From b20647981de742970c358ec121b7581c76ac6aff Mon Sep 17 00:00:00 2001 From: Konstantin Osipov Date: Sun, 3 Apr 2016 15:44:12 +0300 Subject: [PATCH 001/286] Update repo URLs --- centos/Dockerfile | 2 +- debian/Dockerfile | 4 ++-- fedora/Dockerfile | 2 +- ubuntu/Dockerfile | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/centos/Dockerfile b/centos/Dockerfile index 74c8cb4..9d0eeb6 100644 --- a/centos/Dockerfile +++ b/centos/Dockerfile @@ -4,7 +4,7 @@ FROM centos RUN touch /etc/yum.repos.d/tarantool.repo RUN echo '[tarantool]' >> /etc/yum.repos.d/tarantool.repo RUN echo 'name=Centos-$releasever - Tarantool' >> /etc/yum.repos.d/tarantool.repo -RUN echo 'baseurl=http://tarantool.org/dist/master/centos/$releasever/os/$basearch/' >> /etc/yum.repos.d/tarantool.repo +RUN echo 'baseurl=http://tarantool.org/dist/1.6/centos/$releasever/os/$basearch/' >> /etc/yum.repos.d/tarantool.repo RUN echo 'enabled=1' >> /etc/yum.repos.d/tarantool.repo RUN echo 'gpgcheck=0' >> /etc/yum.repos.d/tarantool.repo diff --git a/debian/Dockerfile b/debian/Dockerfile index fb59fc9..0199c82 100644 --- a/debian/Dockerfile +++ b/debian/Dockerfile @@ -2,8 +2,8 @@ FROM debian:jessie # Add tarantool repo RUN touch /etc/apt/sources.list.d/tarantool.list -RUN echo 'deb http://tarantool.org/dist/master/debian/ jessie main' >> /etc/apt/sources.list.d/tarantool.list -RUN echo 'deb-src http://tarantool.org/dist/master/debian/ jessie main' >> /etc/apt/sources.list.d/tarantool.list +RUN echo 'deb http://tarantool.org/dist/1.6/debian/ jessie main' >> /etc/apt/sources.list.d/tarantool.list +RUN echo 'deb-src http://tarantool.org/dist/1.6/debian/ jessie main' >> /etc/apt/sources.list.d/tarantool.list RUN apt-get update diff --git a/fedora/Dockerfile b/fedora/Dockerfile index c2b30bc..3738920 100644 --- a/fedora/Dockerfile +++ b/fedora/Dockerfile @@ -4,7 +4,7 @@ FROM fedora:21 RUN touch /etc/yum.repos.d/tarantool.repo RUN echo '[tarantool]' >> /etc/yum.repos.d/tarantool.repo RUN echo 'name=Centos-$releasever - Tarantool' >> /etc/yum.repos.d/tarantool.repo -RUN echo 'baseurl=http://tarantool.org/dist/master/fedora/$releasever/$basearch/' >> /etc/yum.repos.d/tarantool.repo +RUN echo 'baseurl=http://tarantool.org/dist/1.6/fedora/$releasever/$basearch/' >> /etc/yum.repos.d/tarantool.repo RUN echo 'enabled=1' >> /etc/yum.repos.d/tarantool.repo RUN echo 'gpgcheck=0' >> /etc/yum.repos.d/tarantool.repo diff --git a/ubuntu/Dockerfile b/ubuntu/Dockerfile index 7727ecc..a8a8e9d 100644 --- a/ubuntu/Dockerfile +++ b/ubuntu/Dockerfile @@ -2,8 +2,8 @@ FROM ubuntu:trusty # Add tarantool repo RUN touch /etc/apt/sources.list.d/tarantool.list -RUN echo 'deb http://tarantool.org/dist/master/ubuntu/ trusty main' >> /etc/apt/sources.list.d/tarantool.list -RUN echo 'deb-src http://tarantool.org/dist/master/ubuntu/ trusty main' >> /etc/apt/sources.list.d/tarantool.list +RUN echo 'deb http://tarantool.org/dist/1.6/ubuntu/ trusty main' >> /etc/apt/sources.list.d/tarantool.list +RUN echo 'deb-src http://tarantool.org/dist/1.6/ubuntu/ trusty main' >> /etc/apt/sources.list.d/tarantool.list RUN apt-get update From 4d001841a5964b8dfa2f9dd6d3836417449456e6 Mon Sep 17 00:00:00 2001 From: Sulverus Date: Tue, 10 May 2016 16:25:50 +0300 Subject: [PATCH 002/286] Docker images updated with packagecloud repo --- centos/Dockerfile | 5 ++--- debian/Dockerfile | 11 +++++++---- fedora/Dockerfile | 11 ++++++----- ubuntu/Dockerfile | 10 ++++++---- 4 files changed, 21 insertions(+), 16 deletions(-) diff --git a/centos/Dockerfile b/centos/Dockerfile index 9d0eeb6..a267465 100644 --- a/centos/Dockerfile +++ b/centos/Dockerfile @@ -4,15 +4,14 @@ FROM centos RUN touch /etc/yum.repos.d/tarantool.repo RUN echo '[tarantool]' >> /etc/yum.repos.d/tarantool.repo RUN echo 'name=Centos-$releasever - Tarantool' >> /etc/yum.repos.d/tarantool.repo -RUN echo 'baseurl=http://tarantool.org/dist/1.6/centos/$releasever/os/$basearch/' >> /etc/yum.repos.d/tarantool.repo +RUN echo 'baseurl=http://download.tarantool.org/tarantool/1.6/el/7/\$basearch/' >> /etc/yum.repos.d/tarantool.repo RUN echo 'enabled=1' >> /etc/yum.repos.d/tarantool.repo RUN echo 'gpgcheck=0' >> /etc/yum.repos.d/tarantool.repo # Reconfigure locales for C.UTF-8 RUN yum clean all -RUN yum reinstall -y glibc glibc-common RUN localedef -f UTF-8 -i ru_RU C.UTF-8 EXPOSE 3301 # Install tarantool pack -RUN yum install -y tarantool tarantool-dev tarantool-modules tarantool-expirationd tarantool-queue tarantool-http tarantool-pool tarantool-shard +RUN yum install -y tarantool tarantool-devel tarantool-expirationd tarantool-queue tarantool-http tarantool-pool tarantool-shard tarantool-connpool diff --git a/debian/Dockerfile b/debian/Dockerfile index 0199c82..e94b87a 100644 --- a/debian/Dockerfile +++ b/debian/Dockerfile @@ -1,11 +1,14 @@ FROM debian:jessie +RUN apt-get update # Add tarantool repo RUN touch /etc/apt/sources.list.d/tarantool.list -RUN echo 'deb http://tarantool.org/dist/1.6/debian/ jessie main' >> /etc/apt/sources.list.d/tarantool.list -RUN echo 'deb-src http://tarantool.org/dist/1.6/debian/ jessie main' >> /etc/apt/sources.list.d/tarantool.list +RUN echo 'deb http://download.tarantool.org/tarantool/1.6/debian/ jessie main' >> /etc/apt/sources.list.d/tarantool.list +RUN echo 'deb-src http://download.tarantool.org/tarantool/1.6/debian/ jessie main' >> /etc/apt/sources.list.d/tarantool.list -RUN apt-get update +# Add GPG key +RUN apt-get install -y curl && curl http://download.tarantool.org/tarantool/1.6/gpgkey | apt-key add - +RUN apt-get install -y apt-transport-https && apt-get update # Install locales RUN apt-get install -y locales @@ -20,4 +23,4 @@ ENV LANGUAGE en_US.UTF-8 EXPOSE 3301 # Install tarantool pack -RUN apt-get install -y --force-yes tarantool tarantool-dev tarantool-expirationd tarantool-queue tarantool-http tarantool-pool tarantool-shard +RUN apt-get install -y --force-yes tarantool tarantool-dev tarantool-expirationd tarantool-queue tarantool-http tarantool-connpool tarantool-shard diff --git a/fedora/Dockerfile b/fedora/Dockerfile index 3738920..29b32e9 100644 --- a/fedora/Dockerfile +++ b/fedora/Dockerfile @@ -2,11 +2,12 @@ FROM fedora:21 # Add tarantool repo RUN touch /etc/yum.repos.d/tarantool.repo -RUN echo '[tarantool]' >> /etc/yum.repos.d/tarantool.repo -RUN echo 'name=Centos-$releasever - Tarantool' >> /etc/yum.repos.d/tarantool.repo -RUN echo 'baseurl=http://tarantool.org/dist/1.6/fedora/$releasever/$basearch/' >> /etc/yum.repos.d/tarantool.repo -RUN echo 'enabled=1' >> /etc/yum.repos.d/tarantool.repo +RUN echo '[tarantool_1_6]' >> /etc/yum.repos.d/tarantool.repo +RUN echo 'name=Fedora-\$releasever - Tarantool' >> /etc/yum.repos.d/tarantool.repo +RUN echo 'baseurl=http://download.tarantool.org/tarantool/1.6/fedora/22/\$basearch/' >> /etc/yum.repos.d/tarantool.repo +RUN echo 'repo_gpgcheck=0' >> /etc/yum.repos.d/tarantool.repo RUN echo 'gpgcheck=0' >> /etc/yum.repos.d/tarantool.repo +RUN echo 'enabled=1' >> /etc/yum.repos.d/tarantool.repo # Add locale RUN localedef -f UTF-8 -i ru_RU C.UTF-8 @@ -14,4 +15,4 @@ RUN localedef -f UTF-8 -i ru_RU C.UTF-8 EXPOSE 3301 # Install tarantool pack RUN yum clean all -RUN yum install -y tarantool tarantool-dev tarantool-modules tarantool-expirationd tarantool-queue tarantool-http tarantool-pool tarantool-shard +RUN yum install -y tarantool tarantool-devel tarantool-expirationd tarantool-queue tarantool-http tarantool-connpool tarantool-shard diff --git a/ubuntu/Dockerfile b/ubuntu/Dockerfile index a8a8e9d..6d02088 100644 --- a/ubuntu/Dockerfile +++ b/ubuntu/Dockerfile @@ -2,14 +2,16 @@ FROM ubuntu:trusty # Add tarantool repo RUN touch /etc/apt/sources.list.d/tarantool.list -RUN echo 'deb http://tarantool.org/dist/1.6/ubuntu/ trusty main' >> /etc/apt/sources.list.d/tarantool.list -RUN echo 'deb-src http://tarantool.org/dist/1.6/ubuntu/ trusty main' >> /etc/apt/sources.list.d/tarantool.list +RUN echo 'deb http://download.tarantool.org/tarantool/1.6/ubuntu/ trusty main' >> /etc/apt/sources.list.d/tarantool.list +RUN echo 'deb-src http://download.tarantool.org/tarantool/1.6/ubuntu/ trusty main' >> /etc/apt/sources.list.d/tarantool.list -RUN apt-get update +# Add GPG key +RUN apt-get install -y apt-transport-https && apt-get update +RUN apt-get install -y curl && curl http://download.tarantool.org/tarantool/1.6/gpgkey | sudo apt-key add - # Install locales ENV LC_ALL C.UTF-8 EXPOSE 3301 # Install tarantool pack -RUN apt-get install -y --force-yes tarantool tarantool-dev tarantool-expirationd tarantool-queue tarantool-http tarantool-pool tarantool-shard +RUN apt-get install -y --force-yes tarantool tarantool-dev tarantool-expirationd tarantool-queue tarantool-http tarantool-connpool tarantool-shard From a601ea49a96e09512d8f6c5f1a747812372fd253 Mon Sep 17 00:00:00 2001 From: Sulverus Date: Tue, 10 May 2016 16:46:09 +0300 Subject: [PATCH 003/286] pt-transport-https fix for ubuntu --- ubuntu/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/ubuntu/Dockerfile b/ubuntu/Dockerfile index 6d02088..22eae50 100644 --- a/ubuntu/Dockerfile +++ b/ubuntu/Dockerfile @@ -1,4 +1,5 @@ FROM ubuntu:trusty +RUN apt-get update # Add tarantool repo RUN touch /etc/apt/sources.list.d/tarantool.list From 2a0ae14bd9d73659a5a710660205b14839a3265e Mon Sep 17 00:00:00 2001 From: Sulverus Date: Tue, 10 May 2016 17:55:23 +0300 Subject: [PATCH 004/286] Docker images updated with new tarantool modules --- centos/Dockerfile | 2 +- debian/Dockerfile | 2 +- fedora/Dockerfile | 2 +- ubuntu/Dockerfile | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/centos/Dockerfile b/centos/Dockerfile index a267465..55024ec 100644 --- a/centos/Dockerfile +++ b/centos/Dockerfile @@ -14,4 +14,4 @@ RUN localedef -f UTF-8 -i ru_RU C.UTF-8 EXPOSE 3301 # Install tarantool pack -RUN yum install -y tarantool tarantool-devel tarantool-expirationd tarantool-queue tarantool-http tarantool-pool tarantool-shard tarantool-connpool +RUN yum install -y tarantool tarantool-devel tarantool-expirationd tarantool-queue tarantool-http tarantool-pool tarantool-shard tarantool-connpool tarantool-cbench tarantool-avro tarantool-pg tarantool-mysql tarantool-memcached diff --git a/debian/Dockerfile b/debian/Dockerfile index e94b87a..9f96a30 100644 --- a/debian/Dockerfile +++ b/debian/Dockerfile @@ -23,4 +23,4 @@ ENV LANGUAGE en_US.UTF-8 EXPOSE 3301 # Install tarantool pack -RUN apt-get install -y --force-yes tarantool tarantool-dev tarantool-expirationd tarantool-queue tarantool-http tarantool-connpool tarantool-shard +RUN apt-get install -y --force-yes tarantool tarantool-dev tarantool-expirationd tarantool-queue tarantool-http tarantool-connpool tarantool-shard tarantool-cbench tarantool-avro tarantool-pg tarantool-mysql tarantool-memcached diff --git a/fedora/Dockerfile b/fedora/Dockerfile index 29b32e9..9eb5115 100644 --- a/fedora/Dockerfile +++ b/fedora/Dockerfile @@ -15,4 +15,4 @@ RUN localedef -f UTF-8 -i ru_RU C.UTF-8 EXPOSE 3301 # Install tarantool pack RUN yum clean all -RUN yum install -y tarantool tarantool-devel tarantool-expirationd tarantool-queue tarantool-http tarantool-connpool tarantool-shard +RUN yum install -y tarantool tarantool-devel tarantool-expirationd tarantool-queue tarantool-http tarantool-connpool tarantool-shard tarantool-cbench tarantool-pg tarantool-mysql tarantool-memcached diff --git a/ubuntu/Dockerfile b/ubuntu/Dockerfile index 22eae50..a0c261e 100644 --- a/ubuntu/Dockerfile +++ b/ubuntu/Dockerfile @@ -15,4 +15,4 @@ ENV LC_ALL C.UTF-8 EXPOSE 3301 # Install tarantool pack -RUN apt-get install -y --force-yes tarantool tarantool-dev tarantool-expirationd tarantool-queue tarantool-http tarantool-connpool tarantool-shard +RUN apt-get install -y --force-yes tarantool tarantool-dev tarantool-expirationd tarantool-queue tarantool-http tarantool-connpool tarantool-shard tarantool-cbench tarantool-avro tarantool-pg tarantool-mysql tarantool-memcached From e7509c772908dbe952ca80da5182aa201ea22d6d Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Fri, 27 May 2016 17:55:25 +0300 Subject: [PATCH 005/286] Remove existing Dockerfiles --- centos/Dockerfile | 17 ----------------- debian/Dockerfile | 26 -------------------------- fedora/Dockerfile | 18 ------------------ ubuntu/Dockerfile | 18 ------------------ 4 files changed, 79 deletions(-) delete mode 100644 centos/Dockerfile delete mode 100644 debian/Dockerfile delete mode 100644 fedora/Dockerfile delete mode 100644 ubuntu/Dockerfile diff --git a/centos/Dockerfile b/centos/Dockerfile deleted file mode 100644 index 55024ec..0000000 --- a/centos/Dockerfile +++ /dev/null @@ -1,17 +0,0 @@ -FROM centos - -#Add tarantool repo -RUN touch /etc/yum.repos.d/tarantool.repo -RUN echo '[tarantool]' >> /etc/yum.repos.d/tarantool.repo -RUN echo 'name=Centos-$releasever - Tarantool' >> /etc/yum.repos.d/tarantool.repo -RUN echo 'baseurl=http://download.tarantool.org/tarantool/1.6/el/7/\$basearch/' >> /etc/yum.repos.d/tarantool.repo -RUN echo 'enabled=1' >> /etc/yum.repos.d/tarantool.repo -RUN echo 'gpgcheck=0' >> /etc/yum.repos.d/tarantool.repo - -# Reconfigure locales for C.UTF-8 -RUN yum clean all -RUN localedef -f UTF-8 -i ru_RU C.UTF-8 - -EXPOSE 3301 -# Install tarantool pack -RUN yum install -y tarantool tarantool-devel tarantool-expirationd tarantool-queue tarantool-http tarantool-pool tarantool-shard tarantool-connpool tarantool-cbench tarantool-avro tarantool-pg tarantool-mysql tarantool-memcached diff --git a/debian/Dockerfile b/debian/Dockerfile deleted file mode 100644 index 9f96a30..0000000 --- a/debian/Dockerfile +++ /dev/null @@ -1,26 +0,0 @@ -FROM debian:jessie -RUN apt-get update - -# Add tarantool repo -RUN touch /etc/apt/sources.list.d/tarantool.list -RUN echo 'deb http://download.tarantool.org/tarantool/1.6/debian/ jessie main' >> /etc/apt/sources.list.d/tarantool.list -RUN echo 'deb-src http://download.tarantool.org/tarantool/1.6/debian/ jessie main' >> /etc/apt/sources.list.d/tarantool.list - -# Add GPG key -RUN apt-get install -y curl && curl http://download.tarantool.org/tarantool/1.6/gpgkey | apt-key add - -RUN apt-get install -y apt-transport-https && apt-get update - -# Install locales -RUN apt-get install -y locales -RUN dpkg-reconfigure locales && \ - locale-gen C.UTF-8 && \ - /usr/sbin/update-locale LANG=C.UTF-8 -RUN echo 'en_US.UTF-8 UTF-8' >> /etc/locale.gen && \ - locale-gen -ENV LC_ALL C.UTF-8 -ENV LANG en_US.UTF-8 -ENV LANGUAGE en_US.UTF-8 - -EXPOSE 3301 -# Install tarantool pack -RUN apt-get install -y --force-yes tarantool tarantool-dev tarantool-expirationd tarantool-queue tarantool-http tarantool-connpool tarantool-shard tarantool-cbench tarantool-avro tarantool-pg tarantool-mysql tarantool-memcached diff --git a/fedora/Dockerfile b/fedora/Dockerfile deleted file mode 100644 index 9eb5115..0000000 --- a/fedora/Dockerfile +++ /dev/null @@ -1,18 +0,0 @@ -FROM fedora:21 - -# Add tarantool repo -RUN touch /etc/yum.repos.d/tarantool.repo -RUN echo '[tarantool_1_6]' >> /etc/yum.repos.d/tarantool.repo -RUN echo 'name=Fedora-\$releasever - Tarantool' >> /etc/yum.repos.d/tarantool.repo -RUN echo 'baseurl=http://download.tarantool.org/tarantool/1.6/fedora/22/\$basearch/' >> /etc/yum.repos.d/tarantool.repo -RUN echo 'repo_gpgcheck=0' >> /etc/yum.repos.d/tarantool.repo -RUN echo 'gpgcheck=0' >> /etc/yum.repos.d/tarantool.repo -RUN echo 'enabled=1' >> /etc/yum.repos.d/tarantool.repo - -# Add locale -RUN localedef -f UTF-8 -i ru_RU C.UTF-8 - -EXPOSE 3301 -# Install tarantool pack -RUN yum clean all -RUN yum install -y tarantool tarantool-devel tarantool-expirationd tarantool-queue tarantool-http tarantool-connpool tarantool-shard tarantool-cbench tarantool-pg tarantool-mysql tarantool-memcached diff --git a/ubuntu/Dockerfile b/ubuntu/Dockerfile deleted file mode 100644 index a0c261e..0000000 --- a/ubuntu/Dockerfile +++ /dev/null @@ -1,18 +0,0 @@ -FROM ubuntu:trusty -RUN apt-get update - -# Add tarantool repo -RUN touch /etc/apt/sources.list.d/tarantool.list -RUN echo 'deb http://download.tarantool.org/tarantool/1.6/ubuntu/ trusty main' >> /etc/apt/sources.list.d/tarantool.list -RUN echo 'deb-src http://download.tarantool.org/tarantool/1.6/ubuntu/ trusty main' >> /etc/apt/sources.list.d/tarantool.list - -# Add GPG key -RUN apt-get install -y apt-transport-https && apt-get update -RUN apt-get install -y curl && curl http://download.tarantool.org/tarantool/1.6/gpgkey | sudo apt-key add - - -# Install locales -ENV LC_ALL C.UTF-8 - -EXPOSE 3301 -# Install tarantool pack -RUN apt-get install -y --force-yes tarantool tarantool-dev tarantool-expirationd tarantool-queue tarantool-http tarantool-connpool tarantool-shard tarantool-cbench tarantool-avro tarantool-pg tarantool-mysql tarantool-memcached From ba00a6397c0c55a752877c92a47e438bc263a098 Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Fri, 27 May 2016 17:55:48 +0300 Subject: [PATCH 006/286] Add Dockerfiles based on Alpine Linux --- 1.6/Dockerfile | 55 +++++++++++++++++++++++++++++++++++++ 1.6/docker-entrypoint.sh | 16 +++++++++++ 1.7/Dockerfile | 58 ++++++++++++++++++++++++++++++++++++++++ 1.7/docker-entrypoint.sh | 16 +++++++++++ 4 files changed, 145 insertions(+) create mode 100644 1.6/Dockerfile create mode 100755 1.6/docker-entrypoint.sh create mode 100644 1.7/Dockerfile create mode 100755 1.7/docker-entrypoint.sh diff --git a/1.6/Dockerfile b/1.6/Dockerfile new file mode 100644 index 0000000..47c92bc --- /dev/null +++ b/1.6/Dockerfile @@ -0,0 +1,55 @@ +FROM alpine:3.3 + +# add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added +RUN addgroup -S tarantool && adduser -S -G tarantool tarantool + +# grab su-exec for easy step-down from root +RUN apk add --no-cache 'su-exec>=0.2' + +ENV TARANTOOL_VERSION 1.6.8.525 +ENV TARANTOOL_DOWNLOAD_URL https://github.com/tarantool/tarantool/releases/download/1.6.8.525/tarantool-1.6.8.525.tar.gz +ENV TARANTOOL_DOWNLOAD_SHA1 7b451b8898b3022f37efba461048321f978b8587 + +RUN set -x \ + && apk add --no-cache --virtual .run-deps \ + libstdc++ \ + readline \ + openssl \ + yaml \ + lz4 \ + binutils \ + ncurses \ + libgomp \ + && apk add --no-cache --virtual .build-deps \ + gcc \ + g++ \ + cmake \ + make \ + tar \ + readline-dev \ + openssl-dev \ + yaml-dev \ + lz4-dev \ + binutils-dev \ + ncurses-dev \ + && wget -O tarantool.tar.gz "$TARANTOOL_DOWNLOAD_URL" \ + && echo "$TARANTOOL_DOWNLOAD_SHA1 *tarantool.tar.gz" | sha1sum -c - \ + && mkdir -p /usr/src/tarantool \ + && tar -xzf tarantool.tar.gz -C /usr/src/tarantool --strip-components=1 \ + && rm tarantool.tar.gz \ + && (cd /usr/src/tarantool; cmake .) \ + && make -C /usr/src/tarantool \ + && make -C /usr/src/tarantool install \ + && rm -r /usr/src/tarantool \ + && apk del .build-deps + +RUN mkdir /data && chown tarantool:tarantool /data +VOLUME /data +WORKDIR /data + +COPY docker-entrypoint.sh /usr/local/bin/ +RUN ln -s usr/local/bin/docker-entrypoint.sh /entrypoint.sh # backwards compat +ENTRYPOINT ["docker-entrypoint.sh"] + +EXPOSE 3301 +CMD [ "tarantool" ] diff --git a/1.6/docker-entrypoint.sh b/1.6/docker-entrypoint.sh new file mode 100755 index 0000000..b195f91 --- /dev/null +++ b/1.6/docker-entrypoint.sh @@ -0,0 +1,16 @@ +#!/bin/sh +set -e + +# first arg is `-f` or `--some-option` +# or first arg is `something.conf` +if [ "${1:0:1}" = '-' ]; then + set -- tarantool "$@" +fi + +# allow the container to be started with `--user` +if [ "$1" = 'tarantool' -a "$(id -u)" = '0' ]; then + chown -R tarantool /var/lib/tarantool + exec su-exec tarantool "$0" "$@" +fi + +exec "$@" diff --git a/1.7/Dockerfile b/1.7/Dockerfile new file mode 100644 index 0000000..d11d923 --- /dev/null +++ b/1.7/Dockerfile @@ -0,0 +1,58 @@ +FROM alpine:3.3 + +# add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added +RUN addgroup -S tarantool && adduser -S -G tarantool tarantool + +# grab su-exec for easy step-down from root +RUN apk add --no-cache 'su-exec>=0.2' + +ENV TARANTOOL_VERSION 1.7 +ENV TARANTOOL_DOWNLOAD_URL https://github.com/tarantool/tarantool.git +ENV TARANTOOL_COMMIT f6e6918 + +RUN set -x \ + && apk add --no-cache --virtual .run-deps \ + libstdc++ \ + readline \ + openssl \ + yaml \ + lz4 \ + binutils \ + ncurses \ + libgomp \ + && apk add --no-cache --virtual .build-deps \ + git \ + perl \ + gcc \ + g++ \ + cmake \ + make \ + tar \ + readline-dev \ + openssl-dev \ + yaml-dev \ + lz4-dev \ + binutils-dev \ + ncurses-dev \ + libc-dev \ + && mkdir -p /usr/src/tarantool \ + && git clone $TARANTOOL_DOWNLOAD_URL /usr/src/tarantool \ + && git -C /usr/src/tarantool checkout $TARANTOOL_COMMIT \ + && git -C /usr/src/tarantool submodule update \ + && echo "$TARANTOOL_VERSION" > /usr/src/tarantool/VERSION \ + && (cd /usr/src/tarantool; cmake .) \ + && make -C /usr/src/tarantool \ + && make -C /usr/src/tarantool install \ + && rm -r /usr/src/tarantool \ + && apk del .build-deps + +RUN mkdir /data && chown tarantool:tarantool /data +VOLUME /var/lib/tarantool +WORKDIR /var/lib/tarantool + +COPY docker-entrypoint.sh /usr/local/bin/ +RUN ln -s usr/local/bin/docker-entrypoint.sh /entrypoint.sh # backwards compat +ENTRYPOINT ["docker-entrypoint.sh"] + +EXPOSE 3301 +CMD [ "tarantool" ] diff --git a/1.7/docker-entrypoint.sh b/1.7/docker-entrypoint.sh new file mode 100755 index 0000000..b195f91 --- /dev/null +++ b/1.7/docker-entrypoint.sh @@ -0,0 +1,16 @@ +#!/bin/sh +set -e + +# first arg is `-f` or `--some-option` +# or first arg is `something.conf` +if [ "${1:0:1}" = '-' ]; then + set -- tarantool "$@" +fi + +# allow the container to be started with `--user` +if [ "$1" = 'tarantool' -a "$(id -u)" = '0' ]; then + chown -R tarantool /var/lib/tarantool + exec su-exec tarantool "$0" "$@" +fi + +exec "$@" From de11c71ce44041a48600296fefbb799fc61a0975 Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Thu, 2 Jun 2016 16:36:16 +0300 Subject: [PATCH 007/286] A wrapper to call box.cfg and set admin password --- 1.6/Dockerfile | 12 ++++++++--- 1.6/docker-entrypoint.sh | 6 ++++++ 1.6/tarantool-entrypoint.lua | 42 ++++++++++++++++++++++++++++++++++++ 1.7/Dockerfile | 10 +++++++-- 1.7/docker-entrypoint.sh | 6 ++++++ 1.7/tarantool-entrypoint.lua | 42 ++++++++++++++++++++++++++++++++++++ 6 files changed, 113 insertions(+), 5 deletions(-) create mode 100755 1.6/tarantool-entrypoint.lua create mode 100755 1.7/tarantool-entrypoint.lua diff --git a/1.6/Dockerfile b/1.6/Dockerfile index 47c92bc..9363683 100644 --- a/1.6/Dockerfile +++ b/1.6/Dockerfile @@ -43,10 +43,16 @@ RUN set -x \ && rm -r /usr/src/tarantool \ && apk del .build-deps -RUN mkdir /data && chown tarantool:tarantool /data -VOLUME /data -WORKDIR /data +RUN mkdir -p /var/lib/tarantool \ + && chown tarantool:tarantool /var/lib/tarantool \ + && mkdir -p /opt/tarantool \ + && chown tarantool:tarantool /opt/tarantool +VOLUME /var/lib/tarantool +VOLUME /opt/tarantool +WORKDIR /opt/tarantool + +COPY tarantool-entrypoint.lua /usr/local/bin/ COPY docker-entrypoint.sh /usr/local/bin/ RUN ln -s usr/local/bin/docker-entrypoint.sh /entrypoint.sh # backwards compat ENTRYPOINT ["docker-entrypoint.sh"] diff --git a/1.6/docker-entrypoint.sh b/1.6/docker-entrypoint.sh index b195f91..3a9f5e4 100755 --- a/1.6/docker-entrypoint.sh +++ b/1.6/docker-entrypoint.sh @@ -13,4 +13,10 @@ if [ "$1" = 'tarantool' -a "$(id -u)" = '0' ]; then exec su-exec tarantool "$0" "$@" fi +# entry point wraps the passed script to do basic setup +if [ "$1" = 'tarantool' ]; then + shift + exec tarantool "/usr/local/bin/tarantool-entrypoint.lua" "$@" +fi + exec "$@" diff --git a/1.6/tarantool-entrypoint.lua b/1.6/tarantool-entrypoint.lua new file mode 100755 index 0000000..3c2208b --- /dev/null +++ b/1.6/tarantool-entrypoint.lua @@ -0,0 +1,42 @@ +#!/usr/bin/env tarantool + +local slab_alloc_arena = os.getenv('TARANTOOL_SLAB_ALLOC_ARENA') +local admin_password = os.getenv('TARANTOOL_ADMIN_PASSWORD') +local listen_port = tonumber(os.getenv('TARANTOOL_PORT')) + +if admin_password == nil then + print("Error: password option is not specified: TARANTOOL_ADMIN_PASSWORD") + os.exit(1) +end + +if listen_port == nil then + listen_port = 3301 +end + +if slab_alloc_arena == nil then + slab_alloc_arena = 0.5 +end + +box.cfg { + slab_alloc_arena = slab_alloc_arena; + wal_mode = 'write'; + listen = listen_port; + work_dir = '/var/lib/tarantool'; +} + +box.schema.user.passwd("admin", admin_password) + +-- re-run the script passed as parameter with all arguments that follow +execute_script = arg[1] +if execute_script ~= nil then + narg = 0 + while true do + arg[narg] = arg[narg + 1] + if arg[narg] == nil then + break + end + narg = narg + 1 + end + + dofile(execute_script) +end diff --git a/1.7/Dockerfile b/1.7/Dockerfile index d11d923..734d6d4 100644 --- a/1.7/Dockerfile +++ b/1.7/Dockerfile @@ -46,10 +46,16 @@ RUN set -x \ && rm -r /usr/src/tarantool \ && apk del .build-deps -RUN mkdir /data && chown tarantool:tarantool /data +RUN mkdir -p /var/lib/tarantool \ + && chown tarantool:tarantool /var/lib/tarantool \ + && mkdir -p /opt/tarantool \ + && chown tarantool:tarantool /opt/tarantool + VOLUME /var/lib/tarantool -WORKDIR /var/lib/tarantool +VOLUME /opt/tarantool +WORKDIR /opt/tarantool +COPY tarantool-entrypoint.lua /usr/local/bin/ COPY docker-entrypoint.sh /usr/local/bin/ RUN ln -s usr/local/bin/docker-entrypoint.sh /entrypoint.sh # backwards compat ENTRYPOINT ["docker-entrypoint.sh"] diff --git a/1.7/docker-entrypoint.sh b/1.7/docker-entrypoint.sh index b195f91..3a9f5e4 100755 --- a/1.7/docker-entrypoint.sh +++ b/1.7/docker-entrypoint.sh @@ -13,4 +13,10 @@ if [ "$1" = 'tarantool' -a "$(id -u)" = '0' ]; then exec su-exec tarantool "$0" "$@" fi +# entry point wraps the passed script to do basic setup +if [ "$1" = 'tarantool' ]; then + shift + exec tarantool "/usr/local/bin/tarantool-entrypoint.lua" "$@" +fi + exec "$@" diff --git a/1.7/tarantool-entrypoint.lua b/1.7/tarantool-entrypoint.lua new file mode 100755 index 0000000..3c2208b --- /dev/null +++ b/1.7/tarantool-entrypoint.lua @@ -0,0 +1,42 @@ +#!/usr/bin/env tarantool + +local slab_alloc_arena = os.getenv('TARANTOOL_SLAB_ALLOC_ARENA') +local admin_password = os.getenv('TARANTOOL_ADMIN_PASSWORD') +local listen_port = tonumber(os.getenv('TARANTOOL_PORT')) + +if admin_password == nil then + print("Error: password option is not specified: TARANTOOL_ADMIN_PASSWORD") + os.exit(1) +end + +if listen_port == nil then + listen_port = 3301 +end + +if slab_alloc_arena == nil then + slab_alloc_arena = 0.5 +end + +box.cfg { + slab_alloc_arena = slab_alloc_arena; + wal_mode = 'write'; + listen = listen_port; + work_dir = '/var/lib/tarantool'; +} + +box.schema.user.passwd("admin", admin_password) + +-- re-run the script passed as parameter with all arguments that follow +execute_script = arg[1] +if execute_script ~= nil then + narg = 0 + while true do + arg[narg] = arg[narg + 1] + if arg[narg] == nil then + break + end + narg = narg + 1 + end + + dofile(execute_script) +end From e0fdc6e41d3bed7609418448c4ec049bdd3b0e3b Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Thu, 2 Jun 2016 16:42:45 +0300 Subject: [PATCH 008/286] Read slab options from environment variables --- 1.6/tarantool-entrypoint.lua | 18 ++++++++++++++++++ 1.7/tarantool-entrypoint.lua | 18 ++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/1.6/tarantool-entrypoint.lua b/1.6/tarantool-entrypoint.lua index 3c2208b..12bc43d 100755 --- a/1.6/tarantool-entrypoint.lua +++ b/1.6/tarantool-entrypoint.lua @@ -1,6 +1,9 @@ #!/usr/bin/env tarantool local slab_alloc_arena = os.getenv('TARANTOOL_SLAB_ALLOC_ARENA') +local slab_alloc_factor = os.getenv('TARANTOOL_SLAB_ALLOC_FACTOR') +local slab_alloc_maximal = os.getenv('TARANTOOL_SLAB_ALLOC_MAXIMAL') +local slab_alloc_minimal = os.getenv('TARANTOOL_SLAB_ALLOC_MINIMAL') local admin_password = os.getenv('TARANTOOL_ADMIN_PASSWORD') local listen_port = tonumber(os.getenv('TARANTOOL_PORT')) @@ -17,8 +20,23 @@ if slab_alloc_arena == nil then slab_alloc_arena = 0.5 end +if slab_alloc_factor == nil then + slab_alloc_factor = 1.1 +end + +if slab_alloc_maximal == nil then + slab_alloc_maximal = 1048576 +end + +if slab_alloc_minimal == nil then + slab_alloc_minimal = 16 +end + box.cfg { slab_alloc_arena = slab_alloc_arena; + slab_alloc_factor = slab_alloc_factor; + slab_alloc_maximal = slab_alloc_maximal; + slab_alloc_minimal = slab_alloc_minimal; wal_mode = 'write'; listen = listen_port; work_dir = '/var/lib/tarantool'; diff --git a/1.7/tarantool-entrypoint.lua b/1.7/tarantool-entrypoint.lua index 3c2208b..12bc43d 100755 --- a/1.7/tarantool-entrypoint.lua +++ b/1.7/tarantool-entrypoint.lua @@ -1,6 +1,9 @@ #!/usr/bin/env tarantool local slab_alloc_arena = os.getenv('TARANTOOL_SLAB_ALLOC_ARENA') +local slab_alloc_factor = os.getenv('TARANTOOL_SLAB_ALLOC_FACTOR') +local slab_alloc_maximal = os.getenv('TARANTOOL_SLAB_ALLOC_MAXIMAL') +local slab_alloc_minimal = os.getenv('TARANTOOL_SLAB_ALLOC_MINIMAL') local admin_password = os.getenv('TARANTOOL_ADMIN_PASSWORD') local listen_port = tonumber(os.getenv('TARANTOOL_PORT')) @@ -17,8 +20,23 @@ if slab_alloc_arena == nil then slab_alloc_arena = 0.5 end +if slab_alloc_factor == nil then + slab_alloc_factor = 1.1 +end + +if slab_alloc_maximal == nil then + slab_alloc_maximal = 1048576 +end + +if slab_alloc_minimal == nil then + slab_alloc_minimal = 16 +end + box.cfg { slab_alloc_arena = slab_alloc_arena; + slab_alloc_factor = slab_alloc_factor; + slab_alloc_maximal = slab_alloc_maximal; + slab_alloc_minimal = slab_alloc_minimal; wal_mode = 'write'; listen = listen_port; work_dir = '/var/lib/tarantool'; From 0ecb16a66234f06298479b02fc95454fed55a487 Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Thu, 2 Jun 2016 19:56:48 +0300 Subject: [PATCH 009/286] Permit empty admin password, but warn the user --- 1.6/tarantool-entrypoint.lua | 15 +++++++++++++-- 1.7/tarantool-entrypoint.lua | 15 +++++++++++++-- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/1.6/tarantool-entrypoint.lua b/1.6/tarantool-entrypoint.lua index 12bc43d..67d3f09 100755 --- a/1.6/tarantool-entrypoint.lua +++ b/1.6/tarantool-entrypoint.lua @@ -8,8 +8,19 @@ local admin_password = os.getenv('TARANTOOL_ADMIN_PASSWORD') local listen_port = tonumber(os.getenv('TARANTOOL_PORT')) if admin_password == nil then - print("Error: password option is not specified: TARANTOOL_ADMIN_PASSWORD") - os.exit(1) + admin_password = "" + + warn_str = [[**************************************************** +WARNING: No password has been set for the database. + This will allow anyone with access to the + Tarantool port to access your database. In + Docker's default configuration, this is + effectively any other container on the same + system. + Use "-e TARANTOOL_ADMIN_PASSWORD=password" + to set it in "docker run". +****************************************************]] + print(warn_str) end if listen_port == nil then diff --git a/1.7/tarantool-entrypoint.lua b/1.7/tarantool-entrypoint.lua index 12bc43d..67d3f09 100755 --- a/1.7/tarantool-entrypoint.lua +++ b/1.7/tarantool-entrypoint.lua @@ -8,8 +8,19 @@ local admin_password = os.getenv('TARANTOOL_ADMIN_PASSWORD') local listen_port = tonumber(os.getenv('TARANTOOL_PORT')) if admin_password == nil then - print("Error: password option is not specified: TARANTOOL_ADMIN_PASSWORD") - os.exit(1) + admin_password = "" + + warn_str = [[**************************************************** +WARNING: No password has been set for the database. + This will allow anyone with access to the + Tarantool port to access your database. In + Docker's default configuration, this is + effectively any other container on the same + system. + Use "-e TARANTOOL_ADMIN_PASSWORD=password" + to set it in "docker run". +****************************************************]] + print(warn_str) end if listen_port == nil then From 700552d0e4ca12f22ecfeb086c8f764988d74bbb Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Thu, 2 Jun 2016 19:59:16 +0300 Subject: [PATCH 010/286] Configure replication source via env variables --- 1.6/tarantool-entrypoint.lua | 10 ++++++++++ 1.7/tarantool-entrypoint.lua | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/1.6/tarantool-entrypoint.lua b/1.6/tarantool-entrypoint.lua index 67d3f09..4adeb14 100755 --- a/1.6/tarantool-entrypoint.lua +++ b/1.6/tarantool-entrypoint.lua @@ -6,6 +6,7 @@ local slab_alloc_maximal = os.getenv('TARANTOOL_SLAB_ALLOC_MAXIMAL') local slab_alloc_minimal = os.getenv('TARANTOOL_SLAB_ALLOC_MINIMAL') local admin_password = os.getenv('TARANTOOL_ADMIN_PASSWORD') local listen_port = tonumber(os.getenv('TARANTOOL_PORT')) +local replication_source = os.getenv('TARANTOOL_REPLICATION_SOURCE') if admin_password == nil then admin_password = "" @@ -43,6 +44,14 @@ if slab_alloc_minimal == nil then slab_alloc_minimal = 16 end +replication_source_table = {} +if replication_source ~= nil then + for addr in string.gmatch(replication_source, "[^,]+") do + table.insert(replication_source_table, + "admin:" .. admin_password .. "@" .. addr) + end +end + box.cfg { slab_alloc_arena = slab_alloc_arena; slab_alloc_factor = slab_alloc_factor; @@ -51,6 +60,7 @@ box.cfg { wal_mode = 'write'; listen = listen_port; work_dir = '/var/lib/tarantool'; + replication_source = replication_source_table; } box.schema.user.passwd("admin", admin_password) diff --git a/1.7/tarantool-entrypoint.lua b/1.7/tarantool-entrypoint.lua index 67d3f09..4adeb14 100755 --- a/1.7/tarantool-entrypoint.lua +++ b/1.7/tarantool-entrypoint.lua @@ -6,6 +6,7 @@ local slab_alloc_maximal = os.getenv('TARANTOOL_SLAB_ALLOC_MAXIMAL') local slab_alloc_minimal = os.getenv('TARANTOOL_SLAB_ALLOC_MINIMAL') local admin_password = os.getenv('TARANTOOL_ADMIN_PASSWORD') local listen_port = tonumber(os.getenv('TARANTOOL_PORT')) +local replication_source = os.getenv('TARANTOOL_REPLICATION_SOURCE') if admin_password == nil then admin_password = "" @@ -43,6 +44,14 @@ if slab_alloc_minimal == nil then slab_alloc_minimal = 16 end +replication_source_table = {} +if replication_source ~= nil then + for addr in string.gmatch(replication_source, "[^,]+") do + table.insert(replication_source_table, + "admin:" .. admin_password .. "@" .. addr) + end +end + box.cfg { slab_alloc_arena = slab_alloc_arena; slab_alloc_factor = slab_alloc_factor; @@ -51,6 +60,7 @@ box.cfg { wal_mode = 'write'; listen = listen_port; work_dir = '/var/lib/tarantool'; + replication_source = replication_source_table; } box.schema.user.passwd("admin", admin_password) From 614c1df450872701d0cea3938be15f602916832a Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Thu, 9 Jun 2016 21:44:19 +0300 Subject: [PATCH 011/286] Compile tarantool with sane defaults Also, tune slab_alloc_arena to tarantool default. --- 1.6/Dockerfile | 7 ++++++- 1.6/tarantool-entrypoint.lua | 2 +- 1.7/Dockerfile | 7 ++++++- 1.7/tarantool-entrypoint.lua | 2 +- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/1.6/Dockerfile b/1.6/Dockerfile index 9363683..2e82067 100644 --- a/1.6/Dockerfile +++ b/1.6/Dockerfile @@ -37,7 +37,12 @@ RUN set -x \ && mkdir -p /usr/src/tarantool \ && tar -xzf tarantool.tar.gz -C /usr/src/tarantool --strip-components=1 \ && rm tarantool.tar.gz \ - && (cd /usr/src/tarantool; cmake .) \ + && (cd /usr/src/tarantool; \ + cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo\ + -DENABLE_BUNDLED_LIBYAML:BOOL=OFF\ + -DENABLE_BACKTRACE:BOOL=ON\ + -DENABLE_DIST:BOOL=ON\ + .) \ && make -C /usr/src/tarantool \ && make -C /usr/src/tarantool install \ && rm -r /usr/src/tarantool \ diff --git a/1.6/tarantool-entrypoint.lua b/1.6/tarantool-entrypoint.lua index 4adeb14..2b73028 100755 --- a/1.6/tarantool-entrypoint.lua +++ b/1.6/tarantool-entrypoint.lua @@ -29,7 +29,7 @@ if listen_port == nil then end if slab_alloc_arena == nil then - slab_alloc_arena = 0.5 + slab_alloc_arena = 1.0 end if slab_alloc_factor == nil then diff --git a/1.7/Dockerfile b/1.7/Dockerfile index 734d6d4..64276e3 100644 --- a/1.7/Dockerfile +++ b/1.7/Dockerfile @@ -40,7 +40,12 @@ RUN set -x \ && git -C /usr/src/tarantool checkout $TARANTOOL_COMMIT \ && git -C /usr/src/tarantool submodule update \ && echo "$TARANTOOL_VERSION" > /usr/src/tarantool/VERSION \ - && (cd /usr/src/tarantool; cmake .) \ + && (cd /usr/src/tarantool; \ + cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo\ + -DENABLE_BUNDLED_LIBYAML:BOOL=OFF\ + -DENABLE_BACKTRACE:BOOL=ON\ + -DENABLE_DIST:BOOL=ON\ + .) \ && make -C /usr/src/tarantool \ && make -C /usr/src/tarantool install \ && rm -r /usr/src/tarantool \ diff --git a/1.7/tarantool-entrypoint.lua b/1.7/tarantool-entrypoint.lua index 4adeb14..2b73028 100755 --- a/1.7/tarantool-entrypoint.lua +++ b/1.7/tarantool-entrypoint.lua @@ -29,7 +29,7 @@ if listen_port == nil then end if slab_alloc_arena == nil then - slab_alloc_arena = 0.5 + slab_alloc_arena = 1.0 end if slab_alloc_factor == nil then From f4453ea61dffd8901446bb0859f7ca87fe3ed581 Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Fri, 10 Jun 2016 22:50:06 +0300 Subject: [PATCH 012/286] Add "batteries" to docker containers --- 1.6/Dockerfile | 82 +++++++++++++++++++++++++++++++++++++++++++++++++- 1.7/Dockerfile | 82 +++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 162 insertions(+), 2 deletions(-) diff --git a/1.6/Dockerfile b/1.6/Dockerfile index 2e82067..ecb0ce1 100644 --- a/1.6/Dockerfile +++ b/1.6/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.3 +FROM alpine:3.4 # add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added RUN addgroup -S tarantool && adduser -S -G tarantool tarantool @@ -9,6 +9,7 @@ RUN apk add --no-cache 'su-exec>=0.2' ENV TARANTOOL_VERSION 1.6.8.525 ENV TARANTOOL_DOWNLOAD_URL https://github.com/tarantool/tarantool/releases/download/1.6.8.525/tarantool-1.6.8.525.tar.gz ENV TARANTOOL_DOWNLOAD_SHA1 7b451b8898b3022f37efba461048321f978b8587 +ENV TARANTOOL_INSTALL_LUADIR /usr/local/share/tarantool RUN set -x \ && apk add --no-cache --virtual .run-deps \ @@ -48,6 +49,85 @@ RUN set -x \ && rm -r /usr/src/tarantool \ && apk del .build-deps + +RUN set -x \ + && apk add --no-cache --virtual .run-deps \ + mariadb-client-libs \ + libpq \ + && apk add --no-cache --virtual .build-deps \ + git \ + cmake \ + make \ + gcc \ + g++ \ + postgresql-dev \ + && : "---------- expirationd ----------" \ + && (cd /usr/src; git clone https://github.com/tarantool/expirationd.git) \ + && cp -r /usr/src/expirationd/expirationd.lua $TARANTOOL_INSTALL_LUADIR \ + && rm -rf /usr/src/expirationd \ + && : "---------- queue ----------" \ + && (cd /usr/src; git clone https://github.com/tarantool/queue.git) \ + && mkdir -p $TARANTOOL_INSTALL_LUADIR/queue/abstract/driver \ + && cp -r /usr/src/queue/queue/*.lua $TARANTOOL_INSTALL_LUADIR/queue \ + && cp -r /usr/src/queue/queue/abstract/*.lua $TARANTOOL_INSTALL_LUADIR/queue/abstract \ + && cp -r /usr/src/queue/queue/abstract/driver/*.lua \ + $TARANTOOL_INSTALL_LUADIR/queue/abstract/driver \ + && rm -rf /usr/src/queue \ + && : "---------- http ----------" \ + && (cd /usr/src; git clone https://github.com/tarantool/http.git) \ + && (cd /usr/src/http; cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .) \ + && (cd /usr/src/http; make) \ + && (cd /usr/src/http; make install) \ + && rm -rf /usr/src/http \ + && : "---------- connpool ----------" \ + && (cd /usr/src; git clone https://github.com/tarantool/connpool.git) \ + && cp -r /usr/src/connpool/connpool.lua $TARANTOOL_INSTALL_LUADIR \ + && rm -rf /usr/src/connpool \ + && : "---------- shard ----------" \ + && (cd /usr/src; git clone https://github.com/tarantool/shard.git) \ + && cp -r /usr/src/shard/shard.lua $TARANTOOL_INSTALL_LUADIR \ + && rm -rf /usr/src/shard \ + && : "---------- msgpuck ----------" \ + && (cd /usr/src; git clone https://github.com/tarantool/msgpuck.git) \ + && (cd /usr/src/msgpuck; cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .) \ + && (cd /usr/src/msgpuck; make) \ + && (cd /usr/src/msgpuck; make install) \ + && rm -rf /usr/src/cbench \ + && : "---------- cbench ----------" \ + && (cd /usr/src; git clone https://github.com/tarantool/cbench.git) \ + && (cd /usr/src/cbench; cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .) \ + && (cd /usr/src/cbench; make) \ + && (cd /usr/src/cbench; make install) \ + && rm -rf /usr/src/cbench \ + && : "---------- avro ----------" \ + && (cd /usr/src; git clone https://github.com/tarantool/tarantool-avro.git) \ + && (cd /usr/src/tarantool-avro; cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .) \ + && (cd /usr/src/tarantool-avro; make) \ + && (cd /usr/src/tarantool-avro; make install) \ + && rm -rf /usr/src/tarantool-avro \ + && : "---------- pg ----------" \ + && (cd /usr/src; git clone https://github.com/tarantool/pg.git) \ + && (cd /usr/src/pg; cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .) \ + && (cd /usr/src/pg; make) \ + && (cd /usr/src/pg; make install) \ + && rm -rf /usr/src/pg \ + && : "---------- mysql ----------" \ + && (cd /usr/src; git clone https://github.com/tarantool/mysql.git) \ + && (cd /usr/src/mysql; cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .) \ + && (cd /usr/src/mysql; make) \ + && (cd /usr/src/mysql; make install) \ + && rm -rf /usr/src/mysql \ + && : "---------- memcached ----------" \ + && (cd /usr/src; git clone https://github.com/tarantool/memcached.git) \ + && git -C /usr/src/memcached submodule update --init --recursive \ + && (cd /usr/src/memcached; cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .) \ + && (cd /usr/src/memcached; make) \ + && (cd /usr/src/memcached; make install) \ + && rm -rf /usr/src/memcached \ + && : "---------- remove build deps ----------" \ + && apk del .build-deps + + RUN mkdir -p /var/lib/tarantool \ && chown tarantool:tarantool /var/lib/tarantool \ && mkdir -p /opt/tarantool \ diff --git a/1.7/Dockerfile b/1.7/Dockerfile index 64276e3..f3d6ce2 100644 --- a/1.7/Dockerfile +++ b/1.7/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.3 +FROM alpine:3.4 # add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added RUN addgroup -S tarantool && adduser -S -G tarantool tarantool @@ -9,6 +9,7 @@ RUN apk add --no-cache 'su-exec>=0.2' ENV TARANTOOL_VERSION 1.7 ENV TARANTOOL_DOWNLOAD_URL https://github.com/tarantool/tarantool.git ENV TARANTOOL_COMMIT f6e6918 +ENV TARANTOOL_INSTALL_LUADIR /usr/local/share/tarantool RUN set -x \ && apk add --no-cache --virtual .run-deps \ @@ -51,6 +52,85 @@ RUN set -x \ && rm -r /usr/src/tarantool \ && apk del .build-deps + +RUN set -x \ + && apk add --no-cache --virtual .run-deps \ + mariadb-client-libs \ + libpq \ + && apk add --no-cache --virtual .build-deps \ + git \ + cmake \ + make \ + gcc \ + g++ \ + postgresql-dev \ + && : "---------- expirationd ----------" \ + && (cd /usr/src; git clone https://github.com/tarantool/expirationd.git) \ + && cp -r /usr/src/expirationd/expirationd.lua $TARANTOOL_INSTALL_LUADIR \ + && rm -rf /usr/src/expirationd \ + && : "---------- queue ----------" \ + && (cd /usr/src; git clone https://github.com/tarantool/queue.git) \ + && mkdir -p $TARANTOOL_INSTALL_LUADIR/queue/abstract/driver \ + && cp -r /usr/src/queue/queue/*.lua $TARANTOOL_INSTALL_LUADIR/queue \ + && cp -r /usr/src/queue/queue/abstract/*.lua $TARANTOOL_INSTALL_LUADIR/queue/abstract \ + && cp -r /usr/src/queue/queue/abstract/driver/*.lua \ + $TARANTOOL_INSTALL_LUADIR/queue/abstract/driver \ + && rm -rf /usr/src/queue \ + && : "---------- http ----------" \ + && (cd /usr/src; git clone https://github.com/tarantool/http.git) \ + && (cd /usr/src/http; cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .) \ + && (cd /usr/src/http; make) \ + && (cd /usr/src/http; make install) \ + && rm -rf /usr/src/http \ + && : "---------- connpool ----------" \ + && (cd /usr/src; git clone https://github.com/tarantool/connpool.git) \ + && cp -r /usr/src/connpool/connpool.lua $TARANTOOL_INSTALL_LUADIR \ + && rm -rf /usr/src/connpool \ + && : "---------- shard ----------" \ + && (cd /usr/src; git clone https://github.com/tarantool/shard.git) \ + && cp -r /usr/src/shard/shard.lua $TARANTOOL_INSTALL_LUADIR \ + && rm -rf /usr/src/shard \ + && : "---------- msgpuck ----------" \ + && (cd /usr/src; git clone https://github.com/tarantool/msgpuck.git) \ + && (cd /usr/src/msgpuck; cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .) \ + && (cd /usr/src/msgpuck; make) \ + && (cd /usr/src/msgpuck; make install) \ + && rm -rf /usr/src/cbench \ + && : "---------- cbench ----------" \ + && (cd /usr/src; git clone https://github.com/tarantool/cbench.git) \ + && (cd /usr/src/cbench; cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .) \ + && (cd /usr/src/cbench; make) \ + && (cd /usr/src/cbench; make install) \ + && rm -rf /usr/src/cbench \ + && : "---------- avro ----------" \ + && (cd /usr/src; git clone https://github.com/tarantool/tarantool-avro.git) \ + && (cd /usr/src/tarantool-avro; cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .) \ + && (cd /usr/src/tarantool-avro; make) \ + && (cd /usr/src/tarantool-avro; make install) \ + && rm -rf /usr/src/tarantool-avro \ + && : "---------- pg ----------" \ + && (cd /usr/src; git clone https://github.com/tarantool/pg.git) \ + && (cd /usr/src/pg; cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .) \ + && (cd /usr/src/pg; make) \ + && (cd /usr/src/pg; make install) \ + && rm -rf /usr/src/pg \ + && : "---------- mysql ----------" \ + && (cd /usr/src; git clone https://github.com/tarantool/mysql.git) \ + && (cd /usr/src/mysql; cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .) \ + && (cd /usr/src/mysql; make) \ + && (cd /usr/src/mysql; make install) \ + && rm -rf /usr/src/mysql \ + && : "---------- memcached ----------" \ + && (cd /usr/src; git clone https://github.com/tarantool/memcached.git) \ + && git -C /usr/src/memcached submodule update --init --recursive \ + && (cd /usr/src/memcached; cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .) \ + && (cd /usr/src/memcached; make) \ + && (cd /usr/src/memcached; make install) \ + && rm -rf /usr/src/memcached \ + && : "---------- remove build deps ----------" \ + && apk del .build-deps + + RUN mkdir -p /var/lib/tarantool \ && chown tarantool:tarantool /var/lib/tarantool \ && mkdir -p /opt/tarantool \ From d263a9f11a8bfc92f5987c3bff70dfab4aa77420 Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Wed, 6 Jul 2016 13:22:39 +0300 Subject: [PATCH 013/286] One-time initialization of database --- 1.6/Dockerfile | 32 +++---- 1.6/tarantool-entrypoint.lua | 166 ++++++++++++++++++++++++++--------- 1.7/Dockerfile | 39 ++++---- 1.7/tarantool-entrypoint.lua | 166 ++++++++++++++++++++++++++--------- 4 files changed, 284 insertions(+), 119 deletions(-) diff --git a/1.6/Dockerfile b/1.6/Dockerfile index ecb0ce1..707102c 100644 --- a/1.6/Dockerfile +++ b/1.6/Dockerfile @@ -1,4 +1,5 @@ FROM alpine:3.4 +MAINTAINER mail@racktear.com # add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added RUN addgroup -S tarantool && adduser -S -G tarantool tarantool @@ -44,7 +45,7 @@ RUN set -x \ -DENABLE_BACKTRACE:BOOL=ON\ -DENABLE_DIST:BOOL=ON\ .) \ - && make -C /usr/src/tarantool \ + && make -C /usr/src/tarantool -j \ && make -C /usr/src/tarantool install \ && rm -r /usr/src/tarantool \ && apk del .build-deps @@ -63,65 +64,66 @@ RUN set -x \ postgresql-dev \ && : "---------- expirationd ----------" \ && (cd /usr/src; git clone https://github.com/tarantool/expirationd.git) \ - && cp -r /usr/src/expirationd/expirationd.lua $TARANTOOL_INSTALL_LUADIR \ + && cp -r /usr/src/expirationd/expirationd.lua "$TARANTOOL_INSTALL_LUADIR" \ && rm -rf /usr/src/expirationd \ && : "---------- queue ----------" \ && (cd /usr/src; git clone https://github.com/tarantool/queue.git) \ - && mkdir -p $TARANTOOL_INSTALL_LUADIR/queue/abstract/driver \ - && cp -r /usr/src/queue/queue/*.lua $TARANTOOL_INSTALL_LUADIR/queue \ - && cp -r /usr/src/queue/queue/abstract/*.lua $TARANTOOL_INSTALL_LUADIR/queue/abstract \ + && mkdir -p "$TARANTOOL_INSTALL_LUADIR/queue/abstract/driver" \ + && cp -r /usr/src/queue/queue/*.lua "$TARANTOOL_INSTALL_LUADIR/queue" \ + && cp -r /usr/src/queue/queue/abstract/*.lua \ + "$TARANTOOL_INSTALL_LUADIR/queue/abstract" \ && cp -r /usr/src/queue/queue/abstract/driver/*.lua \ - $TARANTOOL_INSTALL_LUADIR/queue/abstract/driver \ + "$TARANTOOL_INSTALL_LUADIR/queue/abstract/driver" \ && rm -rf /usr/src/queue \ && : "---------- http ----------" \ && (cd /usr/src; git clone https://github.com/tarantool/http.git) \ && (cd /usr/src/http; cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .) \ - && (cd /usr/src/http; make) \ + && (cd /usr/src/http; make -j) \ && (cd /usr/src/http; make install) \ && rm -rf /usr/src/http \ && : "---------- connpool ----------" \ && (cd /usr/src; git clone https://github.com/tarantool/connpool.git) \ - && cp -r /usr/src/connpool/connpool.lua $TARANTOOL_INSTALL_LUADIR \ + && cp -r /usr/src/connpool/connpool.lua "$TARANTOOL_INSTALL_LUADIR" \ && rm -rf /usr/src/connpool \ && : "---------- shard ----------" \ && (cd /usr/src; git clone https://github.com/tarantool/shard.git) \ - && cp -r /usr/src/shard/shard.lua $TARANTOOL_INSTALL_LUADIR \ + && cp -r /usr/src/shard/shard.lua "$TARANTOOL_INSTALL_LUADIR" \ && rm -rf /usr/src/shard \ && : "---------- msgpuck ----------" \ && (cd /usr/src; git clone https://github.com/tarantool/msgpuck.git) \ && (cd /usr/src/msgpuck; cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .) \ - && (cd /usr/src/msgpuck; make) \ + && (cd /usr/src/msgpuck; make -j) \ && (cd /usr/src/msgpuck; make install) \ && rm -rf /usr/src/cbench \ && : "---------- cbench ----------" \ && (cd /usr/src; git clone https://github.com/tarantool/cbench.git) \ && (cd /usr/src/cbench; cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .) \ - && (cd /usr/src/cbench; make) \ + && (cd /usr/src/cbench; make -j) \ && (cd /usr/src/cbench; make install) \ && rm -rf /usr/src/cbench \ && : "---------- avro ----------" \ && (cd /usr/src; git clone https://github.com/tarantool/tarantool-avro.git) \ && (cd /usr/src/tarantool-avro; cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .) \ - && (cd /usr/src/tarantool-avro; make) \ + && (cd /usr/src/tarantool-avro; make -j) \ && (cd /usr/src/tarantool-avro; make install) \ && rm -rf /usr/src/tarantool-avro \ && : "---------- pg ----------" \ && (cd /usr/src; git clone https://github.com/tarantool/pg.git) \ && (cd /usr/src/pg; cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .) \ - && (cd /usr/src/pg; make) \ + && (cd /usr/src/pg; make -j) \ && (cd /usr/src/pg; make install) \ && rm -rf /usr/src/pg \ && : "---------- mysql ----------" \ && (cd /usr/src; git clone https://github.com/tarantool/mysql.git) \ && (cd /usr/src/mysql; cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .) \ - && (cd /usr/src/mysql; make) \ + && (cd /usr/src/mysql; make -j) \ && (cd /usr/src/mysql; make install) \ && rm -rf /usr/src/mysql \ && : "---------- memcached ----------" \ && (cd /usr/src; git clone https://github.com/tarantool/memcached.git) \ && git -C /usr/src/memcached submodule update --init --recursive \ && (cd /usr/src/memcached; cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .) \ - && (cd /usr/src/memcached; make) \ + && (cd /usr/src/memcached; make -j) \ && (cd /usr/src/memcached; make install) \ && rm -rf /usr/src/memcached \ && : "---------- remove build deps ----------" \ diff --git a/1.6/tarantool-entrypoint.lua b/1.6/tarantool-entrypoint.lua index 2b73028..1845d31 100755 --- a/1.6/tarantool-entrypoint.lua +++ b/1.6/tarantool-entrypoint.lua @@ -1,69 +1,149 @@ #!/usr/bin/env tarantool -local slab_alloc_arena = os.getenv('TARANTOOL_SLAB_ALLOC_ARENA') -local slab_alloc_factor = os.getenv('TARANTOOL_SLAB_ALLOC_FACTOR') -local slab_alloc_maximal = os.getenv('TARANTOOL_SLAB_ALLOC_MAXIMAL') -local slab_alloc_minimal = os.getenv('TARANTOOL_SLAB_ALLOC_MINIMAL') -local admin_password = os.getenv('TARANTOOL_ADMIN_PASSWORD') -local listen_port = tonumber(os.getenv('TARANTOOL_PORT')) -local replication_source = os.getenv('TARANTOOL_REPLICATION_SOURCE') +local fio = require('fio') +local errno = require('errno') +local fun = require('fun') +local urilib = require('uri') -if admin_password == nil then - admin_password = "" +local TARANTOOL_DEFAULT_PORT = 3301 - warn_str = [[**************************************************** -WARNING: No password has been set for the database. - This will allow anyone with access to the - Tarantool port to access your database. In - Docker's default configuration, this is - effectively any other container on the same - system. - Use "-e TARANTOOL_ADMIN_PASSWORD=password" - to set it in "docker run". -****************************************************]] - print(warn_str) -end +local slab_alloc_arena = os.getenv('TARANTOOL_SLAB_ALLOC_ARENA') or 1.0 +local slab_alloc_factor = os.getenv('TARANTOOL_SLAB_ALLOC_FACTOR') or 1.1 +local slab_alloc_maximal = os.getenv('TARANTOOL_SLAB_ALLOC_MAXIMAL') or 1048576 +local slab_alloc_minimal = os.getenv('TARANTOOL_SLAB_ALLOC_MINIMAL') or 16 +local user_name = os.getenv('TARANTOOL_USER_NAME') or 'guest' +local user_password = os.getenv('TARANTOOL_USER_PASSWORD') +local listen_port = tonumber(os.getenv('TARANTOOL_PORT')) or TARANTOOL_DEFAULT_PORT +local replication_source = os.getenv('TARANTOOL_REPLICATION_SOURCE') +local wal_mode = os.getenv('TARANTOOL_WAL_MODE') or 'write' -if listen_port == nil then - listen_port = 3301 -end +local work_dir = '/var/lib/tarantool' +local snap_filename = "00000000000000000000.snap" +local snap_path = work_dir..'/'..snap_filename -if slab_alloc_arena == nil then - slab_alloc_arena = 1.0 -end +local first_run = false -if slab_alloc_factor == nil then - slab_alloc_factor = 1.1 +if fio.stat(snap_path) == nil and errno() == errno.ENOENT then + first_run = true end -if slab_alloc_maximal == nil then - slab_alloc_maximal = 1048576 -end +local replication_source_table = {} +if replication_source ~= nil then + for uri in string.gmatch(replication_source, "[^,]+") do -if slab_alloc_minimal == nil then - slab_alloc_minimal = 16 -end + local parsed_uri = urilib.parse(uri) + if parsed_uri == nil then + error("Incorrect replication source URI format: '"..uri.."'") + end + local host = parsed_uri.host + local port = parsed_uri.service or TARANTOOL_DEFAULT_PORT + local user = parsed_uri.login or user_name + local password = parsed_uri.password or user_password -replication_source_table = {} -if replication_source ~= nil then - for addr in string.gmatch(replication_source, "[^,]+") do - table.insert(replication_source_table, - "admin:" .. admin_password .. "@" .. addr) + if user == 'guest' then + replication_source = string.format("%s:%s", host, port) + elseif password == nil then + replication_source = string.format("%s:@%s:%s", user, host, port) + else + replication_source = string.format("%s:%s@%s:%s", user, password, + host, port) + end + + table.insert(replication_source_table, replication_source) end end + + box.cfg { slab_alloc_arena = slab_alloc_arena; slab_alloc_factor = slab_alloc_factor; slab_alloc_maximal = slab_alloc_maximal; slab_alloc_minimal = slab_alloc_minimal; - wal_mode = 'write'; + wal_mode = wal_mode; listen = listen_port; - work_dir = '/var/lib/tarantool'; + work_dir = work_dir; replication_source = replication_source_table; } -box.schema.user.passwd("admin", admin_password) +local min_replica_uuid = nil +if box.info.replication.status ~= 'off' then + local uuids + uuids = fun.map(function(replica) + return replica.uuid + end, + box.info.replication):totable() + + table.sort(uuids) + min_replica_uuid = uuids[1] +end + +if first_run and (#box.info.replication == 0 or + box.info.server.uuid == min_replica_uuid) then + + print("Initializing database") + + if user_name ~= 'guest' and user_password == nil then + user_password = "" + + warn_str = [[**************************************************** +WARNING: No password has been set for the database. + This will allow anyone with access to the + Tarantool port to access your database. In + Docker's default configuration, this is + effectively any other container on the same + system. + Use "-e TARANTOOL_USER_PASSWORD=password" + to set it in "docker run". +****************************************************]] + print(warn_str) + end + + if user_name == 'guest' and user_password == nil then + warn_str = [[**************************************************** +WARNING: 'guest' is chosen as primary user. + Since it is not allowed to set a password for + guest user, your instance will be accessible + by anyone having direct access to the Tarantool + port. + If you wanted to create an authenticated user, + specify "-e TARANTOOL_USER_NAME=username" and + pick a user name other than "guest". +****************************************************]] + print(warn_str) + end + + if user_name == 'guest' and user_password ~= nil then + user_password = nil + + warn_str = [[**************************************************** +WARNING: A password for guest user has been specified. + In Tarantool, guest user can't have a password + and is always allowed to login, if it has + enough privileges. + If you wanted to create an authenticated user, + specify "-e TARANTOOL_USER_NAME=username" and + pick a user name other than "guest". +****************************************************]] + print(warn_str) + end + + if user_name ~= 'admin' and user_name ~= 'guest' then + print(string.format("Creating user '%s'", user_name)) + box.schema.user.create(user_name) + end + + if user_name ~= 'admin' then + print(string.format("Granting admin privileges to user '%s'", user_name)) + box.schema.user.grant(user_name, 'read,write,execute', 'universe') + box.schema.user.grant(user_name, 'replication') + end + + if user_name ~= 'guest' then + box.schema.user.passwd(user_name, user_password) + end +end + -- re-run the script passed as parameter with all arguments that follow execute_script = arg[1] diff --git a/1.7/Dockerfile b/1.7/Dockerfile index f3d6ce2..bcc2360 100644 --- a/1.7/Dockerfile +++ b/1.7/Dockerfile @@ -1,4 +1,5 @@ FROM alpine:3.4 +MAINTAINER mail@racktear.com # add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added RUN addgroup -S tarantool && adduser -S -G tarantool tarantool @@ -8,7 +9,7 @@ RUN apk add --no-cache 'su-exec>=0.2' ENV TARANTOOL_VERSION 1.7 ENV TARANTOOL_DOWNLOAD_URL https://github.com/tarantool/tarantool.git -ENV TARANTOOL_COMMIT f6e6918 +ENV TARANTOOL_COMMIT 076a842 ENV TARANTOOL_INSTALL_LUADIR /usr/local/share/tarantool RUN set -x \ @@ -37,8 +38,8 @@ RUN set -x \ ncurses-dev \ libc-dev \ && mkdir -p /usr/src/tarantool \ - && git clone $TARANTOOL_DOWNLOAD_URL /usr/src/tarantool \ - && git -C /usr/src/tarantool checkout $TARANTOOL_COMMIT \ + && git clone "$TARANTOOL_DOWNLOAD_URL" /usr/src/tarantool \ + && git -C /usr/src/tarantool checkout "$TARANTOOL_COMMIT" \ && git -C /usr/src/tarantool submodule update \ && echo "$TARANTOOL_VERSION" > /usr/src/tarantool/VERSION \ && (cd /usr/src/tarantool; \ @@ -47,7 +48,7 @@ RUN set -x \ -DENABLE_BACKTRACE:BOOL=ON\ -DENABLE_DIST:BOOL=ON\ .) \ - && make -C /usr/src/tarantool \ + && make -C /usr/src/tarantool -j\ && make -C /usr/src/tarantool install \ && rm -r /usr/src/tarantool \ && apk del .build-deps @@ -61,70 +62,72 @@ RUN set -x \ git \ cmake \ make \ + coreutils \ gcc \ g++ \ postgresql-dev \ && : "---------- expirationd ----------" \ && (cd /usr/src; git clone https://github.com/tarantool/expirationd.git) \ - && cp -r /usr/src/expirationd/expirationd.lua $TARANTOOL_INSTALL_LUADIR \ + && cp -r /usr/src/expirationd/expirationd.lua "$TARANTOOL_INSTALL_LUADIR" \ && rm -rf /usr/src/expirationd \ && : "---------- queue ----------" \ && (cd /usr/src; git clone https://github.com/tarantool/queue.git) \ - && mkdir -p $TARANTOOL_INSTALL_LUADIR/queue/abstract/driver \ - && cp -r /usr/src/queue/queue/*.lua $TARANTOOL_INSTALL_LUADIR/queue \ - && cp -r /usr/src/queue/queue/abstract/*.lua $TARANTOOL_INSTALL_LUADIR/queue/abstract \ + && mkdir -p "$TARANTOOL_INSTALL_LUADIR/queue/abstract/driver" \ + && cp -r /usr/src/queue/queue/*.lua "$TARANTOOL_INSTALL_LUADIR/queue" \ + && cp -r /usr/src/queue/queue/abstract/*.lua \ + "$TARANTOOL_INSTALL_LUADIR/queue/abstract" \ && cp -r /usr/src/queue/queue/abstract/driver/*.lua \ - $TARANTOOL_INSTALL_LUADIR/queue/abstract/driver \ + "$TARANTOOL_INSTALL_LUADIR/queue/abstract/driver" \ && rm -rf /usr/src/queue \ && : "---------- http ----------" \ && (cd /usr/src; git clone https://github.com/tarantool/http.git) \ && (cd /usr/src/http; cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .) \ - && (cd /usr/src/http; make) \ + && (cd /usr/src/http; make -j) \ && (cd /usr/src/http; make install) \ && rm -rf /usr/src/http \ && : "---------- connpool ----------" \ && (cd /usr/src; git clone https://github.com/tarantool/connpool.git) \ - && cp -r /usr/src/connpool/connpool.lua $TARANTOOL_INSTALL_LUADIR \ + && cp -r /usr/src/connpool/connpool.lua "$TARANTOOL_INSTALL_LUADIR" \ && rm -rf /usr/src/connpool \ && : "---------- shard ----------" \ && (cd /usr/src; git clone https://github.com/tarantool/shard.git) \ - && cp -r /usr/src/shard/shard.lua $TARANTOOL_INSTALL_LUADIR \ + && cp -r /usr/src/shard/shard.lua "$TARANTOOL_INSTALL_LUADIR" \ && rm -rf /usr/src/shard \ && : "---------- msgpuck ----------" \ && (cd /usr/src; git clone https://github.com/tarantool/msgpuck.git) \ && (cd /usr/src/msgpuck; cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .) \ - && (cd /usr/src/msgpuck; make) \ + && (cd /usr/src/msgpuck; make -j) \ && (cd /usr/src/msgpuck; make install) \ && rm -rf /usr/src/cbench \ && : "---------- cbench ----------" \ && (cd /usr/src; git clone https://github.com/tarantool/cbench.git) \ && (cd /usr/src/cbench; cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .) \ - && (cd /usr/src/cbench; make) \ + && (cd /usr/src/cbench; make -j) \ && (cd /usr/src/cbench; make install) \ && rm -rf /usr/src/cbench \ && : "---------- avro ----------" \ && (cd /usr/src; git clone https://github.com/tarantool/tarantool-avro.git) \ && (cd /usr/src/tarantool-avro; cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .) \ - && (cd /usr/src/tarantool-avro; make) \ + && (cd /usr/src/tarantool-avro; make -j) \ && (cd /usr/src/tarantool-avro; make install) \ && rm -rf /usr/src/tarantool-avro \ && : "---------- pg ----------" \ && (cd /usr/src; git clone https://github.com/tarantool/pg.git) \ && (cd /usr/src/pg; cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .) \ - && (cd /usr/src/pg; make) \ + && (cd /usr/src/pg; make -j) \ && (cd /usr/src/pg; make install) \ && rm -rf /usr/src/pg \ && : "---------- mysql ----------" \ && (cd /usr/src; git clone https://github.com/tarantool/mysql.git) \ && (cd /usr/src/mysql; cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .) \ - && (cd /usr/src/mysql; make) \ + && (cd /usr/src/mysql; make -j) \ && (cd /usr/src/mysql; make install) \ && rm -rf /usr/src/mysql \ && : "---------- memcached ----------" \ && (cd /usr/src; git clone https://github.com/tarantool/memcached.git) \ && git -C /usr/src/memcached submodule update --init --recursive \ && (cd /usr/src/memcached; cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .) \ - && (cd /usr/src/memcached; make) \ + && (cd /usr/src/memcached; make -j) \ && (cd /usr/src/memcached; make install) \ && rm -rf /usr/src/memcached \ && : "---------- remove build deps ----------" \ diff --git a/1.7/tarantool-entrypoint.lua b/1.7/tarantool-entrypoint.lua index 2b73028..1845d31 100755 --- a/1.7/tarantool-entrypoint.lua +++ b/1.7/tarantool-entrypoint.lua @@ -1,69 +1,149 @@ #!/usr/bin/env tarantool -local slab_alloc_arena = os.getenv('TARANTOOL_SLAB_ALLOC_ARENA') -local slab_alloc_factor = os.getenv('TARANTOOL_SLAB_ALLOC_FACTOR') -local slab_alloc_maximal = os.getenv('TARANTOOL_SLAB_ALLOC_MAXIMAL') -local slab_alloc_minimal = os.getenv('TARANTOOL_SLAB_ALLOC_MINIMAL') -local admin_password = os.getenv('TARANTOOL_ADMIN_PASSWORD') -local listen_port = tonumber(os.getenv('TARANTOOL_PORT')) -local replication_source = os.getenv('TARANTOOL_REPLICATION_SOURCE') +local fio = require('fio') +local errno = require('errno') +local fun = require('fun') +local urilib = require('uri') -if admin_password == nil then - admin_password = "" +local TARANTOOL_DEFAULT_PORT = 3301 - warn_str = [[**************************************************** -WARNING: No password has been set for the database. - This will allow anyone with access to the - Tarantool port to access your database. In - Docker's default configuration, this is - effectively any other container on the same - system. - Use "-e TARANTOOL_ADMIN_PASSWORD=password" - to set it in "docker run". -****************************************************]] - print(warn_str) -end +local slab_alloc_arena = os.getenv('TARANTOOL_SLAB_ALLOC_ARENA') or 1.0 +local slab_alloc_factor = os.getenv('TARANTOOL_SLAB_ALLOC_FACTOR') or 1.1 +local slab_alloc_maximal = os.getenv('TARANTOOL_SLAB_ALLOC_MAXIMAL') or 1048576 +local slab_alloc_minimal = os.getenv('TARANTOOL_SLAB_ALLOC_MINIMAL') or 16 +local user_name = os.getenv('TARANTOOL_USER_NAME') or 'guest' +local user_password = os.getenv('TARANTOOL_USER_PASSWORD') +local listen_port = tonumber(os.getenv('TARANTOOL_PORT')) or TARANTOOL_DEFAULT_PORT +local replication_source = os.getenv('TARANTOOL_REPLICATION_SOURCE') +local wal_mode = os.getenv('TARANTOOL_WAL_MODE') or 'write' -if listen_port == nil then - listen_port = 3301 -end +local work_dir = '/var/lib/tarantool' +local snap_filename = "00000000000000000000.snap" +local snap_path = work_dir..'/'..snap_filename -if slab_alloc_arena == nil then - slab_alloc_arena = 1.0 -end +local first_run = false -if slab_alloc_factor == nil then - slab_alloc_factor = 1.1 +if fio.stat(snap_path) == nil and errno() == errno.ENOENT then + first_run = true end -if slab_alloc_maximal == nil then - slab_alloc_maximal = 1048576 -end +local replication_source_table = {} +if replication_source ~= nil then + for uri in string.gmatch(replication_source, "[^,]+") do -if slab_alloc_minimal == nil then - slab_alloc_minimal = 16 -end + local parsed_uri = urilib.parse(uri) + if parsed_uri == nil then + error("Incorrect replication source URI format: '"..uri.."'") + end + local host = parsed_uri.host + local port = parsed_uri.service or TARANTOOL_DEFAULT_PORT + local user = parsed_uri.login or user_name + local password = parsed_uri.password or user_password -replication_source_table = {} -if replication_source ~= nil then - for addr in string.gmatch(replication_source, "[^,]+") do - table.insert(replication_source_table, - "admin:" .. admin_password .. "@" .. addr) + if user == 'guest' then + replication_source = string.format("%s:%s", host, port) + elseif password == nil then + replication_source = string.format("%s:@%s:%s", user, host, port) + else + replication_source = string.format("%s:%s@%s:%s", user, password, + host, port) + end + + table.insert(replication_source_table, replication_source) end end + + box.cfg { slab_alloc_arena = slab_alloc_arena; slab_alloc_factor = slab_alloc_factor; slab_alloc_maximal = slab_alloc_maximal; slab_alloc_minimal = slab_alloc_minimal; - wal_mode = 'write'; + wal_mode = wal_mode; listen = listen_port; - work_dir = '/var/lib/tarantool'; + work_dir = work_dir; replication_source = replication_source_table; } -box.schema.user.passwd("admin", admin_password) +local min_replica_uuid = nil +if box.info.replication.status ~= 'off' then + local uuids + uuids = fun.map(function(replica) + return replica.uuid + end, + box.info.replication):totable() + + table.sort(uuids) + min_replica_uuid = uuids[1] +end + +if first_run and (#box.info.replication == 0 or + box.info.server.uuid == min_replica_uuid) then + + print("Initializing database") + + if user_name ~= 'guest' and user_password == nil then + user_password = "" + + warn_str = [[**************************************************** +WARNING: No password has been set for the database. + This will allow anyone with access to the + Tarantool port to access your database. In + Docker's default configuration, this is + effectively any other container on the same + system. + Use "-e TARANTOOL_USER_PASSWORD=password" + to set it in "docker run". +****************************************************]] + print(warn_str) + end + + if user_name == 'guest' and user_password == nil then + warn_str = [[**************************************************** +WARNING: 'guest' is chosen as primary user. + Since it is not allowed to set a password for + guest user, your instance will be accessible + by anyone having direct access to the Tarantool + port. + If you wanted to create an authenticated user, + specify "-e TARANTOOL_USER_NAME=username" and + pick a user name other than "guest". +****************************************************]] + print(warn_str) + end + + if user_name == 'guest' and user_password ~= nil then + user_password = nil + + warn_str = [[**************************************************** +WARNING: A password for guest user has been specified. + In Tarantool, guest user can't have a password + and is always allowed to login, if it has + enough privileges. + If you wanted to create an authenticated user, + specify "-e TARANTOOL_USER_NAME=username" and + pick a user name other than "guest". +****************************************************]] + print(warn_str) + end + + if user_name ~= 'admin' and user_name ~= 'guest' then + print(string.format("Creating user '%s'", user_name)) + box.schema.user.create(user_name) + end + + if user_name ~= 'admin' then + print(string.format("Granting admin privileges to user '%s'", user_name)) + box.schema.user.grant(user_name, 'read,write,execute', 'universe') + box.schema.user.grant(user_name, 'replication') + end + + if user_name ~= 'guest' then + box.schema.user.passwd(user_name, user_password) + end +end + -- re-run the script passed as parameter with all arguments that follow execute_script = arg[1] From fb82234c7adced6099382b54ce4cdb82a70ae0a8 Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Wed, 6 Jul 2016 14:40:40 +0300 Subject: [PATCH 014/286] Less layers in Dockerfiles --- 1.6/Dockerfile | 16 +++++++--------- 1.7/Dockerfile | 16 +++++++--------- 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/1.6/Dockerfile b/1.6/Dockerfile index 707102c..b6ea90c 100644 --- a/1.6/Dockerfile +++ b/1.6/Dockerfile @@ -1,16 +1,14 @@ FROM alpine:3.4 MAINTAINER mail@racktear.com -# add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added -RUN addgroup -S tarantool && adduser -S -G tarantool tarantool +RUN addgroup -S tarantool \ + && adduser -S -G tarantool tarantool \ + && apk add --no-cache 'su-exec>=0.2' -# grab su-exec for easy step-down from root -RUN apk add --no-cache 'su-exec>=0.2' - -ENV TARANTOOL_VERSION 1.6.8.525 -ENV TARANTOOL_DOWNLOAD_URL https://github.com/tarantool/tarantool/releases/download/1.6.8.525/tarantool-1.6.8.525.tar.gz -ENV TARANTOOL_DOWNLOAD_SHA1 7b451b8898b3022f37efba461048321f978b8587 -ENV TARANTOOL_INSTALL_LUADIR /usr/local/share/tarantool +ENV TARANTOOL_VERSION=1.6.8.525 \ + TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool/releases/download/1.6.8.525/tarantool-1.6.8.525.tar.gz \ + TARANTOOL_DOWNLOAD_SHA1=7b451b8898b3022f37efba461048321f978b8587 \ + TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool RUN set -x \ && apk add --no-cache --virtual .run-deps \ diff --git a/1.7/Dockerfile b/1.7/Dockerfile index bcc2360..5eeb777 100644 --- a/1.7/Dockerfile +++ b/1.7/Dockerfile @@ -1,16 +1,14 @@ FROM alpine:3.4 MAINTAINER mail@racktear.com -# add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added -RUN addgroup -S tarantool && adduser -S -G tarantool tarantool +RUN addgroup -S tarantool \ + && adduser -S -G tarantool tarantool \ + && apk add --no-cache 'su-exec>=0.2' -# grab su-exec for easy step-down from root -RUN apk add --no-cache 'su-exec>=0.2' - -ENV TARANTOOL_VERSION 1.7 -ENV TARANTOOL_DOWNLOAD_URL https://github.com/tarantool/tarantool.git -ENV TARANTOOL_COMMIT 076a842 -ENV TARANTOOL_INSTALL_LUADIR /usr/local/share/tarantool +ENV TARANTOOL_VERSION=1.7 \ + TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ + TARANTOOL_COMMIT=076a842 \ + TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool RUN set -x \ && apk add --no-cache --virtual .run-deps \ From 7021f79e99f2086ff1107c6ad2eb4a1e0d672464 Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Wed, 6 Jul 2016 15:48:18 +0300 Subject: [PATCH 015/286] Unix sockets for console connection --- 1.6/Dockerfile | 5 ++++- 1.6/tarantool-entrypoint.lua | 3 +++ 1.7/Dockerfile | 4 +++- 1.7/tarantool-entrypoint.lua | 3 +++ 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/1.6/Dockerfile b/1.6/Dockerfile index b6ea90c..9cd916a 100644 --- a/1.6/Dockerfile +++ b/1.6/Dockerfile @@ -131,7 +131,10 @@ RUN set -x \ RUN mkdir -p /var/lib/tarantool \ && chown tarantool:tarantool /var/lib/tarantool \ && mkdir -p /opt/tarantool \ - && chown tarantool:tarantool /opt/tarantool + && chown tarantool:tarantool /opt/tarantool \ + && mkdir -p /var/run/tarantool \ + && chown tarantool:tarantool /var/run/tarantool + VOLUME /var/lib/tarantool VOLUME /opt/tarantool diff --git a/1.6/tarantool-entrypoint.lua b/1.6/tarantool-entrypoint.lua index 1845d31..33ffef9 100755 --- a/1.6/tarantool-entrypoint.lua +++ b/1.6/tarantool-entrypoint.lua @@ -4,8 +4,10 @@ local fio = require('fio') local errno = require('errno') local fun = require('fun') local urilib = require('uri') +local console = require('console') local TARANTOOL_DEFAULT_PORT = 3301 +local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' local slab_alloc_arena = os.getenv('TARANTOOL_SLAB_ALLOC_ARENA') or 1.0 local slab_alloc_factor = os.getenv('TARANTOOL_SLAB_ALLOC_FACTOR') or 1.1 @@ -144,6 +146,7 @@ WARNING: A password for guest user has been specified. end end +console.listen(CONSOLE_SOCKET_PATH) -- re-run the script passed as parameter with all arguments that follow execute_script = arg[1] diff --git a/1.7/Dockerfile b/1.7/Dockerfile index 5eeb777..c1bbc0e 100644 --- a/1.7/Dockerfile +++ b/1.7/Dockerfile @@ -135,7 +135,9 @@ RUN set -x \ RUN mkdir -p /var/lib/tarantool \ && chown tarantool:tarantool /var/lib/tarantool \ && mkdir -p /opt/tarantool \ - && chown tarantool:tarantool /opt/tarantool + && chown tarantool:tarantool /opt/tarantool \ + && mkdir -p /var/run/tarantool \ + && chown tarantool:tarantool /var/run/tarantool VOLUME /var/lib/tarantool VOLUME /opt/tarantool diff --git a/1.7/tarantool-entrypoint.lua b/1.7/tarantool-entrypoint.lua index 1845d31..33ffef9 100755 --- a/1.7/tarantool-entrypoint.lua +++ b/1.7/tarantool-entrypoint.lua @@ -4,8 +4,10 @@ local fio = require('fio') local errno = require('errno') local fun = require('fun') local urilib = require('uri') +local console = require('console') local TARANTOOL_DEFAULT_PORT = 3301 +local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' local slab_alloc_arena = os.getenv('TARANTOOL_SLAB_ALLOC_ARENA') or 1.0 local slab_alloc_factor = os.getenv('TARANTOOL_SLAB_ALLOC_FACTOR') or 1.1 @@ -144,6 +146,7 @@ WARNING: A password for guest user has been specified. end end +console.listen(CONSOLE_SOCKET_PATH) -- re-run the script passed as parameter with all arguments that follow execute_script = arg[1] From f985ceb213ca0b138e43cfb3ba771d8fd9b09ac9 Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Wed, 6 Jul 2016 16:03:33 +0300 Subject: [PATCH 016/286] Add 'console' command to connect to the instance --- 1.6/Dockerfile | 2 ++ 1.6/console | 15 +++++++++++++++ 1.7/Dockerfile | 2 ++ 1.7/console | 15 +++++++++++++++ 4 files changed, 34 insertions(+) create mode 100755 1.6/console create mode 100755 1.7/console diff --git a/1.6/Dockerfile b/1.6/Dockerfile index 9cd916a..a5ee1fc 100644 --- a/1.6/Dockerfile +++ b/1.6/Dockerfile @@ -142,6 +142,8 @@ WORKDIR /opt/tarantool COPY tarantool-entrypoint.lua /usr/local/bin/ COPY docker-entrypoint.sh /usr/local/bin/ +COPY console /usr/local/bin/ + RUN ln -s usr/local/bin/docker-entrypoint.sh /entrypoint.sh # backwards compat ENTRYPOINT ["docker-entrypoint.sh"] diff --git a/1.6/console b/1.6/console new file mode 100755 index 0000000..d6fb192 --- /dev/null +++ b/1.6/console @@ -0,0 +1,15 @@ +#!/usr/bin/env tarantool + +local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' + +console = require('console') +console.on_start(function(self) + local status, reason + status, reason = pcall(function() require('console').connect(CONSOLE_SOCKET_PATH) end) + if not status then + self:print(reason) + self.running = false + end +end) +console.on_client_disconnect(function(self) self.running = false end) +console.start() diff --git a/1.7/Dockerfile b/1.7/Dockerfile index c1bbc0e..2e4ac44 100644 --- a/1.7/Dockerfile +++ b/1.7/Dockerfile @@ -145,6 +145,8 @@ WORKDIR /opt/tarantool COPY tarantool-entrypoint.lua /usr/local/bin/ COPY docker-entrypoint.sh /usr/local/bin/ +COPY console /usr/local/bin/ + RUN ln -s usr/local/bin/docker-entrypoint.sh /entrypoint.sh # backwards compat ENTRYPOINT ["docker-entrypoint.sh"] diff --git a/1.7/console b/1.7/console new file mode 100755 index 0000000..d6fb192 --- /dev/null +++ b/1.7/console @@ -0,0 +1,15 @@ +#!/usr/bin/env tarantool + +local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' + +console = require('console') +console.on_start(function(self) + local status, reason + status, reason = pcall(function() require('console').connect(CONSOLE_SOCKET_PATH) end) + if not status then + self:print(reason) + self.running = false + end +end) +console.on_client_disconnect(function(self) self.running = false end) +console.start() From 3296a45ad3207e319fc76594a85c2167859295ab Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Thu, 14 Jul 2016 22:03:18 +0300 Subject: [PATCH 017/286] Reimplement Dockerfiles to use luarocks --- 1.6/Dockerfile | 117 +++++++++++++++++++---------------------------- 1.6/console | 15 ------ 1.7/Dockerfile | 122 ++++++++++++++++++++----------------------------- 1.7/console | 15 ------ 4 files changed, 96 insertions(+), 173 deletions(-) delete mode 100755 1.6/console delete mode 100755 1.7/console diff --git a/1.6/Dockerfile b/1.6/Dockerfile index a5ee1fc..f25ab51 100644 --- a/1.6/Dockerfile +++ b/1.6/Dockerfile @@ -8,7 +8,8 @@ RUN addgroup -S tarantool \ ENV TARANTOOL_VERSION=1.6.8.525 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool/releases/download/1.6.8.525/tarantool-1.6.8.525.tar.gz \ TARANTOOL_DOWNLOAD_SHA1=7b451b8898b3022f37efba461048321f978b8587 \ - TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool + TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ + LUAROCKS_URL=http://keplerproject.github.io/luarocks/releases/luarocks-2.3.0.tar.gz RUN set -x \ && apk add --no-cache --virtual .run-deps \ @@ -20,12 +21,18 @@ RUN set -x \ binutils \ ncurses \ libgomp \ - && apk add --no-cache --virtual .build-deps \ + lua \ + curl \ + lua-dev \ + musl-dev \ + make \ + git \ gcc \ + tar \ + zip \ + && apk add --no-cache --virtual .build-deps \ g++ \ cmake \ - make \ - tar \ readline-dev \ openssl-dev \ yaml-dev \ @@ -45,9 +52,34 @@ RUN set -x \ .) \ && make -C /usr/src/tarantool -j \ && make -C /usr/src/tarantool install \ - && rm -r /usr/src/tarantool \ + && : "---------- small ----------" \ + && (cd /usr/src/tarantool/src/lib/small; \ + cmake -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + .) \ + && make -C /usr/src/tarantool/src/lib/small \ + && make -C /usr/src/tarantool/src/lib/small install \ + && : "---------- msgpuck ----------" \ + && (cd /usr/src/tarantool/src/lib/msgpuck; \ + cmake -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + .) \ + && make -C /usr/src/tarantool/src/lib/msgpuck \ + && make -C /usr/src/tarantool/src/lib/msgpuck install \ + && : "---------- luarocks ----------" \ + && wget -O luarocks.tar.gz "$LUAROCKS_URL" \ + && mkdir -p /usr/src/luarocks \ + && tar -xzf luarocks.tar.gz -C /usr/src/luarocks --strip-components=1 \ + && (cd /usr/src/luarocks; \ + ./configure; \ + make build; \ + make install) \ + && rm -r /usr/src/luarocks \ && apk del .build-deps +COPY luarocks-config.lua /usr/local/etc/luarocks/config-5.1.lua RUN set -x \ && apk add --no-cache --virtual .run-deps \ @@ -60,70 +92,16 @@ RUN set -x \ gcc \ g++ \ postgresql-dev \ - && : "---------- expirationd ----------" \ - && (cd /usr/src; git clone https://github.com/tarantool/expirationd.git) \ - && cp -r /usr/src/expirationd/expirationd.lua "$TARANTOOL_INSTALL_LUADIR" \ - && rm -rf /usr/src/expirationd \ - && : "---------- queue ----------" \ - && (cd /usr/src; git clone https://github.com/tarantool/queue.git) \ - && mkdir -p "$TARANTOOL_INSTALL_LUADIR/queue/abstract/driver" \ - && cp -r /usr/src/queue/queue/*.lua "$TARANTOOL_INSTALL_LUADIR/queue" \ - && cp -r /usr/src/queue/queue/abstract/*.lua \ - "$TARANTOOL_INSTALL_LUADIR/queue/abstract" \ - && cp -r /usr/src/queue/queue/abstract/driver/*.lua \ - "$TARANTOOL_INSTALL_LUADIR/queue/abstract/driver" \ - && rm -rf /usr/src/queue \ - && : "---------- http ----------" \ - && (cd /usr/src; git clone https://github.com/tarantool/http.git) \ - && (cd /usr/src/http; cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .) \ - && (cd /usr/src/http; make -j) \ - && (cd /usr/src/http; make install) \ - && rm -rf /usr/src/http \ - && : "---------- connpool ----------" \ - && (cd /usr/src; git clone https://github.com/tarantool/connpool.git) \ - && cp -r /usr/src/connpool/connpool.lua "$TARANTOOL_INSTALL_LUADIR" \ - && rm -rf /usr/src/connpool \ - && : "---------- shard ----------" \ - && (cd /usr/src; git clone https://github.com/tarantool/shard.git) \ - && cp -r /usr/src/shard/shard.lua "$TARANTOOL_INSTALL_LUADIR" \ - && rm -rf /usr/src/shard \ - && : "---------- msgpuck ----------" \ - && (cd /usr/src; git clone https://github.com/tarantool/msgpuck.git) \ - && (cd /usr/src/msgpuck; cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .) \ - && (cd /usr/src/msgpuck; make -j) \ - && (cd /usr/src/msgpuck; make install) \ - && rm -rf /usr/src/cbench \ - && : "---------- cbench ----------" \ - && (cd /usr/src; git clone https://github.com/tarantool/cbench.git) \ - && (cd /usr/src/cbench; cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .) \ - && (cd /usr/src/cbench; make -j) \ - && (cd /usr/src/cbench; make install) \ - && rm -rf /usr/src/cbench \ - && : "---------- avro ----------" \ - && (cd /usr/src; git clone https://github.com/tarantool/tarantool-avro.git) \ - && (cd /usr/src/tarantool-avro; cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .) \ - && (cd /usr/src/tarantool-avro; make -j) \ - && (cd /usr/src/tarantool-avro; make install) \ - && rm -rf /usr/src/tarantool-avro \ - && : "---------- pg ----------" \ - && (cd /usr/src; git clone https://github.com/tarantool/pg.git) \ - && (cd /usr/src/pg; cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .) \ - && (cd /usr/src/pg; make -j) \ - && (cd /usr/src/pg; make install) \ - && rm -rf /usr/src/pg \ - && : "---------- mysql ----------" \ - && (cd /usr/src; git clone https://github.com/tarantool/mysql.git) \ - && (cd /usr/src/mysql; cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .) \ - && (cd /usr/src/mysql; make -j) \ - && (cd /usr/src/mysql; make install) \ - && rm -rf /usr/src/mysql \ - && : "---------- memcached ----------" \ - && (cd /usr/src; git clone https://github.com/tarantool/memcached.git) \ - && git -C /usr/src/memcached submodule update --init --recursive \ - && (cd /usr/src/memcached; cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .) \ - && (cd /usr/src/memcached; make -j) \ - && (cd /usr/src/memcached; make install) \ - && rm -rf /usr/src/memcached \ + && : "---------- luarocks ----------" \ + && luarocks install avro-schema \ + && luarocks install expirationd \ + && luarocks install queue \ + && luarocks install connpool \ + && luarocks install shard \ + && luarocks install http \ + && luarocks install pg \ + && luarocks install mysql \ + && luarocks install memcached \ && : "---------- remove build deps ----------" \ && apk del .build-deps @@ -142,7 +120,6 @@ WORKDIR /opt/tarantool COPY tarantool-entrypoint.lua /usr/local/bin/ COPY docker-entrypoint.sh /usr/local/bin/ -COPY console /usr/local/bin/ RUN ln -s usr/local/bin/docker-entrypoint.sh /entrypoint.sh # backwards compat ENTRYPOINT ["docker-entrypoint.sh"] diff --git a/1.6/console b/1.6/console deleted file mode 100755 index d6fb192..0000000 --- a/1.6/console +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env tarantool - -local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' - -console = require('console') -console.on_start(function(self) - local status, reason - status, reason = pcall(function() require('console').connect(CONSOLE_SOCKET_PATH) end) - if not status then - self:print(reason) - self.running = false - end -end) -console.on_client_disconnect(function(self) self.running = false end) -console.start() diff --git a/1.7/Dockerfile b/1.7/Dockerfile index 2e4ac44..d160ace 100644 --- a/1.7/Dockerfile +++ b/1.7/Dockerfile @@ -7,8 +7,9 @@ RUN addgroup -S tarantool \ ENV TARANTOOL_VERSION=1.7 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ - TARANTOOL_COMMIT=076a842 \ - TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool + TARANTOOL_COMMIT=b4a4139 \ + TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ + LUAROCKS_URL=http://keplerproject.github.io/luarocks/releases/luarocks-2.3.0.tar.gz RUN set -x \ && apk add --no-cache --virtual .run-deps \ @@ -20,21 +21,26 @@ RUN set -x \ binutils \ ncurses \ libgomp \ - && apk add --no-cache --virtual .build-deps \ + lua \ + curl \ + lua-dev \ + musl-dev \ + make \ git \ - perl \ gcc \ + tar \ + zip \ + && apk add --no-cache --virtual .build-deps \ + perl \ g++ \ cmake \ - make \ - tar \ readline-dev \ openssl-dev \ yaml-dev \ lz4-dev \ binutils-dev \ ncurses-dev \ - libc-dev \ + && : "---------- tarantool ----------" \ && mkdir -p /usr/src/tarantool \ && git clone "$TARANTOOL_DOWNLOAD_URL" /usr/src/tarantool \ && git -C /usr/src/tarantool checkout "$TARANTOOL_COMMIT" \ @@ -48,9 +54,34 @@ RUN set -x \ .) \ && make -C /usr/src/tarantool -j\ && make -C /usr/src/tarantool install \ - && rm -r /usr/src/tarantool \ + && : "---------- small ----------" \ + && (cd /usr/src/tarantool/src/lib/small; \ + cmake -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + .) \ + && make -C /usr/src/tarantool/src/lib/small \ + && make -C /usr/src/tarantool/src/lib/small install \ + && : "---------- msgpuck ----------" \ + && (cd /usr/src/tarantool/src/lib/msgpuck; \ + cmake -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + .) \ + && make -C /usr/src/tarantool/src/lib/msgpuck \ + && make -C /usr/src/tarantool/src/lib/msgpuck install \ + && : "---------- luarocks ----------" \ + && wget -O luarocks.tar.gz "$LUAROCKS_URL" \ + && mkdir -p /usr/src/luarocks \ + && tar -xzf luarocks.tar.gz -C /usr/src/luarocks --strip-components=1 \ + && (cd /usr/src/luarocks; \ + ./configure; \ + make build; \ + make install) \ + && rm -r /usr/src/luarocks \ && apk del .build-deps +COPY luarocks-config.lua /usr/local/etc/luarocks/config-5.1.lua RUN set -x \ && apk add --no-cache --virtual .run-deps \ @@ -64,70 +95,16 @@ RUN set -x \ gcc \ g++ \ postgresql-dev \ - && : "---------- expirationd ----------" \ - && (cd /usr/src; git clone https://github.com/tarantool/expirationd.git) \ - && cp -r /usr/src/expirationd/expirationd.lua "$TARANTOOL_INSTALL_LUADIR" \ - && rm -rf /usr/src/expirationd \ - && : "---------- queue ----------" \ - && (cd /usr/src; git clone https://github.com/tarantool/queue.git) \ - && mkdir -p "$TARANTOOL_INSTALL_LUADIR/queue/abstract/driver" \ - && cp -r /usr/src/queue/queue/*.lua "$TARANTOOL_INSTALL_LUADIR/queue" \ - && cp -r /usr/src/queue/queue/abstract/*.lua \ - "$TARANTOOL_INSTALL_LUADIR/queue/abstract" \ - && cp -r /usr/src/queue/queue/abstract/driver/*.lua \ - "$TARANTOOL_INSTALL_LUADIR/queue/abstract/driver" \ - && rm -rf /usr/src/queue \ - && : "---------- http ----------" \ - && (cd /usr/src; git clone https://github.com/tarantool/http.git) \ - && (cd /usr/src/http; cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .) \ - && (cd /usr/src/http; make -j) \ - && (cd /usr/src/http; make install) \ - && rm -rf /usr/src/http \ - && : "---------- connpool ----------" \ - && (cd /usr/src; git clone https://github.com/tarantool/connpool.git) \ - && cp -r /usr/src/connpool/connpool.lua "$TARANTOOL_INSTALL_LUADIR" \ - && rm -rf /usr/src/connpool \ - && : "---------- shard ----------" \ - && (cd /usr/src; git clone https://github.com/tarantool/shard.git) \ - && cp -r /usr/src/shard/shard.lua "$TARANTOOL_INSTALL_LUADIR" \ - && rm -rf /usr/src/shard \ - && : "---------- msgpuck ----------" \ - && (cd /usr/src; git clone https://github.com/tarantool/msgpuck.git) \ - && (cd /usr/src/msgpuck; cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .) \ - && (cd /usr/src/msgpuck; make -j) \ - && (cd /usr/src/msgpuck; make install) \ - && rm -rf /usr/src/cbench \ - && : "---------- cbench ----------" \ - && (cd /usr/src; git clone https://github.com/tarantool/cbench.git) \ - && (cd /usr/src/cbench; cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .) \ - && (cd /usr/src/cbench; make -j) \ - && (cd /usr/src/cbench; make install) \ - && rm -rf /usr/src/cbench \ - && : "---------- avro ----------" \ - && (cd /usr/src; git clone https://github.com/tarantool/tarantool-avro.git) \ - && (cd /usr/src/tarantool-avro; cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .) \ - && (cd /usr/src/tarantool-avro; make -j) \ - && (cd /usr/src/tarantool-avro; make install) \ - && rm -rf /usr/src/tarantool-avro \ - && : "---------- pg ----------" \ - && (cd /usr/src; git clone https://github.com/tarantool/pg.git) \ - && (cd /usr/src/pg; cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .) \ - && (cd /usr/src/pg; make -j) \ - && (cd /usr/src/pg; make install) \ - && rm -rf /usr/src/pg \ - && : "---------- mysql ----------" \ - && (cd /usr/src; git clone https://github.com/tarantool/mysql.git) \ - && (cd /usr/src/mysql; cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .) \ - && (cd /usr/src/mysql; make -j) \ - && (cd /usr/src/mysql; make install) \ - && rm -rf /usr/src/mysql \ - && : "---------- memcached ----------" \ - && (cd /usr/src; git clone https://github.com/tarantool/memcached.git) \ - && git -C /usr/src/memcached submodule update --init --recursive \ - && (cd /usr/src/memcached; cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .) \ - && (cd /usr/src/memcached; make -j) \ - && (cd /usr/src/memcached; make install) \ - && rm -rf /usr/src/memcached \ + && : "---------- luarocks ----------" \ + && luarocks install avro-schema \ + && luarocks install expirationd \ + && luarocks install queue \ + && luarocks install connpool \ + && luarocks install shard \ + && luarocks install http \ + && luarocks install pg \ + && luarocks install mysql \ + && luarocks install memcached \ && : "---------- remove build deps ----------" \ && apk del .build-deps @@ -145,7 +122,6 @@ WORKDIR /opt/tarantool COPY tarantool-entrypoint.lua /usr/local/bin/ COPY docker-entrypoint.sh /usr/local/bin/ -COPY console /usr/local/bin/ RUN ln -s usr/local/bin/docker-entrypoint.sh /entrypoint.sh # backwards compat ENTRYPOINT ["docker-entrypoint.sh"] diff --git a/1.7/console b/1.7/console deleted file mode 100755 index d6fb192..0000000 --- a/1.7/console +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env tarantool - -local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' - -console = require('console') -console.on_start(function(self) - local status, reason - status, reason = pcall(function() require('console').connect(CONSOLE_SOCKET_PATH) end) - if not status then - self:print(reason) - self.running = false - end -end) -console.on_client_disconnect(function(self) self.running = false end) -console.start() From f1eba18d279d15e87d06efa8578f5098946b4eb7 Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Thu, 14 Jul 2016 22:03:47 +0300 Subject: [PATCH 018/286] Reimplement entrypoint to patch box.cfg{} This change will make the entrypoint similar to tarantoolctl. --- 1.6/tarantool-entrypoint.lua | 195 +++++++++++++++++------------------ 1.7/tarantool-entrypoint.lua | 195 +++++++++++++++++------------------ 2 files changed, 194 insertions(+), 196 deletions(-) diff --git a/1.6/tarantool-entrypoint.lua b/1.6/tarantool-entrypoint.lua index 33ffef9..2e3efb6 100755 --- a/1.6/tarantool-entrypoint.lua +++ b/1.6/tarantool-entrypoint.lua @@ -9,86 +9,78 @@ local console = require('console') local TARANTOOL_DEFAULT_PORT = 3301 local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' -local slab_alloc_arena = os.getenv('TARANTOOL_SLAB_ALLOC_ARENA') or 1.0 -local slab_alloc_factor = os.getenv('TARANTOOL_SLAB_ALLOC_FACTOR') or 1.1 -local slab_alloc_maximal = os.getenv('TARANTOOL_SLAB_ALLOC_MAXIMAL') or 1048576 -local slab_alloc_minimal = os.getenv('TARANTOOL_SLAB_ALLOC_MINIMAL') or 16 -local user_name = os.getenv('TARANTOOL_USER_NAME') or 'guest' -local user_password = os.getenv('TARANTOOL_USER_PASSWORD') -local listen_port = tonumber(os.getenv('TARANTOOL_PORT')) or TARANTOOL_DEFAULT_PORT -local replication_source = os.getenv('TARANTOOL_REPLICATION_SOURCE') -local wal_mode = os.getenv('TARANTOOL_WAL_MODE') or 'write' - -local work_dir = '/var/lib/tarantool' -local snap_filename = "00000000000000000000.snap" -local snap_path = work_dir..'/'..snap_filename - -local first_run = false - -if fio.stat(snap_path) == nil and errno() == errno.ENOENT then - first_run = true -end - -local replication_source_table = {} -if replication_source ~= nil then - for uri in string.gmatch(replication_source, "[^,]+") do +local orig_cfg = box.cfg + +local function wrapper_cfg(override) + cfg = {} + cfg.slab_alloc_arena = os.getenv('TARANTOOL_SLAB_ALLOC_ARENA') or + override.slab_alloc_arena + cfg.slab_alloc_factor = os.getenv('TARANTOOL_SLAB_ALLOC_FACTOR') or + override.slab_alloc_factor + cfg.slab_alloc_maximal = os.getenv('TARANTOOL_SLAB_ALLOC_MAXIMAL') or + override.slab_alloc_maximal + cfg.slab_alloc_minimal = os.getenv('TARANTOOL_SLAB_ALLOC_MINIMAL') or + override.slab_alloc_minimal + cfg.listen = tonumber(os.getenv('TARANTOOL_PORT')) or + override.listen or TARANTOOL_DEFAULT_PORT + cfg.wal_mode = os.getenv('TARANTOOL_WAL_MODE') or + override.wal_mode + cfg.wal_dir = override.wal_dir or '/var/lib/tarantool' + cfg.snap_dir = override.snap_dir or '/var/lib/tarantool' + cfg.pid_file = override.pid_file or '/var/run/tarantool/tarantool.pid' + + local user_name = os.getenv('TARANTOOL_USER_NAME') or 'guest' + local user_password = os.getenv('TARANTOOL_USER_PASSWORD') + + local work_dir = '/var/lib/tarantool' + local snap_filename = "00000000000000000000.snap" + local snap_path = work_dir..'/'..snap_filename + + local first_run = false + + if fio.stat(snap_path) == nil and errno() == errno.ENOENT then + first_run = true + end - local parsed_uri = urilib.parse(uri) - if parsed_uri == nil then - error("Incorrect replication source URI format: '"..uri.."'") + local replication_source = os.getenv('TARANTOOL_REPLICATION_SOURCE') + local replication_source_table = {} + if replication_source ~= nil then + for uri in string.gmatch(replication_source, "[^,]+") do + + local parsed_uri = urilib.parse(uri) + if parsed_uri == nil then + error("Incorrect replication source URI format: '"..uri.."'") + end + local host = parsed_uri.host + local port = parsed_uri.service or TARANTOOL_DEFAULT_PORT + local user = parsed_uri.login or user_name + local password = parsed_uri.password or user_password + + if user == 'guest' then + replication_source = string.format("%s:%s", host, port) + elseif password == nil then + replication_source = string.format("%s:@%s:%s", user, host, port) + else + replication_source = string.format("%s:%s@%s:%s", user, password, + host, port) + end + + table.insert(replication_source_table, replication_source) end - local host = parsed_uri.host - local port = parsed_uri.service or TARANTOOL_DEFAULT_PORT - local user = parsed_uri.login or user_name - local password = parsed_uri.password or user_password - - if user == 'guest' then - replication_source = string.format("%s:%s", host, port) - elseif password == nil then - replication_source = string.format("%s:@%s:%s", user, host, port) - else - replication_source = string.format("%s:%s@%s:%s", user, password, - host, port) - end - - table.insert(replication_source_table, replication_source) end -end - + cfg.replication_source = replication_source_table -box.cfg { - slab_alloc_arena = slab_alloc_arena; - slab_alloc_factor = slab_alloc_factor; - slab_alloc_maximal = slab_alloc_maximal; - slab_alloc_minimal = slab_alloc_minimal; - wal_mode = wal_mode; - listen = listen_port; - work_dir = work_dir; - replication_source = replication_source_table; -} - -local min_replica_uuid = nil -if box.info.replication.status ~= 'off' then - local uuids - uuids = fun.map(function(replica) - return replica.uuid - end, - box.info.replication):totable() - - table.sort(uuids) - min_replica_uuid = uuids[1] -end - -if first_run and (#box.info.replication == 0 or - box.info.server.uuid == min_replica_uuid) then + orig_cfg(cfg) - print("Initializing database") + box.once('tarantool-entrypoint', function () + if first_run then + print("Initializing database") - if user_name ~= 'guest' and user_password == nil then - user_password = "" + if user_name ~= 'guest' and user_password == nil then + user_password = "" - warn_str = [[**************************************************** + warn_str = [[**************************************************** WARNING: No password has been set for the database. This will allow anyone with access to the Tarantool port to access your database. In @@ -98,11 +90,11 @@ WARNING: No password has been set for the database. Use "-e TARANTOOL_USER_PASSWORD=password" to set it in "docker run". ****************************************************]] - print(warn_str) - end + print(warn_str) + end - if user_name == 'guest' and user_password == nil then - warn_str = [[**************************************************** + if user_name == 'guest' and user_password == nil then + warn_str = [[**************************************************** WARNING: 'guest' is chosen as primary user. Since it is not allowed to set a password for guest user, your instance will be accessible @@ -112,13 +104,13 @@ WARNING: 'guest' is chosen as primary user. specify "-e TARANTOOL_USER_NAME=username" and pick a user name other than "guest". ****************************************************]] - print(warn_str) - end + print(warn_str) + end - if user_name == 'guest' and user_password ~= nil then - user_password = nil + if user_name == 'guest' and user_password ~= nil then + user_password = nil - warn_str = [[**************************************************** + warn_str = [[**************************************************** WARNING: A password for guest user has been specified. In Tarantool, guest user can't have a password and is always allowed to login, if it has @@ -127,30 +119,37 @@ WARNING: A password for guest user has been specified. specify "-e TARANTOOL_USER_NAME=username" and pick a user name other than "guest". ****************************************************]] - print(warn_str) - end - - if user_name ~= 'admin' and user_name ~= 'guest' then - print(string.format("Creating user '%s'", user_name)) - box.schema.user.create(user_name) - end + print(warn_str) + end + + if user_name ~= 'admin' and user_name ~= 'guest' then + print(string.format("Creating user '%s'", user_name)) + box.schema.user.create(user_name) + end + + if user_name ~= 'admin' then + print(string.format("Granting admin privileges to user '%s'", user_name)) + box.schema.user.grant(user_name, 'read,write,execute', 'universe') + box.schema.user.grant(user_name, 'replication') + end + + if user_name ~= 'guest' then + box.schema.user.passwd(user_name, user_password) + end + end + end) - if user_name ~= 'admin' then - print(string.format("Granting admin privileges to user '%s'", user_name)) - box.schema.user.grant(user_name, 'read,write,execute', 'universe') - box.schema.user.grant(user_name, 'replication') - end + console.listen(CONSOLE_SOCKET_PATH) - if user_name ~= 'guest' then - box.schema.user.passwd(user_name, user_password) - end end -console.listen(CONSOLE_SOCKET_PATH) +box.cfg = wrapper_cfg -- re-run the script passed as parameter with all arguments that follow execute_script = arg[1] -if execute_script ~= nil then +if execute_script == nil then + box.cfg {} +else narg = 0 while true do arg[narg] = arg[narg + 1] diff --git a/1.7/tarantool-entrypoint.lua b/1.7/tarantool-entrypoint.lua index 33ffef9..2e3efb6 100755 --- a/1.7/tarantool-entrypoint.lua +++ b/1.7/tarantool-entrypoint.lua @@ -9,86 +9,78 @@ local console = require('console') local TARANTOOL_DEFAULT_PORT = 3301 local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' -local slab_alloc_arena = os.getenv('TARANTOOL_SLAB_ALLOC_ARENA') or 1.0 -local slab_alloc_factor = os.getenv('TARANTOOL_SLAB_ALLOC_FACTOR') or 1.1 -local slab_alloc_maximal = os.getenv('TARANTOOL_SLAB_ALLOC_MAXIMAL') or 1048576 -local slab_alloc_minimal = os.getenv('TARANTOOL_SLAB_ALLOC_MINIMAL') or 16 -local user_name = os.getenv('TARANTOOL_USER_NAME') or 'guest' -local user_password = os.getenv('TARANTOOL_USER_PASSWORD') -local listen_port = tonumber(os.getenv('TARANTOOL_PORT')) or TARANTOOL_DEFAULT_PORT -local replication_source = os.getenv('TARANTOOL_REPLICATION_SOURCE') -local wal_mode = os.getenv('TARANTOOL_WAL_MODE') or 'write' - -local work_dir = '/var/lib/tarantool' -local snap_filename = "00000000000000000000.snap" -local snap_path = work_dir..'/'..snap_filename - -local first_run = false - -if fio.stat(snap_path) == nil and errno() == errno.ENOENT then - first_run = true -end - -local replication_source_table = {} -if replication_source ~= nil then - for uri in string.gmatch(replication_source, "[^,]+") do +local orig_cfg = box.cfg + +local function wrapper_cfg(override) + cfg = {} + cfg.slab_alloc_arena = os.getenv('TARANTOOL_SLAB_ALLOC_ARENA') or + override.slab_alloc_arena + cfg.slab_alloc_factor = os.getenv('TARANTOOL_SLAB_ALLOC_FACTOR') or + override.slab_alloc_factor + cfg.slab_alloc_maximal = os.getenv('TARANTOOL_SLAB_ALLOC_MAXIMAL') or + override.slab_alloc_maximal + cfg.slab_alloc_minimal = os.getenv('TARANTOOL_SLAB_ALLOC_MINIMAL') or + override.slab_alloc_minimal + cfg.listen = tonumber(os.getenv('TARANTOOL_PORT')) or + override.listen or TARANTOOL_DEFAULT_PORT + cfg.wal_mode = os.getenv('TARANTOOL_WAL_MODE') or + override.wal_mode + cfg.wal_dir = override.wal_dir or '/var/lib/tarantool' + cfg.snap_dir = override.snap_dir or '/var/lib/tarantool' + cfg.pid_file = override.pid_file or '/var/run/tarantool/tarantool.pid' + + local user_name = os.getenv('TARANTOOL_USER_NAME') or 'guest' + local user_password = os.getenv('TARANTOOL_USER_PASSWORD') + + local work_dir = '/var/lib/tarantool' + local snap_filename = "00000000000000000000.snap" + local snap_path = work_dir..'/'..snap_filename + + local first_run = false + + if fio.stat(snap_path) == nil and errno() == errno.ENOENT then + first_run = true + end - local parsed_uri = urilib.parse(uri) - if parsed_uri == nil then - error("Incorrect replication source URI format: '"..uri.."'") + local replication_source = os.getenv('TARANTOOL_REPLICATION_SOURCE') + local replication_source_table = {} + if replication_source ~= nil then + for uri in string.gmatch(replication_source, "[^,]+") do + + local parsed_uri = urilib.parse(uri) + if parsed_uri == nil then + error("Incorrect replication source URI format: '"..uri.."'") + end + local host = parsed_uri.host + local port = parsed_uri.service or TARANTOOL_DEFAULT_PORT + local user = parsed_uri.login or user_name + local password = parsed_uri.password or user_password + + if user == 'guest' then + replication_source = string.format("%s:%s", host, port) + elseif password == nil then + replication_source = string.format("%s:@%s:%s", user, host, port) + else + replication_source = string.format("%s:%s@%s:%s", user, password, + host, port) + end + + table.insert(replication_source_table, replication_source) end - local host = parsed_uri.host - local port = parsed_uri.service or TARANTOOL_DEFAULT_PORT - local user = parsed_uri.login or user_name - local password = parsed_uri.password or user_password - - if user == 'guest' then - replication_source = string.format("%s:%s", host, port) - elseif password == nil then - replication_source = string.format("%s:@%s:%s", user, host, port) - else - replication_source = string.format("%s:%s@%s:%s", user, password, - host, port) - end - - table.insert(replication_source_table, replication_source) end -end - + cfg.replication_source = replication_source_table -box.cfg { - slab_alloc_arena = slab_alloc_arena; - slab_alloc_factor = slab_alloc_factor; - slab_alloc_maximal = slab_alloc_maximal; - slab_alloc_minimal = slab_alloc_minimal; - wal_mode = wal_mode; - listen = listen_port; - work_dir = work_dir; - replication_source = replication_source_table; -} - -local min_replica_uuid = nil -if box.info.replication.status ~= 'off' then - local uuids - uuids = fun.map(function(replica) - return replica.uuid - end, - box.info.replication):totable() - - table.sort(uuids) - min_replica_uuid = uuids[1] -end - -if first_run and (#box.info.replication == 0 or - box.info.server.uuid == min_replica_uuid) then + orig_cfg(cfg) - print("Initializing database") + box.once('tarantool-entrypoint', function () + if first_run then + print("Initializing database") - if user_name ~= 'guest' and user_password == nil then - user_password = "" + if user_name ~= 'guest' and user_password == nil then + user_password = "" - warn_str = [[**************************************************** + warn_str = [[**************************************************** WARNING: No password has been set for the database. This will allow anyone with access to the Tarantool port to access your database. In @@ -98,11 +90,11 @@ WARNING: No password has been set for the database. Use "-e TARANTOOL_USER_PASSWORD=password" to set it in "docker run". ****************************************************]] - print(warn_str) - end + print(warn_str) + end - if user_name == 'guest' and user_password == nil then - warn_str = [[**************************************************** + if user_name == 'guest' and user_password == nil then + warn_str = [[**************************************************** WARNING: 'guest' is chosen as primary user. Since it is not allowed to set a password for guest user, your instance will be accessible @@ -112,13 +104,13 @@ WARNING: 'guest' is chosen as primary user. specify "-e TARANTOOL_USER_NAME=username" and pick a user name other than "guest". ****************************************************]] - print(warn_str) - end + print(warn_str) + end - if user_name == 'guest' and user_password ~= nil then - user_password = nil + if user_name == 'guest' and user_password ~= nil then + user_password = nil - warn_str = [[**************************************************** + warn_str = [[**************************************************** WARNING: A password for guest user has been specified. In Tarantool, guest user can't have a password and is always allowed to login, if it has @@ -127,30 +119,37 @@ WARNING: A password for guest user has been specified. specify "-e TARANTOOL_USER_NAME=username" and pick a user name other than "guest". ****************************************************]] - print(warn_str) - end - - if user_name ~= 'admin' and user_name ~= 'guest' then - print(string.format("Creating user '%s'", user_name)) - box.schema.user.create(user_name) - end + print(warn_str) + end + + if user_name ~= 'admin' and user_name ~= 'guest' then + print(string.format("Creating user '%s'", user_name)) + box.schema.user.create(user_name) + end + + if user_name ~= 'admin' then + print(string.format("Granting admin privileges to user '%s'", user_name)) + box.schema.user.grant(user_name, 'read,write,execute', 'universe') + box.schema.user.grant(user_name, 'replication') + end + + if user_name ~= 'guest' then + box.schema.user.passwd(user_name, user_password) + end + end + end) - if user_name ~= 'admin' then - print(string.format("Granting admin privileges to user '%s'", user_name)) - box.schema.user.grant(user_name, 'read,write,execute', 'universe') - box.schema.user.grant(user_name, 'replication') - end + console.listen(CONSOLE_SOCKET_PATH) - if user_name ~= 'guest' then - box.schema.user.passwd(user_name, user_password) - end end -console.listen(CONSOLE_SOCKET_PATH) +box.cfg = wrapper_cfg -- re-run the script passed as parameter with all arguments that follow execute_script = arg[1] -if execute_script ~= nil then +if execute_script == nil then + box.cfg {} +else narg = 0 while true do arg[narg] = arg[narg + 1] From 6d25f1e96617c2e866bddaf45e70dbd52136c63b Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Fri, 15 Jul 2016 11:26:01 +0300 Subject: [PATCH 019/286] Add luarocks configs --- 1.6/luarocks-config.lua | 9 +++++++++ 1.7/luarocks-config.lua | 9 +++++++++ 2 files changed, 18 insertions(+) create mode 100644 1.6/luarocks-config.lua create mode 100644 1.7/luarocks-config.lua diff --git a/1.6/luarocks-config.lua b/1.6/luarocks-config.lua new file mode 100644 index 0000000..111f955 --- /dev/null +++ b/1.6/luarocks-config.lua @@ -0,0 +1,9 @@ +rocks_trees = { + { name = [[user]], root = home..[[/.luarocks]] }, + { name = [[system]], root = [[/usr/local]] } +} + +rocks_servers = { + [[http://rocks.tarantool.org/]], + [[http://luarocks.org/repositories/rocks]] +} diff --git a/1.7/luarocks-config.lua b/1.7/luarocks-config.lua new file mode 100644 index 0000000..111f955 --- /dev/null +++ b/1.7/luarocks-config.lua @@ -0,0 +1,9 @@ +rocks_trees = { + { name = [[user]], root = home..[[/.luarocks]] }, + { name = [[system]], root = [[/usr/local]] } +} + +rocks_servers = { + [[http://rocks.tarantool.org/]], + [[http://luarocks.org/repositories/rocks]] +} From 034502a917232be5b558eef4067da94d26f76229 Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Fri, 15 Jul 2016 18:03:11 +0300 Subject: [PATCH 020/286] Open console if running within a terminal --- 1.6/Dockerfile | 1 + 1.6/tarantool-entrypoint.lua | 6 ++++++ 1.7/Dockerfile | 1 + 1.7/tarantool-entrypoint.lua | 6 ++++++ 4 files changed, 14 insertions(+) diff --git a/1.6/Dockerfile b/1.6/Dockerfile index f25ab51..1f69727 100644 --- a/1.6/Dockerfile +++ b/1.6/Dockerfile @@ -102,6 +102,7 @@ RUN set -x \ && luarocks install pg \ && luarocks install mysql \ && luarocks install memcached \ + && luarocks install lua-term \ && : "---------- remove build deps ----------" \ && apk del .build-deps diff --git a/1.6/tarantool-entrypoint.lua b/1.6/tarantool-entrypoint.lua index 2e3efb6..3396ce4 100755 --- a/1.6/tarantool-entrypoint.lua +++ b/1.6/tarantool-entrypoint.lua @@ -5,6 +5,7 @@ local errno = require('errno') local fun = require('fun') local urilib = require('uri') local console = require('console') +local term = require('term') local TARANTOOL_DEFAULT_PORT = 3301 local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' @@ -149,6 +150,11 @@ box.cfg = wrapper_cfg execute_script = arg[1] if execute_script == nil then box.cfg {} + + if term.isatty(io.stdout) then + console.start() + os.exit(0) + end else narg = 0 while true do diff --git a/1.7/Dockerfile b/1.7/Dockerfile index d160ace..62a16b9 100644 --- a/1.7/Dockerfile +++ b/1.7/Dockerfile @@ -105,6 +105,7 @@ RUN set -x \ && luarocks install pg \ && luarocks install mysql \ && luarocks install memcached \ + && luarocks install lua-term \ && : "---------- remove build deps ----------" \ && apk del .build-deps diff --git a/1.7/tarantool-entrypoint.lua b/1.7/tarantool-entrypoint.lua index 2e3efb6..3396ce4 100755 --- a/1.7/tarantool-entrypoint.lua +++ b/1.7/tarantool-entrypoint.lua @@ -5,6 +5,7 @@ local errno = require('errno') local fun = require('fun') local urilib = require('uri') local console = require('console') +local term = require('term') local TARANTOOL_DEFAULT_PORT = 3301 local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' @@ -149,6 +150,11 @@ box.cfg = wrapper_cfg execute_script = arg[1] if execute_script == nil then box.cfg {} + + if term.isatty(io.stdout) then + console.start() + os.exit(0) + end else narg = 0 while true do From 1e433195b55e0cdf869d6c5d954f05e96a431ecf Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Fri, 15 Jul 2016 18:04:38 +0300 Subject: [PATCH 021/286] Change tarantoolctl default settings --- 1.6/Dockerfile | 8 +++++--- 1.6/tarantool.default | 22 ++++++++++++++++++++++ 1.7/Dockerfile | 3 ++- 1.7/tarantool.default | 22 ++++++++++++++++++++++ 4 files changed, 51 insertions(+), 4 deletions(-) create mode 100644 1.6/tarantool.default create mode 100644 1.7/tarantool.default diff --git a/1.6/Dockerfile b/1.6/Dockerfile index 1f69727..4a3c4c9 100644 --- a/1.6/Dockerfile +++ b/1.6/Dockerfile @@ -5,9 +5,9 @@ RUN addgroup -S tarantool \ && adduser -S -G tarantool tarantool \ && apk add --no-cache 'su-exec>=0.2' -ENV TARANTOOL_VERSION=1.6.8.525 \ - TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool/releases/download/1.6.8.525/tarantool-1.6.8.525.tar.gz \ - TARANTOOL_DOWNLOAD_SHA1=7b451b8898b3022f37efba461048321f978b8587 \ +ENV TARANTOOL_VERSION=1.6.8.741 \ + TARANTOOL_DOWNLOAD_URL=https://tarantool.org/dist/1.6/tarantool-1.6.8.741.tar.gz \ + TARANTOOL_DOWNLOAD_SHA1=8fca24b6f55e753ddce001146ee1c3659ddaf92f \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ LUAROCKS_URL=http://keplerproject.github.io/luarocks/releases/luarocks-2.3.0.tar.gz @@ -44,6 +44,7 @@ RUN set -x \ && mkdir -p /usr/src/tarantool \ && tar -xzf tarantool.tar.gz -C /usr/src/tarantool --strip-components=1 \ && rm tarantool.tar.gz \ + && echo "$TARANTOOL_VERSION" > /usr/src/tarantool/VERSION \ && (cd /usr/src/tarantool; \ cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo\ -DENABLE_BUNDLED_LIBYAML:BOOL=OFF\ @@ -121,6 +122,7 @@ WORKDIR /opt/tarantool COPY tarantool-entrypoint.lua /usr/local/bin/ COPY docker-entrypoint.sh /usr/local/bin/ +COPY tarantool.default /usr/local/etc/default/tarantool RUN ln -s usr/local/bin/docker-entrypoint.sh /entrypoint.sh # backwards compat ENTRYPOINT ["docker-entrypoint.sh"] diff --git a/1.6/tarantool.default b/1.6/tarantool.default new file mode 100644 index 0000000..fffe3b0 --- /dev/null +++ b/1.6/tarantool.default @@ -0,0 +1,22 @@ +-- +-- System-wide settings for tarantoolctl and init scripts +-- +-- This file is meant to enable the usage of tarantoolctl inside +-- docker containers. Since there is no init system, most of its +-- functionality will not work, except 'tarantoolctl enter' or +-- 'tarantoolctl status'. +-- + +default_cfg = { + pid_file = "/var/run/tarantool", -- /var/run/tarantool/${INSTANCE}.pid + wal_dir = "/var/lib/tarantool", -- /var/lib/tarantool/${INSTANCE}/ + snap_dir = "/var/lib/tarantool", -- /var/lib/tarantool/${INSTANCE} + vinyl_dir = "/var/lib/tarantool", -- /var/lib/tarantool/${INSTANCE} + logger = "/var/log/tarantool", -- /var/log/tarantool/${INSTANCE}.log + username = "tarantool", +} + +-- instances.available - all available instances +-- instances.enabled - instances to autostart by sysvinit +instance_dir = "/usr/local/etc/tarantool/instances.enabled" +-- vim: set ft=lua : diff --git a/1.7/Dockerfile b/1.7/Dockerfile index 62a16b9..e573ff3 100644 --- a/1.7/Dockerfile +++ b/1.7/Dockerfile @@ -7,7 +7,7 @@ RUN addgroup -S tarantool \ ENV TARANTOOL_VERSION=1.7 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ - TARANTOOL_COMMIT=b4a4139 \ + TARANTOOL_COMMIT=71515ae \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ LUAROCKS_URL=http://keplerproject.github.io/luarocks/releases/luarocks-2.3.0.tar.gz @@ -123,6 +123,7 @@ WORKDIR /opt/tarantool COPY tarantool-entrypoint.lua /usr/local/bin/ COPY docker-entrypoint.sh /usr/local/bin/ +COPY tarantool.default /usr/local/etc/default/tarantool RUN ln -s usr/local/bin/docker-entrypoint.sh /entrypoint.sh # backwards compat ENTRYPOINT ["docker-entrypoint.sh"] diff --git a/1.7/tarantool.default b/1.7/tarantool.default new file mode 100644 index 0000000..fffe3b0 --- /dev/null +++ b/1.7/tarantool.default @@ -0,0 +1,22 @@ +-- +-- System-wide settings for tarantoolctl and init scripts +-- +-- This file is meant to enable the usage of tarantoolctl inside +-- docker containers. Since there is no init system, most of its +-- functionality will not work, except 'tarantoolctl enter' or +-- 'tarantoolctl status'. +-- + +default_cfg = { + pid_file = "/var/run/tarantool", -- /var/run/tarantool/${INSTANCE}.pid + wal_dir = "/var/lib/tarantool", -- /var/lib/tarantool/${INSTANCE}/ + snap_dir = "/var/lib/tarantool", -- /var/lib/tarantool/${INSTANCE} + vinyl_dir = "/var/lib/tarantool", -- /var/lib/tarantool/${INSTANCE} + logger = "/var/log/tarantool", -- /var/log/tarantool/${INSTANCE}.log + username = "tarantool", +} + +-- instances.available - all available instances +-- instances.enabled - instances to autostart by sysvinit +instance_dir = "/usr/local/etc/tarantool/instances.enabled" +-- vim: set ft=lua : From 6c9e797acb2eb69aa474e8a9777f615a97d35c08 Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Fri, 15 Jul 2016 18:07:11 +0300 Subject: [PATCH 022/286] Update README.md --- README.md | 114 +++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 105 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index faa6cc6..df590a9 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,105 @@ -# tarantool-docker -Docker images with tarantool for Centos, Fedora, Debian and Ubuntu: -* Configured yum/apt with tarantool repo -* Configured C.UTF-8 locale(required for tarantool) -* Tarantool database with dev package and default modules -* Expirationd module -* Queue module -* Http modlue -* Sharding module +# What is Tarantool + +Tarantool is a Lua application server integrated with a database management system. It has a "fiber" model which means that many Tarantool applications can run simultaneously on a single thread, while the Tarantool server itself can run multiple threads for input-output and background maintenance. It incorporates the LuaJIT -- "Just In Time" -- Lua compiler, Lua libraries for most common applications, and the Tarantool Database Server which is an established NoSQL DBMS. Thus Tarantool serves all the purposes that have made node.js and Twisted popular, plus it supports data persistence. + +The database API allows for permanently storing Lua objects, managing object collections, creating or dropping secondary keys, making changes atomically, configuring and monitoring replication, performing controlled fail-over, and executing Lua code triggered by database events. Remote database instances are accessible transparently via a remote-procedure-invocation API. + +For more information, please visit [tarantool.org](http://tarantool.org). + +# How to use this image + +## Start a Tarantool instance (without authentication) + +```console +$ docker run --name some-tarantool -d tarantool/tarantool:1.7 +``` + +Where `some-tarantool` is the name you want to assign to your container, and `1.7` is the tag specifying the Tarantool version you want. The `box.cfg{}` configuration manager is automatically called from the entry point, so your database will be ready to accept connections and serve data. + +Note: this will create an instance without password protection and with an exposed 'guest' user, so anyone can directly connect to the container to change data in Tarantool. Please use this option only for development or testing. + +## Start a Tarantool instance (with authentication) + +```console +$ docker run --name some-tarantool -e TARANTOOL_USER_NAME=myusername -e TARANTOOL_USER_PASSWORD=mysecretpassword -d tarantool/tarantool:1.7 +``` + +Where `some-tarantool` is the name you want to assign to your container, `myusername` is the name of the user that will be created and granted admin privileges, `mysecretpassword` is the password to be set for the user, and `1.7` is the tag specifying the Tarantool version you want. The `box.cfg{}` configuration manager is automatically called from the entry point, so your database will be ready to accept connections and serve data. + +## Connect to Tarantool from an application in another Docker container + +This image exposes the standard Tarantool port (3301), so container linking makes the Tarantool instance available to other application containers. Start your application container like this in order to link it to the Tarantool container: + +```console +$ docker run --link some-tarantool:tarantool -d application-that-uses-tarantool +``` + +## Connect to Tarantool from the Tarantool command line client + +```console +$ docker run -it --link some-tarantool:tarantool --rm tarantool/tarantool:1.7 tarantoolctl connect myusername:mysecretpassword@tarantool:3301 +``` + +## Environment Variables + +When you start the Tarantool image, you can adjust the configuration of the Tarantool instance by passing one or more environment variables on the `docker run` command line. + +### `TARANTOOL_USER_NAME` + +Setting this variable allows you to pick the name of the user that is utilized for remote connections. By default, it is 'guest'. Please note that since guest user in Tarantool can't have a password, it is highly recommended that you change it. + +### `TARANTOOL_USER_PASSWORD` + +For security reasons, it is recommended that you never leave this variable unset. This environment variable sets the user's password for Tarantool. In the above example, it is set to "mysecretpassword". + +### `TARANTOOL_PORT` + +Optional. Specifying this variable will tell Tarantool to listen for incoming connections on a specific port. Default is 3301. + +### `TARANTOOL_REPLICATION_SOURCE` + +Optional. Comma-separated list of URIs to treat as replication sources. Upon the start, Tarantool will attempt to connect to those instances, fetch the data snapshot and start replicating transaction logs. In other words, it will become a slave. For the multi-master configuration, other participating instances of Tarantool should be started with the same TARANTOOL_REPLICATION_SOURCE. (NB: applicable only to 1.7) + +### `TARANTOOL_SLAB_ALLOC_ARENA` + +Optional. Specifies how much memory Tarantool allocates to actually store tuples, in gigabytes. When the limit is reached, INSERT or UPDATE requests begin failing. Default is 1.0. + +### `TARANTOOL_SLAB_ALLOC_FACTOR` + +Optional. Used as the multiplier for computing the sizes of memory chunks that tuples are stored in. A lower value may result in less wasted memory depending on the total amount of memory available and the distribution of item sizes. Default is 1.1. + +### `TARANTOOL_SLAB_ALLOC_MAXIMAL` + +Optional. Size of the largest allocation unit in bytes. It can be increased if it is necessary to store large tuples. Default is 1048576. + +### `TARANTOOL_SLAB_ALLOC_MINIMAL` + +Optional. Size of the smallest allocation unit, in bytes. It can be decreased if most of the tuples are very small. Default is 16. + +# Initializing a new instance + +When a container is started for the first time, Tarantool entry point will call box.cfg{}, create users as necessary and expose the configured port. + +# Adding application code in Lua + +To add your application code written in Lua, you will need to inherit from one of the `tarantool` images and add your Lua code to /opt/tarantool: + +```bash +FROM tarantool/tarantool:1.6 +COPY app.lua /opt/tarantool +CMD ["tarantool", "/opt/tarantool/app.lua"] +``` + +# Running without a helper script + +Sometimes you may want to run Tarantool completely on your own, instead of relying on the entrypoint script to call `box.cfg{}` for you. This may be the case when you have complex initialization logic, or packaging an existing application that you don't want to adapt to conventions of these Docker images. + +Just replace `tarantool` with `/usr/local/bin/tarantool` in your Dockerfile: + +```bash +FROM tarantool/tarantool:1.6 +COPY app.lua /opt/tarantool +CMD ["/usr/local/bin/tarantool", "/opt/tarantool/app.lua"] +``` + +This will call Tarantool directly, sidestepping all entrypoint logic. From dc8f26f2f87d0946a8577d437c97a66fbb653ef7 Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Fri, 15 Jul 2016 18:56:52 +0300 Subject: [PATCH 023/286] Reduce container size --- 1.6/Dockerfile | 17 ++++++++++++----- 1.7/Dockerfile | 17 ++++++++++++----- 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/1.6/Dockerfile b/1.6/Dockerfile index 4a3c4c9..49980a1 100644 --- a/1.6/Dockerfile +++ b/1.6/Dockerfile @@ -23,14 +23,10 @@ RUN set -x \ libgomp \ lua \ curl \ - lua-dev \ - musl-dev \ - make \ - git \ - gcc \ tar \ zip \ && apk add --no-cache --virtual .build-deps \ + gcc \ g++ \ cmake \ readline-dev \ @@ -39,6 +35,10 @@ RUN set -x \ lz4-dev \ binutils-dev \ ncurses-dev \ + lua-dev \ + musl-dev \ + make \ + git \ && wget -O tarantool.tar.gz "$TARANTOOL_DOWNLOAD_URL" \ && echo "$TARANTOOL_DOWNLOAD_SHA1 *tarantool.tar.gz" | sha1sum -c - \ && mkdir -p /usr/src/tarantool \ @@ -53,6 +53,7 @@ RUN set -x \ .) \ && make -C /usr/src/tarantool -j \ && make -C /usr/src/tarantool install \ + && make -C /usr/src/tarantool clean \ && : "---------- small ----------" \ && (cd /usr/src/tarantool/src/lib/small; \ cmake -DCMAKE_INSTALL_PREFIX=/usr \ @@ -61,6 +62,7 @@ RUN set -x \ .) \ && make -C /usr/src/tarantool/src/lib/small \ && make -C /usr/src/tarantool/src/lib/small install \ + && make -C /usr/src/tarantool/src/lib/small clean \ && : "---------- msgpuck ----------" \ && (cd /usr/src/tarantool/src/lib/msgpuck; \ cmake -DCMAKE_INSTALL_PREFIX=/usr \ @@ -69,6 +71,7 @@ RUN set -x \ .) \ && make -C /usr/src/tarantool/src/lib/msgpuck \ && make -C /usr/src/tarantool/src/lib/msgpuck install \ + && make -C /usr/src/tarantool/src/lib/msgpuck clean \ && : "---------- luarocks ----------" \ && wget -O luarocks.tar.gz "$LUAROCKS_URL" \ && mkdir -p /usr/src/luarocks \ @@ -78,6 +81,8 @@ RUN set -x \ make build; \ make install) \ && rm -r /usr/src/luarocks \ + && rm -rf /usr/src/tarantool \ + && : "---------- remove build deps ----------" \ && apk del .build-deps COPY luarocks-config.lua /usr/local/etc/luarocks/config-5.1.lua @@ -93,6 +98,8 @@ RUN set -x \ gcc \ g++ \ postgresql-dev \ + lua-dev \ + musl-dev \ && : "---------- luarocks ----------" \ && luarocks install avro-schema \ && luarocks install expirationd \ diff --git a/1.7/Dockerfile b/1.7/Dockerfile index e573ff3..17e9965 100644 --- a/1.7/Dockerfile +++ b/1.7/Dockerfile @@ -23,15 +23,11 @@ RUN set -x \ libgomp \ lua \ curl \ - lua-dev \ - musl-dev \ - make \ - git \ - gcc \ tar \ zip \ && apk add --no-cache --virtual .build-deps \ perl \ + gcc \ g++ \ cmake \ readline-dev \ @@ -40,6 +36,10 @@ RUN set -x \ lz4-dev \ binutils-dev \ ncurses-dev \ + lua-dev \ + musl-dev \ + make \ + git \ && : "---------- tarantool ----------" \ && mkdir -p /usr/src/tarantool \ && git clone "$TARANTOOL_DOWNLOAD_URL" /usr/src/tarantool \ @@ -54,6 +54,7 @@ RUN set -x \ .) \ && make -C /usr/src/tarantool -j\ && make -C /usr/src/tarantool install \ + && make -C /usr/src/tarantool clean \ && : "---------- small ----------" \ && (cd /usr/src/tarantool/src/lib/small; \ cmake -DCMAKE_INSTALL_PREFIX=/usr \ @@ -62,6 +63,7 @@ RUN set -x \ .) \ && make -C /usr/src/tarantool/src/lib/small \ && make -C /usr/src/tarantool/src/lib/small install \ + && make -C /usr/src/tarantool/src/lib/small clean \ && : "---------- msgpuck ----------" \ && (cd /usr/src/tarantool/src/lib/msgpuck; \ cmake -DCMAKE_INSTALL_PREFIX=/usr \ @@ -70,6 +72,7 @@ RUN set -x \ .) \ && make -C /usr/src/tarantool/src/lib/msgpuck \ && make -C /usr/src/tarantool/src/lib/msgpuck install \ + && make -C /usr/src/tarantool/src/lib/msgpuck clean \ && : "---------- luarocks ----------" \ && wget -O luarocks.tar.gz "$LUAROCKS_URL" \ && mkdir -p /usr/src/luarocks \ @@ -79,6 +82,8 @@ RUN set -x \ make build; \ make install) \ && rm -r /usr/src/luarocks \ + && rm -rf /usr/src/tarantool \ + && : "---------- remove build deps ----------" \ && apk del .build-deps COPY luarocks-config.lua /usr/local/etc/luarocks/config-5.1.lua @@ -95,6 +100,8 @@ RUN set -x \ gcc \ g++ \ postgresql-dev \ + lua-dev \ + musl-dev \ && : "---------- luarocks ----------" \ && luarocks install avro-schema \ && luarocks install expirationd \ From 2731efa4dc0a02a3235da767779ef1f5bf2317a4 Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Thu, 21 Jul 2016 15:09:10 +0300 Subject: [PATCH 024/286] Add tarantool-prometheus module --- 1.6/Dockerfile | 1 + 1.7/Dockerfile | 1 + 2 files changed, 2 insertions(+) diff --git a/1.6/Dockerfile b/1.6/Dockerfile index 49980a1..91f5925 100644 --- a/1.6/Dockerfile +++ b/1.6/Dockerfile @@ -110,6 +110,7 @@ RUN set -x \ && luarocks install pg \ && luarocks install mysql \ && luarocks install memcached \ + && luarocks install tarantool-prometheus \ && luarocks install lua-term \ && : "---------- remove build deps ----------" \ && apk del .build-deps diff --git a/1.7/Dockerfile b/1.7/Dockerfile index 17e9965..10e10c8 100644 --- a/1.7/Dockerfile +++ b/1.7/Dockerfile @@ -112,6 +112,7 @@ RUN set -x \ && luarocks install pg \ && luarocks install mysql \ && luarocks install memcached \ + && luarocks install tarantool-prometheus \ && luarocks install lua-term \ && : "---------- remove build deps ----------" \ && apk del .build-deps From 33aa0ecbfcd1f095578a6c4f1130d8c96d223209 Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Mon, 25 Jul 2016 19:14:38 +0300 Subject: [PATCH 025/286] Fix numeric env parameters --- 1.6/tarantool-entrypoint.lua | 8 ++++---- 1.7/tarantool-entrypoint.lua | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/1.6/tarantool-entrypoint.lua b/1.6/tarantool-entrypoint.lua index 3396ce4..6f3a484 100755 --- a/1.6/tarantool-entrypoint.lua +++ b/1.6/tarantool-entrypoint.lua @@ -14,13 +14,13 @@ local orig_cfg = box.cfg local function wrapper_cfg(override) cfg = {} - cfg.slab_alloc_arena = os.getenv('TARANTOOL_SLAB_ALLOC_ARENA') or + cfg.slab_alloc_arena = tonumber(os.getenv('TARANTOOL_SLAB_ALLOC_ARENA')) or override.slab_alloc_arena - cfg.slab_alloc_factor = os.getenv('TARANTOOL_SLAB_ALLOC_FACTOR') or + cfg.slab_alloc_factor = tonumber(os.getenv('TARANTOOL_SLAB_ALLOC_FACTOR')) or override.slab_alloc_factor - cfg.slab_alloc_maximal = os.getenv('TARANTOOL_SLAB_ALLOC_MAXIMAL') or + cfg.slab_alloc_maximal = tonumber(os.getenv('TARANTOOL_SLAB_ALLOC_MAXIMAL')) or override.slab_alloc_maximal - cfg.slab_alloc_minimal = os.getenv('TARANTOOL_SLAB_ALLOC_MINIMAL') or + cfg.slab_alloc_minimal = tonumber(os.getenv('TARANTOOL_SLAB_ALLOC_MINIMAL')) or override.slab_alloc_minimal cfg.listen = tonumber(os.getenv('TARANTOOL_PORT')) or override.listen or TARANTOOL_DEFAULT_PORT diff --git a/1.7/tarantool-entrypoint.lua b/1.7/tarantool-entrypoint.lua index 3396ce4..6f3a484 100755 --- a/1.7/tarantool-entrypoint.lua +++ b/1.7/tarantool-entrypoint.lua @@ -14,13 +14,13 @@ local orig_cfg = box.cfg local function wrapper_cfg(override) cfg = {} - cfg.slab_alloc_arena = os.getenv('TARANTOOL_SLAB_ALLOC_ARENA') or + cfg.slab_alloc_arena = tonumber(os.getenv('TARANTOOL_SLAB_ALLOC_ARENA')) or override.slab_alloc_arena - cfg.slab_alloc_factor = os.getenv('TARANTOOL_SLAB_ALLOC_FACTOR') or + cfg.slab_alloc_factor = tonumber(os.getenv('TARANTOOL_SLAB_ALLOC_FACTOR')) or override.slab_alloc_factor - cfg.slab_alloc_maximal = os.getenv('TARANTOOL_SLAB_ALLOC_MAXIMAL') or + cfg.slab_alloc_maximal = tonumber(os.getenv('TARANTOOL_SLAB_ALLOC_MAXIMAL')) or override.slab_alloc_maximal - cfg.slab_alloc_minimal = os.getenv('TARANTOOL_SLAB_ALLOC_MINIMAL') or + cfg.slab_alloc_minimal = tonumber(os.getenv('TARANTOOL_SLAB_ALLOC_MINIMAL')) or override.slab_alloc_minimal cfg.listen = tonumber(os.getenv('TARANTOOL_PORT')) or override.listen or TARANTOOL_DEFAULT_PORT From c2ef99f16453a397fb07c144ab73662adf06dc1b Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Thu, 4 Aug 2016 15:07:22 +0300 Subject: [PATCH 026/286] Allow to override replication_source from box.cfg --- 1.6/tarantool-entrypoint.lua | 6 +++++- 1.7/tarantool-entrypoint.lua | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/1.6/tarantool-entrypoint.lua b/1.6/tarantool-entrypoint.lua index 6f3a484..30a3ae5 100755 --- a/1.6/tarantool-entrypoint.lua +++ b/1.6/tarantool-entrypoint.lua @@ -70,7 +70,11 @@ local function wrapper_cfg(override) end end - cfg.replication_source = replication_source_table + if replication_source then + cfg.replication_source = replication_source_table + else + cfg.replication_source = override.replication_source + end orig_cfg(cfg) diff --git a/1.7/tarantool-entrypoint.lua b/1.7/tarantool-entrypoint.lua index 6f3a484..30a3ae5 100755 --- a/1.7/tarantool-entrypoint.lua +++ b/1.7/tarantool-entrypoint.lua @@ -70,7 +70,11 @@ local function wrapper_cfg(override) end end - cfg.replication_source = replication_source_table + if replication_source then + cfg.replication_source = replication_source_table + else + cfg.replication_source = override.replication_source + end orig_cfg(cfg) From afd978faca3cd1e3ab20fc958f97dc320fc76a79 Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Thu, 4 Aug 2016 18:12:08 +0300 Subject: [PATCH 027/286] Allow to change settings after first run There is now a way to change settings dynamically: tarantool_set_config.lua e.g. tarantool_set_config.lua TARANTOOL_SLAB_ALLOC_ARENA 1.2 All things that can be set via env, can be changed this way. Fixes #4 --- 1.6/Dockerfile | 7 +- 1.6/tarantool-entrypoint.lua | 148 ++++++++++++++++++++++++----------- 1.6/tarantool_set_config.lua | 104 ++++++++++++++++++++++++ 1.7/Dockerfile | 6 +- 1.7/tarantool-entrypoint.lua | 148 ++++++++++++++++++++++++----------- 1.7/tarantool_set_config.lua | 104 ++++++++++++++++++++++++ 6 files changed, 426 insertions(+), 91 deletions(-) create mode 100755 1.6/tarantool_set_config.lua create mode 100755 1.7/tarantool_set_config.lua diff --git a/1.6/Dockerfile b/1.6/Dockerfile index 91f5925..97a4f7d 100644 --- a/1.6/Dockerfile +++ b/1.6/Dockerfile @@ -121,14 +121,17 @@ RUN mkdir -p /var/lib/tarantool \ && mkdir -p /opt/tarantool \ && chown tarantool:tarantool /opt/tarantool \ && mkdir -p /var/run/tarantool \ - && chown tarantool:tarantool /var/run/tarantool - + && chown tarantool:tarantool /var/run/tarantool \ + && mkdir /etc/tarantool \ + && chown tarantool:tarantool /etc/tarantool VOLUME /var/lib/tarantool VOLUME /opt/tarantool +VOLUME /etc/tarantool WORKDIR /opt/tarantool COPY tarantool-entrypoint.lua /usr/local/bin/ +COPY tarantool_set_config.lua /usr/local/bin/ COPY docker-entrypoint.sh /usr/local/bin/ COPY tarantool.default /usr/local/etc/default/tarantool diff --git a/1.6/tarantool-entrypoint.lua b/1.6/tarantool-entrypoint.lua index 30a3ae5..3046a77 100755 --- a/1.6/tarantool-entrypoint.lua +++ b/1.6/tarantool-entrypoint.lua @@ -6,76 +6,136 @@ local fun = require('fun') local urilib = require('uri') local console = require('console') local term = require('term') +local log = require('log') +local yaml = require('yaml') local TARANTOOL_DEFAULT_PORT = 3301 local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' +local CFG_FILE_PATH = '/etc/tarantool/config.yml' local orig_cfg = box.cfg -local function wrapper_cfg(override) - cfg = {} - cfg.slab_alloc_arena = tonumber(os.getenv('TARANTOOL_SLAB_ALLOC_ARENA')) or - override.slab_alloc_arena - cfg.slab_alloc_factor = tonumber(os.getenv('TARANTOOL_SLAB_ALLOC_FACTOR')) or - override.slab_alloc_factor - cfg.slab_alloc_maximal = tonumber(os.getenv('TARANTOOL_SLAB_ALLOC_MAXIMAL')) or - override.slab_alloc_maximal - cfg.slab_alloc_minimal = tonumber(os.getenv('TARANTOOL_SLAB_ALLOC_MINIMAL')) or - override.slab_alloc_minimal - cfg.listen = tonumber(os.getenv('TARANTOOL_PORT')) or - override.listen or TARANTOOL_DEFAULT_PORT - cfg.wal_mode = os.getenv('TARANTOOL_WAL_MODE') or - override.wal_mode - cfg.wal_dir = override.wal_dir or '/var/lib/tarantool' - cfg.snap_dir = override.snap_dir or '/var/lib/tarantool' - cfg.pid_file = override.pid_file or '/var/run/tarantool/tarantool.pid' +local function read_config() + local f = io.open(CFG_FILE_PATH, "rb") + if f == nil then + print("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) + os.exit(1) + end + local content = f:read("*all") + f:close() + return yaml.decode(content) +end - local user_name = os.getenv('TARANTOOL_USER_NAME') or 'guest' - local user_password = os.getenv('TARANTOOL_USER_PASSWORD') +local function write_config(cfg) + local f = io.open(CFG_FILE_PATH, "w+") + if f == nil then + print("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) + os.exit(1) + end + local content = yaml.encode(cfg) + f:write(content) + f:close() +end + +local function parse_replication_source(replication_source, user_name, user_password) + if replication_source == nil then + return nil + end + + local replication_source_table = {} + for uri in string.gmatch(replication_source, "[^,]+") do + local parsed_uri = urilib.parse(uri) + if parsed_uri == nil then + error("Incorrect replication source URI format: '"..uri.."'") + end + local host = parsed_uri.host + local port = parsed_uri.service or TARANTOOL_DEFAULT_PORT + local user = parsed_uri.login or user_name + local password = parsed_uri.password or user_password + + if user == 'guest' or user == nil then + replication_source = string.format("%s:%s", host, port) + elseif password == nil then + replication_source = string.format("%s:@%s:%s", user, host, port) + else + replication_source = string.format("%s:%s@%s:%s", user, password, + host, port) + end + + table.insert(replication_source_table, replication_source) + end + + return replication_source_table +end +function set_replication_source(replication_source) + local replication_source_table = parse_replication_source(replication_source) + box.cfg{replication_source = replication_source_table} + + log.info("Updated box.cfg{replication_source} to "..replication_source) +end + +local function wrapper_cfg(override) local work_dir = '/var/lib/tarantool' local snap_filename = "00000000000000000000.snap" local snap_path = work_dir..'/'..snap_filename local first_run = false - if fio.stat(snap_path) == nil and errno() == errno.ENOENT then first_run = true end - local replication_source = os.getenv('TARANTOOL_REPLICATION_SOURCE') - local replication_source_table = {} - if replication_source ~= nil then - for uri in string.gmatch(replication_source, "[^,]+") do - - local parsed_uri = urilib.parse(uri) - if parsed_uri == nil then - error("Incorrect replication source URI format: '"..uri.."'") - end - local host = parsed_uri.host - local port = parsed_uri.service or TARANTOOL_DEFAULT_PORT - local user = parsed_uri.login or user_name - local password = parsed_uri.password or user_password - - if user == 'guest' then - replication_source = string.format("%s:%s", host, port) - elseif password == nil then - replication_source = string.format("%s:@%s:%s", user, host, port) - else - replication_source = string.format("%s:%s@%s:%s", user, password, - host, port) - end + local user_name = os.getenv('TARANTOOL_USER_NAME') or 'guest' + local user_password = os.getenv('TARANTOOL_USER_PASSWORD') - table.insert(replication_source_table, replication_source) - end + local file_cfg = {} + if first_run then + file_cfg.TARANTOOL_USER_NAME = os.getenv('TARANTOOL_USER_NAME') + file_cfg.TARANTOOL_USER_PASSWORD = os.getenv('TARANTOOL_USER_PASSWORD') + file_cfg.TARANTOOL_SLAB_ALLOC_ARENA = os.getenv('TARANTOOL_SLAB_ALLOC_ARENA') + file_cfg.TARANTOOL_SLAB_ALLOC_FACTOR = os.getenv('TARANTOOL_SLAB_ALLOC_FACTOR') + file_cfg.TARANTOOL_SLAB_ALLOC_MINIMAL = os.getenv('TARANTOOL_SLAB_ALLOC_MINIMAL') + file_cfg.TARANTOOL_SLAB_ALLOC_MAXIMAL = os.getenv('TARANTOOL_SLAB_ALLOC_MAXIMAL') + file_cfg.TARANTOOL_PORT = os.getenv('TARANTOOL_PORT') + file_cfg.TARANTOOL_WAL_MODE = os.getenv('TARANTOOL_WAL_MODE') + file_cfg.TARANTOOL_REPLICATION_SOURCE = os.getenv('TARANTOOL_REPLICATION_SOURCE') + + write_config(file_cfg) + else + file_cfg = read_config() end + local cfg = override or {} + cfg.slab_alloc_arena = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_ARENA) or + override.slab_alloc_arena + cfg.slab_alloc_factor = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_FACTOR) or + override.slab_alloc_factor + cfg.slab_alloc_maximal = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_MAXIMAL) or + override.slab_alloc_maximal + cfg.slab_alloc_minimal = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_MINIMAL) or + override.slab_alloc_minimal + cfg.listen = tonumber(file_cfg.TARANTOOL_PORT) or + override.listen or TARANTOOL_DEFAULT_PORT + cfg.wal_mode = file_cfg.TARANTOOL_WAL_MODE or + override.wal_mode + + cfg.wal_dir = override.wal_dir or '/var/lib/tarantool' + cfg.snap_dir = override.snap_dir or '/var/lib/tarantool' + cfg.pid_file = override.pid_file or '/var/run/tarantool/tarantool.pid' + + local replication_source = file_cfg.TARANTOOL_REPLICATION_SOURCE + local replication_source_table = parse_replication_source(replication_source, + user_name, + user_password) + if replication_source then cfg.replication_source = replication_source_table else cfg.replication_source = override.replication_source end + print("Config:\n" .. yaml.encode(cfg)) + orig_cfg(cfg) box.once('tarantool-entrypoint', function () diff --git a/1.6/tarantool_set_config.lua b/1.6/tarantool_set_config.lua new file mode 100755 index 0000000..024b598 --- /dev/null +++ b/1.6/tarantool_set_config.lua @@ -0,0 +1,104 @@ +#!/usr/bin/env tarantool + +local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' +local CFG_FILE_PATH = '/etc/tarantool/config.yml' + +local fio = require('fio') +local yaml = require('yaml') +local console = require('console') +local errno = require('errno') + +local function read_config() + local f = io.open(CFG_FILE_PATH, "rb") + if f == nil then + print("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) + os.exit(1) + end + local content = f:read("*all") + f:close() + return yaml.decode(content) +end + +local function write_config(cfg) + local f = io.open(CFG_FILE_PATH, "w+") + if f == nil then + print("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) + os.exit(1) + end + local content = yaml.encode(cfg) + f:write(content) + f:close() +end + +local function nop(console, cfg, value) +end + +local function update_replication_source(console, cfg, value) + local cmd = "" + + local user_name = "nil" + if cfg['TARANTOOL_USER_NAME'] then + user_name = "'" .. cfg['TARANTOOL_USER_NAME'] .. "'" + end + + local user_password = "nil" + if cfg['TARANTOOL_USER_PASSWORD'] then + user_password = "'" .. cfg['TARANTOOL_USER_PASSWORD'] .. "'" + end + + cmd = "set_replication_source('"..value.."', " .. user_name .. "," .. user_password .. ")" + print("cmd: ", cmd) + + res = console:eval(cmd) + + if res ~= nil then + print(res) + end +end + +local vars = { + TARANTOOL_SLAB_ALLOC_ARENA=nop, + TARANTOOL_SLAB_ALLOC_FACTOR=nop, + TARANTOOL_SLAB_ALLOC_MAXIMAL=nop, + TARANTOOL_SLAB_ALLOC_MINIMAL=nop, + TARANTOOL_PORT=nop, + TARANTOOL_WAL_MODE=nop, + TARANTOOL_USER_NAME=nop, + TARANTOOL_USER_PASSWORD=nop, + TARANTOOL_REPLICATION_SOURCE=update_replication_source +} + +console.on_start(function(self) + local status, reason + status, reason = pcall(function() require('console').connect(CONSOLE_SOCKET_PATH) end) + if not status then + self:print(reason) + os.exit(1) + end + + if arg[1] == nil or arg[2] == nil then + self:print("Usage: " .. arg[0] .. " ") + os.exit(1) + end + + if vars[arg[1]] == nil then + self:print("Unknown var: " .. arg[1]) + os.exit(1) + end + + local cfg = read_config() + cfg[arg[1]] = arg[2] + + local func = vars[arg[1]] + func(self, cfg, arg[2]) + + write_config(cfg) + + self.running = false + os.exit(0) +end) + +console.on_client_disconnect(function(self) self.running = false end) +console.start() + +os.exit(0) diff --git a/1.7/Dockerfile b/1.7/Dockerfile index 10e10c8..6735bcb 100644 --- a/1.7/Dockerfile +++ b/1.7/Dockerfile @@ -123,13 +123,17 @@ RUN mkdir -p /var/lib/tarantool \ && mkdir -p /opt/tarantool \ && chown tarantool:tarantool /opt/tarantool \ && mkdir -p /var/run/tarantool \ - && chown tarantool:tarantool /var/run/tarantool + && chown tarantool:tarantool /var/run/tarantool \ + && mkdir /etc/tarantool \ + && chown tarantool:tarantool /etc/tarantool VOLUME /var/lib/tarantool VOLUME /opt/tarantool +VOLUME /etc/tarantool WORKDIR /opt/tarantool COPY tarantool-entrypoint.lua /usr/local/bin/ +COPY tarantool_set_config.lua /usr/local/bin/ COPY docker-entrypoint.sh /usr/local/bin/ COPY tarantool.default /usr/local/etc/default/tarantool diff --git a/1.7/tarantool-entrypoint.lua b/1.7/tarantool-entrypoint.lua index 30a3ae5..3046a77 100755 --- a/1.7/tarantool-entrypoint.lua +++ b/1.7/tarantool-entrypoint.lua @@ -6,76 +6,136 @@ local fun = require('fun') local urilib = require('uri') local console = require('console') local term = require('term') +local log = require('log') +local yaml = require('yaml') local TARANTOOL_DEFAULT_PORT = 3301 local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' +local CFG_FILE_PATH = '/etc/tarantool/config.yml' local orig_cfg = box.cfg -local function wrapper_cfg(override) - cfg = {} - cfg.slab_alloc_arena = tonumber(os.getenv('TARANTOOL_SLAB_ALLOC_ARENA')) or - override.slab_alloc_arena - cfg.slab_alloc_factor = tonumber(os.getenv('TARANTOOL_SLAB_ALLOC_FACTOR')) or - override.slab_alloc_factor - cfg.slab_alloc_maximal = tonumber(os.getenv('TARANTOOL_SLAB_ALLOC_MAXIMAL')) or - override.slab_alloc_maximal - cfg.slab_alloc_minimal = tonumber(os.getenv('TARANTOOL_SLAB_ALLOC_MINIMAL')) or - override.slab_alloc_minimal - cfg.listen = tonumber(os.getenv('TARANTOOL_PORT')) or - override.listen or TARANTOOL_DEFAULT_PORT - cfg.wal_mode = os.getenv('TARANTOOL_WAL_MODE') or - override.wal_mode - cfg.wal_dir = override.wal_dir or '/var/lib/tarantool' - cfg.snap_dir = override.snap_dir or '/var/lib/tarantool' - cfg.pid_file = override.pid_file or '/var/run/tarantool/tarantool.pid' +local function read_config() + local f = io.open(CFG_FILE_PATH, "rb") + if f == nil then + print("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) + os.exit(1) + end + local content = f:read("*all") + f:close() + return yaml.decode(content) +end - local user_name = os.getenv('TARANTOOL_USER_NAME') or 'guest' - local user_password = os.getenv('TARANTOOL_USER_PASSWORD') +local function write_config(cfg) + local f = io.open(CFG_FILE_PATH, "w+") + if f == nil then + print("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) + os.exit(1) + end + local content = yaml.encode(cfg) + f:write(content) + f:close() +end + +local function parse_replication_source(replication_source, user_name, user_password) + if replication_source == nil then + return nil + end + + local replication_source_table = {} + for uri in string.gmatch(replication_source, "[^,]+") do + local parsed_uri = urilib.parse(uri) + if parsed_uri == nil then + error("Incorrect replication source URI format: '"..uri.."'") + end + local host = parsed_uri.host + local port = parsed_uri.service or TARANTOOL_DEFAULT_PORT + local user = parsed_uri.login or user_name + local password = parsed_uri.password or user_password + + if user == 'guest' or user == nil then + replication_source = string.format("%s:%s", host, port) + elseif password == nil then + replication_source = string.format("%s:@%s:%s", user, host, port) + else + replication_source = string.format("%s:%s@%s:%s", user, password, + host, port) + end + + table.insert(replication_source_table, replication_source) + end + + return replication_source_table +end +function set_replication_source(replication_source) + local replication_source_table = parse_replication_source(replication_source) + box.cfg{replication_source = replication_source_table} + + log.info("Updated box.cfg{replication_source} to "..replication_source) +end + +local function wrapper_cfg(override) local work_dir = '/var/lib/tarantool' local snap_filename = "00000000000000000000.snap" local snap_path = work_dir..'/'..snap_filename local first_run = false - if fio.stat(snap_path) == nil and errno() == errno.ENOENT then first_run = true end - local replication_source = os.getenv('TARANTOOL_REPLICATION_SOURCE') - local replication_source_table = {} - if replication_source ~= nil then - for uri in string.gmatch(replication_source, "[^,]+") do - - local parsed_uri = urilib.parse(uri) - if parsed_uri == nil then - error("Incorrect replication source URI format: '"..uri.."'") - end - local host = parsed_uri.host - local port = parsed_uri.service or TARANTOOL_DEFAULT_PORT - local user = parsed_uri.login or user_name - local password = parsed_uri.password or user_password - - if user == 'guest' then - replication_source = string.format("%s:%s", host, port) - elseif password == nil then - replication_source = string.format("%s:@%s:%s", user, host, port) - else - replication_source = string.format("%s:%s@%s:%s", user, password, - host, port) - end + local user_name = os.getenv('TARANTOOL_USER_NAME') or 'guest' + local user_password = os.getenv('TARANTOOL_USER_PASSWORD') - table.insert(replication_source_table, replication_source) - end + local file_cfg = {} + if first_run then + file_cfg.TARANTOOL_USER_NAME = os.getenv('TARANTOOL_USER_NAME') + file_cfg.TARANTOOL_USER_PASSWORD = os.getenv('TARANTOOL_USER_PASSWORD') + file_cfg.TARANTOOL_SLAB_ALLOC_ARENA = os.getenv('TARANTOOL_SLAB_ALLOC_ARENA') + file_cfg.TARANTOOL_SLAB_ALLOC_FACTOR = os.getenv('TARANTOOL_SLAB_ALLOC_FACTOR') + file_cfg.TARANTOOL_SLAB_ALLOC_MINIMAL = os.getenv('TARANTOOL_SLAB_ALLOC_MINIMAL') + file_cfg.TARANTOOL_SLAB_ALLOC_MAXIMAL = os.getenv('TARANTOOL_SLAB_ALLOC_MAXIMAL') + file_cfg.TARANTOOL_PORT = os.getenv('TARANTOOL_PORT') + file_cfg.TARANTOOL_WAL_MODE = os.getenv('TARANTOOL_WAL_MODE') + file_cfg.TARANTOOL_REPLICATION_SOURCE = os.getenv('TARANTOOL_REPLICATION_SOURCE') + + write_config(file_cfg) + else + file_cfg = read_config() end + local cfg = override or {} + cfg.slab_alloc_arena = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_ARENA) or + override.slab_alloc_arena + cfg.slab_alloc_factor = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_FACTOR) or + override.slab_alloc_factor + cfg.slab_alloc_maximal = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_MAXIMAL) or + override.slab_alloc_maximal + cfg.slab_alloc_minimal = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_MINIMAL) or + override.slab_alloc_minimal + cfg.listen = tonumber(file_cfg.TARANTOOL_PORT) or + override.listen or TARANTOOL_DEFAULT_PORT + cfg.wal_mode = file_cfg.TARANTOOL_WAL_MODE or + override.wal_mode + + cfg.wal_dir = override.wal_dir or '/var/lib/tarantool' + cfg.snap_dir = override.snap_dir or '/var/lib/tarantool' + cfg.pid_file = override.pid_file or '/var/run/tarantool/tarantool.pid' + + local replication_source = file_cfg.TARANTOOL_REPLICATION_SOURCE + local replication_source_table = parse_replication_source(replication_source, + user_name, + user_password) + if replication_source then cfg.replication_source = replication_source_table else cfg.replication_source = override.replication_source end + print("Config:\n" .. yaml.encode(cfg)) + orig_cfg(cfg) box.once('tarantool-entrypoint', function () diff --git a/1.7/tarantool_set_config.lua b/1.7/tarantool_set_config.lua new file mode 100755 index 0000000..024b598 --- /dev/null +++ b/1.7/tarantool_set_config.lua @@ -0,0 +1,104 @@ +#!/usr/bin/env tarantool + +local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' +local CFG_FILE_PATH = '/etc/tarantool/config.yml' + +local fio = require('fio') +local yaml = require('yaml') +local console = require('console') +local errno = require('errno') + +local function read_config() + local f = io.open(CFG_FILE_PATH, "rb") + if f == nil then + print("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) + os.exit(1) + end + local content = f:read("*all") + f:close() + return yaml.decode(content) +end + +local function write_config(cfg) + local f = io.open(CFG_FILE_PATH, "w+") + if f == nil then + print("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) + os.exit(1) + end + local content = yaml.encode(cfg) + f:write(content) + f:close() +end + +local function nop(console, cfg, value) +end + +local function update_replication_source(console, cfg, value) + local cmd = "" + + local user_name = "nil" + if cfg['TARANTOOL_USER_NAME'] then + user_name = "'" .. cfg['TARANTOOL_USER_NAME'] .. "'" + end + + local user_password = "nil" + if cfg['TARANTOOL_USER_PASSWORD'] then + user_password = "'" .. cfg['TARANTOOL_USER_PASSWORD'] .. "'" + end + + cmd = "set_replication_source('"..value.."', " .. user_name .. "," .. user_password .. ")" + print("cmd: ", cmd) + + res = console:eval(cmd) + + if res ~= nil then + print(res) + end +end + +local vars = { + TARANTOOL_SLAB_ALLOC_ARENA=nop, + TARANTOOL_SLAB_ALLOC_FACTOR=nop, + TARANTOOL_SLAB_ALLOC_MAXIMAL=nop, + TARANTOOL_SLAB_ALLOC_MINIMAL=nop, + TARANTOOL_PORT=nop, + TARANTOOL_WAL_MODE=nop, + TARANTOOL_USER_NAME=nop, + TARANTOOL_USER_PASSWORD=nop, + TARANTOOL_REPLICATION_SOURCE=update_replication_source +} + +console.on_start(function(self) + local status, reason + status, reason = pcall(function() require('console').connect(CONSOLE_SOCKET_PATH) end) + if not status then + self:print(reason) + os.exit(1) + end + + if arg[1] == nil or arg[2] == nil then + self:print("Usage: " .. arg[0] .. " ") + os.exit(1) + end + + if vars[arg[1]] == nil then + self:print("Unknown var: " .. arg[1]) + os.exit(1) + end + + local cfg = read_config() + cfg[arg[1]] = arg[2] + + local func = vars[arg[1]] + func(self, cfg, arg[2]) + + write_config(cfg) + + self.running = false + os.exit(0) +end) + +console.on_client_disconnect(function(self) self.running = false end) +console.start() + +os.exit(0) From 2d97ee03f466b9d2ed9382e50d9e23816b457cdc Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Fri, 12 Aug 2016 16:53:43 +0300 Subject: [PATCH 028/286] Add support for Tarantool 1.5 Fixes #43 --- 1.5/Dockerfile | 102 +++++++++++++++++++++++++++++++++++++++ 1.5/docker-entrypoint.sh | 70 +++++++++++++++++++++++++++ 1.5/luarocks-config.lua | 9 ++++ 3 files changed, 181 insertions(+) create mode 100644 1.5/Dockerfile create mode 100755 1.5/docker-entrypoint.sh create mode 100644 1.5/luarocks-config.lua diff --git a/1.5/Dockerfile b/1.5/Dockerfile new file mode 100644 index 0000000..0a4ae9f --- /dev/null +++ b/1.5/Dockerfile @@ -0,0 +1,102 @@ +FROM alpine:3.4 +MAINTAINER mail@racktear.com + +RUN addgroup -S tarantool \ + && adduser -S -G tarantool tarantool \ + && apk add --no-cache 'su-exec>=0.2' + +ENV TARANTOOL_VERSION=1.5.5.27 \ + TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ + TARANTOOL_COMMIT=6aaa31234d1ee2f5e1107ab24508a7875ea4e05a \ + TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ + LUAROCKS_URL=http://keplerproject.github.io/luarocks/releases/luarocks-2.3.0.tar.gz + +RUN set -x \ + && apk add --no-cache --virtual .run-deps \ + libstdc++ \ + readline \ + openssl \ + yaml \ + lz4 \ + binutils \ + ncurses \ + libgomp \ + lua \ + curl \ + tar \ + zip \ + mariadb-client-libs \ + libpq \ + mariadb-libs \ + && apk add --no-cache --virtual .build-deps \ + perl \ + gcc \ + g++ \ + cmake \ + readline-dev \ + openssl-dev \ + yaml-dev \ + lz4-dev \ + binutils-dev \ + ncurses-dev \ + lua-dev \ + musl-dev \ + make \ + git \ + postgresql-dev \ + lua-dev \ + mariadb-dev \ + && : "---------- tarantool ----------" \ + && mkdir -p /usr/src/tarantool \ + && git clone "$TARANTOOL_DOWNLOAD_URL" /usr/src/tarantool \ + && git -C /usr/src/tarantool checkout "$TARANTOOL_COMMIT" \ + && git -C /usr/src/tarantool submodule init \ + && git -C /usr/src/tarantool submodule update \ + && echo "$TARANTOOL_VERSION" > /usr/src/tarantool/VERSION \ + && (cd /usr/src/tarantool; \ + cmake -DENABLE_CLIENT:BOOL=ON \ + -DWITH_MYSQL:BOOL=ON \ + -DWITH_POSTGRESQL:BOOL=ON \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DENABLE_BUNDLED_LIBYAML:BOOL=OFF \ + -DENABLE_BACKTRACE:BOOL=ON \ + .) \ + && make -C /usr/src/tarantool -j \ + && make -C /usr/src/tarantool install \ + && make -C /usr/src/tarantool clean \ + && : "---------- luarocks ----------" \ + && wget -O luarocks.tar.gz "$LUAROCKS_URL" \ + && mkdir -p /usr/src/luarocks \ + && tar -xzf luarocks.tar.gz -C /usr/src/luarocks --strip-components=1 \ + && (cd /usr/src/luarocks; \ + ./configure; \ + make build; \ + make install) \ + && rm -r /usr/src/luarocks \ + && rm -rf /usr/src/tarantool \ + && : "---------- remove build deps ----------" \ + && apk del .build-deps + +COPY luarocks-config.lua /usr/local/etc/luarocks/config-5.1.lua + +RUN mkdir -p /var/lib/tarantool \ + && chown tarantool:tarantool /var/lib/tarantool \ + && mkdir -p /opt/tarantool \ + && chown tarantool:tarantool /opt/tarantool \ + && mkdir -p /var/run/tarantool \ + && chown tarantool:tarantool /var/run/tarantool \ + && mkdir /etc/tarantool \ + && chown tarantool:tarantool /etc/tarantool + +VOLUME /var/lib/tarantool +VOLUME /opt/tarantool +VOLUME /etc/tarantool +WORKDIR /opt/tarantool + +COPY docker-entrypoint.sh /usr/local/bin/ + +RUN ln -s /usr/local/bin/docker-entrypoint.sh /entrypoint.sh # backwards compat +ENTRYPOINT ["docker-entrypoint.sh"] + +EXPOSE 3301 +CMD [ "tarantool_box", "-c", "/etc/tarantool/tarantool.cfg" ] diff --git a/1.5/docker-entrypoint.sh b/1.5/docker-entrypoint.sh new file mode 100755 index 0000000..4f42dad --- /dev/null +++ b/1.5/docker-entrypoint.sh @@ -0,0 +1,70 @@ +#!/bin/sh + +update_cfg() +{ + variable=$1 + varname=$2 + value=$(printenv $varname) + CFG=/etc/tarantool/tarantool.cfg + + if printenv $varname > /dev/null + then + if grep "$variable=" $CFG + then + sed -i "s/$variable=.*/$variable=$value/g" $CFG + else + echo "$variable=$value" >> $CFG + fi + fi +} + +try_init_db() +{ + if [ "$(find . -maxdepth 1 -name '/var/lib/tarantool/*.snap' -print)" = "" ] + then + echo "Initializing config:" + + CFG=/etc/tarantool/tarantool.cfg + + if [ ! -f $CFG ] + then + echo "work_dir=/opt/tarantool" > $CFG + echo "memcached_port=11211" >> $CFG + echo "primary_port=3301" >> $CFG + echo "admin_port=3305" >> $CFG + echo "replication_port=3310" >> $CFG + fi + + update_cfg "replication_port" "TARANTOOL_REPLICATION_PORT" + update_cfg "replication_source" "TARANTOOL_REPLICATION_SOURCE" + update_cfg "slab_alloc_arena" "TARANTOOL_SLAB_ALLOC_ARENA" + update_cfg "slab_alloc_factor" "TARANTOOL_SLAB_ALLOC_FACTOR" + update_cfg "slab_alloc_minimal" "TARANTOOL_SLAB_ALLOC_MINIMAL" + update_cfg "primary_port" "TARANTOOL_PORT" + update_cfg "admin_port" "TARANTOOL_ADMIN_PORT" + update_cfg "wal_mode" "TARANTOOL_WAL_MODE" + + cat $CFG + + echo + echo "Initializing database:" + + tarantool_box -c $CFG --init-storage + + echo + fi +} + +if [ "$1" = 'tarantool_box' -a "$(id -u)" = '0' ]; then + chown -R tarantool /var/lib/tarantool + exec su-exec tarantool "$0" "$@" +fi + +# entry point wraps the passed script to do basic setup +if [ "$1" = 'tarantool_box' ]; then + shift + try_init_db + exec tarantool_box "$@" +fi + +exec "$@" diff --git a/1.5/luarocks-config.lua b/1.5/luarocks-config.lua new file mode 100644 index 0000000..111f955 --- /dev/null +++ b/1.5/luarocks-config.lua @@ -0,0 +1,9 @@ +rocks_trees = { + { name = [[user]], root = home..[[/.luarocks]] }, + { name = [[system]], root = [[/usr/local]] } +} + +rocks_servers = { + [[http://rocks.tarantool.org/]], + [[http://luarocks.org/repositories/rocks]] +} From 7071735559a1f591abe22de4a51d894cb4b17ee1 Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Fri, 12 Aug 2016 17:19:41 +0300 Subject: [PATCH 029/286] Set default snapshot_period to 1h Fixes #6 --- 1.6/tarantool-entrypoint.lua | 5 +++++ 1.7/tarantool-entrypoint.lua | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/1.6/tarantool-entrypoint.lua b/1.6/tarantool-entrypoint.lua index 3046a77..65f1944 100755 --- a/1.6/tarantool-entrypoint.lua +++ b/1.6/tarantool-entrypoint.lua @@ -10,9 +10,11 @@ local log = require('log') local yaml = require('yaml') local TARANTOOL_DEFAULT_PORT = 3301 +local TARANTOOL_DEFAULT_SNAPSHOT_PERIOD = 3600 -- seconds local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' local CFG_FILE_PATH = '/etc/tarantool/config.yml' + local orig_cfg = box.cfg local function read_config() @@ -99,6 +101,7 @@ local function wrapper_cfg(override) file_cfg.TARANTOOL_PORT = os.getenv('TARANTOOL_PORT') file_cfg.TARANTOOL_WAL_MODE = os.getenv('TARANTOOL_WAL_MODE') file_cfg.TARANTOOL_REPLICATION_SOURCE = os.getenv('TARANTOOL_REPLICATION_SOURCE') + file_cfg.TARANTOOL_SNAPSHOT_PERIOD = os.getenv('TARANTOOL_SNAPSHOT_PERIOD') write_config(file_cfg) else @@ -118,6 +121,8 @@ local function wrapper_cfg(override) override.listen or TARANTOOL_DEFAULT_PORT cfg.wal_mode = file_cfg.TARANTOOL_WAL_MODE or override.wal_mode + cfg.snapshot_period = tonumber(file_cfg.TARANTOOL_SNAPSHOT_PERIOD) or + override.snapshot_period or TARANTOOL_DEFAULT_SNAPSHOT_PERIOD cfg.wal_dir = override.wal_dir or '/var/lib/tarantool' cfg.snap_dir = override.snap_dir or '/var/lib/tarantool' diff --git a/1.7/tarantool-entrypoint.lua b/1.7/tarantool-entrypoint.lua index 3046a77..65f1944 100755 --- a/1.7/tarantool-entrypoint.lua +++ b/1.7/tarantool-entrypoint.lua @@ -10,9 +10,11 @@ local log = require('log') local yaml = require('yaml') local TARANTOOL_DEFAULT_PORT = 3301 +local TARANTOOL_DEFAULT_SNAPSHOT_PERIOD = 3600 -- seconds local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' local CFG_FILE_PATH = '/etc/tarantool/config.yml' + local orig_cfg = box.cfg local function read_config() @@ -99,6 +101,7 @@ local function wrapper_cfg(override) file_cfg.TARANTOOL_PORT = os.getenv('TARANTOOL_PORT') file_cfg.TARANTOOL_WAL_MODE = os.getenv('TARANTOOL_WAL_MODE') file_cfg.TARANTOOL_REPLICATION_SOURCE = os.getenv('TARANTOOL_REPLICATION_SOURCE') + file_cfg.TARANTOOL_SNAPSHOT_PERIOD = os.getenv('TARANTOOL_SNAPSHOT_PERIOD') write_config(file_cfg) else @@ -118,6 +121,8 @@ local function wrapper_cfg(override) override.listen or TARANTOOL_DEFAULT_PORT cfg.wal_mode = file_cfg.TARANTOOL_WAL_MODE or override.wal_mode + cfg.snapshot_period = tonumber(file_cfg.TARANTOOL_SNAPSHOT_PERIOD) or + override.snapshot_period or TARANTOOL_DEFAULT_SNAPSHOT_PERIOD cfg.wal_dir = override.wal_dir or '/var/lib/tarantool' cfg.snap_dir = override.snap_dir or '/var/lib/tarantool' From 935920caa683e37b29c2a40fcc671af5cd5b2eab Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Fri, 12 Aug 2016 17:43:27 +0300 Subject: [PATCH 030/286] Detect existing snapshots by globbing This prevents reinitialization of database when old snapshots are removed. Because initial version used only snaphost '0' for that purpose. --- 1.6/tarantool-entrypoint.lua | 16 ++++++++-------- 1.7/tarantool-entrypoint.lua | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/1.6/tarantool-entrypoint.lua b/1.6/tarantool-entrypoint.lua index 65f1944..092b1e6 100755 --- a/1.6/tarantool-entrypoint.lua +++ b/1.6/tarantool-entrypoint.lua @@ -79,11 +79,11 @@ end local function wrapper_cfg(override) local work_dir = '/var/lib/tarantool' - local snap_filename = "00000000000000000000.snap" + local snap_filename = "*.snap" local snap_path = work_dir..'/'..snap_filename local first_run = false - if fio.stat(snap_path) == nil and errno() == errno.ENOENT then + if next(fio.glob(snap_path)) == nil then first_run = true end @@ -150,7 +150,7 @@ local function wrapper_cfg(override) if user_name ~= 'guest' and user_password == nil then user_password = "" - warn_str = [[**************************************************** + local warn_str = [[**************************************************** WARNING: No password has been set for the database. This will allow anyone with access to the Tarantool port to access your database. In @@ -160,11 +160,11 @@ WARNING: No password has been set for the database. Use "-e TARANTOOL_USER_PASSWORD=password" to set it in "docker run". ****************************************************]] - print(warn_str) + log.warn('\n'..warn_str) end if user_name == 'guest' and user_password == nil then - warn_str = [[**************************************************** + local warn_str = [[**************************************************** WARNING: 'guest' is chosen as primary user. Since it is not allowed to set a password for guest user, your instance will be accessible @@ -174,13 +174,13 @@ WARNING: 'guest' is chosen as primary user. specify "-e TARANTOOL_USER_NAME=username" and pick a user name other than "guest". ****************************************************]] - print(warn_str) + log.warn('\n'..warn_str) end if user_name == 'guest' and user_password ~= nil then user_password = nil - warn_str = [[**************************************************** + local warn_str = [[**************************************************** WARNING: A password for guest user has been specified. In Tarantool, guest user can't have a password and is always allowed to login, if it has @@ -189,7 +189,7 @@ WARNING: A password for guest user has been specified. specify "-e TARANTOOL_USER_NAME=username" and pick a user name other than "guest". ****************************************************]] - print(warn_str) + log.warn('\n'..warn_str) end if user_name ~= 'admin' and user_name ~= 'guest' then diff --git a/1.7/tarantool-entrypoint.lua b/1.7/tarantool-entrypoint.lua index 65f1944..092b1e6 100755 --- a/1.7/tarantool-entrypoint.lua +++ b/1.7/tarantool-entrypoint.lua @@ -79,11 +79,11 @@ end local function wrapper_cfg(override) local work_dir = '/var/lib/tarantool' - local snap_filename = "00000000000000000000.snap" + local snap_filename = "*.snap" local snap_path = work_dir..'/'..snap_filename local first_run = false - if fio.stat(snap_path) == nil and errno() == errno.ENOENT then + if next(fio.glob(snap_path)) == nil then first_run = true end @@ -150,7 +150,7 @@ local function wrapper_cfg(override) if user_name ~= 'guest' and user_password == nil then user_password = "" - warn_str = [[**************************************************** + local warn_str = [[**************************************************** WARNING: No password has been set for the database. This will allow anyone with access to the Tarantool port to access your database. In @@ -160,11 +160,11 @@ WARNING: No password has been set for the database. Use "-e TARANTOOL_USER_PASSWORD=password" to set it in "docker run". ****************************************************]] - print(warn_str) + log.warn('\n'..warn_str) end if user_name == 'guest' and user_password == nil then - warn_str = [[**************************************************** + local warn_str = [[**************************************************** WARNING: 'guest' is chosen as primary user. Since it is not allowed to set a password for guest user, your instance will be accessible @@ -174,13 +174,13 @@ WARNING: 'guest' is chosen as primary user. specify "-e TARANTOOL_USER_NAME=username" and pick a user name other than "guest". ****************************************************]] - print(warn_str) + log.warn('\n'..warn_str) end if user_name == 'guest' and user_password ~= nil then user_password = nil - warn_str = [[**************************************************** + local warn_str = [[**************************************************** WARNING: A password for guest user has been specified. In Tarantool, guest user can't have a password and is always allowed to login, if it has @@ -189,7 +189,7 @@ WARNING: A password for guest user has been specified. specify "-e TARANTOOL_USER_NAME=username" and pick a user name other than "guest". ****************************************************]] - print(warn_str) + log.warn('\n'..warn_str) end if user_name ~= 'admin' and user_name ~= 'guest' then From 8a559b77e99e3b9c05105e59cb124da0259f0d8e Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Fri, 12 Aug 2016 18:03:36 +0300 Subject: [PATCH 031/286] Use log() instead of print() The print() is buffered and is shown out-of-order when running container in background. --- 1.6/tarantool-entrypoint.lua | 10 +++++----- 1.7/tarantool-entrypoint.lua | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/1.6/tarantool-entrypoint.lua b/1.6/tarantool-entrypoint.lua index 092b1e6..19d08c7 100755 --- a/1.6/tarantool-entrypoint.lua +++ b/1.6/tarantool-entrypoint.lua @@ -20,7 +20,7 @@ local orig_cfg = box.cfg local function read_config() local f = io.open(CFG_FILE_PATH, "rb") if f == nil then - print("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) + log.error("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) os.exit(1) end local content = f:read("*all") @@ -139,13 +139,13 @@ local function wrapper_cfg(override) cfg.replication_source = override.replication_source end - print("Config:\n" .. yaml.encode(cfg)) + log.info("Config:\n" .. yaml.encode(cfg)) orig_cfg(cfg) box.once('tarantool-entrypoint', function () if first_run then - print("Initializing database") + log.info("Initializing database") if user_name ~= 'guest' and user_password == nil then user_password = "" @@ -193,12 +193,12 @@ WARNING: A password for guest user has been specified. end if user_name ~= 'admin' and user_name ~= 'guest' then - print(string.format("Creating user '%s'", user_name)) + log.info("Creating user '%s'", user_name) box.schema.user.create(user_name) end if user_name ~= 'admin' then - print(string.format("Granting admin privileges to user '%s'", user_name)) + log.info("Granting admin privileges to user '%s'", user_name) box.schema.user.grant(user_name, 'read,write,execute', 'universe') box.schema.user.grant(user_name, 'replication') end diff --git a/1.7/tarantool-entrypoint.lua b/1.7/tarantool-entrypoint.lua index 092b1e6..19d08c7 100755 --- a/1.7/tarantool-entrypoint.lua +++ b/1.7/tarantool-entrypoint.lua @@ -20,7 +20,7 @@ local orig_cfg = box.cfg local function read_config() local f = io.open(CFG_FILE_PATH, "rb") if f == nil then - print("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) + log.error("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) os.exit(1) end local content = f:read("*all") @@ -139,13 +139,13 @@ local function wrapper_cfg(override) cfg.replication_source = override.replication_source end - print("Config:\n" .. yaml.encode(cfg)) + log.info("Config:\n" .. yaml.encode(cfg)) orig_cfg(cfg) box.once('tarantool-entrypoint', function () if first_run then - print("Initializing database") + log.info("Initializing database") if user_name ~= 'guest' and user_password == nil then user_password = "" @@ -193,12 +193,12 @@ WARNING: A password for guest user has been specified. end if user_name ~= 'admin' and user_name ~= 'guest' then - print(string.format("Creating user '%s'", user_name)) + log.info("Creating user '%s'", user_name) box.schema.user.create(user_name) end if user_name ~= 'admin' then - print(string.format("Granting admin privileges to user '%s'", user_name)) + log.info("Granting admin privileges to user '%s'", user_name) box.schema.user.grant(user_name, 'read,write,execute', 'universe') box.schema.user.grant(user_name, 'replication') end From 0a947d946623eac99c62a774ffd0416769e23906 Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Mon, 29 Aug 2016 18:05:35 +0300 Subject: [PATCH 032/286] Create config file if it doesn't exist --- 1.6/tarantool-entrypoint.lua | 7 ++++++- 1.7/tarantool-entrypoint.lua | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/1.6/tarantool-entrypoint.lua b/1.6/tarantool-entrypoint.lua index 19d08c7..d699839 100755 --- a/1.6/tarantool-entrypoint.lua +++ b/1.6/tarantool-entrypoint.lua @@ -91,7 +91,10 @@ local function wrapper_cfg(override) local user_password = os.getenv('TARANTOOL_USER_PASSWORD') local file_cfg = {} - if first_run then + local config_file_exists = fio.stat(CFG_FILE_PATH) ~= nil + if not config_file_exists then + log.info("Creating configuration file: " .. CFG_FILE_PATH) + file_cfg.TARANTOOL_USER_NAME = os.getenv('TARANTOOL_USER_NAME') file_cfg.TARANTOOL_USER_PASSWORD = os.getenv('TARANTOOL_USER_PASSWORD') file_cfg.TARANTOOL_SLAB_ALLOC_ARENA = os.getenv('TARANTOOL_SLAB_ALLOC_ARENA') @@ -105,6 +108,8 @@ local function wrapper_cfg(override) write_config(file_cfg) else + log.info("Loading existing configuration file: " .. CFG_FILE_PATH) + file_cfg = read_config() end diff --git a/1.7/tarantool-entrypoint.lua b/1.7/tarantool-entrypoint.lua index 19d08c7..d699839 100755 --- a/1.7/tarantool-entrypoint.lua +++ b/1.7/tarantool-entrypoint.lua @@ -91,7 +91,10 @@ local function wrapper_cfg(override) local user_password = os.getenv('TARANTOOL_USER_PASSWORD') local file_cfg = {} - if first_run then + local config_file_exists = fio.stat(CFG_FILE_PATH) ~= nil + if not config_file_exists then + log.info("Creating configuration file: " .. CFG_FILE_PATH) + file_cfg.TARANTOOL_USER_NAME = os.getenv('TARANTOOL_USER_NAME') file_cfg.TARANTOOL_USER_PASSWORD = os.getenv('TARANTOOL_USER_PASSWORD') file_cfg.TARANTOOL_SLAB_ALLOC_ARENA = os.getenv('TARANTOOL_SLAB_ALLOC_ARENA') @@ -105,6 +108,8 @@ local function wrapper_cfg(override) write_config(file_cfg) else + log.info("Loading existing configuration file: " .. CFG_FILE_PATH) + file_cfg = read_config() end From e51dad477ba254fb599e5c519d71b9577bc2ff23 Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Mon, 29 Aug 2016 18:17:05 +0300 Subject: [PATCH 033/286] Update Tarantool 1.7 git commit --- 1.7/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1.7/Dockerfile b/1.7/Dockerfile index 6735bcb..7083ddf 100644 --- a/1.7/Dockerfile +++ b/1.7/Dockerfile @@ -7,7 +7,7 @@ RUN addgroup -S tarantool \ ENV TARANTOOL_VERSION=1.7 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ - TARANTOOL_COMMIT=71515ae \ + TARANTOOL_COMMIT=c19bddb \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ LUAROCKS_URL=http://keplerproject.github.io/luarocks/releases/luarocks-2.3.0.tar.gz From 54415c255965ac0b5790c0baa904cd1a4dcf5c0c Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Wed, 7 Sep 2016 18:16:28 +0300 Subject: [PATCH 034/286] Add cyrus-sasl to dependencies cyrus-sasl is requied to build updated memcached module Fixes #8 --- 1.6/Dockerfile | 2 ++ 1.7/Dockerfile | 2 ++ 2 files changed, 4 insertions(+) diff --git a/1.6/Dockerfile b/1.6/Dockerfile index 97a4f7d..295d4f8 100644 --- a/1.6/Dockerfile +++ b/1.6/Dockerfile @@ -91,6 +91,7 @@ RUN set -x \ && apk add --no-cache --virtual .run-deps \ mariadb-client-libs \ libpq \ + cyrus-sasl \ && apk add --no-cache --virtual .build-deps \ git \ cmake \ @@ -100,6 +101,7 @@ RUN set -x \ postgresql-dev \ lua-dev \ musl-dev \ + cyrus-sasl-dev \ && : "---------- luarocks ----------" \ && luarocks install avro-schema \ && luarocks install expirationd \ diff --git a/1.7/Dockerfile b/1.7/Dockerfile index 7083ddf..891ee62 100644 --- a/1.7/Dockerfile +++ b/1.7/Dockerfile @@ -92,6 +92,7 @@ RUN set -x \ && apk add --no-cache --virtual .run-deps \ mariadb-client-libs \ libpq \ + cyrus-sasl \ && apk add --no-cache --virtual .build-deps \ git \ cmake \ @@ -102,6 +103,7 @@ RUN set -x \ postgresql-dev \ lua-dev \ musl-dev \ + cyrus-sasl-dev \ && : "---------- luarocks ----------" \ && luarocks install avro-schema \ && luarocks install expirationd \ From 388e0af374e552b9aea6b4af78388f0ee9cecf11 Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Fri, 9 Sep 2016 13:58:18 +0300 Subject: [PATCH 035/286] Update tarantool version used for 1.7 --- 1.7/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1.7/Dockerfile b/1.7/Dockerfile index 891ee62..be750f3 100644 --- a/1.7/Dockerfile +++ b/1.7/Dockerfile @@ -7,7 +7,7 @@ RUN addgroup -S tarantool \ ENV TARANTOOL_VERSION=1.7 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ - TARANTOOL_COMMIT=c19bddb \ + TARANTOOL_COMMIT=54b3b2d \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ LUAROCKS_URL=http://keplerproject.github.io/luarocks/releases/luarocks-2.3.0.tar.gz From b231c5175d3b72aa696e3bb9a626991c1f5eb68d Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Tue, 27 Sep 2016 12:24:29 +0300 Subject: [PATCH 036/286] Update tarantool version used for 1.7 --- 1.7/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1.7/Dockerfile b/1.7/Dockerfile index be750f3..ed292eb 100644 --- a/1.7/Dockerfile +++ b/1.7/Dockerfile @@ -7,7 +7,7 @@ RUN addgroup -S tarantool \ ENV TARANTOOL_VERSION=1.7 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ - TARANTOOL_COMMIT=54b3b2d \ + TARANTOOL_COMMIT=72a598e \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ LUAROCKS_URL=http://keplerproject.github.io/luarocks/releases/luarocks-2.3.0.tar.gz From caa76894d81f280c48d595841785bb031c1b5724 Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Tue, 27 Sep 2016 15:04:08 +0300 Subject: [PATCH 037/286] Roll back to previous Tarantool 1.7 version --- 1.7/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1.7/Dockerfile b/1.7/Dockerfile index ed292eb..be750f3 100644 --- a/1.7/Dockerfile +++ b/1.7/Dockerfile @@ -7,7 +7,7 @@ RUN addgroup -S tarantool \ ENV TARANTOOL_VERSION=1.7 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ - TARANTOOL_COMMIT=72a598e \ + TARANTOOL_COMMIT=54b3b2d \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ LUAROCKS_URL=http://keplerproject.github.io/luarocks/releases/luarocks-2.3.0.tar.gz From 44764f0e2286df91a69b9e9097389ed07c6bd7ba Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Wed, 28 Sep 2016 19:17:30 +0300 Subject: [PATCH 038/286] Update tarantool 1.7 version --- 1.7/Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/1.7/Dockerfile b/1.7/Dockerfile index be750f3..87bf579 100644 --- a/1.7/Dockerfile +++ b/1.7/Dockerfile @@ -7,7 +7,7 @@ RUN addgroup -S tarantool \ ENV TARANTOOL_VERSION=1.7 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ - TARANTOOL_COMMIT=54b3b2d \ + TARANTOOL_COMMIT=499634d \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ LUAROCKS_URL=http://keplerproject.github.io/luarocks/releases/luarocks-2.3.0.tar.gz @@ -45,7 +45,6 @@ RUN set -x \ && git clone "$TARANTOOL_DOWNLOAD_URL" /usr/src/tarantool \ && git -C /usr/src/tarantool checkout "$TARANTOOL_COMMIT" \ && git -C /usr/src/tarantool submodule update \ - && echo "$TARANTOOL_VERSION" > /usr/src/tarantool/VERSION \ && (cd /usr/src/tarantool; \ cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo\ -DENABLE_BUNDLED_LIBYAML:BOOL=OFF\ From e4839b160b3fe71d66dbca1312639b9de9169f50 Mon Sep 17 00:00:00 2001 From: Roman Tsisyk Date: Thu, 29 Sep 2016 14:42:56 +0300 Subject: [PATCH 039/286] Bump versions to 1.6.9-11-gf4619d0 and 1.7.2-1-g92ed6c4 --- 1.6/Dockerfile | 13 +++++-------- 1.7/Dockerfile | 7 +++---- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/1.6/Dockerfile b/1.6/Dockerfile index 295d4f8..4e32b07 100644 --- a/1.6/Dockerfile +++ b/1.6/Dockerfile @@ -5,9 +5,8 @@ RUN addgroup -S tarantool \ && adduser -S -G tarantool tarantool \ && apk add --no-cache 'su-exec>=0.2' -ENV TARANTOOL_VERSION=1.6.8.741 \ - TARANTOOL_DOWNLOAD_URL=https://tarantool.org/dist/1.6/tarantool-1.6.8.741.tar.gz \ - TARANTOOL_DOWNLOAD_SHA1=8fca24b6f55e753ddce001146ee1c3659ddaf92f \ +ENV TARANTOOL_VERSION=1.6.9-11-gf4619d0 \ + TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ LUAROCKS_URL=http://keplerproject.github.io/luarocks/releases/luarocks-2.3.0.tar.gz @@ -39,12 +38,10 @@ RUN set -x \ musl-dev \ make \ git \ - && wget -O tarantool.tar.gz "$TARANTOOL_DOWNLOAD_URL" \ - && echo "$TARANTOOL_DOWNLOAD_SHA1 *tarantool.tar.gz" | sha1sum -c - \ && mkdir -p /usr/src/tarantool \ - && tar -xzf tarantool.tar.gz -C /usr/src/tarantool --strip-components=1 \ - && rm tarantool.tar.gz \ - && echo "$TARANTOOL_VERSION" > /usr/src/tarantool/VERSION \ + && git clone "$TARANTOOL_DOWNLOAD_URL" /usr/src/tarantool \ + && git -C /usr/src/tarantool checkout "$TARANTOOL_VERSION" \ + && git -C /usr/src/tarantool submodule update --init --recursive \ && (cd /usr/src/tarantool; \ cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo\ -DENABLE_BUNDLED_LIBYAML:BOOL=OFF\ diff --git a/1.7/Dockerfile b/1.7/Dockerfile index 87bf579..cec254c 100644 --- a/1.7/Dockerfile +++ b/1.7/Dockerfile @@ -5,9 +5,8 @@ RUN addgroup -S tarantool \ && adduser -S -G tarantool tarantool \ && apk add --no-cache 'su-exec>=0.2' -ENV TARANTOOL_VERSION=1.7 \ +ENV TARANTOOL_VERSION=1.7.2-1-g92ed6c4 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ - TARANTOOL_COMMIT=499634d \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ LUAROCKS_URL=http://keplerproject.github.io/luarocks/releases/luarocks-2.3.0.tar.gz @@ -43,8 +42,8 @@ RUN set -x \ && : "---------- tarantool ----------" \ && mkdir -p /usr/src/tarantool \ && git clone "$TARANTOOL_DOWNLOAD_URL" /usr/src/tarantool \ - && git -C /usr/src/tarantool checkout "$TARANTOOL_COMMIT" \ - && git -C /usr/src/tarantool submodule update \ + && git -C /usr/src/tarantool checkout "$TARANTOOL_VERSION" \ + && git -C /usr/src/tarantool submodule update --init --recursive \ && (cd /usr/src/tarantool; \ cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo\ -DENABLE_BUNDLED_LIBYAML:BOOL=OFF\ From c7f549db3e1e6269cb70b47f59a8d59a604f247a Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Tue, 4 Oct 2016 14:29:02 +0300 Subject: [PATCH 040/286] Add tarantool-curl rock --- 1.6/Dockerfile | 3 +++ 1.7/Dockerfile | 3 +++ 2 files changed, 6 insertions(+) diff --git a/1.6/Dockerfile b/1.6/Dockerfile index 4e32b07..381a0c0 100644 --- a/1.6/Dockerfile +++ b/1.6/Dockerfile @@ -89,6 +89,7 @@ RUN set -x \ mariadb-client-libs \ libpq \ cyrus-sasl \ + libcurl \ && apk add --no-cache --virtual .build-deps \ git \ cmake \ @@ -99,6 +100,7 @@ RUN set -x \ lua-dev \ musl-dev \ cyrus-sasl-dev \ + curl-dev \ && : "---------- luarocks ----------" \ && luarocks install avro-schema \ && luarocks install expirationd \ @@ -111,6 +113,7 @@ RUN set -x \ && luarocks install memcached \ && luarocks install tarantool-prometheus \ && luarocks install lua-term \ + && luarocks install tarantool-curl \ && : "---------- remove build deps ----------" \ && apk del .build-deps diff --git a/1.7/Dockerfile b/1.7/Dockerfile index cec254c..c45c916 100644 --- a/1.7/Dockerfile +++ b/1.7/Dockerfile @@ -91,6 +91,7 @@ RUN set -x \ mariadb-client-libs \ libpq \ cyrus-sasl \ + libcurl \ && apk add --no-cache --virtual .build-deps \ git \ cmake \ @@ -102,6 +103,7 @@ RUN set -x \ lua-dev \ musl-dev \ cyrus-sasl-dev \ + curl-dev \ && : "---------- luarocks ----------" \ && luarocks install avro-schema \ && luarocks install expirationd \ @@ -114,6 +116,7 @@ RUN set -x \ && luarocks install memcached \ && luarocks install tarantool-prometheus \ && luarocks install lua-term \ + && luarocks install tarantool-curl \ && : "---------- remove build deps ----------" \ && apk del .build-deps From 7c6e7dac7c9ba788e2ec72db2f89ec010f2024d6 Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Fri, 21 Oct 2016 16:35:23 +0300 Subject: [PATCH 041/286] /opt/tarantool and /etc/tarantool should not be volumes Otherwise people have hard time with setting permissions on their lua scripts. Docker doesn't allow to change them after the VOLUME directive. --- 1.5/Dockerfile | 2 -- 1.6/Dockerfile | 2 -- 1.7/Dockerfile | 2 -- 3 files changed, 6 deletions(-) diff --git a/1.5/Dockerfile b/1.5/Dockerfile index 0a4ae9f..53ebde1 100644 --- a/1.5/Dockerfile +++ b/1.5/Dockerfile @@ -89,8 +89,6 @@ RUN mkdir -p /var/lib/tarantool \ && chown tarantool:tarantool /etc/tarantool VOLUME /var/lib/tarantool -VOLUME /opt/tarantool -VOLUME /etc/tarantool WORKDIR /opt/tarantool COPY docker-entrypoint.sh /usr/local/bin/ diff --git a/1.6/Dockerfile b/1.6/Dockerfile index 381a0c0..9f71d2e 100644 --- a/1.6/Dockerfile +++ b/1.6/Dockerfile @@ -128,8 +128,6 @@ RUN mkdir -p /var/lib/tarantool \ && chown tarantool:tarantool /etc/tarantool VOLUME /var/lib/tarantool -VOLUME /opt/tarantool -VOLUME /etc/tarantool WORKDIR /opt/tarantool COPY tarantool-entrypoint.lua /usr/local/bin/ diff --git a/1.7/Dockerfile b/1.7/Dockerfile index c45c916..c41102b 100644 --- a/1.7/Dockerfile +++ b/1.7/Dockerfile @@ -131,8 +131,6 @@ RUN mkdir -p /var/lib/tarantool \ && chown tarantool:tarantool /etc/tarantool VOLUME /var/lib/tarantool -VOLUME /opt/tarantool -VOLUME /etc/tarantool WORKDIR /opt/tarantool COPY tarantool-entrypoint.lua /usr/local/bin/ From 54146fe86e8f10bf7d99489fdd60fa6425768381 Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Mon, 24 Oct 2016 17:29:56 +0300 Subject: [PATCH 042/286] Add mqtt rock to 1.6 and 1.7 --- 1.6/Dockerfile | 3 +++ 1.7/Dockerfile | 3 +++ 2 files changed, 6 insertions(+) diff --git a/1.6/Dockerfile b/1.6/Dockerfile index 9f71d2e..19c4759 100644 --- a/1.6/Dockerfile +++ b/1.6/Dockerfile @@ -90,6 +90,7 @@ RUN set -x \ libpq \ cyrus-sasl \ libcurl \ + mosquitto-libs \ && apk add --no-cache --virtual .build-deps \ git \ cmake \ @@ -101,6 +102,7 @@ RUN set -x \ musl-dev \ cyrus-sasl-dev \ curl-dev \ + mosquitto-dev \ && : "---------- luarocks ----------" \ && luarocks install avro-schema \ && luarocks install expirationd \ @@ -114,6 +116,7 @@ RUN set -x \ && luarocks install tarantool-prometheus \ && luarocks install lua-term \ && luarocks install tarantool-curl \ + && luarocks install mqtt \ && : "---------- remove build deps ----------" \ && apk del .build-deps diff --git a/1.7/Dockerfile b/1.7/Dockerfile index c41102b..2ad4fd3 100644 --- a/1.7/Dockerfile +++ b/1.7/Dockerfile @@ -92,6 +92,7 @@ RUN set -x \ libpq \ cyrus-sasl \ libcurl \ + mosquitto-libs \ && apk add --no-cache --virtual .build-deps \ git \ cmake \ @@ -104,6 +105,7 @@ RUN set -x \ musl-dev \ cyrus-sasl-dev \ curl-dev \ + mosquitto-dev \ && : "---------- luarocks ----------" \ && luarocks install avro-schema \ && luarocks install expirationd \ @@ -117,6 +119,7 @@ RUN set -x \ && luarocks install tarantool-prometheus \ && luarocks install lua-term \ && luarocks install tarantool-curl \ + && luarocks install mqtt \ && : "---------- remove build deps ----------" \ && apk del .build-deps From 2a61fd6bda483c465a6cf880fecfd269ee1f496a Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Mon, 24 Oct 2016 18:17:31 +0300 Subject: [PATCH 043/286] Bump tarantool 1.5 commit --- 1.5/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1.5/Dockerfile b/1.5/Dockerfile index 53ebde1..8288524 100644 --- a/1.5/Dockerfile +++ b/1.5/Dockerfile @@ -7,7 +7,7 @@ RUN addgroup -S tarantool \ ENV TARANTOOL_VERSION=1.5.5.27 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ - TARANTOOL_COMMIT=6aaa31234d1ee2f5e1107ab24508a7875ea4e05a \ + TARANTOOL_COMMIT=1687c022e7aa93e9c118e1b80e1eac6c429b1010 \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ LUAROCKS_URL=http://keplerproject.github.io/luarocks/releases/luarocks-2.3.0.tar.gz From 2e552da558e150c52080b72b159f744fa65871b8 Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Mon, 28 Nov 2016 21:31:45 +0300 Subject: [PATCH 044/286] Bump tarantool 1.7 commit --- 1.7/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1.7/Dockerfile b/1.7/Dockerfile index 2ad4fd3..d21671b 100644 --- a/1.7/Dockerfile +++ b/1.7/Dockerfile @@ -5,7 +5,7 @@ RUN addgroup -S tarantool \ && adduser -S -G tarantool tarantool \ && apk add --no-cache 'su-exec>=0.2' -ENV TARANTOOL_VERSION=1.7.2-1-g92ed6c4 \ +ENV TARANTOOL_VERSION=1.7.2-287-g085f6e4 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ LUAROCKS_URL=http://keplerproject.github.io/luarocks/releases/luarocks-2.3.0.tar.gz From 57590fbddd837b20f842576472b40ff5381e0dab Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Tue, 29 Nov 2016 13:57:37 +0300 Subject: [PATCH 045/286] Add support for changing username/password How to use: tarantool_set_config.lua TARANTOOL_USER_NAME tarantool_set_config.lua TARANTOOL_USER_PASSWORD --- 1.6/tarantool-entrypoint.lua | 136 +++++++++++++++++++---------------- 1.6/tarantool_set_config.lua | 31 ++++++-- 1.7/tarantool-entrypoint.lua | 136 +++++++++++++++++++---------------- 1.7/tarantool_set_config.lua | 31 ++++++-- 4 files changed, 200 insertions(+), 134 deletions(-) diff --git a/1.6/tarantool-entrypoint.lua b/1.6/tarantool-entrypoint.lua index d699839..b544ed3 100755 --- a/1.6/tarantool-entrypoint.lua +++ b/1.6/tarantool-entrypoint.lua @@ -70,13 +70,85 @@ local function parse_replication_source(replication_source, user_name, user_pass return replication_source_table end -function set_replication_source(replication_source) - local replication_source_table = parse_replication_source(replication_source) +function set_replication_source(replication_source, user_name, user_password) + local replication_source_table = + parse_replication_source(replication_source, user_name, user_password) box.cfg{replication_source = replication_source_table} log.info("Updated box.cfg{replication_source} to "..replication_source) end +local function create_user(user_name, user_password) + if user_name ~= 'guest' and user_password == nil then + user_password = "" + + local warn_str = [[**************************************************** +WARNING: No password has been set for the database. + This will allow anyone with access to the + Tarantool port to access your database. In + Docker's default configuration, this is + effectively any other container on the same + system. + Use "-e TARANTOOL_USER_PASSWORD=password" + to set it in "docker run". +****************************************************]] + log.warn('\n'..warn_str) + end + + if user_name == 'guest' and user_password == nil then + local warn_str = [[**************************************************** +WARNING: 'guest' is chosen as primary user. + Since it is not allowed to set a password for + guest user, your instance will be accessible + by anyone having direct access to the Tarantool + port. + If you wanted to create an authenticated user, + specify "-e TARANTOOL_USER_NAME=username" and + pick a user name other than "guest". +****************************************************]] + log.warn('\n'..warn_str) + end + + if user_name == 'guest' and user_password ~= nil then + user_password = nil + + local warn_str = [[**************************************************** +WARNING: A password for guest user has been specified. + In Tarantool, guest user can't have a password + and is always allowed to login, if it has + enough privileges. + If you wanted to create an authenticated user, + specify "-e TARANTOOL_USER_NAME=username" and + pick a user name other than "guest". +****************************************************]] + log.warn('\n'..warn_str) + end + + if user_name ~= 'admin' and user_name ~= 'guest' then + if not box.schema.user.exists(user_name) then + log.info("Creating user '%s'", user_name) + box.schema.user.create(user_name) + end + end + + if user_name ~= 'admin' then + log.info("Granting admin privileges to user '%s'", user_name) + box.schema.user.grant(user_name, 'read,write,execute', + 'universe', nil, {if_not_exists = true}) + box.schema.user.grant(user_name, 'replication', + nil, nil, {if_not_exists = true}) + end + + if user_name ~= 'guest' then + log.info("Setting password for user '%s'", user_name) + box.schema.user.passwd(user_name, user_password) + end +end + +function set_credentials(user_name, user_password) + create_user(user_name, user_password) +end + local function wrapper_cfg(override) local work_dir = '/var/lib/tarantool' local snap_filename = "*.snap" @@ -152,65 +224,7 @@ local function wrapper_cfg(override) if first_run then log.info("Initializing database") - if user_name ~= 'guest' and user_password == nil then - user_password = "" - - local warn_str = [[**************************************************** -WARNING: No password has been set for the database. - This will allow anyone with access to the - Tarantool port to access your database. In - Docker's default configuration, this is - effectively any other container on the same - system. - Use "-e TARANTOOL_USER_PASSWORD=password" - to set it in "docker run". -****************************************************]] - log.warn('\n'..warn_str) - end - - if user_name == 'guest' and user_password == nil then - local warn_str = [[**************************************************** -WARNING: 'guest' is chosen as primary user. - Since it is not allowed to set a password for - guest user, your instance will be accessible - by anyone having direct access to the Tarantool - port. - If you wanted to create an authenticated user, - specify "-e TARANTOOL_USER_NAME=username" and - pick a user name other than "guest". -****************************************************]] - log.warn('\n'..warn_str) - end - - if user_name == 'guest' and user_password ~= nil then - user_password = nil - - local warn_str = [[**************************************************** -WARNING: A password for guest user has been specified. - In Tarantool, guest user can't have a password - and is always allowed to login, if it has - enough privileges. - If you wanted to create an authenticated user, - specify "-e TARANTOOL_USER_NAME=username" and - pick a user name other than "guest". -****************************************************]] - log.warn('\n'..warn_str) - end - - if user_name ~= 'admin' and user_name ~= 'guest' then - log.info("Creating user '%s'", user_name) - box.schema.user.create(user_name) - end - - if user_name ~= 'admin' then - log.info("Granting admin privileges to user '%s'", user_name) - box.schema.user.grant(user_name, 'read,write,execute', 'universe') - box.schema.user.grant(user_name, 'replication') - end - - if user_name ~= 'guest' then - box.schema.user.passwd(user_name, user_password) - end + create_user(user_name, user_password) end end) diff --git a/1.6/tarantool_set_config.lua b/1.6/tarantool_set_config.lua index 024b598..a368897 100755 --- a/1.6/tarantool_set_config.lua +++ b/1.6/tarantool_set_config.lua @@ -34,8 +34,6 @@ local function nop(console, cfg, value) end local function update_replication_source(console, cfg, value) - local cmd = "" - local user_name = "nil" if cfg['TARANTOOL_USER_NAME'] then user_name = "'" .. cfg['TARANTOOL_USER_NAME'] .. "'" @@ -46,16 +44,37 @@ local function update_replication_source(console, cfg, value) user_password = "'" .. cfg['TARANTOOL_USER_PASSWORD'] .. "'" end - cmd = "set_replication_source('"..value.."', " .. user_name .. "," .. user_password .. ")" + local cmd = "set_replication_source('"..value.."', " .. user_name .. "," .. user_password .. ")" print("cmd: ", cmd) - res = console:eval(cmd) + local res = console:eval(cmd) if res ~= nil then print(res) end end +local function update_credentials(console, cfg, value) + local user_name = "nil" + if cfg['TARANTOOL_USER_NAME'] then + user_name = "'" .. cfg['TARANTOOL_USER_NAME'] .. "'" + end + + local user_password = "nil" + if cfg['TARANTOOL_USER_PASSWORD'] then + user_password = "'" .. cfg['TARANTOOL_USER_PASSWORD'] .. "'" + end + + local cmd = "set_credentials(" .. user_name .. "," .. user_password .. ")" + + local res = console:eval(cmd) + + if res ~= nil then + print(res) + end +end + + local vars = { TARANTOOL_SLAB_ALLOC_ARENA=nop, TARANTOOL_SLAB_ALLOC_FACTOR=nop, @@ -63,8 +82,8 @@ local vars = { TARANTOOL_SLAB_ALLOC_MINIMAL=nop, TARANTOOL_PORT=nop, TARANTOOL_WAL_MODE=nop, - TARANTOOL_USER_NAME=nop, - TARANTOOL_USER_PASSWORD=nop, + TARANTOOL_USER_NAME=update_credentials, + TARANTOOL_USER_PASSWORD=update_credentials, TARANTOOL_REPLICATION_SOURCE=update_replication_source } diff --git a/1.7/tarantool-entrypoint.lua b/1.7/tarantool-entrypoint.lua index d699839..b544ed3 100755 --- a/1.7/tarantool-entrypoint.lua +++ b/1.7/tarantool-entrypoint.lua @@ -70,13 +70,85 @@ local function parse_replication_source(replication_source, user_name, user_pass return replication_source_table end -function set_replication_source(replication_source) - local replication_source_table = parse_replication_source(replication_source) +function set_replication_source(replication_source, user_name, user_password) + local replication_source_table = + parse_replication_source(replication_source, user_name, user_password) box.cfg{replication_source = replication_source_table} log.info("Updated box.cfg{replication_source} to "..replication_source) end +local function create_user(user_name, user_password) + if user_name ~= 'guest' and user_password == nil then + user_password = "" + + local warn_str = [[**************************************************** +WARNING: No password has been set for the database. + This will allow anyone with access to the + Tarantool port to access your database. In + Docker's default configuration, this is + effectively any other container on the same + system. + Use "-e TARANTOOL_USER_PASSWORD=password" + to set it in "docker run". +****************************************************]] + log.warn('\n'..warn_str) + end + + if user_name == 'guest' and user_password == nil then + local warn_str = [[**************************************************** +WARNING: 'guest' is chosen as primary user. + Since it is not allowed to set a password for + guest user, your instance will be accessible + by anyone having direct access to the Tarantool + port. + If you wanted to create an authenticated user, + specify "-e TARANTOOL_USER_NAME=username" and + pick a user name other than "guest". +****************************************************]] + log.warn('\n'..warn_str) + end + + if user_name == 'guest' and user_password ~= nil then + user_password = nil + + local warn_str = [[**************************************************** +WARNING: A password for guest user has been specified. + In Tarantool, guest user can't have a password + and is always allowed to login, if it has + enough privileges. + If you wanted to create an authenticated user, + specify "-e TARANTOOL_USER_NAME=username" and + pick a user name other than "guest". +****************************************************]] + log.warn('\n'..warn_str) + end + + if user_name ~= 'admin' and user_name ~= 'guest' then + if not box.schema.user.exists(user_name) then + log.info("Creating user '%s'", user_name) + box.schema.user.create(user_name) + end + end + + if user_name ~= 'admin' then + log.info("Granting admin privileges to user '%s'", user_name) + box.schema.user.grant(user_name, 'read,write,execute', + 'universe', nil, {if_not_exists = true}) + box.schema.user.grant(user_name, 'replication', + nil, nil, {if_not_exists = true}) + end + + if user_name ~= 'guest' then + log.info("Setting password for user '%s'", user_name) + box.schema.user.passwd(user_name, user_password) + end +end + +function set_credentials(user_name, user_password) + create_user(user_name, user_password) +end + local function wrapper_cfg(override) local work_dir = '/var/lib/tarantool' local snap_filename = "*.snap" @@ -152,65 +224,7 @@ local function wrapper_cfg(override) if first_run then log.info("Initializing database") - if user_name ~= 'guest' and user_password == nil then - user_password = "" - - local warn_str = [[**************************************************** -WARNING: No password has been set for the database. - This will allow anyone with access to the - Tarantool port to access your database. In - Docker's default configuration, this is - effectively any other container on the same - system. - Use "-e TARANTOOL_USER_PASSWORD=password" - to set it in "docker run". -****************************************************]] - log.warn('\n'..warn_str) - end - - if user_name == 'guest' and user_password == nil then - local warn_str = [[**************************************************** -WARNING: 'guest' is chosen as primary user. - Since it is not allowed to set a password for - guest user, your instance will be accessible - by anyone having direct access to the Tarantool - port. - If you wanted to create an authenticated user, - specify "-e TARANTOOL_USER_NAME=username" and - pick a user name other than "guest". -****************************************************]] - log.warn('\n'..warn_str) - end - - if user_name == 'guest' and user_password ~= nil then - user_password = nil - - local warn_str = [[**************************************************** -WARNING: A password for guest user has been specified. - In Tarantool, guest user can't have a password - and is always allowed to login, if it has - enough privileges. - If you wanted to create an authenticated user, - specify "-e TARANTOOL_USER_NAME=username" and - pick a user name other than "guest". -****************************************************]] - log.warn('\n'..warn_str) - end - - if user_name ~= 'admin' and user_name ~= 'guest' then - log.info("Creating user '%s'", user_name) - box.schema.user.create(user_name) - end - - if user_name ~= 'admin' then - log.info("Granting admin privileges to user '%s'", user_name) - box.schema.user.grant(user_name, 'read,write,execute', 'universe') - box.schema.user.grant(user_name, 'replication') - end - - if user_name ~= 'guest' then - box.schema.user.passwd(user_name, user_password) - end + create_user(user_name, user_password) end end) diff --git a/1.7/tarantool_set_config.lua b/1.7/tarantool_set_config.lua index 024b598..a368897 100755 --- a/1.7/tarantool_set_config.lua +++ b/1.7/tarantool_set_config.lua @@ -34,8 +34,6 @@ local function nop(console, cfg, value) end local function update_replication_source(console, cfg, value) - local cmd = "" - local user_name = "nil" if cfg['TARANTOOL_USER_NAME'] then user_name = "'" .. cfg['TARANTOOL_USER_NAME'] .. "'" @@ -46,16 +44,37 @@ local function update_replication_source(console, cfg, value) user_password = "'" .. cfg['TARANTOOL_USER_PASSWORD'] .. "'" end - cmd = "set_replication_source('"..value.."', " .. user_name .. "," .. user_password .. ")" + local cmd = "set_replication_source('"..value.."', " .. user_name .. "," .. user_password .. ")" print("cmd: ", cmd) - res = console:eval(cmd) + local res = console:eval(cmd) if res ~= nil then print(res) end end +local function update_credentials(console, cfg, value) + local user_name = "nil" + if cfg['TARANTOOL_USER_NAME'] then + user_name = "'" .. cfg['TARANTOOL_USER_NAME'] .. "'" + end + + local user_password = "nil" + if cfg['TARANTOOL_USER_PASSWORD'] then + user_password = "'" .. cfg['TARANTOOL_USER_PASSWORD'] .. "'" + end + + local cmd = "set_credentials(" .. user_name .. "," .. user_password .. ")" + + local res = console:eval(cmd) + + if res ~= nil then + print(res) + end +end + + local vars = { TARANTOOL_SLAB_ALLOC_ARENA=nop, TARANTOOL_SLAB_ALLOC_FACTOR=nop, @@ -63,8 +82,8 @@ local vars = { TARANTOOL_SLAB_ALLOC_MINIMAL=nop, TARANTOOL_PORT=nop, TARANTOOL_WAL_MODE=nop, - TARANTOOL_USER_NAME=nop, - TARANTOOL_USER_PASSWORD=nop, + TARANTOOL_USER_NAME=update_credentials, + TARANTOOL_USER_PASSWORD=update_credentials, TARANTOOL_REPLICATION_SOURCE=update_replication_source } From 91c2407aa3bd0a5d00ecb307eafcf89749230ed9 Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Tue, 29 Nov 2016 18:45:02 +0300 Subject: [PATCH 046/286] Added support for changing passwords dynamically e.g. with: tarantool_set_config.lua TARANTOOL_USER_PASSWORD --- 1.6/tarantool-entrypoint.lua | 8 ++++++-- 1.6/tarantool_set_config.lua | 6 ++++++ 1.7/tarantool-entrypoint.lua | 8 ++++++-- 1.7/tarantool_set_config.lua | 6 ++++++ 4 files changed, 24 insertions(+), 4 deletions(-) diff --git a/1.6/tarantool-entrypoint.lua b/1.6/tarantool-entrypoint.lua index b544ed3..a71ec17 100755 --- a/1.6/tarantool-entrypoint.lua +++ b/1.6/tarantool-entrypoint.lua @@ -159,8 +159,6 @@ local function wrapper_cfg(override) first_run = true end - local user_name = os.getenv('TARANTOOL_USER_NAME') or 'guest' - local user_password = os.getenv('TARANTOOL_USER_PASSWORD') local file_cfg = {} local config_file_exists = fio.stat(CFG_FILE_PATH) ~= nil @@ -185,6 +183,12 @@ local function wrapper_cfg(override) file_cfg = read_config() end + local user_name = file_cfg.TARANTOOL_USER_NAME or + os.getenv('TARANTOOL_USER_NAME') or 'guest' + local user_password = file_cfg.TARANTOOL_USER_PASSWORD or + os.getenv('TARANTOOL_USER_PASSWORD') + + local cfg = override or {} cfg.slab_alloc_arena = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_ARENA) or override.slab_alloc_arena diff --git a/1.6/tarantool_set_config.lua b/1.6/tarantool_set_config.lua index a368897..f6b2a55 100755 --- a/1.6/tarantool_set_config.lua +++ b/1.6/tarantool_set_config.lua @@ -72,6 +72,12 @@ local function update_credentials(console, cfg, value) if res ~= nil then print(res) end + + local replication_source = cfg['TARANTOOL_REPLICATION_SOURCE'] + + if replication_source ~= nil then + update_replication_source(console, cfg, replication_source) + end end diff --git a/1.7/tarantool-entrypoint.lua b/1.7/tarantool-entrypoint.lua index b544ed3..a71ec17 100755 --- a/1.7/tarantool-entrypoint.lua +++ b/1.7/tarantool-entrypoint.lua @@ -159,8 +159,6 @@ local function wrapper_cfg(override) first_run = true end - local user_name = os.getenv('TARANTOOL_USER_NAME') or 'guest' - local user_password = os.getenv('TARANTOOL_USER_PASSWORD') local file_cfg = {} local config_file_exists = fio.stat(CFG_FILE_PATH) ~= nil @@ -185,6 +183,12 @@ local function wrapper_cfg(override) file_cfg = read_config() end + local user_name = file_cfg.TARANTOOL_USER_NAME or + os.getenv('TARANTOOL_USER_NAME') or 'guest' + local user_password = file_cfg.TARANTOOL_USER_PASSWORD or + os.getenv('TARANTOOL_USER_PASSWORD') + + local cfg = override or {} cfg.slab_alloc_arena = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_ARENA) or override.slab_alloc_arena diff --git a/1.7/tarantool_set_config.lua b/1.7/tarantool_set_config.lua index a368897..f6b2a55 100755 --- a/1.7/tarantool_set_config.lua +++ b/1.7/tarantool_set_config.lua @@ -72,6 +72,12 @@ local function update_credentials(console, cfg, value) if res ~= nil then print(res) end + + local replication_source = cfg['TARANTOOL_REPLICATION_SOURCE'] + + if replication_source ~= nil then + update_replication_source(console, cfg, replication_source) + end end From 19ba2fa7fbede62dadc0cbc797d3c22ad1cdaeae Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Mon, 5 Dec 2016 15:04:23 +0300 Subject: [PATCH 047/286] Add tarantool-gis module --- 1.6/Dockerfile | 21 +++++++++++++++++++++ 1.7/Dockerfile | 21 +++++++++++++++++++++ 2 files changed, 42 insertions(+) diff --git a/1.6/Dockerfile b/1.6/Dockerfile index 19c4759..e177e65 100644 --- a/1.6/Dockerfile +++ b/1.6/Dockerfile @@ -103,6 +103,26 @@ RUN set -x \ cyrus-sasl-dev \ curl-dev \ mosquitto-dev \ + && : "---------- proj (for gis module) ----------" \ + && wget -O proj.tar.gz http://download.osgeo.org/proj/proj-4.9.3.tar.gz \ + && mkdir -p /usr/src/proj \ + && tar -xzf proj.tar.gz -C /usr/src/proj --strip-components=1 \ + && (cd /usr/src/proj; \ + ./configure; \ + make; \ + make install) \ + && rm -r /usr/src/proj \ + && rm -rf /usr/src/proj \ + && : "---------- geos (for gis module) ----------" \ + && wget -O geos.tar.bz2 http://download.osgeo.org/geos/geos-3.6.0.tar.bz2 \ + && mkdir -p /usr/src/geos \ + && tar -xjf geos.tar.bz2 -C /usr/src/geos --strip-components=1 \ + && (cd /usr/src/geos; \ + ./configure; \ + make; \ + make install) \ + && rm -r /usr/src/geos \ + && rm -rf /usr/src/geos \ && : "---------- luarocks ----------" \ && luarocks install avro-schema \ && luarocks install expirationd \ @@ -117,6 +137,7 @@ RUN set -x \ && luarocks install lua-term \ && luarocks install tarantool-curl \ && luarocks install mqtt \ + && luarocks install tarantool-gis \ && : "---------- remove build deps ----------" \ && apk del .build-deps diff --git a/1.7/Dockerfile b/1.7/Dockerfile index d21671b..39bc109 100644 --- a/1.7/Dockerfile +++ b/1.7/Dockerfile @@ -106,6 +106,26 @@ RUN set -x \ cyrus-sasl-dev \ curl-dev \ mosquitto-dev \ + && : "---------- proj (for gis module) ----------" \ + && wget -O proj.tar.gz http://download.osgeo.org/proj/proj-4.9.3.tar.gz \ + && mkdir -p /usr/src/proj \ + && tar -xzf proj.tar.gz -C /usr/src/proj --strip-components=1 \ + && (cd /usr/src/proj; \ + ./configure; \ + make; \ + make install) \ + && rm -r /usr/src/proj \ + && rm -rf /usr/src/proj \ + && : "---------- geos (for gis module) ----------" \ + && wget -O geos.tar.bz2 http://download.osgeo.org/geos/geos-3.6.0.tar.bz2 \ + && mkdir -p /usr/src/geos \ + && tar -xjf geos.tar.bz2 -C /usr/src/geos --strip-components=1 \ + && (cd /usr/src/geos; \ + ./configure; \ + make; \ + make install) \ + && rm -r /usr/src/geos \ + && rm -rf /usr/src/geos \ && : "---------- luarocks ----------" \ && luarocks install avro-schema \ && luarocks install expirationd \ @@ -120,6 +140,7 @@ RUN set -x \ && luarocks install lua-term \ && luarocks install tarantool-curl \ && luarocks install mqtt \ + && luarocks install tarantool-gis \ && : "---------- remove build deps ----------" \ && apk del .build-deps From 10474f8726f00df4f52b292a7e16ac2886aa8b0d Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Tue, 13 Dec 2016 17:28:59 +0300 Subject: [PATCH 048/286] Scripts to detect if tarantool is up --- 1.6/Dockerfile | 1 + 1.6/tarantool_is_up | 41 +++++++++++++++++++++++++++++++++++++++++ 1.7/Dockerfile | 1 + 1.7/tarantool_is_up | 41 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 84 insertions(+) create mode 100755 1.6/tarantool_is_up create mode 100755 1.7/tarantool_is_up diff --git a/1.6/Dockerfile b/1.6/Dockerfile index e177e65..8de9a9e 100644 --- a/1.6/Dockerfile +++ b/1.6/Dockerfile @@ -157,6 +157,7 @@ WORKDIR /opt/tarantool COPY tarantool-entrypoint.lua /usr/local/bin/ COPY tarantool_set_config.lua /usr/local/bin/ COPY docker-entrypoint.sh /usr/local/bin/ +COPY tarantool_is_up /usr/local/bin/ COPY tarantool.default /usr/local/etc/default/tarantool RUN ln -s usr/local/bin/docker-entrypoint.sh /entrypoint.sh # backwards compat diff --git a/1.6/tarantool_is_up b/1.6/tarantool_is_up new file mode 100755 index 0000000..71148d5 --- /dev/null +++ b/1.6/tarantool_is_up @@ -0,0 +1,41 @@ +#!/bin/sh + +status=$( (tarantool <<-'EOF' +local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' +local console = require('console') +local os = require("os") +local yaml = require("yaml") + +console.on_start(function(self) + local status, reason + status, reason = pcall(function() require('console').connect(CONSOLE_SOCKET_PATH) end) + if not status then + self:print(reason) + os.exit(1) + end + + cmd = 'box.info.status' + local res = self:eval(cmd) + if res ~= nil then + res = yaml.decode(res) + print(res[1]) + end + + os.exit(0) +end) + +console.on_client_disconnect(function(self) self.running = false end) +console.start() + +os.exit(0) +EOF +) 2>/dev/null) + + +echo "$status" + +if [ "$status" = "running" ]; then + exit 0 +else + exit 1 +fi diff --git a/1.7/Dockerfile b/1.7/Dockerfile index 39bc109..59f93a5 100644 --- a/1.7/Dockerfile +++ b/1.7/Dockerfile @@ -160,6 +160,7 @@ WORKDIR /opt/tarantool COPY tarantool-entrypoint.lua /usr/local/bin/ COPY tarantool_set_config.lua /usr/local/bin/ COPY docker-entrypoint.sh /usr/local/bin/ +COPY tarantool_is_up /usr/local/bin/ COPY tarantool.default /usr/local/etc/default/tarantool RUN ln -s usr/local/bin/docker-entrypoint.sh /entrypoint.sh # backwards compat diff --git a/1.7/tarantool_is_up b/1.7/tarantool_is_up new file mode 100755 index 0000000..71148d5 --- /dev/null +++ b/1.7/tarantool_is_up @@ -0,0 +1,41 @@ +#!/bin/sh + +status=$( (tarantool <<-'EOF' +local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' +local console = require('console') +local os = require("os") +local yaml = require("yaml") + +console.on_start(function(self) + local status, reason + status, reason = pcall(function() require('console').connect(CONSOLE_SOCKET_PATH) end) + if not status then + self:print(reason) + os.exit(1) + end + + cmd = 'box.info.status' + local res = self:eval(cmd) + if res ~= nil then + res = yaml.decode(res) + print(res[1]) + end + + os.exit(0) +end) + +console.on_client_disconnect(function(self) self.running = false end) +console.start() + +os.exit(0) +EOF +) 2>/dev/null) + + +echo "$status" + +if [ "$status" = "running" ]; then + exit 0 +else + exit 1 +fi From 7ee0cea5ac71a622029a9119eae65e085c928767 Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Thu, 15 Dec 2016 14:56:37 +0300 Subject: [PATCH 049/286] Freeze luarock versions --- 1.6/Dockerfile | 94 ++++++++++++++++++++++++++++++++++++++++-------- 1.7/Dockerfile | 98 +++++++++++++++++++++++++++++++++++++++++--------- 2 files changed, 161 insertions(+), 31 deletions(-) diff --git a/1.6/Dockerfile b/1.6/Dockerfile index 8de9a9e..1951e35 100644 --- a/1.6/Dockerfile +++ b/1.6/Dockerfile @@ -8,7 +8,33 @@ RUN addgroup -S tarantool \ ENV TARANTOOL_VERSION=1.6.9-11-gf4619d0 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ - LUAROCKS_URL=http://keplerproject.github.io/luarocks/releases/luarocks-2.3.0.tar.gz + LUAROCKS_URL=http://keplerproject.github.io/luarocks/releases/luarocks-2.3.0.tar.gz \ + LUAROCK_AVRO_SCHEMA_REPO=https://github.com/tarantool/avro-schema.git \ + LUAROCK_AVRO_SCHEMA_TAG=b49efa8 \ + LUAROCK_EXPIRATIOND_REPO=https://github.com/tarantool/expirationd.git \ + LUAROCK_EXPIRATIOND_TAG=9ec22b6 \ + LUAROCK_QUEUE_REPO=https://github.com/tarantool/queue.git \ + LUAROCK_QUEUE_TAG=9796515 \ + LUAROCK_CONNPOOL_REPO=https://github.com/tarantool/connpool.git \ + LUAROCK_CONNPOOL_TAG=685af44 \ + LUAROCK_SHARD_REPO=https://github.com/tarantool/shard.git \ + LUAROCK_SHARD_TAG=278b906 \ + LUAROCK_HTTP_REPO=https://github.com/tarantool/http.git \ + LUAROCK_HTTP_TAG=4486de9 \ + LUAROCK_PG_REPO=https://github.com/tarantool/pg.git \ + LUAROCK_PG_TAG=43a7130 \ + LUAROCK_MYSQL_REPO=https://github.com/tarantool/mysql.git \ + LUAROCK_MYSQL_TAG=5219f00 \ + LUAROCK_MEMCACHED_REPO=https://github.com/tarantool/memcached.git \ + LUAROCK_MEMCACHED_TAG=c927626 \ + LUAROCK_TARANTOOL_PROMETHEUS_REPO=https://github.com/tarantool/prometheus.git \ + LUAROCK_TARANTOOL_PROMETHEUS_TAG=0654304 \ + LUAROCK_TARANTOOL_CURL_REPO=https://github.com/tarantool/curl.git \ + LUAROCK_TARANTOOL_CURL_TAG=900b3fd \ + LUAROCK_MQTT_REPO=https://github.com/tarantool/mqtt.git \ + LUAROCK_MQTT_TAG=238fd2e \ + LUAROCK_TARANTOOL_GIS_REPO=https://github.com/tarantool/gis.git \ + LUAROCK_TARANTOOL_GIS_TAG=25209fc RUN set -x \ && apk add --no-cache --virtual .run-deps \ @@ -124,20 +150,58 @@ RUN set -x \ && rm -r /usr/src/geos \ && rm -rf /usr/src/geos \ && : "---------- luarocks ----------" \ - && luarocks install avro-schema \ - && luarocks install expirationd \ - && luarocks install queue \ - && luarocks install connpool \ - && luarocks install shard \ - && luarocks install http \ - && luarocks install pg \ - && luarocks install mysql \ - && luarocks install memcached \ - && luarocks install tarantool-prometheus \ - && luarocks install lua-term \ - && luarocks install tarantool-curl \ - && luarocks install mqtt \ - && luarocks install tarantool-gis \ + && : "avro" \ + && git clone $LUAROCK_AVRO_SCHEMA_REPO /rocks/avro \ + && git -C /rocks/avro checkout $LUAROCK_AVRO_SCHEMA_TAG \ + && (cd /rocks/avro && luarocks make *rockspec) \ + && : "expirationd" \ + && git clone $LUAROCK_EXPIRATIOND_REPO /rocks/expirationd \ + && git -C /rocks/expirationd checkout $LUAROCK_EXPIRATIOND_TAG \ + && (cd /rocks/expirationd && luarocks make *rockspec) \ + && : "queue" \ + && git clone $LUAROCK_QUEUE_REPO /rocks/queue \ + && git -C /rocks/queue checkout $LUAROCK_QUEUE_TAG \ + && (cd /rocks/queue && luarocks make *rockspec) \ + && : "connpool" \ + && git clone $LUAROCK_CONNPOOL_REPO /rocks/connpool \ + && git -C /rocks/connpool checkout $LUAROCK_CONNPOOL_TAG \ + && (cd /rocks/connpool && luarocks make *rockspec) \ + && : "shard" \ + && git clone $LUAROCK_SHARD_REPO /rocks/shard \ + && git -C /rocks/shard checkout $LUAROCK_SHARD_TAG \ + && (cd /rocks/shard && luarocks make *rockspec) \ + && : "http" \ + && git clone $LUAROCK_HTTP_REPO /rocks/http \ + && git -C /rocks/http checkout $LUAROCK_HTTP_TAG \ + && (cd /rocks/http && luarocks make *rockspec) \ + && : "pg" \ + && git clone $LUAROCK_PG_REPO /rocks/pg \ + && git -C /rocks/pg checkout $LUAROCK_PG_TAG \ + && (cd /rocks/pg && luarocks make *rockspec) \ + && : "mysql" \ + && git clone $LUAROCK_MYSQL_REPO /rocks/mysql \ + && git -C /rocks/mysql checkout $LUAROCK_MYSQL_TAG \ + && (cd /rocks/mysql && luarocks make *rockspec) \ + && : "memcached" \ + && git clone $LUAROCK_MEMCACHED_REPO /rocks/memcached \ + && git -C /rocks/memcached checkout $LUAROCK_MEMCACHED_TAG \ + && (cd /rocks/memcached && luarocks make *rockspec) \ + && : "prometheus" \ + && git clone $LUAROCK_TARANTOOL_PROMETHEUS_REPO /rocks/prometheus \ + && git -C /rocks/prometheus checkout $LUAROCK_TARANTOOL_PROMETHEUS_TAG \ + && (cd /rocks/prometheus && luarocks make *rockspec) \ + && : "curl" \ + && git clone $LUAROCK_TARANTOOL_CURL_REPO /rocks/curl \ + && git -C /rocks/curl checkout $LUAROCK_TARANTOOL_CURL_TAG \ + && (cd /rocks/curl && luarocks make *rockspec) \ + && : "mqtt" \ + && git clone $LUAROCK_MQTT_REPO /rocks/mqtt \ + && git -C /rocks/mqtt checkout $LUAROCK_MQTT_TAG \ + && (cd /rocks/mqtt && luarocks make *rockspec) \ + && : "gis" \ + && git clone $LUAROCK_TARANTOOL_GIS_REPO /rocks/gis \ + && git -C /rocks/gis checkout $LUAROCK_TARANTOOL_GIS_TAG \ + && (cd /rocks/gis && luarocks make *rockspec) \ && : "---------- remove build deps ----------" \ && apk del .build-deps diff --git a/1.7/Dockerfile b/1.7/Dockerfile index 59f93a5..aa820d2 100644 --- a/1.7/Dockerfile +++ b/1.7/Dockerfile @@ -8,7 +8,33 @@ RUN addgroup -S tarantool \ ENV TARANTOOL_VERSION=1.7.2-287-g085f6e4 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ - LUAROCKS_URL=http://keplerproject.github.io/luarocks/releases/luarocks-2.3.0.tar.gz + LUAROCKS_URL=http://keplerproject.github.io/luarocks/releases/luarocks-2.3.0.tar.gz \ + LUAROCK_AVRO_SCHEMA_REPO=https://github.com/tarantool/avro-schema.git \ + LUAROCK_AVRO_SCHEMA_TAG=b49efa8 \ + LUAROCK_EXPIRATIOND_REPO=https://github.com/tarantool/expirationd.git \ + LUAROCK_EXPIRATIOND_TAG=9ec22b6 \ + LUAROCK_QUEUE_REPO=https://github.com/tarantool/queue.git \ + LUAROCK_QUEUE_TAG=9796515 \ + LUAROCK_CONNPOOL_REPO=https://github.com/tarantool/connpool.git \ + LUAROCK_CONNPOOL_TAG=685af44 \ + LUAROCK_SHARD_REPO=https://github.com/tarantool/shard.git \ + LUAROCK_SHARD_TAG=278b906 \ + LUAROCK_HTTP_REPO=https://github.com/tarantool/http.git \ + LUAROCK_HTTP_TAG=4486de9 \ + LUAROCK_PG_REPO=https://github.com/tarantool/pg.git \ + LUAROCK_PG_TAG=43a7130 \ + LUAROCK_MYSQL_REPO=https://github.com/tarantool/mysql.git \ + LUAROCK_MYSQL_TAG=5219f00 \ + LUAROCK_MEMCACHED_REPO=https://github.com/tarantool/memcached.git \ + LUAROCK_MEMCACHED_TAG=c927626 \ + LUAROCK_TARANTOOL_PROMETHEUS_REPO=https://github.com/tarantool/prometheus.git \ + LUAROCK_TARANTOOL_PROMETHEUS_TAG=0654304 \ + LUAROCK_TARANTOOL_CURL_REPO=https://github.com/tarantool/curl.git \ + LUAROCK_TARANTOOL_CURL_TAG=900b3fd \ + LUAROCK_MQTT_REPO=https://github.com/tarantool/mqtt.git \ + LUAROCK_MQTT_TAG=238fd2e \ + LUAROCK_TARANTOOL_GIS_REPO=https://github.com/tarantool/gis.git \ + LUAROCK_TARANTOOL_GIS_TAG=25209fc RUN set -x \ && apk add --no-cache --virtual .run-deps \ @@ -106,6 +132,7 @@ RUN set -x \ cyrus-sasl-dev \ curl-dev \ mosquitto-dev \ + && mkdir -p /rocks \ && : "---------- proj (for gis module) ----------" \ && wget -O proj.tar.gz http://download.osgeo.org/proj/proj-4.9.3.tar.gz \ && mkdir -p /usr/src/proj \ @@ -127,22 +154,61 @@ RUN set -x \ && rm -r /usr/src/geos \ && rm -rf /usr/src/geos \ && : "---------- luarocks ----------" \ - && luarocks install avro-schema \ - && luarocks install expirationd \ - && luarocks install queue \ - && luarocks install connpool \ - && luarocks install shard \ - && luarocks install http \ - && luarocks install pg \ - && luarocks install mysql \ - && luarocks install memcached \ - && luarocks install tarantool-prometheus \ - && luarocks install lua-term \ - && luarocks install tarantool-curl \ - && luarocks install mqtt \ - && luarocks install tarantool-gis \ + && : "avro" \ + && git clone $LUAROCK_AVRO_SCHEMA_REPO /rocks/avro \ + && git -C /rocks/avro checkout $LUAROCK_AVRO_SCHEMA_TAG \ + && (cd /rocks/avro && luarocks make *rockspec) \ + && : "expirationd" \ + && git clone $LUAROCK_EXPIRATIOND_REPO /rocks/expirationd \ + && git -C /rocks/expirationd checkout $LUAROCK_EXPIRATIOND_TAG \ + && (cd /rocks/expirationd && luarocks make *rockspec) \ + && : "queue" \ + && git clone $LUAROCK_QUEUE_REPO /rocks/queue \ + && git -C /rocks/queue checkout $LUAROCK_QUEUE_TAG \ + && (cd /rocks/queue && luarocks make *rockspec) \ + && : "connpool" \ + && git clone $LUAROCK_CONNPOOL_REPO /rocks/connpool \ + && git -C /rocks/connpool checkout $LUAROCK_CONNPOOL_TAG \ + && (cd /rocks/connpool && luarocks make *rockspec) \ + && : "shard" \ + && git clone $LUAROCK_SHARD_REPO /rocks/shard \ + && git -C /rocks/shard checkout $LUAROCK_SHARD_TAG \ + && (cd /rocks/shard && luarocks make *rockspec) \ + && : "http" \ + && git clone $LUAROCK_HTTP_REPO /rocks/http \ + && git -C /rocks/http checkout $LUAROCK_HTTP_TAG \ + && (cd /rocks/http && luarocks make *rockspec) \ + && : "pg" \ + && git clone $LUAROCK_PG_REPO /rocks/pg \ + && git -C /rocks/pg checkout $LUAROCK_PG_TAG \ + && (cd /rocks/pg && luarocks make *rockspec) \ + && : "mysql" \ + && git clone $LUAROCK_MYSQL_REPO /rocks/mysql \ + && git -C /rocks/mysql checkout $LUAROCK_MYSQL_TAG \ + && (cd /rocks/mysql && luarocks make *rockspec) \ + && : "memcached" \ + && git clone $LUAROCK_MEMCACHED_REPO /rocks/memcached \ + && git -C /rocks/memcached checkout $LUAROCK_MEMCACHED_TAG \ + && (cd /rocks/memcached && luarocks make *rockspec) \ + && : "prometheus" \ + && git clone $LUAROCK_TARANTOOL_PROMETHEUS_REPO /rocks/prometheus \ + && git -C /rocks/prometheus checkout $LUAROCK_TARANTOOL_PROMETHEUS_TAG \ + && (cd /rocks/prometheus && luarocks make *rockspec) \ + && : "curl" \ + && git clone $LUAROCK_TARANTOOL_CURL_REPO /rocks/curl \ + && git -C /rocks/curl checkout $LUAROCK_TARANTOOL_CURL_TAG \ + && (cd /rocks/curl && luarocks make *rockspec) \ + && : "mqtt" \ + && git clone $LUAROCK_MQTT_REPO /rocks/mqtt \ + && git -C /rocks/mqtt checkout $LUAROCK_MQTT_TAG \ + && (cd /rocks/mqtt && luarocks make *rockspec) \ + && : "gis" \ + && git clone $LUAROCK_TARANTOOL_GIS_REPO /rocks/gis \ + && git -C /rocks/gis checkout $LUAROCK_TARANTOOL_GIS_TAG \ + && (cd /rocks/gis && luarocks make *rockspec) \ && : "---------- remove build deps ----------" \ - && apk del .build-deps + && apk del .build-deps \ + && rm -rf /rocks RUN mkdir -p /var/lib/tarantool \ From 8eafba36c9a108ac165737fbf1e21346b4ee524a Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Thu, 15 Dec 2016 15:43:48 +0300 Subject: [PATCH 050/286] Return back lost luaterm module --- 1.6/Dockerfile | 1 + 1.7/Dockerfile | 1 + 2 files changed, 2 insertions(+) diff --git a/1.6/Dockerfile b/1.6/Dockerfile index 1951e35..3bb81de 100644 --- a/1.6/Dockerfile +++ b/1.6/Dockerfile @@ -150,6 +150,7 @@ RUN set -x \ && rm -r /usr/src/geos \ && rm -rf /usr/src/geos \ && : "---------- luarocks ----------" \ + && luarocks install lua-term \ && : "avro" \ && git clone $LUAROCK_AVRO_SCHEMA_REPO /rocks/avro \ && git -C /rocks/avro checkout $LUAROCK_AVRO_SCHEMA_TAG \ diff --git a/1.7/Dockerfile b/1.7/Dockerfile index aa820d2..de66a4e 100644 --- a/1.7/Dockerfile +++ b/1.7/Dockerfile @@ -154,6 +154,7 @@ RUN set -x \ && rm -r /usr/src/geos \ && rm -rf /usr/src/geos \ && : "---------- luarocks ----------" \ + && luarocks install lua-term \ && : "avro" \ && git clone $LUAROCK_AVRO_SCHEMA_REPO /rocks/avro \ && git -C /rocks/avro checkout $LUAROCK_AVRO_SCHEMA_TAG \ From 4fe5878ce0fdd2da3c873586021849cb0ae74ca8 Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Tue, 20 Dec 2016 12:15:10 +0300 Subject: [PATCH 051/286] Bump mysql rock version --- 1.6/Dockerfile | 2 +- 1.7/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/1.6/Dockerfile b/1.6/Dockerfile index 3bb81de..04a87b0 100644 --- a/1.6/Dockerfile +++ b/1.6/Dockerfile @@ -24,7 +24,7 @@ ENV TARANTOOL_VERSION=1.6.9-11-gf4619d0 \ LUAROCK_PG_REPO=https://github.com/tarantool/pg.git \ LUAROCK_PG_TAG=43a7130 \ LUAROCK_MYSQL_REPO=https://github.com/tarantool/mysql.git \ - LUAROCK_MYSQL_TAG=5219f00 \ + LUAROCK_MYSQL_TAG=1c15d30 \ LUAROCK_MEMCACHED_REPO=https://github.com/tarantool/memcached.git \ LUAROCK_MEMCACHED_TAG=c927626 \ LUAROCK_TARANTOOL_PROMETHEUS_REPO=https://github.com/tarantool/prometheus.git \ diff --git a/1.7/Dockerfile b/1.7/Dockerfile index de66a4e..b16c71e 100644 --- a/1.7/Dockerfile +++ b/1.7/Dockerfile @@ -24,7 +24,7 @@ ENV TARANTOOL_VERSION=1.7.2-287-g085f6e4 \ LUAROCK_PG_REPO=https://github.com/tarantool/pg.git \ LUAROCK_PG_TAG=43a7130 \ LUAROCK_MYSQL_REPO=https://github.com/tarantool/mysql.git \ - LUAROCK_MYSQL_TAG=5219f00 \ + LUAROCK_MYSQL_TAG=1c15d30 \ LUAROCK_MEMCACHED_REPO=https://github.com/tarantool/memcached.git \ LUAROCK_MEMCACHED_TAG=c927626 \ LUAROCK_TARANTOOL_PROMETHEUS_REPO=https://github.com/tarantool/prometheus.git \ From 66f8586a6adf3a43ce20d7ceba6058e33c051586 Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Mon, 9 Jan 2017 16:36:31 +0300 Subject: [PATCH 052/286] Bump tarantool to 1.7.3 --- 1.7/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/1.7/Dockerfile b/1.7/Dockerfile index b16c71e..b22f043 100644 --- a/1.7/Dockerfile +++ b/1.7/Dockerfile @@ -5,7 +5,7 @@ RUN addgroup -S tarantool \ && adduser -S -G tarantool tarantool \ && apk add --no-cache 'su-exec>=0.2' -ENV TARANTOOL_VERSION=1.7.2-287-g085f6e4 \ +ENV TARANTOOL_VERSION=1.7.3-32-g0dd09b1 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ LUAROCKS_URL=http://keplerproject.github.io/luarocks/releases/luarocks-2.3.0.tar.gz \ @@ -26,7 +26,7 @@ ENV TARANTOOL_VERSION=1.7.2-287-g085f6e4 \ LUAROCK_MYSQL_REPO=https://github.com/tarantool/mysql.git \ LUAROCK_MYSQL_TAG=1c15d30 \ LUAROCK_MEMCACHED_REPO=https://github.com/tarantool/memcached.git \ - LUAROCK_MEMCACHED_TAG=c927626 \ + LUAROCK_MEMCACHED_TAG=ba18746 \ LUAROCK_TARANTOOL_PROMETHEUS_REPO=https://github.com/tarantool/prometheus.git \ LUAROCK_TARANTOOL_PROMETHEUS_TAG=0654304 \ LUAROCK_TARANTOOL_CURL_REPO=https://github.com/tarantool/curl.git \ From 09f476c714e064d2ffd3e8780f2a69f98114bf80 Mon Sep 17 00:00:00 2001 From: Rom325 Date: Sun, 15 Jan 2017 18:40:36 +0300 Subject: [PATCH 053/286] Update tarantool.default for 1.6 Getting this error when attempt to start any application in tarantool 1.6 /usr/local/bin/tarantoolctl: Configuration failed: Incorrect value for option 'vinyl_dir': unexpected option As far as I know there's no vinyl in 1.6 so maybe just remove the option from default config? --- 1.6/tarantool.default | 1 - 1 file changed, 1 deletion(-) diff --git a/1.6/tarantool.default b/1.6/tarantool.default index fffe3b0..372dc23 100644 --- a/1.6/tarantool.default +++ b/1.6/tarantool.default @@ -11,7 +11,6 @@ default_cfg = { pid_file = "/var/run/tarantool", -- /var/run/tarantool/${INSTANCE}.pid wal_dir = "/var/lib/tarantool", -- /var/lib/tarantool/${INSTANCE}/ snap_dir = "/var/lib/tarantool", -- /var/lib/tarantool/${INSTANCE} - vinyl_dir = "/var/lib/tarantool", -- /var/lib/tarantool/${INSTANCE} logger = "/var/log/tarantool", -- /var/log/tarantool/${INSTANCE}.log username = "tarantool", } From 36ef6bd35c285d31160a13614ba9d736fa7c6fd6 Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Wed, 18 Jan 2017 11:01:45 +0300 Subject: [PATCH 054/286] Bump queue module commit --- 1.6/Dockerfile | 4 ++-- 1.7/Dockerfile | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/1.6/Dockerfile b/1.6/Dockerfile index 04a87b0..537eb75 100644 --- a/1.6/Dockerfile +++ b/1.6/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.4 +FROM alpine:3.5 MAINTAINER mail@racktear.com RUN addgroup -S tarantool \ @@ -14,7 +14,7 @@ ENV TARANTOOL_VERSION=1.6.9-11-gf4619d0 \ LUAROCK_EXPIRATIOND_REPO=https://github.com/tarantool/expirationd.git \ LUAROCK_EXPIRATIOND_TAG=9ec22b6 \ LUAROCK_QUEUE_REPO=https://github.com/tarantool/queue.git \ - LUAROCK_QUEUE_TAG=9796515 \ + LUAROCK_QUEUE_TAG=24d730c \ LUAROCK_CONNPOOL_REPO=https://github.com/tarantool/connpool.git \ LUAROCK_CONNPOOL_TAG=685af44 \ LUAROCK_SHARD_REPO=https://github.com/tarantool/shard.git \ diff --git a/1.7/Dockerfile b/1.7/Dockerfile index b22f043..dc2953e 100644 --- a/1.7/Dockerfile +++ b/1.7/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.4 +FROM alpine:3.5 MAINTAINER mail@racktear.com RUN addgroup -S tarantool \ @@ -14,7 +14,7 @@ ENV TARANTOOL_VERSION=1.7.3-32-g0dd09b1 \ LUAROCK_EXPIRATIOND_REPO=https://github.com/tarantool/expirationd.git \ LUAROCK_EXPIRATIOND_TAG=9ec22b6 \ LUAROCK_QUEUE_REPO=https://github.com/tarantool/queue.git \ - LUAROCK_QUEUE_TAG=9796515 \ + LUAROCK_QUEUE_TAG=24d730c \ LUAROCK_CONNPOOL_REPO=https://github.com/tarantool/connpool.git \ LUAROCK_CONNPOOL_TAG=685af44 \ LUAROCK_SHARD_REPO=https://github.com/tarantool/shard.git \ From 40b1c948d66855c41aa6d52dc961119bcf988000 Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Thu, 19 Jan 2017 19:21:16 +0300 Subject: [PATCH 055/286] Reintroduce 'console' to connect to local socket --- 1.6/Dockerfile | 1 + 1.6/console | 15 +++++++++++++++ 1.7/Dockerfile | 1 + 1.7/console | 15 +++++++++++++++ 4 files changed, 32 insertions(+) create mode 100755 1.6/console create mode 100755 1.7/console diff --git a/1.6/Dockerfile b/1.6/Dockerfile index 537eb75..7e723f9 100644 --- a/1.6/Dockerfile +++ b/1.6/Dockerfile @@ -222,6 +222,7 @@ WORKDIR /opt/tarantool COPY tarantool-entrypoint.lua /usr/local/bin/ COPY tarantool_set_config.lua /usr/local/bin/ COPY docker-entrypoint.sh /usr/local/bin/ +COPY console /usr/local/bin/ COPY tarantool_is_up /usr/local/bin/ COPY tarantool.default /usr/local/etc/default/tarantool diff --git a/1.6/console b/1.6/console new file mode 100755 index 0000000..d6fb192 --- /dev/null +++ b/1.6/console @@ -0,0 +1,15 @@ +#!/usr/bin/env tarantool + +local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' + +console = require('console') +console.on_start(function(self) + local status, reason + status, reason = pcall(function() require('console').connect(CONSOLE_SOCKET_PATH) end) + if not status then + self:print(reason) + self.running = false + end +end) +console.on_client_disconnect(function(self) self.running = false end) +console.start() diff --git a/1.7/Dockerfile b/1.7/Dockerfile index dc2953e..3d5d04a 100644 --- a/1.7/Dockerfile +++ b/1.7/Dockerfile @@ -227,6 +227,7 @@ WORKDIR /opt/tarantool COPY tarantool-entrypoint.lua /usr/local/bin/ COPY tarantool_set_config.lua /usr/local/bin/ COPY docker-entrypoint.sh /usr/local/bin/ +COPY console /usr/local/bin/ COPY tarantool_is_up /usr/local/bin/ COPY tarantool.default /usr/local/etc/default/tarantool diff --git a/1.7/console b/1.7/console new file mode 100755 index 0000000..d6fb192 --- /dev/null +++ b/1.7/console @@ -0,0 +1,15 @@ +#!/usr/bin/env tarantool + +local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' + +console = require('console') +console.on_start(function(self) + local status, reason + status, reason = pcall(function() require('console').connect(CONSOLE_SOCKET_PATH) end) + if not status then + self:print(reason) + self.running = false + end +end) +console.on_client_disconnect(function(self) self.running = false end) +console.start() From 383278996937d1a53de352a014b64e1ad23e38b1 Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Mon, 23 Jan 2017 17:54:00 +0300 Subject: [PATCH 056/286] Add tarantool gperftools package --- 1.6/Dockerfile | 30 +++++++++- 1.6/gperftools_alpine.diff | 110 +++++++++++++++++++++++++++++++++++++ 1.7/Dockerfile | 30 +++++++++- 1.7/gperftools_alpine.diff | 110 +++++++++++++++++++++++++++++++++++++ 4 files changed, 278 insertions(+), 2 deletions(-) create mode 100644 1.6/gperftools_alpine.diff create mode 100644 1.7/gperftools_alpine.diff diff --git a/1.6/Dockerfile b/1.6/Dockerfile index 7e723f9..3c5d93f 100644 --- a/1.6/Dockerfile +++ b/1.6/Dockerfile @@ -8,6 +8,8 @@ RUN addgroup -S tarantool \ ENV TARANTOOL_VERSION=1.6.9-11-gf4619d0 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ + GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ + GPERFTOOLS_TAG=gperftools-2.5 \ LUAROCKS_URL=http://keplerproject.github.io/luarocks/releases/luarocks-2.3.0.tar.gz \ LUAROCK_AVRO_SCHEMA_REPO=https://github.com/tarantool/avro-schema.git \ LUAROCK_AVRO_SCHEMA_TAG=b49efa8 \ @@ -34,7 +36,11 @@ ENV TARANTOOL_VERSION=1.6.9-11-gf4619d0 \ LUAROCK_MQTT_REPO=https://github.com/tarantool/mqtt.git \ LUAROCK_MQTT_TAG=238fd2e \ LUAROCK_TARANTOOL_GIS_REPO=https://github.com/tarantool/gis.git \ - LUAROCK_TARANTOOL_GIS_TAG=25209fc + LUAROCK_TARANTOOL_GIS_TAG=25209fc \ + LUAROCK_GPERFTOOLS_REPO=https://github.com/tarantool/gperftools.git \ + LUAROCK_GPERFTOOLS_TAG=12a7ac2 + +COPY gperftools_alpine.diff / RUN set -x \ && apk add --no-cache --virtual .run-deps \ @@ -64,6 +70,23 @@ RUN set -x \ musl-dev \ make \ git \ + libunwind-dev \ + autoconf \ + automake \ + libtool \ + linux-headers \ + && : "---------- gperftools ----------" \ + && mkdir -p /usr/src/gperftools \ + && git clone "$GPERFTOOLS_REPO" /usr/src/gperftools \ + && git -C /usr/src/gperftools checkout "$GPERFTOOLS_TAG" \ + && (cd /usr/src/gperftools; \ + patch -p1 < /gperftools_alpine.diff; \ + rm /gperftools_alpine.diff; \ + ./autogen.sh; \ + ./configure; \ + make; \ + cp .libs/libprofiler.so* /usr/local/lib;) \ + && : "---------- tarantool ----------" \ && mkdir -p /usr/src/tarantool \ && git clone "$TARANTOOL_DOWNLOAD_URL" /usr/src/tarantool \ && git -C /usr/src/tarantool checkout "$TARANTOOL_VERSION" \ @@ -105,6 +128,7 @@ RUN set -x \ make install) \ && rm -r /usr/src/luarocks \ && rm -rf /usr/src/tarantool \ + && rm -rf /usr/src/gperftools \ && : "---------- remove build deps ----------" \ && apk del .build-deps @@ -203,6 +227,10 @@ RUN set -x \ && git clone $LUAROCK_TARANTOOL_GIS_REPO /rocks/gis \ && git -C /rocks/gis checkout $LUAROCK_TARANTOOL_GIS_TAG \ && (cd /rocks/gis && luarocks make *rockspec) \ + && : "gperftools" \ + && git clone $LUAROCK_GPERFTOOLS_REPO /rocks/gperftools \ + && git -C /rocks/gperftools checkout $LUAROCK_GPERFTOOLS_TAG \ + && (cd /rocks/gperftools && luarocks make *rockspec) \ && : "---------- remove build deps ----------" \ && apk del .build-deps diff --git a/1.6/gperftools_alpine.diff b/1.6/gperftools_alpine.diff new file mode 100644 index 0000000..e768381 --- /dev/null +++ b/1.6/gperftools_alpine.diff @@ -0,0 +1,110 @@ +diff --git a/src/base/linux_syscall_support.h b/src/base/linux_syscall_support.h +index 5d578cd..fceebe2 100644 +--- a/src/base/linux_syscall_support.h ++++ b/src/base/linux_syscall_support.h +@@ -2432,9 +2432,9 @@ struct kernel_stat { + #if defined(__s390x__) + LSS_INLINE _syscall1(void*, mmap, void*, a) + #else +- /* Need to make sure __off64_t isn't truncated to 32-bits under x32. */ ++ /* Need to make sure off64_t isn't truncated to 32-bits under x32. */ + LSS_INLINE void* LSS_NAME(mmap)(void *s, size_t l, int p, int f, int d, +- __off64_t o) { ++ off64_t o) { + LSS_BODY(6, void*, mmap, LSS_SYSCALL_ARG(s), LSS_SYSCALL_ARG(l), + LSS_SYSCALL_ARG(p), LSS_SYSCALL_ARG(f), + LSS_SYSCALL_ARG(d), (uint64_t)(o)); +@@ -2475,7 +2475,7 @@ struct kernel_stat { + LSS_INLINE _syscall6(void*, mmap, void*, s, + size_t, l, int, p, + int, f, int, d, +- __off64_t, o) ++ off64_t, o) + LSS_INLINE int LSS_NAME(sigaction)(int signum, + const struct kernel_sigaction *act, + struct kernel_sigaction *oldact) { +diff --git a/src/malloc_hook_mmap_linux.h b/src/malloc_hook_mmap_linux.h +index 1c4c766..b2aa8ed 100755 +--- a/src/malloc_hook_mmap_linux.h ++++ b/src/malloc_hook_mmap_linux.h +@@ -56,7 +56,7 @@ + + static inline void* do_mmap64(void *start, size_t length, + int prot, int flags, +- int fd, __off64_t offset) __THROW { ++ int fd, off64_t offset) __THROW { + return sys_mmap(start, length, prot, flags, fd, offset); + } + +@@ -67,7 +67,7 @@ static inline void* do_mmap64(void *start, size_t length, + + static inline void* do_mmap64(void *start, size_t length, + int prot, int flags, +- int fd, __off64_t offset) __THROW { ++ int fd, off64_t offset) __THROW { + void *result; + + // Try mmap2() unless it's not supported +@@ -151,9 +151,11 @@ static inline void* do_mmap64(void *start, size_t length, + # undef mmap + + extern "C" { ++ #ifndef mmap64 + void* mmap64(void *start, size_t length, int prot, int flags, +- int fd, __off64_t offset ) __THROW ++ int fd, off64_t offset ) __THROW + ATTRIBUTE_SECTION(malloc_hook); ++ #endif + void* mmap(void *start, size_t length,int prot, int flags, + int fd, off_t offset) __THROW + ATTRIBUTE_SECTION(malloc_hook); +@@ -166,8 +168,9 @@ extern "C" { + ATTRIBUTE_SECTION(malloc_hook); + } + ++#ifndef mmap64 + extern "C" void* mmap64(void *start, size_t length, int prot, int flags, +- int fd, __off64_t offset) __THROW { ++ int fd, off64_t offset) __THROW { + MallocHook::InvokePreMmapHook(start, length, prot, flags, fd, offset); + void *result; + if (!MallocHook::InvokeMmapReplacement( +@@ -177,6 +180,7 @@ extern "C" void* mmap64(void *start, size_t length, int prot, int flags, + MallocHook::InvokeMmapHook(result, start, length, prot, flags, fd, offset); + return result; + } ++#endif + + # if !defined(__USE_FILE_OFFSET64) || !defined(__REDIRECT_NTH) + +@@ -216,7 +220,7 @@ extern "C" void* mremap(void* old_addr, size_t old_size, size_t new_size, + return result; + } + +-#ifndef __UCLIBC__ ++#if defined(__GLIBC__) && ! defined(__UCLIBC__) + // libc's version: + extern "C" void* __sbrk(ptrdiff_t increment); + +diff --git a/src/tests/stacktrace_unittest.cc b/src/tests/stacktrace_unittest.cc +index 3c9f735..2d39ad9 100644 +--- a/src/tests/stacktrace_unittest.cc ++++ b/src/tests/stacktrace_unittest.cc +@@ -120,17 +120,6 @@ void ATTRIBUTE_NOINLINE CheckStackTraceLeaf(void) { + CHECK_GE(size, 1); + CHECK_LE(size, STACK_LEN); + +-#ifdef HAVE_EXECINFO_H +- { +- char **strings = backtrace_symbols(stack, size); +- printf("Obtained %d stack frames.\n", size); +- for (int i = 0; i < size; i++) +- printf("%s %p\n", strings[i], stack[i]); +- printf("CheckStackTrace() addr: %p\n", &CheckStackTrace); +- free(strings); +- } +-#endif +- + for (int i = 0; i < BACKTRACE_STEPS; i++) { + printf("Backtrace %d: expected: %p..%p actual: %p ... ", + i, expected_range[i].start, expected_range[i].end, stack[i]); diff --git a/1.7/Dockerfile b/1.7/Dockerfile index 3d5d04a..f15a100 100644 --- a/1.7/Dockerfile +++ b/1.7/Dockerfile @@ -8,6 +8,8 @@ RUN addgroup -S tarantool \ ENV TARANTOOL_VERSION=1.7.3-32-g0dd09b1 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ + GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ + GPERFTOOLS_TAG=gperftools-2.5 \ LUAROCKS_URL=http://keplerproject.github.io/luarocks/releases/luarocks-2.3.0.tar.gz \ LUAROCK_AVRO_SCHEMA_REPO=https://github.com/tarantool/avro-schema.git \ LUAROCK_AVRO_SCHEMA_TAG=b49efa8 \ @@ -34,7 +36,11 @@ ENV TARANTOOL_VERSION=1.7.3-32-g0dd09b1 \ LUAROCK_MQTT_REPO=https://github.com/tarantool/mqtt.git \ LUAROCK_MQTT_TAG=238fd2e \ LUAROCK_TARANTOOL_GIS_REPO=https://github.com/tarantool/gis.git \ - LUAROCK_TARANTOOL_GIS_TAG=25209fc + LUAROCK_TARANTOOL_GIS_TAG=25209fc \ + LUAROCK_GPERFTOOLS_REPO=https://github.com/tarantool/gperftools.git \ + LUAROCK_GPERFTOOLS_TAG=12a7ac2 + +COPY gperftools_alpine.diff / RUN set -x \ && apk add --no-cache --virtual .run-deps \ @@ -50,6 +56,7 @@ RUN set -x \ curl \ tar \ zip \ + libunwind \ && apk add --no-cache --virtual .build-deps \ perl \ gcc \ @@ -65,6 +72,22 @@ RUN set -x \ musl-dev \ make \ git \ + libunwind-dev \ + autoconf \ + automake \ + libtool \ + linux-headers \ + && : "---------- gperftools ----------" \ + && mkdir -p /usr/src/gperftools \ + && git clone "$GPERFTOOLS_REPO" /usr/src/gperftools \ + && git -C /usr/src/gperftools checkout "$GPERFTOOLS_TAG" \ + && (cd /usr/src/gperftools; \ + patch -p1 < /gperftools_alpine.diff; \ + rm /gperftools_alpine.diff; \ + ./autogen.sh; \ + ./configure; \ + make; \ + cp .libs/libprofiler.so* /usr/local/lib;) \ && : "---------- tarantool ----------" \ && mkdir -p /usr/src/tarantool \ && git clone "$TARANTOOL_DOWNLOAD_URL" /usr/src/tarantool \ @@ -107,6 +130,7 @@ RUN set -x \ make install) \ && rm -r /usr/src/luarocks \ && rm -rf /usr/src/tarantool \ + && rm -rf /usr/src/gperftools \ && : "---------- remove build deps ----------" \ && apk del .build-deps @@ -207,6 +231,10 @@ RUN set -x \ && git clone $LUAROCK_TARANTOOL_GIS_REPO /rocks/gis \ && git -C /rocks/gis checkout $LUAROCK_TARANTOOL_GIS_TAG \ && (cd /rocks/gis && luarocks make *rockspec) \ + && : "gperftools" \ + && git clone $LUAROCK_GPERFTOOLS_REPO /rocks/gperftools \ + && git -C /rocks/gperftools checkout $LUAROCK_GPERFTOOLS_TAG \ + && (cd /rocks/gperftools && luarocks make *rockspec) \ && : "---------- remove build deps ----------" \ && apk del .build-deps \ && rm -rf /rocks diff --git a/1.7/gperftools_alpine.diff b/1.7/gperftools_alpine.diff new file mode 100644 index 0000000..e768381 --- /dev/null +++ b/1.7/gperftools_alpine.diff @@ -0,0 +1,110 @@ +diff --git a/src/base/linux_syscall_support.h b/src/base/linux_syscall_support.h +index 5d578cd..fceebe2 100644 +--- a/src/base/linux_syscall_support.h ++++ b/src/base/linux_syscall_support.h +@@ -2432,9 +2432,9 @@ struct kernel_stat { + #if defined(__s390x__) + LSS_INLINE _syscall1(void*, mmap, void*, a) + #else +- /* Need to make sure __off64_t isn't truncated to 32-bits under x32. */ ++ /* Need to make sure off64_t isn't truncated to 32-bits under x32. */ + LSS_INLINE void* LSS_NAME(mmap)(void *s, size_t l, int p, int f, int d, +- __off64_t o) { ++ off64_t o) { + LSS_BODY(6, void*, mmap, LSS_SYSCALL_ARG(s), LSS_SYSCALL_ARG(l), + LSS_SYSCALL_ARG(p), LSS_SYSCALL_ARG(f), + LSS_SYSCALL_ARG(d), (uint64_t)(o)); +@@ -2475,7 +2475,7 @@ struct kernel_stat { + LSS_INLINE _syscall6(void*, mmap, void*, s, + size_t, l, int, p, + int, f, int, d, +- __off64_t, o) ++ off64_t, o) + LSS_INLINE int LSS_NAME(sigaction)(int signum, + const struct kernel_sigaction *act, + struct kernel_sigaction *oldact) { +diff --git a/src/malloc_hook_mmap_linux.h b/src/malloc_hook_mmap_linux.h +index 1c4c766..b2aa8ed 100755 +--- a/src/malloc_hook_mmap_linux.h ++++ b/src/malloc_hook_mmap_linux.h +@@ -56,7 +56,7 @@ + + static inline void* do_mmap64(void *start, size_t length, + int prot, int flags, +- int fd, __off64_t offset) __THROW { ++ int fd, off64_t offset) __THROW { + return sys_mmap(start, length, prot, flags, fd, offset); + } + +@@ -67,7 +67,7 @@ static inline void* do_mmap64(void *start, size_t length, + + static inline void* do_mmap64(void *start, size_t length, + int prot, int flags, +- int fd, __off64_t offset) __THROW { ++ int fd, off64_t offset) __THROW { + void *result; + + // Try mmap2() unless it's not supported +@@ -151,9 +151,11 @@ static inline void* do_mmap64(void *start, size_t length, + # undef mmap + + extern "C" { ++ #ifndef mmap64 + void* mmap64(void *start, size_t length, int prot, int flags, +- int fd, __off64_t offset ) __THROW ++ int fd, off64_t offset ) __THROW + ATTRIBUTE_SECTION(malloc_hook); ++ #endif + void* mmap(void *start, size_t length,int prot, int flags, + int fd, off_t offset) __THROW + ATTRIBUTE_SECTION(malloc_hook); +@@ -166,8 +168,9 @@ extern "C" { + ATTRIBUTE_SECTION(malloc_hook); + } + ++#ifndef mmap64 + extern "C" void* mmap64(void *start, size_t length, int prot, int flags, +- int fd, __off64_t offset) __THROW { ++ int fd, off64_t offset) __THROW { + MallocHook::InvokePreMmapHook(start, length, prot, flags, fd, offset); + void *result; + if (!MallocHook::InvokeMmapReplacement( +@@ -177,6 +180,7 @@ extern "C" void* mmap64(void *start, size_t length, int prot, int flags, + MallocHook::InvokeMmapHook(result, start, length, prot, flags, fd, offset); + return result; + } ++#endif + + # if !defined(__USE_FILE_OFFSET64) || !defined(__REDIRECT_NTH) + +@@ -216,7 +220,7 @@ extern "C" void* mremap(void* old_addr, size_t old_size, size_t new_size, + return result; + } + +-#ifndef __UCLIBC__ ++#if defined(__GLIBC__) && ! defined(__UCLIBC__) + // libc's version: + extern "C" void* __sbrk(ptrdiff_t increment); + +diff --git a/src/tests/stacktrace_unittest.cc b/src/tests/stacktrace_unittest.cc +index 3c9f735..2d39ad9 100644 +--- a/src/tests/stacktrace_unittest.cc ++++ b/src/tests/stacktrace_unittest.cc +@@ -120,17 +120,6 @@ void ATTRIBUTE_NOINLINE CheckStackTraceLeaf(void) { + CHECK_GE(size, 1); + CHECK_LE(size, STACK_LEN); + +-#ifdef HAVE_EXECINFO_H +- { +- char **strings = backtrace_symbols(stack, size); +- printf("Obtained %d stack frames.\n", size); +- for (int i = 0; i < size; i++) +- printf("%s %p\n", strings[i], stack[i]); +- printf("CheckStackTrace() addr: %p\n", &CheckStackTrace); +- free(strings); +- } +-#endif +- + for (int i = 0; i < BACKTRACE_STEPS; i++) { + printf("Backtrace %d: expected: %p..%p actual: %p ... ", + i, expected_range[i].start, expected_range[i].end, stack[i]); From a85693345f9607f167d2fa5203cff11101a8f09d Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Tue, 24 Jan 2017 13:57:38 +0300 Subject: [PATCH 057/286] Add pprof binary --- 1.6/Dockerfile | 4 ++++ 1.7/Dockerfile | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/1.6/Dockerfile b/1.6/Dockerfile index 3c5d93f..57c4468 100644 --- a/1.6/Dockerfile +++ b/1.6/Dockerfile @@ -75,6 +75,7 @@ RUN set -x \ automake \ libtool \ linux-headers \ + go \ && : "---------- gperftools ----------" \ && mkdir -p /usr/src/gperftools \ && git clone "$GPERFTOOLS_REPO" /usr/src/gperftools \ @@ -86,6 +87,8 @@ RUN set -x \ ./configure; \ make; \ cp .libs/libprofiler.so* /usr/local/lib;) \ + && (GOPATH=/usr/src/go go get github.com/google/pprof; \ + cp /usr/src/go/bin/pprof /usr/local/bin) \ && : "---------- tarantool ----------" \ && mkdir -p /usr/src/tarantool \ && git clone "$TARANTOOL_DOWNLOAD_URL" /usr/src/tarantool \ @@ -129,6 +132,7 @@ RUN set -x \ && rm -r /usr/src/luarocks \ && rm -rf /usr/src/tarantool \ && rm -rf /usr/src/gperftools \ + && rm -rf /usr/src/go \ && : "---------- remove build deps ----------" \ && apk del .build-deps diff --git a/1.7/Dockerfile b/1.7/Dockerfile index f15a100..1efd021 100644 --- a/1.7/Dockerfile +++ b/1.7/Dockerfile @@ -77,6 +77,7 @@ RUN set -x \ automake \ libtool \ linux-headers \ + go \ && : "---------- gperftools ----------" \ && mkdir -p /usr/src/gperftools \ && git clone "$GPERFTOOLS_REPO" /usr/src/gperftools \ @@ -88,6 +89,8 @@ RUN set -x \ ./configure; \ make; \ cp .libs/libprofiler.so* /usr/local/lib;) \ + && (GOPATH=/usr/src/go go get github.com/google/pprof; \ + cp /usr/src/go/bin/pprof /usr/local/bin) \ && : "---------- tarantool ----------" \ && mkdir -p /usr/src/tarantool \ && git clone "$TARANTOOL_DOWNLOAD_URL" /usr/src/tarantool \ @@ -131,6 +134,7 @@ RUN set -x \ && rm -r /usr/src/luarocks \ && rm -rf /usr/src/tarantool \ && rm -rf /usr/src/gperftools \ + && rm -rf /usr/src/go \ && : "---------- remove build deps ----------" \ && apk del .build-deps @@ -239,7 +243,6 @@ RUN set -x \ && apk del .build-deps \ && rm -rf /rocks - RUN mkdir -p /var/lib/tarantool \ && chown tarantool:tarantool /var/lib/tarantool \ && mkdir -p /opt/tarantool \ From a5842007ad8865cf3721c6957a77c09681bd29e1 Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Wed, 25 Jan 2017 15:20:32 +0300 Subject: [PATCH 058/286] Add healthcheck --- 1.6/Dockerfile | 2 ++ 1.7/Dockerfile | 2 ++ 2 files changed, 4 insertions(+) diff --git a/1.6/Dockerfile b/1.6/Dockerfile index 57c4468..d39cb7d 100644 --- a/1.6/Dockerfile +++ b/1.6/Dockerfile @@ -261,5 +261,7 @@ COPY tarantool.default /usr/local/etc/default/tarantool RUN ln -s usr/local/bin/docker-entrypoint.sh /entrypoint.sh # backwards compat ENTRYPOINT ["docker-entrypoint.sh"] +HEALTHCHECK CMD tarantool_is_up + EXPOSE 3301 CMD [ "tarantool" ] diff --git a/1.7/Dockerfile b/1.7/Dockerfile index 1efd021..f6926d7 100644 --- a/1.7/Dockerfile +++ b/1.7/Dockerfile @@ -265,5 +265,7 @@ COPY tarantool.default /usr/local/etc/default/tarantool RUN ln -s usr/local/bin/docker-entrypoint.sh /entrypoint.sh # backwards compat ENTRYPOINT ["docker-entrypoint.sh"] +HEALTHCHECK CMD tarantool_is_up + EXPOSE 3301 CMD [ "tarantool" ] From ae54cdb72de4727c9e2fd2c7bc5b2ffd81b2df93 Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Tue, 31 Jan 2017 14:52:40 +0300 Subject: [PATCH 059/286] Upgrade tarantool-curl to 2.2.3 --- 1.6/Dockerfile | 4 +++- 1.7/Dockerfile | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/1.6/Dockerfile b/1.6/Dockerfile index d39cb7d..e8d20b2 100644 --- a/1.6/Dockerfile +++ b/1.6/Dockerfile @@ -32,7 +32,7 @@ ENV TARANTOOL_VERSION=1.6.9-11-gf4619d0 \ LUAROCK_TARANTOOL_PROMETHEUS_REPO=https://github.com/tarantool/prometheus.git \ LUAROCK_TARANTOOL_PROMETHEUS_TAG=0654304 \ LUAROCK_TARANTOOL_CURL_REPO=https://github.com/tarantool/curl.git \ - LUAROCK_TARANTOOL_CURL_TAG=900b3fd \ + LUAROCK_TARANTOOL_CURL_TAG=2.2.3 \ LUAROCK_MQTT_REPO=https://github.com/tarantool/mqtt.git \ LUAROCK_MQTT_TAG=238fd2e \ LUAROCK_TARANTOOL_GIS_REPO=https://github.com/tarantool/gis.git \ @@ -145,6 +145,7 @@ RUN set -x \ cyrus-sasl \ libcurl \ mosquitto-libs \ + libev \ && apk add --no-cache --virtual .build-deps \ git \ cmake \ @@ -157,6 +158,7 @@ RUN set -x \ cyrus-sasl-dev \ curl-dev \ mosquitto-dev \ + libev-dev \ && : "---------- proj (for gis module) ----------" \ && wget -O proj.tar.gz http://download.osgeo.org/proj/proj-4.9.3.tar.gz \ && mkdir -p /usr/src/proj \ diff --git a/1.7/Dockerfile b/1.7/Dockerfile index f6926d7..0fefebd 100644 --- a/1.7/Dockerfile +++ b/1.7/Dockerfile @@ -32,7 +32,7 @@ ENV TARANTOOL_VERSION=1.7.3-32-g0dd09b1 \ LUAROCK_TARANTOOL_PROMETHEUS_REPO=https://github.com/tarantool/prometheus.git \ LUAROCK_TARANTOOL_PROMETHEUS_TAG=0654304 \ LUAROCK_TARANTOOL_CURL_REPO=https://github.com/tarantool/curl.git \ - LUAROCK_TARANTOOL_CURL_TAG=900b3fd \ + LUAROCK_TARANTOOL_CURL_TAG=2.2.3 \ LUAROCK_MQTT_REPO=https://github.com/tarantool/mqtt.git \ LUAROCK_MQTT_TAG=238fd2e \ LUAROCK_TARANTOOL_GIS_REPO=https://github.com/tarantool/gis.git \ @@ -147,6 +147,7 @@ RUN set -x \ cyrus-sasl \ libcurl \ mosquitto-libs \ + libev \ && apk add --no-cache --virtual .build-deps \ git \ cmake \ @@ -160,6 +161,7 @@ RUN set -x \ cyrus-sasl-dev \ curl-dev \ mosquitto-dev \ + libev-dev \ && mkdir -p /rocks \ && : "---------- proj (for gis module) ----------" \ && wget -O proj.tar.gz http://download.osgeo.org/proj/proj-4.9.3.tar.gz \ From bc22110ef2b4e58a60f822d955366766e290b254 Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Wed, 1 Feb 2017 19:41:27 +0300 Subject: [PATCH 060/286] Makre README.md more comprehensible --- README.md | 278 +++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 231 insertions(+), 47 deletions(-) diff --git a/README.md b/README.md index df590a9..b10a9fa 100644 --- a/README.md +++ b/README.md @@ -1,105 +1,289 @@ # What is Tarantool -Tarantool is a Lua application server integrated with a database management system. It has a "fiber" model which means that many Tarantool applications can run simultaneously on a single thread, while the Tarantool server itself can run multiple threads for input-output and background maintenance. It incorporates the LuaJIT -- "Just In Time" -- Lua compiler, Lua libraries for most common applications, and the Tarantool Database Server which is an established NoSQL DBMS. Thus Tarantool serves all the purposes that have made node.js and Twisted popular, plus it supports data persistence. +Tarantool is a Lua application server integrated with a database +management system. It has a "fiber" model which means that many +Tarantool applications can run simultaneously on a single thread, +while the Tarantool server itself can run multiple threads for +input-output and background maintenance. It incorporates the LuaJIT -- +"Just In Time" -- Lua compiler, Lua libraries for most common +applications, and the Tarantool Database Server which is an +established NoSQL DBMS. Thus Tarantool serves all the purposes that +have made node.js and Twisted popular, plus it supports data +persistence. + +The database API allows for permanently storing Lua objects, managing +object collections, creating or dropping secondary keys, making +changes atomically, configuring and monitoring replication, performing +controlled fail-over, and executing Lua code triggered by database +events. Remote database instances are accessible transparently via a +remote-procedure-invocation API. + +For more information, visit [tarantool.org](http://tarantool.org). + +# Quickstart + +If you just want to quickly try out tarantool, run this command: -The database API allows for permanently storing Lua objects, managing object collections, creating or dropping secondary keys, making changes atomically, configuring and monitoring replication, performing controlled fail-over, and executing Lua code triggered by database events. Remote database instances are accessible transparently via a remote-procedure-invocation API. +```console +$ docker run --rm -t -i tarantool/tarantool:1.7 +``` + +This will create a one-off Tarantool instance and open an interactive +console. From there you can either type `tutorial()` or follow +[official documentation](https://tarantool.org/doc/book/index.html). + + +# About this image + +This image is a bundle containing Tarantool itself, and a combination +of lua modules and utilities often used in production. It is designed +to be a building block for modern services, and as such has made a few +design choices that set it apart from the systemd-controlled Tarantool. + +First, if you take this image and pin a version, you may rely on the +fact that you won't get updates with incompatible modules. We only do +major module updates while changing the image version. + +Entry-point script provided by this image uses environment variables +to configure various "external" aspects of configuration, such as +replication sources, memory limits, etc... If specified, they override +settings provided in your code. This way you can use docker-compose or +other orchestration and deployment tools to set those options. + +There are a few convenience tools that make use of the fact that there +is only one Tarantool instance running in the container. + + +# What's on board + +- avro: Apache Avro scheme for your data +- expirationd: Automatically delete tuples based on expiration time +- queue: Priority queues with TTL and confirmations +- connpool: Keep a pool of connections to other Tarantool instances +- shard: Automatically distribute data across multiple instances +- http: Embedded HTTP server with flask-style routing support +- curl: HTTP client based on libcurl +- pg: Query PostgreSQL right from Tarantool +- mysql: Query MySql right from Tarantool +- memcached: Access Tarantool as if it was a Memcached instance +- prometheus: Instrument code and export metrics to Prometheus monitoring +- mqtt: Client for MQTT message brokers +- gis: store and query geospatial data +- gperftools: collect CPU profile to find bottlenecks in your code + +If the module you need is not listed here, there is a good chance we may add it. Open an issue [on our GitHub](https://github.com/tarantool/docker). -For more information, please visit [tarantool.org](http://tarantool.org). +# Data directories + +- `/var/lib/tarantool` is a volume containing operational data + (snapshots, xlogs and vinyl runs) + +- `/opt/tarantool` is a place where users should put their lua + application code + +# Convenience utilities + +- `console`: execute it without any arguments to open administrative + console to a running Tarantool instance + +- `tarantool_is_up`: returns 0 if Tarantool has been initialized and + is operating normally + +- `tarantool_set_config.lua`: allows you to dynamically change certain + settings without the need to recreate containers. # How to use this image -## Start a Tarantool instance (without authentication) +## Start a Tarantool instance ```console -$ docker run --name some-tarantool -d tarantool/tarantool:1.7 +$ docker run --name mytarantool -p3301:3301 -d tarantool/tarantool:1.7 ``` -Where `some-tarantool` is the name you want to assign to your container, and `1.7` is the tag specifying the Tarantool version you want. The `box.cfg{}` configuration manager is automatically called from the entry point, so your database will be ready to accept connections and serve data. +This will start an instance of Tarantool 1.7 and expose it on +port 3301. Note, that by default there is no password protection, so +don't expose this instance to the ouside world. -Note: this will create an instance without password protection and with an exposed 'guest' user, so anyone can directly connect to the container to change data in Tarantool. Please use this option only for development or testing. +In this case, when there is no lua code provided, the entry point +script initializes database using a sane set of defaults. Some of them +can be tuned with environment variables (see below). -## Start a Tarantool instance (with authentication) +## Start a secure Tarantool instance ```console -$ docker run --name some-tarantool -e TARANTOOL_USER_NAME=myusername -e TARANTOOL_USER_PASSWORD=mysecretpassword -d tarantool/tarantool:1.7 +$ docker run --name mytarantool -p3301:3301 -e TARANTOOL_USER_NAME=myusername -e TARANTOOL_USER_PASSWORD=mysecretpassword -d tarantool/tarantool:1.7 ``` -Where `some-tarantool` is the name you want to assign to your container, `myusername` is the name of the user that will be created and granted admin privileges, `mysecretpassword` is the password to be set for the user, and `1.7` is the tag specifying the Tarantool version you want. The `box.cfg{}` configuration manager is automatically called from the entry point, so your database will be ready to accept connections and serve data. +This starts an instance of Tarantool 1.7, disables guest login and +creates user named `myusername` with admin privileges and password +`mysecretpassword`. -## Connect to Tarantool from an application in another Docker container +As with the previous example, database is initialized automatically. -This image exposes the standard Tarantool port (3301), so container linking makes the Tarantool instance available to other application containers. Start your application container like this in order to link it to the Tarantool container: +## Connect to a running Tarantool instance ```console -$ docker run --link some-tarantool:tarantool -d application-that-uses-tarantool +$ docker exec -t -i mytarantool console ``` -## Connect to Tarantool from the Tarantool command line client +This will open an interactive admin console on the running instance +named `mytarantool`. You may safely detach from it anytime, the server +will continue running. + +This `console` doesn't require authentication, because it uses a local +unix socket in the container to connect to Tarantool. But it requires +you to have direct access to the container. + +If you need a remote console via TCP/IP, use `tarantoolctl` utility +as explained [here](https://tarantool.org/doc/book/administration.html#administration-tarantoolctl-connect). + +## Start a master-master replica set + +You may start a replica set with docker alone, but it's more +convenient to use [docker-compose](https://docs.docker.com/compose/). +Here's a simplified `docker-compose.yml` for starting a master-master +replica set: + +``` yaml +version: '2' + +services: + tarantool1: + image: tarantool/tarantool:1.7 + environment: + TARANTOOL_REPLICATION_SOURCE: "tarantool1,tarantool2" + networks: + - mynet + ports: + - "3301:3301" + + tarantool2: + image: tarantool/tarantool:1.7 + environment: + TARANTOOL_REPLICATION_SOURCE: "tarantool1,tarantool2" + networks: + - mynet + ports: + - "3302:3301" + +networks: + mynet: + driver: bridge +``` + +Start it like this: + +``` console +$ docker-compose up +``` + +## Adding application code with a volume mount + +The simplest way to provide application code is to mount your code +directory to `/opt/tarantool`: ```console -$ docker run -it --link some-tarantool:tarantool --rm tarantool/tarantool:1.7 tarantoolctl connect myusername:mysecretpassword@tarantool:3301 +$ docker run --name mytarantool -p3301:3301 -d -v /path/to/my/app:/opt/tarantool tarantool/tarantool:1.7 tarantool /opt/tarantool/app.lua ``` +Where `/path/to/my/app` is a host directory containing lua code. Note +that for your code to be actually run, you must execute the main script +explicitly. Hence `tarantool /opt/tarantool/app.lua`, assuming that your +app entry point is called `app.lua`. + + +## Adding application code using container inheritance + +If you want to pack and distribute an image with your code, you may +create your own Dockerfile as follows: + +```bash +FROM tarantool/tarantool:1.7 +COPY app.lua /opt/tarantool +CMD ["tarantool", "/opt/tarantool/app.lua"] +``` + +Please pay attention to the format of `CMD`: unless it is specified in +square brackets, the "wrapper" entry point that our Docker image +provides will not be called. It will lead to inability to configure +your instance using environment variables. + ## Environment Variables -When you start the Tarantool image, you can adjust the configuration of the Tarantool instance by passing one or more environment variables on the `docker run` command line. +When you run this image, you can adjust some of Tarantool settings. +Most of them either control memory/disk limits or specify external +connectivity parameters. + +If you need to fine-tune specific settings not described here, you can +always inherit this container and call `box.cfg{}` yourself. +See +[official documentation on box.cfg](https://tarantool.org/doc/reference/configuration/index.html#box-cfg-params) for +details. ### `TARANTOOL_USER_NAME` -Setting this variable allows you to pick the name of the user that is utilized for remote connections. By default, it is 'guest'. Please note that since guest user in Tarantool can't have a password, it is highly recommended that you change it. +Setting this variable allows you to pick the name of the user that is +utilized for remote connections. By default, it is 'guest'. Please +note that since guest user in Tarantool can't have a password, it is +highly recommended that you change it. ### `TARANTOOL_USER_PASSWORD` -For security reasons, it is recommended that you never leave this variable unset. This environment variable sets the user's password for Tarantool. In the above example, it is set to "mysecretpassword". +For security reasons, it is recommended that you never leave this +variable unset. This environment variable sets the user's password for +Tarantool. In the above example, it is set to "mysecretpassword". ### `TARANTOOL_PORT` -Optional. Specifying this variable will tell Tarantool to listen for incoming connections on a specific port. Default is 3301. +Optional. Specifying this variable will tell Tarantool to listen for +incoming connections on a specific port. Default is 3301. ### `TARANTOOL_REPLICATION_SOURCE` -Optional. Comma-separated list of URIs to treat as replication sources. Upon the start, Tarantool will attempt to connect to those instances, fetch the data snapshot and start replicating transaction logs. In other words, it will become a slave. For the multi-master configuration, other participating instances of Tarantool should be started with the same TARANTOOL_REPLICATION_SOURCE. (NB: applicable only to 1.7) +Optional. Comma-separated list of URIs to treat as replication +sources. Upon the start, Tarantool will attempt to connect to those +instances, fetch the data snapshot and start replicating transaction +logs. In other words, it will become a slave. For the multi-master +configuration, other participating instances of Tarantool should be +started with the same TARANTOOL_REPLICATION_SOURCE. (NB: applicable +only to 1.7) + +Example: + +`user1:pass@host1:3301,user2:pass@host2:3301` ### `TARANTOOL_SLAB_ALLOC_ARENA` -Optional. Specifies how much memory Tarantool allocates to actually store tuples, in gigabytes. When the limit is reached, INSERT or UPDATE requests begin failing. Default is 1.0. +Optional. Specifies how much memory Tarantool allocates to actually +store tuples, in gigabytes. When the limit is reached, INSERT or +UPDATE requests begin failing. Default is 1.0. ### `TARANTOOL_SLAB_ALLOC_FACTOR` -Optional. Used as the multiplier for computing the sizes of memory chunks that tuples are stored in. A lower value may result in less wasted memory depending on the total amount of memory available and the distribution of item sizes. Default is 1.1. +Optional. Used as the multiplier for computing the sizes of memory +chunks that tuples are stored in. A lower value may result in less +wasted memory depending on the total amount of memory available and +the distribution of item sizes. Default is 1.1. ### `TARANTOOL_SLAB_ALLOC_MAXIMAL` -Optional. Size of the largest allocation unit in bytes. It can be increased if it is necessary to store large tuples. Default is 1048576. +Optional. Size of the largest allocation unit in bytes. It can be +increased if it is necessary to store large tuples. Default is +1048576. ### `TARANTOOL_SLAB_ALLOC_MINIMAL` -Optional. Size of the smallest allocation unit, in bytes. It can be decreased if most of the tuples are very small. Default is 16. +Optional. Size of the smallest allocation unit, in bytes. It can be +decreased if most of the tuples are very small. Default is 16. -# Initializing a new instance +### `TARANTOOL_SNAPSHOT_PERIOD` -When a container is started for the first time, Tarantool entry point will call box.cfg{}, create users as necessary and expose the configured port. +Optional. Specifies how often snapshots will be made, in seconds. +Default is 3600 (every 1 hour). -# Adding application code in Lua +# Reporting problems and getting help -To add your application code written in Lua, you will need to inherit from one of the `tarantool` images and add your Lua code to /opt/tarantool: - -```bash -FROM tarantool/tarantool:1.6 -COPY app.lua /opt/tarantool -CMD ["tarantool", "/opt/tarantool/app.lua"] -``` - -# Running without a helper script - -Sometimes you may want to run Tarantool completely on your own, instead of relying on the entrypoint script to call `box.cfg{}` for you. This may be the case when you have complex initialization logic, or packaging an existing application that you don't want to adapt to conventions of these Docker images. - -Just replace `tarantool` with `/usr/local/bin/tarantool` in your Dockerfile: - -```bash -FROM tarantool/tarantool:1.6 -COPY app.lua /opt/tarantool -CMD ["/usr/local/bin/tarantool", "/opt/tarantool/app.lua"] -``` +You can report problems and request +features [on our GitHub](https://github.com/tarantool/docker). -This will call Tarantool directly, sidestepping all entrypoint logic. +Alternatively you may get help on our [Telegram channel](https://t.me/tarantool). From ed0f595fa993a25aeba945fb7aed72a159f41e35 Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Wed, 1 Feb 2017 19:45:56 +0300 Subject: [PATCH 061/286] Link module list entries to GitHub --- README.md | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index b10a9fa..55f81bf 100644 --- a/README.md +++ b/README.md @@ -56,20 +56,20 @@ is only one Tarantool instance running in the container. # What's on board -- avro: Apache Avro scheme for your data -- expirationd: Automatically delete tuples based on expiration time -- queue: Priority queues with TTL and confirmations -- connpool: Keep a pool of connections to other Tarantool instances -- shard: Automatically distribute data across multiple instances -- http: Embedded HTTP server with flask-style routing support -- curl: HTTP client based on libcurl -- pg: Query PostgreSQL right from Tarantool -- mysql: Query MySql right from Tarantool -- memcached: Access Tarantool as if it was a Memcached instance -- prometheus: Instrument code and export metrics to Prometheus monitoring -- mqtt: Client for MQTT message brokers -- gis: store and query geospatial data -- gperftools: collect CPU profile to find bottlenecks in your code +- [avro](https://github.com/tarantool/avro-schema): Apache Avro scheme for your data +- [expirationd](https://github.com/tarantool/expirationd): Automatically delete tuples based on expiration time +- [queue](https://github.com/tarantool/queue): Priority queues with TTL and confirmations +- [connpool](https://github.com/tarantool/connpool): Keep a pool of connections to other Tarantool instances +- [shard](https://github.com/tarantool/shard): Automatically distribute data across multiple instances +- [http](https://github.com/tarantool/http): Embedded HTTP server with flask-style routing support +- [curl](https://github.com/tarantool/curl): HTTP client based on libcurl +- [pg](https://github.com/tarantool/pg): Query PostgreSQL right from Tarantool +- [mysql](https://github.com/tarantool/mysql): Query MySql right from Tarantool +- [memcached](https://github.com/tarantool/memcached): Access Tarantool as if it was a Memcached instance +- [prometheus](https://github.com/tarantool/prometheus): Instrument code and export metrics to Prometheus monitoring +- [mqtt](https://github.com/tarantool/mqtt): Client for MQTT message brokers +- [gis](https://github.com/tarantool/gis): store and query geospatial data +- [gperftools](https://github.com/tarantool/gperftools): collect CPU profile to find bottlenecks in your code If the module you need is not listed here, there is a good chance we may add it. Open an issue [on our GitHub](https://github.com/tarantool/docker). From ef2920f7b79dd6bbdbe8d6246efa416b07a6de03 Mon Sep 17 00:00:00 2001 From: dedok Date: Tue, 14 Feb 2017 20:55:20 +0300 Subject: [PATCH 062/286] bump tarantool-curl version --- 1.6/Dockerfile | 2 +- 1.7/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/1.6/Dockerfile b/1.6/Dockerfile index e8d20b2..320a832 100644 --- a/1.6/Dockerfile +++ b/1.6/Dockerfile @@ -32,7 +32,7 @@ ENV TARANTOOL_VERSION=1.6.9-11-gf4619d0 \ LUAROCK_TARANTOOL_PROMETHEUS_REPO=https://github.com/tarantool/prometheus.git \ LUAROCK_TARANTOOL_PROMETHEUS_TAG=0654304 \ LUAROCK_TARANTOOL_CURL_REPO=https://github.com/tarantool/curl.git \ - LUAROCK_TARANTOOL_CURL_TAG=2.2.3 \ + LUAROCK_TARANTOOL_CURL_TAG=2.2.7 \ LUAROCK_MQTT_REPO=https://github.com/tarantool/mqtt.git \ LUAROCK_MQTT_TAG=238fd2e \ LUAROCK_TARANTOOL_GIS_REPO=https://github.com/tarantool/gis.git \ diff --git a/1.7/Dockerfile b/1.7/Dockerfile index 0fefebd..947e987 100644 --- a/1.7/Dockerfile +++ b/1.7/Dockerfile @@ -32,7 +32,7 @@ ENV TARANTOOL_VERSION=1.7.3-32-g0dd09b1 \ LUAROCK_TARANTOOL_PROMETHEUS_REPO=https://github.com/tarantool/prometheus.git \ LUAROCK_TARANTOOL_PROMETHEUS_TAG=0654304 \ LUAROCK_TARANTOOL_CURL_REPO=https://github.com/tarantool/curl.git \ - LUAROCK_TARANTOOL_CURL_TAG=2.2.3 \ + LUAROCK_TARANTOOL_CURL_TAG=2.2.7 \ LUAROCK_MQTT_REPO=https://github.com/tarantool/mqtt.git \ LUAROCK_MQTT_TAG=238fd2e \ LUAROCK_TARANTOOL_GIS_REPO=https://github.com/tarantool/gis.git \ From 90ffdff5273678e277ae60c44162152c44425873 Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Fri, 3 Mar 2017 16:29:37 +0300 Subject: [PATCH 063/286] Bump http module --- 1.6/Dockerfile | 2 +- 1.7/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/1.6/Dockerfile b/1.6/Dockerfile index 320a832..e82c0bf 100644 --- a/1.6/Dockerfile +++ b/1.6/Dockerfile @@ -22,7 +22,7 @@ ENV TARANTOOL_VERSION=1.6.9-11-gf4619d0 \ LUAROCK_SHARD_REPO=https://github.com/tarantool/shard.git \ LUAROCK_SHARD_TAG=278b906 \ LUAROCK_HTTP_REPO=https://github.com/tarantool/http.git \ - LUAROCK_HTTP_TAG=4486de9 \ + LUAROCK_HTTP_TAG=67d8a9b \ LUAROCK_PG_REPO=https://github.com/tarantool/pg.git \ LUAROCK_PG_TAG=43a7130 \ LUAROCK_MYSQL_REPO=https://github.com/tarantool/mysql.git \ diff --git a/1.7/Dockerfile b/1.7/Dockerfile index 947e987..1701be4 100644 --- a/1.7/Dockerfile +++ b/1.7/Dockerfile @@ -22,7 +22,7 @@ ENV TARANTOOL_VERSION=1.7.3-32-g0dd09b1 \ LUAROCK_SHARD_REPO=https://github.com/tarantool/shard.git \ LUAROCK_SHARD_TAG=278b906 \ LUAROCK_HTTP_REPO=https://github.com/tarantool/http.git \ - LUAROCK_HTTP_TAG=4486de9 \ + LUAROCK_HTTP_TAG=67d8a9b \ LUAROCK_PG_REPO=https://github.com/tarantool/pg.git \ LUAROCK_PG_TAG=43a7130 \ LUAROCK_MYSQL_REPO=https://github.com/tarantool/mysql.git \ From 23af613488227c31d44a262cac65281838e964ce Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Thu, 4 May 2017 18:26:50 +0300 Subject: [PATCH 064/286] Dockerfile for Tarantool 1.8 --- 1.8/Dockerfile | 275 +++++++++++++++++++++++++++++++++++ 1.8/console | 15 ++ 1.8/docker-entrypoint.sh | 22 +++ 1.8/gperftools_alpine.diff | 110 ++++++++++++++ 1.8/luarocks-config.lua | 9 ++ 1.8/tarantool-entrypoint.lua | 261 +++++++++++++++++++++++++++++++++ 1.8/tarantool.default | 22 +++ 1.8/tarantool_is_up | 41 ++++++ 1.8/tarantool_set_config.lua | 129 ++++++++++++++++ 9 files changed, 884 insertions(+) create mode 100644 1.8/Dockerfile create mode 100755 1.8/console create mode 100755 1.8/docker-entrypoint.sh create mode 100644 1.8/gperftools_alpine.diff create mode 100644 1.8/luarocks-config.lua create mode 100755 1.8/tarantool-entrypoint.lua create mode 100644 1.8/tarantool.default create mode 100755 1.8/tarantool_is_up create mode 100755 1.8/tarantool_set_config.lua diff --git a/1.8/Dockerfile b/1.8/Dockerfile new file mode 100644 index 0000000..a715216 --- /dev/null +++ b/1.8/Dockerfile @@ -0,0 +1,275 @@ +FROM alpine:3.5 +MAINTAINER mail@racktear.com + +RUN addgroup -S tarantool \ + && adduser -S -G tarantool tarantool \ + && apk add --no-cache 'su-exec>=0.2' + +ENV TARANTOOL_VERSION=1.7.3-843-g571b1c19e \ + TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ + TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ + GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ + GPERFTOOLS_TAG=gperftools-2.5 \ + LUAROCKS_URL=http://keplerproject.github.io/luarocks/releases/luarocks-2.3.0.tar.gz \ + LUAROCK_AVRO_SCHEMA_REPO=https://github.com/tarantool/avro-schema.git \ + LUAROCK_AVRO_SCHEMA_TAG=b49efa8 \ + LUAROCK_EXPIRATIOND_REPO=https://github.com/tarantool/expirationd.git \ + LUAROCK_EXPIRATIOND_TAG=9ec22b6 \ + LUAROCK_QUEUE_REPO=https://github.com/tarantool/queue.git \ + LUAROCK_QUEUE_TAG=24d730c \ + LUAROCK_CONNPOOL_REPO=https://github.com/tarantool/connpool.git \ + LUAROCK_CONNPOOL_TAG=685af44 \ + LUAROCK_SHARD_REPO=https://github.com/tarantool/shard.git \ + LUAROCK_SHARD_TAG=278b906 \ + LUAROCK_HTTP_REPO=https://github.com/tarantool/http.git \ + LUAROCK_HTTP_TAG=67d8a9b \ + LUAROCK_PG_REPO=https://github.com/tarantool/pg.git \ + LUAROCK_PG_TAG=8bb4164 \ + LUAROCK_MYSQL_REPO=https://github.com/tarantool/mysql.git \ + LUAROCK_MYSQL_TAG=e2c9187 \ + LUAROCK_MEMCACHED_REPO=https://github.com/tarantool/memcached.git \ + LUAROCK_MEMCACHED_TAG=ba18746 \ + LUAROCK_TARANTOOL_PROMETHEUS_REPO=https://github.com/tarantool/prometheus.git \ + LUAROCK_TARANTOOL_PROMETHEUS_TAG=0654304 \ + LUAROCK_TARANTOOL_CURL_REPO=https://github.com/tarantool/curl.git \ + LUAROCK_TARANTOOL_CURL_TAG=2.2.7 \ + LUAROCK_MQTT_REPO=https://github.com/tarantool/mqtt.git \ + LUAROCK_MQTT_TAG=238fd2e \ + LUAROCK_TARANTOOL_GIS_REPO=https://github.com/tarantool/gis.git \ + LUAROCK_TARANTOOL_GIS_TAG=25209fc \ + LUAROCK_GPERFTOOLS_REPO=https://github.com/tarantool/gperftools.git \ + LUAROCK_GPERFTOOLS_TAG=12a7ac2 + +COPY gperftools_alpine.diff / + +RUN set -x \ + && apk add --no-cache --virtual .run-deps \ + libstdc++ \ + readline \ + libressl \ + yaml \ + lz4 \ + binutils \ + ncurses \ + libgomp \ + lua \ + curl \ + tar \ + zip \ + libunwind \ + && apk add --no-cache --virtual .build-deps \ + perl \ + gcc \ + g++ \ + cmake \ + readline-dev \ + libressl-dev \ + yaml-dev \ + lz4-dev \ + binutils-dev \ + ncurses-dev \ + lua-dev \ + musl-dev \ + make \ + git \ + libunwind-dev \ + autoconf \ + automake \ + libtool \ + linux-headers \ + go \ + tcl \ + && : "---------- gperftools ----------" \ + && mkdir -p /usr/src/gperftools \ + && git clone "$GPERFTOOLS_REPO" /usr/src/gperftools \ + && git -C /usr/src/gperftools checkout "$GPERFTOOLS_TAG" \ + && (cd /usr/src/gperftools; \ + patch -p1 < /gperftools_alpine.diff; \ + rm /gperftools_alpine.diff; \ + ./autogen.sh; \ + ./configure; \ + make; \ + cp .libs/libprofiler.so* /usr/local/lib;) \ + && (GOPATH=/usr/src/go go get github.com/google/pprof; \ + cp /usr/src/go/bin/pprof /usr/local/bin) \ + && : "---------- tarantool ----------" \ + && mkdir -p /usr/src/tarantool \ + && git clone "$TARANTOOL_DOWNLOAD_URL" /usr/src/tarantool \ + && git -C /usr/src/tarantool checkout "$TARANTOOL_VERSION" \ + && git -C /usr/src/tarantool submodule update --init --recursive \ + && (cd /usr/src/tarantool; \ + cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo\ + -DENABLE_BUNDLED_LIBYAML:BOOL=OFF\ + -DENABLE_BACKTRACE:BOOL=ON\ + -DENABLE_DIST:BOOL=ON\ + .) \ + && make -C /usr/src/tarantool -j\ + && make -C /usr/src/tarantool install \ + && make -C /usr/src/tarantool clean \ + && : "---------- small ----------" \ + && (cd /usr/src/tarantool/src/lib/small; \ + cmake -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + .) \ + && make -C /usr/src/tarantool/src/lib/small \ + && make -C /usr/src/tarantool/src/lib/small install \ + && make -C /usr/src/tarantool/src/lib/small clean \ + && : "---------- msgpuck ----------" \ + && (cd /usr/src/tarantool/src/lib/msgpuck; \ + cmake -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + .) \ + && make -C /usr/src/tarantool/src/lib/msgpuck \ + && make -C /usr/src/tarantool/src/lib/msgpuck install \ + && make -C /usr/src/tarantool/src/lib/msgpuck clean \ + && : "---------- luarocks ----------" \ + && wget -O luarocks.tar.gz "$LUAROCKS_URL" \ + && mkdir -p /usr/src/luarocks \ + && tar -xzf luarocks.tar.gz -C /usr/src/luarocks --strip-components=1 \ + && (cd /usr/src/luarocks; \ + ./configure; \ + make build; \ + make install) \ + && rm -r /usr/src/luarocks \ + && rm -rf /usr/src/tarantool \ + && rm -rf /usr/src/gperftools \ + && rm -rf /usr/src/go \ + && : "---------- remove build deps ----------" \ + && apk del .build-deps + +COPY luarocks-config.lua /usr/local/etc/luarocks/config-5.1.lua + +RUN set -x \ + && apk add --no-cache --virtual .run-deps \ + mariadb-client-libs \ + libpq \ + cyrus-sasl \ + libcurl \ + mosquitto-libs \ + libev \ + && apk add --no-cache --virtual .build-deps \ + git \ + cmake \ + make \ + coreutils \ + gcc \ + g++ \ + postgresql-dev \ + lua-dev \ + musl-dev \ + cyrus-sasl-dev \ + curl-dev \ + mosquitto-dev \ + libev-dev \ + libressl-dev \ + && mkdir -p /rocks \ + && : "---------- proj (for gis module) ----------" \ + && wget -O proj.tar.gz http://download.osgeo.org/proj/proj-4.9.3.tar.gz \ + && mkdir -p /usr/src/proj \ + && tar -xzf proj.tar.gz -C /usr/src/proj --strip-components=1 \ + && (cd /usr/src/proj; \ + ./configure; \ + make; \ + make install) \ + && rm -r /usr/src/proj \ + && rm -rf /usr/src/proj \ + && : "---------- geos (for gis module) ----------" \ + && wget -O geos.tar.bz2 http://download.osgeo.org/geos/geos-3.6.0.tar.bz2 \ + && mkdir -p /usr/src/geos \ + && tar -xjf geos.tar.bz2 -C /usr/src/geos --strip-components=1 \ + && (cd /usr/src/geos; \ + ./configure; \ + make; \ + make install) \ + && rm -r /usr/src/geos \ + && rm -rf /usr/src/geos \ + && : "---------- luarocks ----------" \ + && luarocks install lua-term \ + && : "avro" \ + && git clone $LUAROCK_AVRO_SCHEMA_REPO /rocks/avro \ + && git -C /rocks/avro checkout $LUAROCK_AVRO_SCHEMA_TAG \ + && (cd /rocks/avro && luarocks make *rockspec) \ + && : "expirationd" \ + && git clone $LUAROCK_EXPIRATIOND_REPO /rocks/expirationd \ + && git -C /rocks/expirationd checkout $LUAROCK_EXPIRATIOND_TAG \ + && (cd /rocks/expirationd && luarocks make *rockspec) \ + && : "queue" \ + && git clone $LUAROCK_QUEUE_REPO /rocks/queue \ + && git -C /rocks/queue checkout $LUAROCK_QUEUE_TAG \ + && (cd /rocks/queue && luarocks make *rockspec) \ + && : "connpool" \ + && git clone $LUAROCK_CONNPOOL_REPO /rocks/connpool \ + && git -C /rocks/connpool checkout $LUAROCK_CONNPOOL_TAG \ + && (cd /rocks/connpool && luarocks make *rockspec) \ + && : "shard" \ + && git clone $LUAROCK_SHARD_REPO /rocks/shard \ + && git -C /rocks/shard checkout $LUAROCK_SHARD_TAG \ + && (cd /rocks/shard && luarocks make *rockspec) \ + && : "http" \ + && git clone $LUAROCK_HTTP_REPO /rocks/http \ + && git -C /rocks/http checkout $LUAROCK_HTTP_TAG \ + && (cd /rocks/http && luarocks make *rockspec) \ + && : "pg" \ + && git clone $LUAROCK_PG_REPO /rocks/pg \ + && git -C /rocks/pg checkout $LUAROCK_PG_TAG \ + && (cd /rocks/pg && luarocks make *rockspec) \ + && : "mysql" \ + && git clone $LUAROCK_MYSQL_REPO /rocks/mysql \ + && git -C /rocks/mysql checkout $LUAROCK_MYSQL_TAG \ + && (cd /rocks/mysql && luarocks make *rockspec) \ + && : "memcached" \ + && git clone $LUAROCK_MEMCACHED_REPO /rocks/memcached \ + && git -C /rocks/memcached checkout $LUAROCK_MEMCACHED_TAG \ + && (cd /rocks/memcached && luarocks make *rockspec) \ + && : "prometheus" \ + && git clone $LUAROCK_TARANTOOL_PROMETHEUS_REPO /rocks/prometheus \ + && git -C /rocks/prometheus checkout $LUAROCK_TARANTOOL_PROMETHEUS_TAG \ + && (cd /rocks/prometheus && luarocks make *rockspec) \ + && : "curl" \ + && git clone $LUAROCK_TARANTOOL_CURL_REPO /rocks/curl \ + && git -C /rocks/curl checkout $LUAROCK_TARANTOOL_CURL_TAG \ + && (cd /rocks/curl && luarocks make *rockspec) \ + && : "mqtt" \ + && git clone $LUAROCK_MQTT_REPO /rocks/mqtt \ + && git -C /rocks/mqtt checkout $LUAROCK_MQTT_TAG \ + && (cd /rocks/mqtt && luarocks make *rockspec) \ + && : "gis" \ + && git clone $LUAROCK_TARANTOOL_GIS_REPO /rocks/gis \ + && git -C /rocks/gis checkout $LUAROCK_TARANTOOL_GIS_TAG \ + && (cd /rocks/gis && luarocks make *rockspec) \ + && : "gperftools" \ + && git clone $LUAROCK_GPERFTOOLS_REPO /rocks/gperftools \ + && git -C /rocks/gperftools checkout $LUAROCK_GPERFTOOLS_TAG \ + && (cd /rocks/gperftools && luarocks make *rockspec) \ + && : "---------- remove build deps ----------" \ + && apk del .build-deps \ + && rm -rf /rocks + +RUN mkdir -p /var/lib/tarantool \ + && chown tarantool:tarantool /var/lib/tarantool \ + && mkdir -p /opt/tarantool \ + && chown tarantool:tarantool /opt/tarantool \ + && mkdir -p /var/run/tarantool \ + && chown tarantool:tarantool /var/run/tarantool \ + && mkdir /etc/tarantool \ + && chown tarantool:tarantool /etc/tarantool + +VOLUME /var/lib/tarantool +WORKDIR /opt/tarantool + +COPY tarantool-entrypoint.lua /usr/local/bin/ +COPY tarantool_set_config.lua /usr/local/bin/ +COPY docker-entrypoint.sh /usr/local/bin/ +COPY console /usr/local/bin/ +COPY tarantool_is_up /usr/local/bin/ +COPY tarantool.default /usr/local/etc/default/tarantool + +RUN ln -s usr/local/bin/docker-entrypoint.sh /entrypoint.sh # backwards compat +ENTRYPOINT ["docker-entrypoint.sh"] + +HEALTHCHECK CMD tarantool_is_up + +EXPOSE 3301 +CMD [ "tarantool" ] diff --git a/1.8/console b/1.8/console new file mode 100755 index 0000000..d6fb192 --- /dev/null +++ b/1.8/console @@ -0,0 +1,15 @@ +#!/usr/bin/env tarantool + +local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' + +console = require('console') +console.on_start(function(self) + local status, reason + status, reason = pcall(function() require('console').connect(CONSOLE_SOCKET_PATH) end) + if not status then + self:print(reason) + self.running = false + end +end) +console.on_client_disconnect(function(self) self.running = false end) +console.start() diff --git a/1.8/docker-entrypoint.sh b/1.8/docker-entrypoint.sh new file mode 100755 index 0000000..3a9f5e4 --- /dev/null +++ b/1.8/docker-entrypoint.sh @@ -0,0 +1,22 @@ +#!/bin/sh +set -e + +# first arg is `-f` or `--some-option` +# or first arg is `something.conf` +if [ "${1:0:1}" = '-' ]; then + set -- tarantool "$@" +fi + +# allow the container to be started with `--user` +if [ "$1" = 'tarantool' -a "$(id -u)" = '0' ]; then + chown -R tarantool /var/lib/tarantool + exec su-exec tarantool "$0" "$@" +fi + +# entry point wraps the passed script to do basic setup +if [ "$1" = 'tarantool' ]; then + shift + exec tarantool "/usr/local/bin/tarantool-entrypoint.lua" "$@" +fi + +exec "$@" diff --git a/1.8/gperftools_alpine.diff b/1.8/gperftools_alpine.diff new file mode 100644 index 0000000..e768381 --- /dev/null +++ b/1.8/gperftools_alpine.diff @@ -0,0 +1,110 @@ +diff --git a/src/base/linux_syscall_support.h b/src/base/linux_syscall_support.h +index 5d578cd..fceebe2 100644 +--- a/src/base/linux_syscall_support.h ++++ b/src/base/linux_syscall_support.h +@@ -2432,9 +2432,9 @@ struct kernel_stat { + #if defined(__s390x__) + LSS_INLINE _syscall1(void*, mmap, void*, a) + #else +- /* Need to make sure __off64_t isn't truncated to 32-bits under x32. */ ++ /* Need to make sure off64_t isn't truncated to 32-bits under x32. */ + LSS_INLINE void* LSS_NAME(mmap)(void *s, size_t l, int p, int f, int d, +- __off64_t o) { ++ off64_t o) { + LSS_BODY(6, void*, mmap, LSS_SYSCALL_ARG(s), LSS_SYSCALL_ARG(l), + LSS_SYSCALL_ARG(p), LSS_SYSCALL_ARG(f), + LSS_SYSCALL_ARG(d), (uint64_t)(o)); +@@ -2475,7 +2475,7 @@ struct kernel_stat { + LSS_INLINE _syscall6(void*, mmap, void*, s, + size_t, l, int, p, + int, f, int, d, +- __off64_t, o) ++ off64_t, o) + LSS_INLINE int LSS_NAME(sigaction)(int signum, + const struct kernel_sigaction *act, + struct kernel_sigaction *oldact) { +diff --git a/src/malloc_hook_mmap_linux.h b/src/malloc_hook_mmap_linux.h +index 1c4c766..b2aa8ed 100755 +--- a/src/malloc_hook_mmap_linux.h ++++ b/src/malloc_hook_mmap_linux.h +@@ -56,7 +56,7 @@ + + static inline void* do_mmap64(void *start, size_t length, + int prot, int flags, +- int fd, __off64_t offset) __THROW { ++ int fd, off64_t offset) __THROW { + return sys_mmap(start, length, prot, flags, fd, offset); + } + +@@ -67,7 +67,7 @@ static inline void* do_mmap64(void *start, size_t length, + + static inline void* do_mmap64(void *start, size_t length, + int prot, int flags, +- int fd, __off64_t offset) __THROW { ++ int fd, off64_t offset) __THROW { + void *result; + + // Try mmap2() unless it's not supported +@@ -151,9 +151,11 @@ static inline void* do_mmap64(void *start, size_t length, + # undef mmap + + extern "C" { ++ #ifndef mmap64 + void* mmap64(void *start, size_t length, int prot, int flags, +- int fd, __off64_t offset ) __THROW ++ int fd, off64_t offset ) __THROW + ATTRIBUTE_SECTION(malloc_hook); ++ #endif + void* mmap(void *start, size_t length,int prot, int flags, + int fd, off_t offset) __THROW + ATTRIBUTE_SECTION(malloc_hook); +@@ -166,8 +168,9 @@ extern "C" { + ATTRIBUTE_SECTION(malloc_hook); + } + ++#ifndef mmap64 + extern "C" void* mmap64(void *start, size_t length, int prot, int flags, +- int fd, __off64_t offset) __THROW { ++ int fd, off64_t offset) __THROW { + MallocHook::InvokePreMmapHook(start, length, prot, flags, fd, offset); + void *result; + if (!MallocHook::InvokeMmapReplacement( +@@ -177,6 +180,7 @@ extern "C" void* mmap64(void *start, size_t length, int prot, int flags, + MallocHook::InvokeMmapHook(result, start, length, prot, flags, fd, offset); + return result; + } ++#endif + + # if !defined(__USE_FILE_OFFSET64) || !defined(__REDIRECT_NTH) + +@@ -216,7 +220,7 @@ extern "C" void* mremap(void* old_addr, size_t old_size, size_t new_size, + return result; + } + +-#ifndef __UCLIBC__ ++#if defined(__GLIBC__) && ! defined(__UCLIBC__) + // libc's version: + extern "C" void* __sbrk(ptrdiff_t increment); + +diff --git a/src/tests/stacktrace_unittest.cc b/src/tests/stacktrace_unittest.cc +index 3c9f735..2d39ad9 100644 +--- a/src/tests/stacktrace_unittest.cc ++++ b/src/tests/stacktrace_unittest.cc +@@ -120,17 +120,6 @@ void ATTRIBUTE_NOINLINE CheckStackTraceLeaf(void) { + CHECK_GE(size, 1); + CHECK_LE(size, STACK_LEN); + +-#ifdef HAVE_EXECINFO_H +- { +- char **strings = backtrace_symbols(stack, size); +- printf("Obtained %d stack frames.\n", size); +- for (int i = 0; i < size; i++) +- printf("%s %p\n", strings[i], stack[i]); +- printf("CheckStackTrace() addr: %p\n", &CheckStackTrace); +- free(strings); +- } +-#endif +- + for (int i = 0; i < BACKTRACE_STEPS; i++) { + printf("Backtrace %d: expected: %p..%p actual: %p ... ", + i, expected_range[i].start, expected_range[i].end, stack[i]); diff --git a/1.8/luarocks-config.lua b/1.8/luarocks-config.lua new file mode 100644 index 0000000..111f955 --- /dev/null +++ b/1.8/luarocks-config.lua @@ -0,0 +1,9 @@ +rocks_trees = { + { name = [[user]], root = home..[[/.luarocks]] }, + { name = [[system]], root = [[/usr/local]] } +} + +rocks_servers = { + [[http://rocks.tarantool.org/]], + [[http://luarocks.org/repositories/rocks]] +} diff --git a/1.8/tarantool-entrypoint.lua b/1.8/tarantool-entrypoint.lua new file mode 100755 index 0000000..a71ec17 --- /dev/null +++ b/1.8/tarantool-entrypoint.lua @@ -0,0 +1,261 @@ +#!/usr/bin/env tarantool + +local fio = require('fio') +local errno = require('errno') +local fun = require('fun') +local urilib = require('uri') +local console = require('console') +local term = require('term') +local log = require('log') +local yaml = require('yaml') + +local TARANTOOL_DEFAULT_PORT = 3301 +local TARANTOOL_DEFAULT_SNAPSHOT_PERIOD = 3600 -- seconds +local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' +local CFG_FILE_PATH = '/etc/tarantool/config.yml' + + +local orig_cfg = box.cfg + +local function read_config() + local f = io.open(CFG_FILE_PATH, "rb") + if f == nil then + log.error("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) + os.exit(1) + end + local content = f:read("*all") + f:close() + return yaml.decode(content) +end + +local function write_config(cfg) + local f = io.open(CFG_FILE_PATH, "w+") + if f == nil then + print("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) + os.exit(1) + end + local content = yaml.encode(cfg) + f:write(content) + f:close() +end + +local function parse_replication_source(replication_source, user_name, user_password) + if replication_source == nil then + return nil + end + + local replication_source_table = {} + for uri in string.gmatch(replication_source, "[^,]+") do + local parsed_uri = urilib.parse(uri) + if parsed_uri == nil then + error("Incorrect replication source URI format: '"..uri.."'") + end + local host = parsed_uri.host + local port = parsed_uri.service or TARANTOOL_DEFAULT_PORT + local user = parsed_uri.login or user_name + local password = parsed_uri.password or user_password + + if user == 'guest' or user == nil then + replication_source = string.format("%s:%s", host, port) + elseif password == nil then + replication_source = string.format("%s:@%s:%s", user, host, port) + else + replication_source = string.format("%s:%s@%s:%s", user, password, + host, port) + end + + table.insert(replication_source_table, replication_source) + end + + return replication_source_table +end + +function set_replication_source(replication_source, user_name, user_password) + local replication_source_table = + parse_replication_source(replication_source, user_name, user_password) + box.cfg{replication_source = replication_source_table} + + log.info("Updated box.cfg{replication_source} to "..replication_source) +end + +local function create_user(user_name, user_password) + if user_name ~= 'guest' and user_password == nil then + user_password = "" + + local warn_str = [[**************************************************** +WARNING: No password has been set for the database. + This will allow anyone with access to the + Tarantool port to access your database. In + Docker's default configuration, this is + effectively any other container on the same + system. + Use "-e TARANTOOL_USER_PASSWORD=password" + to set it in "docker run". +****************************************************]] + log.warn('\n'..warn_str) + end + + if user_name == 'guest' and user_password == nil then + local warn_str = [[**************************************************** +WARNING: 'guest' is chosen as primary user. + Since it is not allowed to set a password for + guest user, your instance will be accessible + by anyone having direct access to the Tarantool + port. + If you wanted to create an authenticated user, + specify "-e TARANTOOL_USER_NAME=username" and + pick a user name other than "guest". +****************************************************]] + log.warn('\n'..warn_str) + end + + if user_name == 'guest' and user_password ~= nil then + user_password = nil + + local warn_str = [[**************************************************** +WARNING: A password for guest user has been specified. + In Tarantool, guest user can't have a password + and is always allowed to login, if it has + enough privileges. + If you wanted to create an authenticated user, + specify "-e TARANTOOL_USER_NAME=username" and + pick a user name other than "guest". +****************************************************]] + log.warn('\n'..warn_str) + end + + if user_name ~= 'admin' and user_name ~= 'guest' then + if not box.schema.user.exists(user_name) then + log.info("Creating user '%s'", user_name) + box.schema.user.create(user_name) + end + end + + if user_name ~= 'admin' then + log.info("Granting admin privileges to user '%s'", user_name) + box.schema.user.grant(user_name, 'read,write,execute', + 'universe', nil, {if_not_exists = true}) + box.schema.user.grant(user_name, 'replication', + nil, nil, {if_not_exists = true}) + end + + if user_name ~= 'guest' then + log.info("Setting password for user '%s'", user_name) + box.schema.user.passwd(user_name, user_password) + end +end + +function set_credentials(user_name, user_password) + create_user(user_name, user_password) +end + +local function wrapper_cfg(override) + local work_dir = '/var/lib/tarantool' + local snap_filename = "*.snap" + local snap_path = work_dir..'/'..snap_filename + + local first_run = false + if next(fio.glob(snap_path)) == nil then + first_run = true + end + + + local file_cfg = {} + local config_file_exists = fio.stat(CFG_FILE_PATH) ~= nil + if not config_file_exists then + log.info("Creating configuration file: " .. CFG_FILE_PATH) + + file_cfg.TARANTOOL_USER_NAME = os.getenv('TARANTOOL_USER_NAME') + file_cfg.TARANTOOL_USER_PASSWORD = os.getenv('TARANTOOL_USER_PASSWORD') + file_cfg.TARANTOOL_SLAB_ALLOC_ARENA = os.getenv('TARANTOOL_SLAB_ALLOC_ARENA') + file_cfg.TARANTOOL_SLAB_ALLOC_FACTOR = os.getenv('TARANTOOL_SLAB_ALLOC_FACTOR') + file_cfg.TARANTOOL_SLAB_ALLOC_MINIMAL = os.getenv('TARANTOOL_SLAB_ALLOC_MINIMAL') + file_cfg.TARANTOOL_SLAB_ALLOC_MAXIMAL = os.getenv('TARANTOOL_SLAB_ALLOC_MAXIMAL') + file_cfg.TARANTOOL_PORT = os.getenv('TARANTOOL_PORT') + file_cfg.TARANTOOL_WAL_MODE = os.getenv('TARANTOOL_WAL_MODE') + file_cfg.TARANTOOL_REPLICATION_SOURCE = os.getenv('TARANTOOL_REPLICATION_SOURCE') + file_cfg.TARANTOOL_SNAPSHOT_PERIOD = os.getenv('TARANTOOL_SNAPSHOT_PERIOD') + + write_config(file_cfg) + else + log.info("Loading existing configuration file: " .. CFG_FILE_PATH) + + file_cfg = read_config() + end + + local user_name = file_cfg.TARANTOOL_USER_NAME or + os.getenv('TARANTOOL_USER_NAME') or 'guest' + local user_password = file_cfg.TARANTOOL_USER_PASSWORD or + os.getenv('TARANTOOL_USER_PASSWORD') + + + local cfg = override or {} + cfg.slab_alloc_arena = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_ARENA) or + override.slab_alloc_arena + cfg.slab_alloc_factor = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_FACTOR) or + override.slab_alloc_factor + cfg.slab_alloc_maximal = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_MAXIMAL) or + override.slab_alloc_maximal + cfg.slab_alloc_minimal = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_MINIMAL) or + override.slab_alloc_minimal + cfg.listen = tonumber(file_cfg.TARANTOOL_PORT) or + override.listen or TARANTOOL_DEFAULT_PORT + cfg.wal_mode = file_cfg.TARANTOOL_WAL_MODE or + override.wal_mode + cfg.snapshot_period = tonumber(file_cfg.TARANTOOL_SNAPSHOT_PERIOD) or + override.snapshot_period or TARANTOOL_DEFAULT_SNAPSHOT_PERIOD + + cfg.wal_dir = override.wal_dir or '/var/lib/tarantool' + cfg.snap_dir = override.snap_dir or '/var/lib/tarantool' + cfg.pid_file = override.pid_file or '/var/run/tarantool/tarantool.pid' + + local replication_source = file_cfg.TARANTOOL_REPLICATION_SOURCE + local replication_source_table = parse_replication_source(replication_source, + user_name, + user_password) + + if replication_source then + cfg.replication_source = replication_source_table + else + cfg.replication_source = override.replication_source + end + + log.info("Config:\n" .. yaml.encode(cfg)) + + orig_cfg(cfg) + + box.once('tarantool-entrypoint', function () + if first_run then + log.info("Initializing database") + + create_user(user_name, user_password) + end + end) + + console.listen(CONSOLE_SOCKET_PATH) + +end + +box.cfg = wrapper_cfg + +-- re-run the script passed as parameter with all arguments that follow +execute_script = arg[1] +if execute_script == nil then + box.cfg {} + + if term.isatty(io.stdout) then + console.start() + os.exit(0) + end +else + narg = 0 + while true do + arg[narg] = arg[narg + 1] + if arg[narg] == nil then + break + end + narg = narg + 1 + end + + dofile(execute_script) +end diff --git a/1.8/tarantool.default b/1.8/tarantool.default new file mode 100644 index 0000000..fffe3b0 --- /dev/null +++ b/1.8/tarantool.default @@ -0,0 +1,22 @@ +-- +-- System-wide settings for tarantoolctl and init scripts +-- +-- This file is meant to enable the usage of tarantoolctl inside +-- docker containers. Since there is no init system, most of its +-- functionality will not work, except 'tarantoolctl enter' or +-- 'tarantoolctl status'. +-- + +default_cfg = { + pid_file = "/var/run/tarantool", -- /var/run/tarantool/${INSTANCE}.pid + wal_dir = "/var/lib/tarantool", -- /var/lib/tarantool/${INSTANCE}/ + snap_dir = "/var/lib/tarantool", -- /var/lib/tarantool/${INSTANCE} + vinyl_dir = "/var/lib/tarantool", -- /var/lib/tarantool/${INSTANCE} + logger = "/var/log/tarantool", -- /var/log/tarantool/${INSTANCE}.log + username = "tarantool", +} + +-- instances.available - all available instances +-- instances.enabled - instances to autostart by sysvinit +instance_dir = "/usr/local/etc/tarantool/instances.enabled" +-- vim: set ft=lua : diff --git a/1.8/tarantool_is_up b/1.8/tarantool_is_up new file mode 100755 index 0000000..71148d5 --- /dev/null +++ b/1.8/tarantool_is_up @@ -0,0 +1,41 @@ +#!/bin/sh + +status=$( (tarantool <<-'EOF' +local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' +local console = require('console') +local os = require("os") +local yaml = require("yaml") + +console.on_start(function(self) + local status, reason + status, reason = pcall(function() require('console').connect(CONSOLE_SOCKET_PATH) end) + if not status then + self:print(reason) + os.exit(1) + end + + cmd = 'box.info.status' + local res = self:eval(cmd) + if res ~= nil then + res = yaml.decode(res) + print(res[1]) + end + + os.exit(0) +end) + +console.on_client_disconnect(function(self) self.running = false end) +console.start() + +os.exit(0) +EOF +) 2>/dev/null) + + +echo "$status" + +if [ "$status" = "running" ]; then + exit 0 +else + exit 1 +fi diff --git a/1.8/tarantool_set_config.lua b/1.8/tarantool_set_config.lua new file mode 100755 index 0000000..f6b2a55 --- /dev/null +++ b/1.8/tarantool_set_config.lua @@ -0,0 +1,129 @@ +#!/usr/bin/env tarantool + +local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' +local CFG_FILE_PATH = '/etc/tarantool/config.yml' + +local fio = require('fio') +local yaml = require('yaml') +local console = require('console') +local errno = require('errno') + +local function read_config() + local f = io.open(CFG_FILE_PATH, "rb") + if f == nil then + print("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) + os.exit(1) + end + local content = f:read("*all") + f:close() + return yaml.decode(content) +end + +local function write_config(cfg) + local f = io.open(CFG_FILE_PATH, "w+") + if f == nil then + print("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) + os.exit(1) + end + local content = yaml.encode(cfg) + f:write(content) + f:close() +end + +local function nop(console, cfg, value) +end + +local function update_replication_source(console, cfg, value) + local user_name = "nil" + if cfg['TARANTOOL_USER_NAME'] then + user_name = "'" .. cfg['TARANTOOL_USER_NAME'] .. "'" + end + + local user_password = "nil" + if cfg['TARANTOOL_USER_PASSWORD'] then + user_password = "'" .. cfg['TARANTOOL_USER_PASSWORD'] .. "'" + end + + local cmd = "set_replication_source('"..value.."', " .. user_name .. "," .. user_password .. ")" + print("cmd: ", cmd) + + local res = console:eval(cmd) + + if res ~= nil then + print(res) + end +end + +local function update_credentials(console, cfg, value) + local user_name = "nil" + if cfg['TARANTOOL_USER_NAME'] then + user_name = "'" .. cfg['TARANTOOL_USER_NAME'] .. "'" + end + + local user_password = "nil" + if cfg['TARANTOOL_USER_PASSWORD'] then + user_password = "'" .. cfg['TARANTOOL_USER_PASSWORD'] .. "'" + end + + local cmd = "set_credentials(" .. user_name .. "," .. user_password .. ")" + + local res = console:eval(cmd) + + if res ~= nil then + print(res) + end + + local replication_source = cfg['TARANTOOL_REPLICATION_SOURCE'] + + if replication_source ~= nil then + update_replication_source(console, cfg, replication_source) + end +end + + +local vars = { + TARANTOOL_SLAB_ALLOC_ARENA=nop, + TARANTOOL_SLAB_ALLOC_FACTOR=nop, + TARANTOOL_SLAB_ALLOC_MAXIMAL=nop, + TARANTOOL_SLAB_ALLOC_MINIMAL=nop, + TARANTOOL_PORT=nop, + TARANTOOL_WAL_MODE=nop, + TARANTOOL_USER_NAME=update_credentials, + TARANTOOL_USER_PASSWORD=update_credentials, + TARANTOOL_REPLICATION_SOURCE=update_replication_source +} + +console.on_start(function(self) + local status, reason + status, reason = pcall(function() require('console').connect(CONSOLE_SOCKET_PATH) end) + if not status then + self:print(reason) + os.exit(1) + end + + if arg[1] == nil or arg[2] == nil then + self:print("Usage: " .. arg[0] .. " ") + os.exit(1) + end + + if vars[arg[1]] == nil then + self:print("Unknown var: " .. arg[1]) + os.exit(1) + end + + local cfg = read_config() + cfg[arg[1]] = arg[2] + + local func = vars[arg[1]] + func(self, cfg, arg[2]) + + write_config(cfg) + + self.running = false + os.exit(0) +end) + +console.on_client_disconnect(function(self) self.running = false end) +console.start() + +os.exit(0) From 5a4de960261ef87bd486fb094e30b53e1815e4ec Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Fri, 5 May 2017 14:41:15 +0300 Subject: [PATCH 065/286] Disable memcached as id doesn't built yet with 1.8 --- 1.8/Dockerfile | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/1.8/Dockerfile b/1.8/Dockerfile index a715216..bbe94da 100644 --- a/1.8/Dockerfile +++ b/1.8/Dockerfile @@ -26,9 +26,9 @@ ENV TARANTOOL_VERSION=1.7.3-843-g571b1c19e \ LUAROCK_PG_REPO=https://github.com/tarantool/pg.git \ LUAROCK_PG_TAG=8bb4164 \ LUAROCK_MYSQL_REPO=https://github.com/tarantool/mysql.git \ - LUAROCK_MYSQL_TAG=e2c9187 \ + LUAROCK_MYSQL_TAG=3203633 \ LUAROCK_MEMCACHED_REPO=https://github.com/tarantool/memcached.git \ - LUAROCK_MEMCACHED_TAG=ba18746 \ + LUAROCK_MEMCACHED_TAG=04623e5 \ LUAROCK_TARANTOOL_PROMETHEUS_REPO=https://github.com/tarantool/prometheus.git \ LUAROCK_TARANTOOL_PROMETHEUS_TAG=0654304 \ LUAROCK_TARANTOOL_CURL_REPO=https://github.com/tarantool/curl.git \ @@ -219,10 +219,6 @@ RUN set -x \ && git clone $LUAROCK_MYSQL_REPO /rocks/mysql \ && git -C /rocks/mysql checkout $LUAROCK_MYSQL_TAG \ && (cd /rocks/mysql && luarocks make *rockspec) \ - && : "memcached" \ - && git clone $LUAROCK_MEMCACHED_REPO /rocks/memcached \ - && git -C /rocks/memcached checkout $LUAROCK_MEMCACHED_TAG \ - && (cd /rocks/memcached && luarocks make *rockspec) \ && : "prometheus" \ && git clone $LUAROCK_TARANTOOL_PROMETHEUS_REPO /rocks/prometheus \ && git -C /rocks/prometheus checkout $LUAROCK_TARANTOOL_PROMETHEUS_TAG \ From 290ed10d3637e3e37161d0b5d2d2d7e0e1f993f9 Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Wed, 10 May 2017 14:05:01 +0300 Subject: [PATCH 066/286] Bump tarantool 1.8 version --- 1.8/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1.8/Dockerfile b/1.8/Dockerfile index bbe94da..b9f2e26 100644 --- a/1.8/Dockerfile +++ b/1.8/Dockerfile @@ -5,7 +5,7 @@ RUN addgroup -S tarantool \ && adduser -S -G tarantool tarantool \ && apk add --no-cache 'su-exec>=0.2' -ENV TARANTOOL_VERSION=1.7.3-843-g571b1c19e \ +ENV TARANTOOL_VERSION=1.7.3-682-gdf6de9c17 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ From f2d570eb973b81b36e7b5b3d0e82f12aaaa426f1 Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Wed, 10 May 2017 15:19:32 +0300 Subject: [PATCH 067/286] Add memcached back, because it's been fixed --- 1.8/Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/1.8/Dockerfile b/1.8/Dockerfile index b9f2e26..f8e1603 100644 --- a/1.8/Dockerfile +++ b/1.8/Dockerfile @@ -28,7 +28,7 @@ ENV TARANTOOL_VERSION=1.7.3-682-gdf6de9c17 \ LUAROCK_MYSQL_REPO=https://github.com/tarantool/mysql.git \ LUAROCK_MYSQL_TAG=3203633 \ LUAROCK_MEMCACHED_REPO=https://github.com/tarantool/memcached.git \ - LUAROCK_MEMCACHED_TAG=04623e5 \ + LUAROCK_MEMCACHED_TAG=7aa78b2 \ LUAROCK_TARANTOOL_PROMETHEUS_REPO=https://github.com/tarantool/prometheus.git \ LUAROCK_TARANTOOL_PROMETHEUS_TAG=0654304 \ LUAROCK_TARANTOOL_CURL_REPO=https://github.com/tarantool/curl.git \ @@ -219,6 +219,10 @@ RUN set -x \ && git clone $LUAROCK_MYSQL_REPO /rocks/mysql \ && git -C /rocks/mysql checkout $LUAROCK_MYSQL_TAG \ && (cd /rocks/mysql && luarocks make *rockspec) \ + && : "memcached" \ + && git clone $LUAROCK_MEMCACHED_REPO /rocks/memcached \ + && git -C /rocks/memcached checkout $LUAROCK_MEMCACHED_TAG \ + && (cd /rocks/memcached && luarocks make *rockspec) \ && : "prometheus" \ && git clone $LUAROCK_TARANTOOL_PROMETHEUS_REPO /rocks/prometheus \ && git -C /rocks/prometheus checkout $LUAROCK_TARANTOOL_PROMETHEUS_TAG \ From 7765b65bcac07a009567b428bfda9fd6373f8f1a Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Mon, 15 May 2017 10:51:18 +0300 Subject: [PATCH 068/286] Bump tarantool 1.7 version --- 1.7/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1.7/Dockerfile b/1.7/Dockerfile index 1701be4..df79d9e 100644 --- a/1.7/Dockerfile +++ b/1.7/Dockerfile @@ -5,7 +5,7 @@ RUN addgroup -S tarantool \ && adduser -S -G tarantool tarantool \ && apk add --no-cache 'su-exec>=0.2' -ENV TARANTOOL_VERSION=1.7.3-32-g0dd09b1 \ +ENV TARANTOOL_VERSION=1.7.4-0-g927bd9c24 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ From 49fbfaef07f1d6eb7ed5876ad7625d4ed9974f00 Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Mon, 15 May 2017 14:34:53 +0300 Subject: [PATCH 069/286] Bump memcached, pg and mysql --- 1.7/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/1.7/Dockerfile b/1.7/Dockerfile index df79d9e..f56dc47 100644 --- a/1.7/Dockerfile +++ b/1.7/Dockerfile @@ -24,11 +24,11 @@ ENV TARANTOOL_VERSION=1.7.4-0-g927bd9c24 \ LUAROCK_HTTP_REPO=https://github.com/tarantool/http.git \ LUAROCK_HTTP_TAG=67d8a9b \ LUAROCK_PG_REPO=https://github.com/tarantool/pg.git \ - LUAROCK_PG_TAG=43a7130 \ + LUAROCK_PG_TAG=8bb4164 \ LUAROCK_MYSQL_REPO=https://github.com/tarantool/mysql.git \ - LUAROCK_MYSQL_TAG=1c15d30 \ + LUAROCK_MYSQL_TAG=3203633 \ LUAROCK_MEMCACHED_REPO=https://github.com/tarantool/memcached.git \ - LUAROCK_MEMCACHED_TAG=ba18746 \ + LUAROCK_MEMCACHED_TAG=7aa78b2 \ LUAROCK_TARANTOOL_PROMETHEUS_REPO=https://github.com/tarantool/prometheus.git \ LUAROCK_TARANTOOL_PROMETHEUS_TAG=0654304 \ LUAROCK_TARANTOOL_CURL_REPO=https://github.com/tarantool/curl.git \ From 119a6b74eeb02a1f5e9208e9f8390223e6d4192a Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Wed, 17 May 2017 18:22:14 +0300 Subject: [PATCH 070/286] Bump tarantool 1.8 --- 1.8/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1.8/Dockerfile b/1.8/Dockerfile index f8e1603..43d5529 100644 --- a/1.8/Dockerfile +++ b/1.8/Dockerfile @@ -5,7 +5,7 @@ RUN addgroup -S tarantool \ && adduser -S -G tarantool tarantool \ && apk add --no-cache 'su-exec>=0.2' -ENV TARANTOOL_VERSION=1.7.3-682-gdf6de9c17 \ +ENV TARANTOOL_VERSION=1.8.1 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ From ddf50ebd3059bea8d6f1ac5398d566f5e80d0af4 Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Thu, 8 Jun 2017 14:05:56 +0300 Subject: [PATCH 071/286] Bump shard and tarantool version --- 1.7/Dockerfile | 4 ++-- 1.8/Dockerfile | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/1.7/Dockerfile b/1.7/Dockerfile index f56dc47..215cc5b 100644 --- a/1.7/Dockerfile +++ b/1.7/Dockerfile @@ -5,7 +5,7 @@ RUN addgroup -S tarantool \ && adduser -S -G tarantool tarantool \ && apk add --no-cache 'su-exec>=0.2' -ENV TARANTOOL_VERSION=1.7.4-0-g927bd9c24 \ +ENV TARANTOOL_VERSION=1.7.4-105-g9183c1557 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ @@ -20,7 +20,7 @@ ENV TARANTOOL_VERSION=1.7.4-0-g927bd9c24 \ LUAROCK_CONNPOOL_REPO=https://github.com/tarantool/connpool.git \ LUAROCK_CONNPOOL_TAG=685af44 \ LUAROCK_SHARD_REPO=https://github.com/tarantool/shard.git \ - LUAROCK_SHARD_TAG=278b906 \ + LUAROCK_SHARD_TAG=1caf6b8 \ LUAROCK_HTTP_REPO=https://github.com/tarantool/http.git \ LUAROCK_HTTP_TAG=67d8a9b \ LUAROCK_PG_REPO=https://github.com/tarantool/pg.git \ diff --git a/1.8/Dockerfile b/1.8/Dockerfile index 43d5529..af75527 100644 --- a/1.8/Dockerfile +++ b/1.8/Dockerfile @@ -20,7 +20,7 @@ ENV TARANTOOL_VERSION=1.8.1 \ LUAROCK_CONNPOOL_REPO=https://github.com/tarantool/connpool.git \ LUAROCK_CONNPOOL_TAG=685af44 \ LUAROCK_SHARD_REPO=https://github.com/tarantool/shard.git \ - LUAROCK_SHARD_TAG=278b906 \ + LUAROCK_SHARD_TAG=1caf6b8 \ LUAROCK_HTTP_REPO=https://github.com/tarantool/http.git \ LUAROCK_HTTP_TAG=67d8a9b \ LUAROCK_PG_REPO=https://github.com/tarantool/pg.git \ From 0391c90b15b619edf4754aa06780238ee385e5f5 Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Mon, 19 Jun 2017 15:16:57 +0300 Subject: [PATCH 072/286] Add Dockerfile for tarantool 1.7 based on CentOS 7 --- 1.7-centos7/.dockerignore | 0 1.7-centos7/Dockerfile | 303 +++++++++++++++++++++++++++ 1.7-centos7/console | 15 ++ 1.7-centos7/docker-entrypoint.sh | 22 ++ 1.7-centos7/luarocks-config.lua | 11 + 1.7-centos7/mosquitto.repo | 7 + 1.7-centos7/tarantool-entrypoint.lua | 261 +++++++++++++++++++++++ 1.7-centos7/tarantool.default | 22 ++ 1.7-centos7/tarantool_is_up | 41 ++++ 1.7-centos7/tarantool_set_config.lua | 129 ++++++++++++ 10 files changed, 811 insertions(+) create mode 100644 1.7-centos7/.dockerignore create mode 100644 1.7-centos7/Dockerfile create mode 100755 1.7-centos7/console create mode 100755 1.7-centos7/docker-entrypoint.sh create mode 100644 1.7-centos7/luarocks-config.lua create mode 100644 1.7-centos7/mosquitto.repo create mode 100755 1.7-centos7/tarantool-entrypoint.lua create mode 100644 1.7-centos7/tarantool.default create mode 100755 1.7-centos7/tarantool_is_up create mode 100755 1.7-centos7/tarantool_set_config.lua diff --git a/1.7-centos7/.dockerignore b/1.7-centos7/.dockerignore new file mode 100644 index 0000000..e69de29 diff --git a/1.7-centos7/Dockerfile b/1.7-centos7/Dockerfile new file mode 100644 index 0000000..f85026e --- /dev/null +++ b/1.7-centos7/Dockerfile @@ -0,0 +1,303 @@ +FROM centos:7 +MAINTAINER mail@racktear.com + +RUN groupadd tarantool \ + && adduser -g tarantool tarantool + +ENV TARANTOOL_VERSION=1.7.4-105-g9183c1557 \ + TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ + TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ + GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ + GPERFTOOLS_TAG=gperftools-2.5 \ + LUAROCKS_URL=http://keplerproject.github.io/luarocks/releases/luarocks-2.3.0.tar.gz \ + LUAROCK_AVRO_SCHEMA_REPO=https://github.com/tarantool/avro-schema.git \ + LUAROCK_AVRO_SCHEMA_TAG=b49efa8 \ + LUAROCK_EXPIRATIOND_REPO=https://github.com/tarantool/expirationd.git \ + LUAROCK_EXPIRATIOND_TAG=9ec22b6 \ + LUAROCK_QUEUE_REPO=https://github.com/tarantool/queue.git \ + LUAROCK_QUEUE_TAG=24d730c \ + LUAROCK_CONNPOOL_REPO=https://github.com/tarantool/connpool.git \ + LUAROCK_CONNPOOL_TAG=685af44 \ + LUAROCK_SHARD_REPO=https://github.com/tarantool/shard.git \ + LUAROCK_SHARD_TAG=278b906 \ + LUAROCK_HTTP_REPO=https://github.com/tarantool/http.git \ + LUAROCK_HTTP_TAG=67d8a9b \ + LUAROCK_PG_REPO=https://github.com/tarantool/pg.git \ + LUAROCK_PG_TAG=8bb4164 \ + LUAROCK_MYSQL_REPO=https://github.com/tarantool/mysql.git \ + LUAROCK_MYSQL_TAG=3203633 \ + LUAROCK_MEMCACHED_REPO=https://github.com/tarantool/memcached.git \ + LUAROCK_MEMCACHED_TAG=7aa78b2 \ + LUAROCK_TARANTOOL_PROMETHEUS_REPO=https://github.com/tarantool/prometheus.git \ + LUAROCK_TARANTOOL_PROMETHEUS_TAG=0654304 \ + LUAROCK_TARANTOOL_CURL_REPO=https://github.com/tarantool/curl.git \ + LUAROCK_TARANTOOL_CURL_TAG=2.2.7 \ + LUAROCK_MQTT_REPO=https://github.com/tarantool/mqtt.git \ + LUAROCK_MQTT_TAG=238fd2e \ + LUAROCK_TARANTOOL_GIS_REPO=https://github.com/tarantool/gis.git \ + LUAROCK_TARANTOOL_GIS_TAG=25209fc \ + LUAROCK_GPERFTOOLS_REPO=https://github.com/tarantool/gperftools.git \ + LUAROCK_GPERFTOOLS_TAG=12a7ac2 + +RUN yum -y install epel-release && \ + yum -y update && \ + yum -y clean all + +RUN set -x \ + && yum -y install \ + libstdc++ \ + readline \ + openssl \ + yaml \ + lz4 \ + binutils \ + ncurses \ + libgomp \ + lua \ + curl \ + tar \ + zip \ + libunwind \ + && yum -y install \ + perl \ + gcc-c++ \ + cmake \ + readline-devel \ + openssl-devel \ + libyaml-devel \ + lz4-devel \ + binutils-devel \ + ncurses-devel \ + lua-devel \ + make \ + git \ + libunwind-devel \ + autoconf \ + automake \ + libtool \ + go \ + wget \ + && : "---------- gperftools ----------" \ + && mkdir -p /usr/src/gperftools \ + && git clone "$GPERFTOOLS_REPO" /usr/src/gperftools \ + && (cd /usr/src/gperftools; git checkout "$GPERFTOOLS_TAG";) \ + && (cd /usr/src/gperftools; \ + ./autogen.sh; \ + ./configure; \ + make; \ + cp .libs/libprofiler.so* /usr/local/lib;) \ + && (GOPATH=/usr/src/go go get github.com/google/pprof; \ + cp /usr/src/go/bin/pprof /usr/local/bin) \ + && : "---------- tarantool ----------" \ + && mkdir -p /usr/src/tarantool \ + && git clone "$TARANTOOL_DOWNLOAD_URL" /usr/src/tarantool \ + && (cd /usr/src/tarantool; git checkout "$TARANTOOL_VERSION";) \ + && (cd /usr/src/tarantool; git submodule update --init --recursive;) \ + && (cd /usr/src/tarantool; \ + cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo\ + -DENABLE_BUNDLED_LIBYAML:BOOL=OFF\ + -DENABLE_BACKTRACE:BOOL=ON\ + -DENABLE_DIST:BOOL=ON\ + .) \ + && make -C /usr/src/tarantool -j\ + && make -C /usr/src/tarantool install \ + && make -C /usr/src/tarantool clean \ + && : "---------- small ----------" \ + && (cd /usr/src/tarantool/src/lib/small; \ + cmake -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + .) \ + && make -C /usr/src/tarantool/src/lib/small \ + && make -C /usr/src/tarantool/src/lib/small install \ + && make -C /usr/src/tarantool/src/lib/small clean \ + && : "---------- msgpuck ----------" \ + && (cd /usr/src/tarantool/src/lib/msgpuck; \ + cmake -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + .) \ + && make -C /usr/src/tarantool/src/lib/msgpuck \ + && make -C /usr/src/tarantool/src/lib/msgpuck install \ + && make -C /usr/src/tarantool/src/lib/msgpuck clean \ + && : "---------- luarocks ----------" \ + && wget -O luarocks.tar.gz "$LUAROCKS_URL" \ + && mkdir -p /usr/src/luarocks \ + && tar -xzf luarocks.tar.gz -C /usr/src/luarocks --strip-components=1 \ + && (cd /usr/src/luarocks; \ + ./configure; \ + make build; \ + make install) \ + && rm -r /usr/src/luarocks \ + && rm -rf /usr/src/tarantool \ + && rm -rf /usr/src/gperftools \ + && rm -rf /usr/src/go \ + && : "---------- remove build deps ----------" \ + && yum -y remove \ + perl \ + gcc-c++ \ + cmake \ + readline-devel \ + openssl-devel \ + libyaml-devel \ + lz4-devel \ + binutils-devel \ + ncurses-devel \ + lua-devel \ + make \ + git \ + libunwind-devel \ + autoconf \ + automake \ + libtool \ + go \ + wget + +COPY luarocks-config.lua /usr/local/etc/luarocks/config-5.1.lua +COPY mosquitto.repo /etc/yum.repos.d/ + +RUN set -x \ + && yum -y install https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-redhat96-9.6-3.noarch.rpm \ + && yum -y install \ + mariadb-libs \ + postgresql96-libs \ + cyrus-sasl \ + libcurl \ + libmosquitto1 \ + libev \ + proj \ + geos \ + unzip \ + && yum -y install \ + git \ + cmake \ + make \ + gcc-c++ \ + postgresql96-devel \ + lua-devel \ + cyrus-sasl-devel \ + curl-devel \ + libmosquitto-devel \ + libev-devel \ + wget \ + proj-devel \ + geos-devel \ + openssl-devel \ + && mkdir -p /rocks \ + && : "---------- luarocks ----------" \ + && luarocks install lua-term \ + && : "avro" \ + && git clone $LUAROCK_AVRO_SCHEMA_REPO /rocks/avro \ + && (cd /rocks/avro; git checkout $LUAROCK_AVRO_SCHEMA_TAG) \ + && (cd /rocks/avro && luarocks make *rockspec) \ + && : "expirationd" \ + && git clone $LUAROCK_EXPIRATIOND_REPO /rocks/expirationd \ + && (cd /rocks/expirationd; git checkout $LUAROCK_EXPIRATIOND_TAG) \ + && (cd /rocks/expirationd && luarocks make *rockspec) \ + && : "queue" \ + && git clone $LUAROCK_QUEUE_REPO /rocks/queue \ + && (cd /rocks/queue; git checkout $LUAROCK_QUEUE_TAG) \ + && (cd /rocks/queue && luarocks make *rockspec) \ + && : "connpool" \ + && git clone $LUAROCK_CONNPOOL_REPO /rocks/connpool \ + && (cd /rocks/connpool; git checkout $LUAROCK_CONNPOOL_TAG) \ + && (cd /rocks/connpool && luarocks make *rockspec) \ + && : "shard" \ + && git clone $LUAROCK_SHARD_REPO /rocks/shard \ + && (cd /rocks/shard; git checkout $LUAROCK_SHARD_TAG) \ + && (cd /rocks/shard && luarocks make *rockspec) \ + && : "http" \ + && git clone $LUAROCK_HTTP_REPO /rocks/http \ + && (cd /rocks/http; git checkout $LUAROCK_HTTP_TAG) \ + && (cd /rocks/http && luarocks make *rockspec) \ + && : "pg" \ + && git clone $LUAROCK_PG_REPO /rocks/pg \ + && (cd /rocks/pg; git checkout $LUAROCK_PG_TAG) \ + && (cd /rocks/pg && luarocks make *rockspec) \ + && : "mysql" \ + && git clone $LUAROCK_MYSQL_REPO /rocks/mysql \ + && (cd /rocks/mysql; git checkout $LUAROCK_MYSQL_TAG) \ + && (cd /rocks/mysql && luarocks make *rockspec) \ + && : "memcached" \ + && git clone $LUAROCK_MEMCACHED_REPO /rocks/memcached \ + && (cd /rocks/memcached; git checkout $LUAROCK_MEMCACHED_TAG) \ + && (cd /rocks/memcached && luarocks make *rockspec) \ + && : "prometheus" \ + && git clone $LUAROCK_TARANTOOL_PROMETHEUS_REPO /rocks/prometheus \ + && (cd /rocks/prometheus; git checkout $LUAROCK_TARANTOOL_PROMETHEUS_TAG) \ + && (cd /rocks/prometheus && luarocks make *rockspec) \ + && : "curl" \ + && git clone $LUAROCK_TARANTOOL_CURL_REPO /rocks/curl \ + && (cd /rocks/curl; git checkout $LUAROCK_TARANTOOL_CURL_TAG) \ + && (cd /rocks/curl && luarocks make *rockspec) \ + && : "mqtt" \ + && git clone $LUAROCK_MQTT_REPO /rocks/mqtt \ + && (cd /rocks/mqtt; git checkout $LUAROCK_MQTT_TAG) \ + && (cd /rocks/mqtt && luarocks make *rockspec) \ + && : "gis" \ + && git clone $LUAROCK_TARANTOOL_GIS_REPO /rocks/gis \ + && (cd /rocks/gis; git checkout $LUAROCK_TARANTOOL_GIS_TAG) \ + && (cd /rocks/gis && luarocks make *rockspec) \ + && : "gperftools" \ + && git clone $LUAROCK_GPERFTOOLS_REPO /rocks/gperftools \ + && (cd /rocks/gperftools; git checkout $LUAROCK_GPERFTOOLS_TAG) \ + && (cd /rocks/gperftools && luarocks make *rockspec) \ + && : "---------- remove build deps ----------" \ + && rm -rf /rocks \ + && yum -y remove \ + git \ + cmake \ + make \ + gcc-c++ \ + postgresql96-devel \ + lua-devel \ + cyrus-sasl-devel \ + curl-devel \ + libmosquitto-devel \ + libev-devel \ + wget \ + proj-devel \ + geos-devel \ + openssl-devel + + +RUN set -x \ + && : "---------- gosu ----------" \ + && gpg --keyserver pool.sks-keyservers.net --recv-keys \ + B42F6819007F00F88E364FD4036A9C25BF357DD4 \ + && curl -o /usr/local/bin/gosu -SL \ + "https://github.com/tianon/gosu/releases/download/1.2/gosu-amd64" \ + && curl -o /usr/local/bin/gosu.asc -SL \ + "https://github.com/tianon/gosu/releases/download/1.2/gosu-amd64.asc" \ + && gpg --verify /usr/local/bin/gosu.asc \ + && rm /usr/local/bin/gosu.asc \ + && rm -r /root/.gnupg/ \ + && chmod +x /usr/local/bin/gosu + + +RUN mkdir -p /var/lib/tarantool \ + && chown tarantool:tarantool /var/lib/tarantool \ + && mkdir -p /opt/tarantool \ + && chown tarantool:tarantool /opt/tarantool \ + && mkdir -p /var/run/tarantool \ + && chown tarantool:tarantool /var/run/tarantool \ + && mkdir /etc/tarantool \ + && chown tarantool:tarantool /etc/tarantool + +VOLUME /var/lib/tarantool +WORKDIR /opt/tarantool + +COPY tarantool-entrypoint.lua /usr/local/bin/ +COPY tarantool_set_config.lua /usr/local/bin/ +COPY docker-entrypoint.sh /usr/local/bin/ +COPY console /usr/local/bin/ +COPY tarantool_is_up /usr/local/bin/ +COPY tarantool.default /usr/local/etc/default/tarantool + +RUN ln -s usr/local/bin/docker-entrypoint.sh /entrypoint.sh # backwards compat +ENTRYPOINT ["docker-entrypoint.sh"] + +HEALTHCHECK CMD tarantool_is_up + +EXPOSE 3301 +CMD [ "tarantool" ] diff --git a/1.7-centos7/console b/1.7-centos7/console new file mode 100755 index 0000000..d6fb192 --- /dev/null +++ b/1.7-centos7/console @@ -0,0 +1,15 @@ +#!/usr/bin/env tarantool + +local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' + +console = require('console') +console.on_start(function(self) + local status, reason + status, reason = pcall(function() require('console').connect(CONSOLE_SOCKET_PATH) end) + if not status then + self:print(reason) + self.running = false + end +end) +console.on_client_disconnect(function(self) self.running = false end) +console.start() diff --git a/1.7-centos7/docker-entrypoint.sh b/1.7-centos7/docker-entrypoint.sh new file mode 100755 index 0000000..6d48fdd --- /dev/null +++ b/1.7-centos7/docker-entrypoint.sh @@ -0,0 +1,22 @@ +#!/bin/sh +set -e + +# first arg is `-f` or `--some-option` +# or first arg is `something.conf` +if [ "${1:0:1}" = '-' ]; then + set -- tarantool "$@" +fi + +# allow the container to be started with `--user` +if [ "$1" = 'tarantool' -a "$(id -u)" = '0' ]; then + chown -R tarantool /var/lib/tarantool + exec gosu tarantool "$0" "$@" +fi + +# entry point wraps the passed script to do basic setup +if [ "$1" = 'tarantool' ]; then + shift + exec tarantool "/usr/local/bin/tarantool-entrypoint.lua" "$@" +fi + +exec "$@" diff --git a/1.7-centos7/luarocks-config.lua b/1.7-centos7/luarocks-config.lua new file mode 100644 index 0000000..4c48b74 --- /dev/null +++ b/1.7-centos7/luarocks-config.lua @@ -0,0 +1,11 @@ +rocks_trees = { + { name = [[user]], root = home..[[/.luarocks]] }, + { name = [[system]], root = [[/usr/local]] } +} + +lib_modules_path="/lib64/lua/"..lua_version + +rocks_servers = { + [[http://rocks.tarantool.org/]], + [[http://luarocks.org/repositories/rocks]] +} diff --git a/1.7-centos7/mosquitto.repo b/1.7-centos7/mosquitto.repo new file mode 100644 index 0000000..4df10dc --- /dev/null +++ b/1.7-centos7/mosquitto.repo @@ -0,0 +1,7 @@ +[home_oojah_mqtt] +name=mqtt (CentOS_CentOS-7) +type=rpm-md +baseurl=http://download.opensuse.org/repositories/home:/oojah:/mqtt/CentOS_CentOS-7/ +gpgcheck=1 +gpgkey=http://download.opensuse.org/repositories/home:/oojah:/mqtt/CentOS_CentOS-7//repodata/repomd.xml.key +enabled=1 \ No newline at end of file diff --git a/1.7-centos7/tarantool-entrypoint.lua b/1.7-centos7/tarantool-entrypoint.lua new file mode 100755 index 0000000..a71ec17 --- /dev/null +++ b/1.7-centos7/tarantool-entrypoint.lua @@ -0,0 +1,261 @@ +#!/usr/bin/env tarantool + +local fio = require('fio') +local errno = require('errno') +local fun = require('fun') +local urilib = require('uri') +local console = require('console') +local term = require('term') +local log = require('log') +local yaml = require('yaml') + +local TARANTOOL_DEFAULT_PORT = 3301 +local TARANTOOL_DEFAULT_SNAPSHOT_PERIOD = 3600 -- seconds +local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' +local CFG_FILE_PATH = '/etc/tarantool/config.yml' + + +local orig_cfg = box.cfg + +local function read_config() + local f = io.open(CFG_FILE_PATH, "rb") + if f == nil then + log.error("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) + os.exit(1) + end + local content = f:read("*all") + f:close() + return yaml.decode(content) +end + +local function write_config(cfg) + local f = io.open(CFG_FILE_PATH, "w+") + if f == nil then + print("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) + os.exit(1) + end + local content = yaml.encode(cfg) + f:write(content) + f:close() +end + +local function parse_replication_source(replication_source, user_name, user_password) + if replication_source == nil then + return nil + end + + local replication_source_table = {} + for uri in string.gmatch(replication_source, "[^,]+") do + local parsed_uri = urilib.parse(uri) + if parsed_uri == nil then + error("Incorrect replication source URI format: '"..uri.."'") + end + local host = parsed_uri.host + local port = parsed_uri.service or TARANTOOL_DEFAULT_PORT + local user = parsed_uri.login or user_name + local password = parsed_uri.password or user_password + + if user == 'guest' or user == nil then + replication_source = string.format("%s:%s", host, port) + elseif password == nil then + replication_source = string.format("%s:@%s:%s", user, host, port) + else + replication_source = string.format("%s:%s@%s:%s", user, password, + host, port) + end + + table.insert(replication_source_table, replication_source) + end + + return replication_source_table +end + +function set_replication_source(replication_source, user_name, user_password) + local replication_source_table = + parse_replication_source(replication_source, user_name, user_password) + box.cfg{replication_source = replication_source_table} + + log.info("Updated box.cfg{replication_source} to "..replication_source) +end + +local function create_user(user_name, user_password) + if user_name ~= 'guest' and user_password == nil then + user_password = "" + + local warn_str = [[**************************************************** +WARNING: No password has been set for the database. + This will allow anyone with access to the + Tarantool port to access your database. In + Docker's default configuration, this is + effectively any other container on the same + system. + Use "-e TARANTOOL_USER_PASSWORD=password" + to set it in "docker run". +****************************************************]] + log.warn('\n'..warn_str) + end + + if user_name == 'guest' and user_password == nil then + local warn_str = [[**************************************************** +WARNING: 'guest' is chosen as primary user. + Since it is not allowed to set a password for + guest user, your instance will be accessible + by anyone having direct access to the Tarantool + port. + If you wanted to create an authenticated user, + specify "-e TARANTOOL_USER_NAME=username" and + pick a user name other than "guest". +****************************************************]] + log.warn('\n'..warn_str) + end + + if user_name == 'guest' and user_password ~= nil then + user_password = nil + + local warn_str = [[**************************************************** +WARNING: A password for guest user has been specified. + In Tarantool, guest user can't have a password + and is always allowed to login, if it has + enough privileges. + If you wanted to create an authenticated user, + specify "-e TARANTOOL_USER_NAME=username" and + pick a user name other than "guest". +****************************************************]] + log.warn('\n'..warn_str) + end + + if user_name ~= 'admin' and user_name ~= 'guest' then + if not box.schema.user.exists(user_name) then + log.info("Creating user '%s'", user_name) + box.schema.user.create(user_name) + end + end + + if user_name ~= 'admin' then + log.info("Granting admin privileges to user '%s'", user_name) + box.schema.user.grant(user_name, 'read,write,execute', + 'universe', nil, {if_not_exists = true}) + box.schema.user.grant(user_name, 'replication', + nil, nil, {if_not_exists = true}) + end + + if user_name ~= 'guest' then + log.info("Setting password for user '%s'", user_name) + box.schema.user.passwd(user_name, user_password) + end +end + +function set_credentials(user_name, user_password) + create_user(user_name, user_password) +end + +local function wrapper_cfg(override) + local work_dir = '/var/lib/tarantool' + local snap_filename = "*.snap" + local snap_path = work_dir..'/'..snap_filename + + local first_run = false + if next(fio.glob(snap_path)) == nil then + first_run = true + end + + + local file_cfg = {} + local config_file_exists = fio.stat(CFG_FILE_PATH) ~= nil + if not config_file_exists then + log.info("Creating configuration file: " .. CFG_FILE_PATH) + + file_cfg.TARANTOOL_USER_NAME = os.getenv('TARANTOOL_USER_NAME') + file_cfg.TARANTOOL_USER_PASSWORD = os.getenv('TARANTOOL_USER_PASSWORD') + file_cfg.TARANTOOL_SLAB_ALLOC_ARENA = os.getenv('TARANTOOL_SLAB_ALLOC_ARENA') + file_cfg.TARANTOOL_SLAB_ALLOC_FACTOR = os.getenv('TARANTOOL_SLAB_ALLOC_FACTOR') + file_cfg.TARANTOOL_SLAB_ALLOC_MINIMAL = os.getenv('TARANTOOL_SLAB_ALLOC_MINIMAL') + file_cfg.TARANTOOL_SLAB_ALLOC_MAXIMAL = os.getenv('TARANTOOL_SLAB_ALLOC_MAXIMAL') + file_cfg.TARANTOOL_PORT = os.getenv('TARANTOOL_PORT') + file_cfg.TARANTOOL_WAL_MODE = os.getenv('TARANTOOL_WAL_MODE') + file_cfg.TARANTOOL_REPLICATION_SOURCE = os.getenv('TARANTOOL_REPLICATION_SOURCE') + file_cfg.TARANTOOL_SNAPSHOT_PERIOD = os.getenv('TARANTOOL_SNAPSHOT_PERIOD') + + write_config(file_cfg) + else + log.info("Loading existing configuration file: " .. CFG_FILE_PATH) + + file_cfg = read_config() + end + + local user_name = file_cfg.TARANTOOL_USER_NAME or + os.getenv('TARANTOOL_USER_NAME') or 'guest' + local user_password = file_cfg.TARANTOOL_USER_PASSWORD or + os.getenv('TARANTOOL_USER_PASSWORD') + + + local cfg = override or {} + cfg.slab_alloc_arena = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_ARENA) or + override.slab_alloc_arena + cfg.slab_alloc_factor = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_FACTOR) or + override.slab_alloc_factor + cfg.slab_alloc_maximal = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_MAXIMAL) or + override.slab_alloc_maximal + cfg.slab_alloc_minimal = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_MINIMAL) or + override.slab_alloc_minimal + cfg.listen = tonumber(file_cfg.TARANTOOL_PORT) or + override.listen or TARANTOOL_DEFAULT_PORT + cfg.wal_mode = file_cfg.TARANTOOL_WAL_MODE or + override.wal_mode + cfg.snapshot_period = tonumber(file_cfg.TARANTOOL_SNAPSHOT_PERIOD) or + override.snapshot_period or TARANTOOL_DEFAULT_SNAPSHOT_PERIOD + + cfg.wal_dir = override.wal_dir or '/var/lib/tarantool' + cfg.snap_dir = override.snap_dir or '/var/lib/tarantool' + cfg.pid_file = override.pid_file or '/var/run/tarantool/tarantool.pid' + + local replication_source = file_cfg.TARANTOOL_REPLICATION_SOURCE + local replication_source_table = parse_replication_source(replication_source, + user_name, + user_password) + + if replication_source then + cfg.replication_source = replication_source_table + else + cfg.replication_source = override.replication_source + end + + log.info("Config:\n" .. yaml.encode(cfg)) + + orig_cfg(cfg) + + box.once('tarantool-entrypoint', function () + if first_run then + log.info("Initializing database") + + create_user(user_name, user_password) + end + end) + + console.listen(CONSOLE_SOCKET_PATH) + +end + +box.cfg = wrapper_cfg + +-- re-run the script passed as parameter with all arguments that follow +execute_script = arg[1] +if execute_script == nil then + box.cfg {} + + if term.isatty(io.stdout) then + console.start() + os.exit(0) + end +else + narg = 0 + while true do + arg[narg] = arg[narg + 1] + if arg[narg] == nil then + break + end + narg = narg + 1 + end + + dofile(execute_script) +end diff --git a/1.7-centos7/tarantool.default b/1.7-centos7/tarantool.default new file mode 100644 index 0000000..fffe3b0 --- /dev/null +++ b/1.7-centos7/tarantool.default @@ -0,0 +1,22 @@ +-- +-- System-wide settings for tarantoolctl and init scripts +-- +-- This file is meant to enable the usage of tarantoolctl inside +-- docker containers. Since there is no init system, most of its +-- functionality will not work, except 'tarantoolctl enter' or +-- 'tarantoolctl status'. +-- + +default_cfg = { + pid_file = "/var/run/tarantool", -- /var/run/tarantool/${INSTANCE}.pid + wal_dir = "/var/lib/tarantool", -- /var/lib/tarantool/${INSTANCE}/ + snap_dir = "/var/lib/tarantool", -- /var/lib/tarantool/${INSTANCE} + vinyl_dir = "/var/lib/tarantool", -- /var/lib/tarantool/${INSTANCE} + logger = "/var/log/tarantool", -- /var/log/tarantool/${INSTANCE}.log + username = "tarantool", +} + +-- instances.available - all available instances +-- instances.enabled - instances to autostart by sysvinit +instance_dir = "/usr/local/etc/tarantool/instances.enabled" +-- vim: set ft=lua : diff --git a/1.7-centos7/tarantool_is_up b/1.7-centos7/tarantool_is_up new file mode 100755 index 0000000..71148d5 --- /dev/null +++ b/1.7-centos7/tarantool_is_up @@ -0,0 +1,41 @@ +#!/bin/sh + +status=$( (tarantool <<-'EOF' +local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' +local console = require('console') +local os = require("os") +local yaml = require("yaml") + +console.on_start(function(self) + local status, reason + status, reason = pcall(function() require('console').connect(CONSOLE_SOCKET_PATH) end) + if not status then + self:print(reason) + os.exit(1) + end + + cmd = 'box.info.status' + local res = self:eval(cmd) + if res ~= nil then + res = yaml.decode(res) + print(res[1]) + end + + os.exit(0) +end) + +console.on_client_disconnect(function(self) self.running = false end) +console.start() + +os.exit(0) +EOF +) 2>/dev/null) + + +echo "$status" + +if [ "$status" = "running" ]; then + exit 0 +else + exit 1 +fi diff --git a/1.7-centos7/tarantool_set_config.lua b/1.7-centos7/tarantool_set_config.lua new file mode 100755 index 0000000..f6b2a55 --- /dev/null +++ b/1.7-centos7/tarantool_set_config.lua @@ -0,0 +1,129 @@ +#!/usr/bin/env tarantool + +local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' +local CFG_FILE_PATH = '/etc/tarantool/config.yml' + +local fio = require('fio') +local yaml = require('yaml') +local console = require('console') +local errno = require('errno') + +local function read_config() + local f = io.open(CFG_FILE_PATH, "rb") + if f == nil then + print("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) + os.exit(1) + end + local content = f:read("*all") + f:close() + return yaml.decode(content) +end + +local function write_config(cfg) + local f = io.open(CFG_FILE_PATH, "w+") + if f == nil then + print("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) + os.exit(1) + end + local content = yaml.encode(cfg) + f:write(content) + f:close() +end + +local function nop(console, cfg, value) +end + +local function update_replication_source(console, cfg, value) + local user_name = "nil" + if cfg['TARANTOOL_USER_NAME'] then + user_name = "'" .. cfg['TARANTOOL_USER_NAME'] .. "'" + end + + local user_password = "nil" + if cfg['TARANTOOL_USER_PASSWORD'] then + user_password = "'" .. cfg['TARANTOOL_USER_PASSWORD'] .. "'" + end + + local cmd = "set_replication_source('"..value.."', " .. user_name .. "," .. user_password .. ")" + print("cmd: ", cmd) + + local res = console:eval(cmd) + + if res ~= nil then + print(res) + end +end + +local function update_credentials(console, cfg, value) + local user_name = "nil" + if cfg['TARANTOOL_USER_NAME'] then + user_name = "'" .. cfg['TARANTOOL_USER_NAME'] .. "'" + end + + local user_password = "nil" + if cfg['TARANTOOL_USER_PASSWORD'] then + user_password = "'" .. cfg['TARANTOOL_USER_PASSWORD'] .. "'" + end + + local cmd = "set_credentials(" .. user_name .. "," .. user_password .. ")" + + local res = console:eval(cmd) + + if res ~= nil then + print(res) + end + + local replication_source = cfg['TARANTOOL_REPLICATION_SOURCE'] + + if replication_source ~= nil then + update_replication_source(console, cfg, replication_source) + end +end + + +local vars = { + TARANTOOL_SLAB_ALLOC_ARENA=nop, + TARANTOOL_SLAB_ALLOC_FACTOR=nop, + TARANTOOL_SLAB_ALLOC_MAXIMAL=nop, + TARANTOOL_SLAB_ALLOC_MINIMAL=nop, + TARANTOOL_PORT=nop, + TARANTOOL_WAL_MODE=nop, + TARANTOOL_USER_NAME=update_credentials, + TARANTOOL_USER_PASSWORD=update_credentials, + TARANTOOL_REPLICATION_SOURCE=update_replication_source +} + +console.on_start(function(self) + local status, reason + status, reason = pcall(function() require('console').connect(CONSOLE_SOCKET_PATH) end) + if not status then + self:print(reason) + os.exit(1) + end + + if arg[1] == nil or arg[2] == nil then + self:print("Usage: " .. arg[0] .. " ") + os.exit(1) + end + + if vars[arg[1]] == nil then + self:print("Unknown var: " .. arg[1]) + os.exit(1) + end + + local cfg = read_config() + cfg[arg[1]] = arg[2] + + local func = vars[arg[1]] + func(self, cfg, arg[2]) + + write_config(cfg) + + self.running = false + os.exit(0) +end) + +console.on_client_disconnect(function(self) self.running = false end) +console.start() + +os.exit(0) From 4aa31a91797823db8805e18bb36690ec50376b2e Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Tue, 20 Jun 2017 12:27:45 +0300 Subject: [PATCH 073/286] Bump sharding module version --- 1.7-centos7/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1.7-centos7/Dockerfile b/1.7-centos7/Dockerfile index f85026e..565fcff 100644 --- a/1.7-centos7/Dockerfile +++ b/1.7-centos7/Dockerfile @@ -19,7 +19,7 @@ ENV TARANTOOL_VERSION=1.7.4-105-g9183c1557 \ LUAROCK_CONNPOOL_REPO=https://github.com/tarantool/connpool.git \ LUAROCK_CONNPOOL_TAG=685af44 \ LUAROCK_SHARD_REPO=https://github.com/tarantool/shard.git \ - LUAROCK_SHARD_TAG=278b906 \ + LUAROCK_SHARD_TAG=1caf6b8 \ LUAROCK_HTTP_REPO=https://github.com/tarantool/http.git \ LUAROCK_HTTP_TAG=67d8a9b \ LUAROCK_PG_REPO=https://github.com/tarantool/pg.git \ From c69b848e5c61bcbbc0113bb28ef2d87124a606d0 Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Fri, 30 Jun 2017 13:53:22 +0300 Subject: [PATCH 074/286] Trim the size of 1.7-centos7 image --- 1.7-centos7/Dockerfile | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/1.7-centos7/Dockerfile b/1.7-centos7/Dockerfile index 565fcff..d7f472f 100644 --- a/1.7-centos7/Dockerfile +++ b/1.7-centos7/Dockerfile @@ -4,7 +4,7 @@ MAINTAINER mail@racktear.com RUN groupadd tarantool \ && adduser -g tarantool tarantool -ENV TARANTOOL_VERSION=1.7.4-105-g9183c1557 \ +ENV TARANTOOL_VERSION=1.7.4-224-g246a89efd \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ @@ -58,6 +58,7 @@ RUN set -x \ tar \ zip \ libunwind \ + libcurl \ && yum -y install \ perl \ gcc-c++ \ @@ -77,6 +78,7 @@ RUN set -x \ libtool \ go \ wget \ + curl-devel \ && : "---------- gperftools ----------" \ && mkdir -p /usr/src/gperftools \ && git clone "$GPERFTOOLS_REPO" /usr/src/gperftools \ @@ -151,7 +153,14 @@ RUN set -x \ automake \ libtool \ go \ - wget + wget \ + perl \ + kernel-headers \ + golang-src \ + curl-devel \ + && rpm -qa | grep devel | xargs yum -y remove \ + && rm -rf /var/cache/yum + COPY luarocks-config.lua /usr/local/etc/luarocks/config-5.1.lua COPY mosquitto.repo /etc/yum.repos.d/ @@ -258,7 +267,12 @@ RUN set -x \ wget \ proj-devel \ geos-devel \ - openssl-devel + openssl-devel \ + perl \ + kernel-headers \ + golang-src \ + && rpm -qa | grep devel | xargs yum -y remove \ + && rm -rf /var/cache/yum RUN set -x \ From 5ef6e8f724e8ba62ccf91fdc4f6f8d66cb1173b8 Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Fri, 7 Jul 2017 14:20:07 +0300 Subject: [PATCH 075/286] Bump tarantool 1.7 version --- 1.7/Dockerfile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/1.7/Dockerfile b/1.7/Dockerfile index 215cc5b..7ada7cc 100644 --- a/1.7/Dockerfile +++ b/1.7/Dockerfile @@ -5,7 +5,7 @@ RUN addgroup -S tarantool \ && adduser -S -G tarantool tarantool \ && apk add --no-cache 'su-exec>=0.2' -ENV TARANTOOL_VERSION=1.7.4-105-g9183c1557 \ +ENV TARANTOOL_VERSION=1.7.4-224-g246a89efd \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ @@ -46,7 +46,7 @@ RUN set -x \ && apk add --no-cache --virtual .run-deps \ libstdc++ \ readline \ - openssl \ + libressl \ yaml \ lz4 \ binutils \ @@ -57,13 +57,14 @@ RUN set -x \ tar \ zip \ libunwind \ + libcurl \ && apk add --no-cache --virtual .build-deps \ perl \ gcc \ g++ \ cmake \ readline-dev \ - openssl-dev \ + libressl-dev \ yaml-dev \ lz4-dev \ binutils-dev \ @@ -78,6 +79,7 @@ RUN set -x \ libtool \ linux-headers \ go \ + curl-dev \ && : "---------- gperftools ----------" \ && mkdir -p /usr/src/gperftools \ && git clone "$GPERFTOOLS_REPO" /usr/src/gperftools \ @@ -145,7 +147,6 @@ RUN set -x \ mariadb-client-libs \ libpq \ cyrus-sasl \ - libcurl \ mosquitto-libs \ libev \ && apk add --no-cache --virtual .build-deps \ From dcde94f8e2a1c4b3b7b6328fbc2e6bf2ddce194e Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Fri, 7 Jul 2017 19:14:53 +0300 Subject: [PATCH 076/286] Bump tarantool 1.7 version --- 1.7/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1.7/Dockerfile b/1.7/Dockerfile index 7ada7cc..080c667 100644 --- a/1.7/Dockerfile +++ b/1.7/Dockerfile @@ -5,7 +5,7 @@ RUN addgroup -S tarantool \ && adduser -S -G tarantool tarantool \ && apk add --no-cache 'su-exec>=0.2' -ENV TARANTOOL_VERSION=1.7.4-224-g246a89efd \ +ENV TARANTOOL_VERSION=1.7.4-248-g212cab57a \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ From 5428f370bf33f054121b15d1487c56631b81744d Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Thu, 13 Jul 2017 15:52:23 +0300 Subject: [PATCH 077/286] Bump tarantool 1.8 version --- 1.8/Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/1.8/Dockerfile b/1.8/Dockerfile index af75527..838d96d 100644 --- a/1.8/Dockerfile +++ b/1.8/Dockerfile @@ -5,7 +5,7 @@ RUN addgroup -S tarantool \ && adduser -S -G tarantool tarantool \ && apk add --no-cache 'su-exec>=0.2' -ENV TARANTOOL_VERSION=1.8.1 \ +ENV TARANTOOL_VERSION=1.8.1-355-g0a4a5315b \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ @@ -57,6 +57,7 @@ RUN set -x \ tar \ zip \ libunwind \ + libcurl \ && apk add --no-cache --virtual .build-deps \ perl \ gcc \ @@ -79,6 +80,7 @@ RUN set -x \ linux-headers \ go \ tcl \ + curl-dev \ && : "---------- gperftools ----------" \ && mkdir -p /usr/src/gperftools \ && git clone "$GPERFTOOLS_REPO" /usr/src/gperftools \ From 5757a5229289c38fb52363063a0efbff3cf1a843 Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Thu, 13 Jul 2017 15:52:49 +0300 Subject: [PATCH 078/286] Bump connpool and shard modules --- 1.7-centos7/Dockerfile | 4 ++-- 1.7/Dockerfile | 4 ++-- 1.8/Dockerfile | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/1.7-centos7/Dockerfile b/1.7-centos7/Dockerfile index d7f472f..8f8210a 100644 --- a/1.7-centos7/Dockerfile +++ b/1.7-centos7/Dockerfile @@ -17,9 +17,9 @@ ENV TARANTOOL_VERSION=1.7.4-224-g246a89efd \ LUAROCK_QUEUE_REPO=https://github.com/tarantool/queue.git \ LUAROCK_QUEUE_TAG=24d730c \ LUAROCK_CONNPOOL_REPO=https://github.com/tarantool/connpool.git \ - LUAROCK_CONNPOOL_TAG=685af44 \ + LUAROCK_CONNPOOL_TAG=e9551fb \ LUAROCK_SHARD_REPO=https://github.com/tarantool/shard.git \ - LUAROCK_SHARD_TAG=1caf6b8 \ + LUAROCK_SHARD_TAG=8f8c5a7 \ LUAROCK_HTTP_REPO=https://github.com/tarantool/http.git \ LUAROCK_HTTP_TAG=67d8a9b \ LUAROCK_PG_REPO=https://github.com/tarantool/pg.git \ diff --git a/1.7/Dockerfile b/1.7/Dockerfile index 080c667..71d6956 100644 --- a/1.7/Dockerfile +++ b/1.7/Dockerfile @@ -18,9 +18,9 @@ ENV TARANTOOL_VERSION=1.7.4-248-g212cab57a \ LUAROCK_QUEUE_REPO=https://github.com/tarantool/queue.git \ LUAROCK_QUEUE_TAG=24d730c \ LUAROCK_CONNPOOL_REPO=https://github.com/tarantool/connpool.git \ - LUAROCK_CONNPOOL_TAG=685af44 \ + LUAROCK_CONNPOOL_TAG=e9551fb \ LUAROCK_SHARD_REPO=https://github.com/tarantool/shard.git \ - LUAROCK_SHARD_TAG=1caf6b8 \ + LUAROCK_SHARD_TAG=8f8c5a7 \ LUAROCK_HTTP_REPO=https://github.com/tarantool/http.git \ LUAROCK_HTTP_TAG=67d8a9b \ LUAROCK_PG_REPO=https://github.com/tarantool/pg.git \ diff --git a/1.8/Dockerfile b/1.8/Dockerfile index 838d96d..aa7293b 100644 --- a/1.8/Dockerfile +++ b/1.8/Dockerfile @@ -18,9 +18,9 @@ ENV TARANTOOL_VERSION=1.8.1-355-g0a4a5315b \ LUAROCK_QUEUE_REPO=https://github.com/tarantool/queue.git \ LUAROCK_QUEUE_TAG=24d730c \ LUAROCK_CONNPOOL_REPO=https://github.com/tarantool/connpool.git \ - LUAROCK_CONNPOOL_TAG=685af44 \ + LUAROCK_CONNPOOL_TAG=e9551fb \ LUAROCK_SHARD_REPO=https://github.com/tarantool/shard.git \ - LUAROCK_SHARD_TAG=1caf6b8 \ + LUAROCK_SHARD_TAG=8f8c5a7 \ LUAROCK_HTTP_REPO=https://github.com/tarantool/http.git \ LUAROCK_HTTP_TAG=67d8a9b \ LUAROCK_PG_REPO=https://github.com/tarantool/pg.git \ From 3843e30c7c6d81f1ac80b7c826342066014b6ba8 Mon Sep 17 00:00:00 2001 From: Roman Tsisyk Date: Fri, 14 Jul 2017 16:50:23 +0300 Subject: [PATCH 079/286] Bump Tarantool 1.7-centos7 version A new Tarantool version needed for the Oracle connector. --- 1.7-centos7/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1.7-centos7/Dockerfile b/1.7-centos7/Dockerfile index 8f8210a..27d222c 100644 --- a/1.7-centos7/Dockerfile +++ b/1.7-centos7/Dockerfile @@ -4,7 +4,7 @@ MAINTAINER mail@racktear.com RUN groupadd tarantool \ && adduser -g tarantool tarantool -ENV TARANTOOL_VERSION=1.7.4-224-g246a89efd \ +ENV TARANTOOL_VERSION=1.7.4-294-g54d06d7bf \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ From 9ed52b1ed04abf93323fe53a843e6e3c6fcd145d Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Fri, 14 Jul 2017 18:43:01 +0300 Subject: [PATCH 080/286] Set vinyl_dir to /var/lib/tarantool --- 1.7-centos7/tarantool-entrypoint.lua | 1 + 1.7/tarantool-entrypoint.lua | 1 + 1.8/tarantool-entrypoint.lua | 1 + 3 files changed, 3 insertions(+) diff --git a/1.7-centos7/tarantool-entrypoint.lua b/1.7-centos7/tarantool-entrypoint.lua index a71ec17..a925d31 100755 --- a/1.7-centos7/tarantool-entrypoint.lua +++ b/1.7-centos7/tarantool-entrypoint.lua @@ -207,6 +207,7 @@ local function wrapper_cfg(override) cfg.wal_dir = override.wal_dir or '/var/lib/tarantool' cfg.snap_dir = override.snap_dir or '/var/lib/tarantool' + cfg.vinyl_dir = override.vinyl_dir or '/var/lib/tarantool' cfg.pid_file = override.pid_file or '/var/run/tarantool/tarantool.pid' local replication_source = file_cfg.TARANTOOL_REPLICATION_SOURCE diff --git a/1.7/tarantool-entrypoint.lua b/1.7/tarantool-entrypoint.lua index a71ec17..a925d31 100755 --- a/1.7/tarantool-entrypoint.lua +++ b/1.7/tarantool-entrypoint.lua @@ -207,6 +207,7 @@ local function wrapper_cfg(override) cfg.wal_dir = override.wal_dir or '/var/lib/tarantool' cfg.snap_dir = override.snap_dir or '/var/lib/tarantool' + cfg.vinyl_dir = override.vinyl_dir or '/var/lib/tarantool' cfg.pid_file = override.pid_file or '/var/run/tarantool/tarantool.pid' local replication_source = file_cfg.TARANTOOL_REPLICATION_SOURCE diff --git a/1.8/tarantool-entrypoint.lua b/1.8/tarantool-entrypoint.lua index a71ec17..a925d31 100755 --- a/1.8/tarantool-entrypoint.lua +++ b/1.8/tarantool-entrypoint.lua @@ -207,6 +207,7 @@ local function wrapper_cfg(override) cfg.wal_dir = override.wal_dir or '/var/lib/tarantool' cfg.snap_dir = override.snap_dir or '/var/lib/tarantool' + cfg.vinyl_dir = override.vinyl_dir or '/var/lib/tarantool' cfg.pid_file = override.pid_file or '/var/run/tarantool/tarantool.pid' local replication_source = file_cfg.TARANTOOL_REPLICATION_SOURCE From 27b427c4835bfd0a72ca4d2f8cf26c5c25acf8a3 Mon Sep 17 00:00:00 2001 From: Roman Tsisyk Date: Mon, 17 Jul 2017 10:07:33 +0300 Subject: [PATCH 081/286] Bump Tarantool 1.7-centos7 version --- 1.7-centos7/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1.7-centos7/Dockerfile b/1.7-centos7/Dockerfile index 27d222c..ba3e2cb 100644 --- a/1.7-centos7/Dockerfile +++ b/1.7-centos7/Dockerfile @@ -4,7 +4,7 @@ MAINTAINER mail@racktear.com RUN groupadd tarantool \ && adduser -g tarantool tarantool -ENV TARANTOOL_VERSION=1.7.4-294-g54d06d7bf \ +ENV TARANTOOL_VERSION=1.7.4-298-g5a8243d53 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ From 27cab3b31efb51203d5b87252b6e56e45811e51f Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Mon, 17 Jul 2017 12:35:10 +0300 Subject: [PATCH 082/286] Bump connpool version --- 1.7-centos7/Dockerfile | 2 +- 1.7/Dockerfile | 2 +- 1.8/Dockerfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/1.7-centos7/Dockerfile b/1.7-centos7/Dockerfile index ba3e2cb..3fd49d5 100644 --- a/1.7-centos7/Dockerfile +++ b/1.7-centos7/Dockerfile @@ -17,7 +17,7 @@ ENV TARANTOOL_VERSION=1.7.4-298-g5a8243d53 \ LUAROCK_QUEUE_REPO=https://github.com/tarantool/queue.git \ LUAROCK_QUEUE_TAG=24d730c \ LUAROCK_CONNPOOL_REPO=https://github.com/tarantool/connpool.git \ - LUAROCK_CONNPOOL_TAG=e9551fb \ + LUAROCK_CONNPOOL_TAG=89c2fe4 \ LUAROCK_SHARD_REPO=https://github.com/tarantool/shard.git \ LUAROCK_SHARD_TAG=8f8c5a7 \ LUAROCK_HTTP_REPO=https://github.com/tarantool/http.git \ diff --git a/1.7/Dockerfile b/1.7/Dockerfile index 71d6956..15f1dc2 100644 --- a/1.7/Dockerfile +++ b/1.7/Dockerfile @@ -18,7 +18,7 @@ ENV TARANTOOL_VERSION=1.7.4-248-g212cab57a \ LUAROCK_QUEUE_REPO=https://github.com/tarantool/queue.git \ LUAROCK_QUEUE_TAG=24d730c \ LUAROCK_CONNPOOL_REPO=https://github.com/tarantool/connpool.git \ - LUAROCK_CONNPOOL_TAG=e9551fb \ + LUAROCK_CONNPOOL_TAG=89c2fe4 \ LUAROCK_SHARD_REPO=https://github.com/tarantool/shard.git \ LUAROCK_SHARD_TAG=8f8c5a7 \ LUAROCK_HTTP_REPO=https://github.com/tarantool/http.git \ diff --git a/1.8/Dockerfile b/1.8/Dockerfile index aa7293b..aba6732 100644 --- a/1.8/Dockerfile +++ b/1.8/Dockerfile @@ -18,7 +18,7 @@ ENV TARANTOOL_VERSION=1.8.1-355-g0a4a5315b \ LUAROCK_QUEUE_REPO=https://github.com/tarantool/queue.git \ LUAROCK_QUEUE_TAG=24d730c \ LUAROCK_CONNPOOL_REPO=https://github.com/tarantool/connpool.git \ - LUAROCK_CONNPOOL_TAG=e9551fb \ + LUAROCK_CONNPOOL_TAG=89c2fe4 \ LUAROCK_SHARD_REPO=https://github.com/tarantool/shard.git \ LUAROCK_SHARD_TAG=8f8c5a7 \ LUAROCK_HTTP_REPO=https://github.com/tarantool/http.git \ From be4afeedd5983af95486bb2c938de70ffed18ee2 Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Mon, 24 Jul 2017 18:39:34 +0300 Subject: [PATCH 083/286] Bump tarantool 1.7 and 1.8 --- 1.7-centos7/Dockerfile | 2 +- 1.7/Dockerfile | 2 +- 1.8/Dockerfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/1.7-centos7/Dockerfile b/1.7-centos7/Dockerfile index 3fd49d5..28b516d 100644 --- a/1.7-centos7/Dockerfile +++ b/1.7-centos7/Dockerfile @@ -4,7 +4,7 @@ MAINTAINER mail@racktear.com RUN groupadd tarantool \ && adduser -g tarantool tarantool -ENV TARANTOOL_VERSION=1.7.4-298-g5a8243d53 \ +ENV TARANTOOL_VERSION=1.7.4-329-g2e4b6fddf \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ diff --git a/1.7/Dockerfile b/1.7/Dockerfile index 15f1dc2..6312b70 100644 --- a/1.7/Dockerfile +++ b/1.7/Dockerfile @@ -5,7 +5,7 @@ RUN addgroup -S tarantool \ && adduser -S -G tarantool tarantool \ && apk add --no-cache 'su-exec>=0.2' -ENV TARANTOOL_VERSION=1.7.4-248-g212cab57a \ +ENV TARANTOOL_VERSION=1.7.4-329-g2e4b6fddf \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ diff --git a/1.8/Dockerfile b/1.8/Dockerfile index aba6732..ecdce86 100644 --- a/1.8/Dockerfile +++ b/1.8/Dockerfile @@ -5,7 +5,7 @@ RUN addgroup -S tarantool \ && adduser -S -G tarantool tarantool \ && apk add --no-cache 'su-exec>=0.2' -ENV TARANTOOL_VERSION=1.8.1-355-g0a4a5315b \ +ENV TARANTOOL_VERSION=1.8.1-415-ge3d2485c7 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ From ed97ae6792a9134b2563a00fe238af8aac9fb406 Mon Sep 17 00:00:00 2001 From: naberezhnyi Date: Fri, 18 Aug 2017 20:02:17 +0300 Subject: [PATCH 084/286] Fix condition for find snapshot 1.5 --- 1.5/docker-entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1.5/docker-entrypoint.sh b/1.5/docker-entrypoint.sh index 4f42dad..a58676d 100755 --- a/1.5/docker-entrypoint.sh +++ b/1.5/docker-entrypoint.sh @@ -20,7 +20,7 @@ update_cfg() try_init_db() { - if [ "$(find . -maxdepth 1 -name '/var/lib/tarantool/*.snap' -print)" = "" ] + if [ "$(find /var/lib/tarantool -maxdepth 1 -name '*.snap' -print)" = "" ] then echo "Initializing config:" From d88df5b5400a86b1b3bec86f9ae36764a3628267 Mon Sep 17 00:00:00 2001 From: Roman Tsisyk Date: Tue, 22 Aug 2017 08:59:29 +0300 Subject: [PATCH 085/286] Update to the latest 1.7 --- 1.7-centos7/Dockerfile | 2 +- 1.7/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/1.7-centos7/Dockerfile b/1.7-centos7/Dockerfile index 28b516d..2a2c3bd 100644 --- a/1.7-centos7/Dockerfile +++ b/1.7-centos7/Dockerfile @@ -4,7 +4,7 @@ MAINTAINER mail@racktear.com RUN groupadd tarantool \ && adduser -g tarantool tarantool -ENV TARANTOOL_VERSION=1.7.4-329-g2e4b6fddf \ +ENV TARANTOOL_VERSION=1.7.4-464-ga6128fcd2 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ diff --git a/1.7/Dockerfile b/1.7/Dockerfile index 6312b70..b5eb617 100644 --- a/1.7/Dockerfile +++ b/1.7/Dockerfile @@ -5,7 +5,7 @@ RUN addgroup -S tarantool \ && adduser -S -G tarantool tarantool \ && apk add --no-cache 'su-exec>=0.2' -ENV TARANTOOL_VERSION=1.7.4-329-g2e4b6fddf \ +ENV TARANTOOL_VERSION=1.7.4-464-ga6128fcd2 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ From 3a7f546599f35a58129dfbe462bee88869ab8cd0 Mon Sep 17 00:00:00 2001 From: naberezhnyi Date: Tue, 22 Aug 2017 12:09:32 +0300 Subject: [PATCH 086/286] Add default volume dir /var/lib/tarantool 1.5 --- 1.5/docker-entrypoint.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/1.5/docker-entrypoint.sh b/1.5/docker-entrypoint.sh index a58676d..d9ab1fc 100755 --- a/1.5/docker-entrypoint.sh +++ b/1.5/docker-entrypoint.sh @@ -33,6 +33,8 @@ try_init_db() echo "primary_port=3301" >> $CFG echo "admin_port=3305" >> $CFG echo "replication_port=3310" >> $CFG + echo "snap_dir=/var/lib/tarantool" >> $CFG + echo "wal_dir=/var/lib/tarantool" >> $CFG fi update_cfg "replication_port" "TARANTOOL_REPLICATION_PORT" @@ -43,6 +45,8 @@ try_init_db() update_cfg "primary_port" "TARANTOOL_PORT" update_cfg "admin_port" "TARANTOOL_ADMIN_PORT" update_cfg "wal_mode" "TARANTOOL_WAL_MODE" + update_cfg "snap_dir" "TARANTOOL_SNAP_DIR" + update_cfg "wal_dir" "TARANTOOL_WAL_DIR" cat $CFG From f5a3a1136b12f494816ed965b72a1637aba2ba23 Mon Sep 17 00:00:00 2001 From: Roman Tsisyk Date: Tue, 22 Aug 2017 20:15:25 +0300 Subject: [PATCH 087/286] Bump 1.7 to 1.7.5 --- 1.7-centos7/Dockerfile | 2 +- 1.7/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/1.7-centos7/Dockerfile b/1.7-centos7/Dockerfile index 2a2c3bd..b6ae7ab 100644 --- a/1.7-centos7/Dockerfile +++ b/1.7-centos7/Dockerfile @@ -4,7 +4,7 @@ MAINTAINER mail@racktear.com RUN groupadd tarantool \ && adduser -g tarantool tarantool -ENV TARANTOOL_VERSION=1.7.4-464-ga6128fcd2 \ +ENV TARANTOOL_VERSION=1.7.5-0-g24b70de10 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ diff --git a/1.7/Dockerfile b/1.7/Dockerfile index b5eb617..0b39ce2 100644 --- a/1.7/Dockerfile +++ b/1.7/Dockerfile @@ -5,7 +5,7 @@ RUN addgroup -S tarantool \ && adduser -S -G tarantool tarantool \ && apk add --no-cache 'su-exec>=0.2' -ENV TARANTOOL_VERSION=1.7.4-464-ga6128fcd2 \ +ENV TARANTOOL_VERSION=1.7.5-0-g24b70de10 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ From b3e2cb42ae6e90434c87e5793591a7064304206e Mon Sep 17 00:00:00 2001 From: Roman Tsisyk Date: Fri, 25 Aug 2017 15:04:48 +0300 Subject: [PATCH 088/286] Install gperftools-libs from packages for 1.7-centos7 Compiled gperftools simple didn't work. --- 1.7-centos7/Dockerfile | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/1.7-centos7/Dockerfile b/1.7-centos7/Dockerfile index b6ae7ab..7838fcc 100644 --- a/1.7-centos7/Dockerfile +++ b/1.7-centos7/Dockerfile @@ -7,8 +7,6 @@ RUN groupadd tarantool \ ENV TARANTOOL_VERSION=1.7.5-0-g24b70de10 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ - GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ - GPERFTOOLS_TAG=gperftools-2.5 \ LUAROCKS_URL=http://keplerproject.github.io/luarocks/releases/luarocks-2.3.0.tar.gz \ LUAROCK_AVRO_SCHEMA_REPO=https://github.com/tarantool/avro-schema.git \ LUAROCK_AVRO_SCHEMA_TAG=b49efa8 \ @@ -80,14 +78,7 @@ RUN set -x \ wget \ curl-devel \ && : "---------- gperftools ----------" \ - && mkdir -p /usr/src/gperftools \ - && git clone "$GPERFTOOLS_REPO" /usr/src/gperftools \ - && (cd /usr/src/gperftools; git checkout "$GPERFTOOLS_TAG";) \ - && (cd /usr/src/gperftools; \ - ./autogen.sh; \ - ./configure; \ - make; \ - cp .libs/libprofiler.so* /usr/local/lib;) \ + && yum install -y gperftools-libs \ && (GOPATH=/usr/src/go go get github.com/google/pprof; \ cp /usr/src/go/bin/pprof /usr/local/bin) \ && : "---------- tarantool ----------" \ @@ -132,7 +123,6 @@ RUN set -x \ make install) \ && rm -r /usr/src/luarocks \ && rm -rf /usr/src/tarantool \ - && rm -rf /usr/src/gperftools \ && rm -rf /usr/src/go \ && : "---------- remove build deps ----------" \ && yum -y remove \ From 00434bc36ab2de37e8d4325f18252cc3200eef8f Mon Sep 17 00:00:00 2001 From: Roman Tsisyk Date: Fri, 25 Aug 2017 15:48:51 +0300 Subject: [PATCH 089/286] Enable GitLab CI --- .gitlab-ci.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..e815c21 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,35 @@ +stages: + - build + - release + +variables: + REGISTRY: registry.gitlab.com + IMAGE: ${REGISTRY}/${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME} + +before_script: + # Enable GitLab registry + - docker login -u gitlab-ci-token -p ${CI_BUILD_TOKEN} ${REGISTRY} + +# +# Build Docker image and publish as IMAGE:BRANCH +# +docker-build: + stage: build + variables: + TAG: 1.7-centos7 + script: + - docker build -t ${IMAGE}:${TAG}-${CI_COMMIT_REF_SLUG} ${TAG}/ + - docker push ${IMAGE}:${TAG}-${CI_COMMIT_REF_SLUG} + +# +# Tag IMAGE:BRANCH as image:latest for release branches (master) +# +docker-tag: + stage: release + variables: + TAG: 1.7-centos7 + script: + - docker tag ${IMAGE}:${TAG}-${CI_COMMIT_REF_SLUG} ${IMAGE}:${TAG} + - docker push ${IMAGE}:${TAG} + only: + - master From 82800d2da60080e8c2da2f960386daa1ec5402fe Mon Sep 17 00:00:00 2001 From: NabAlex Date: Mon, 28 Aug 2017 21:34:28 +0300 Subject: [PATCH 090/286] Add primary_port, admin_port and some default values --- 1.5/Dockerfile | 6 +++++- 1.5/docker-entrypoint.sh | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/1.5/Dockerfile b/1.5/Dockerfile index 8288524..760a7ae 100644 --- a/1.5/Dockerfile +++ b/1.5/Dockerfile @@ -9,7 +9,11 @@ ENV TARANTOOL_VERSION=1.5.5.27 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_COMMIT=1687c022e7aa93e9c118e1b80e1eac6c429b1010 \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ - LUAROCKS_URL=http://keplerproject.github.io/luarocks/releases/luarocks-2.3.0.tar.gz + LUAROCKS_URL=http://keplerproject.github.io/luarocks/releases/luarocks-2.3.0.tar.gz \ + TARANTOOL_SNAP_DIR=/var/lib/tarantool \ + TARANTOOL_WAL_DIR=/var/lib/tarantool \ + TARANTOOL_PORT=3301 \ + TARANTOOL_ADMIN_PORT=3302 RUN set -x \ && apk add --no-cache --virtual .run-deps \ diff --git a/1.5/docker-entrypoint.sh b/1.5/docker-entrypoint.sh index d9ab1fc..e14d7d1 100755 --- a/1.5/docker-entrypoint.sh +++ b/1.5/docker-entrypoint.sh @@ -31,7 +31,7 @@ try_init_db() echo "work_dir=/opt/tarantool" > $CFG echo "memcached_port=11211" >> $CFG echo "primary_port=3301" >> $CFG - echo "admin_port=3305" >> $CFG + echo "admin_port=3302" >> $CFG echo "replication_port=3310" >> $CFG echo "snap_dir=/var/lib/tarantool" >> $CFG echo "wal_dir=/var/lib/tarantool" >> $CFG From 08080e3d0dcf837f3b7ac5d3989d8e318471d8ab Mon Sep 17 00:00:00 2001 From: NabAlex Date: Wed, 30 Aug 2017 17:51:07 +0300 Subject: [PATCH 091/286] Create config with the privileges of root user --- 1.5/docker-entrypoint.sh | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/1.5/docker-entrypoint.sh b/1.5/docker-entrypoint.sh index e14d7d1..bcc6819 100755 --- a/1.5/docker-entrypoint.sh +++ b/1.5/docker-entrypoint.sh @@ -53,22 +53,17 @@ try_init_db() echo echo "Initializing database:" - tarantool_box -c $CFG --init-storage + su-exec tarantool tarantool_box -c $CFG --init-storage echo fi } -if [ "$1" = 'tarantool_box' -a "$(id -u)" = '0' ]; then - chown -R tarantool /var/lib/tarantool - exec su-exec tarantool "$0" "$@" -fi - # entry point wraps the passed script to do basic setup if [ "$1" = 'tarantool_box' ]; then shift try_init_db - exec tarantool_box "$@" + exec su-exec tarantool tarantool_box "$@" fi exec "$@" From da28436ea0f38fff52095f803b07d05093e44112 Mon Sep 17 00:00:00 2001 From: Roman Proskin Date: Tue, 26 Sep 2017 15:29:56 +0300 Subject: [PATCH 092/286] Fix handling of box.cfg deprecated options --- 1.6/tarantool-entrypoint.lua | 50 ++++++++++++++++++++++------ 1.7-centos7/tarantool-entrypoint.lua | 50 ++++++++++++++++++++++------ 1.7/tarantool-entrypoint.lua | 50 ++++++++++++++++++++++------ 1.8/tarantool-entrypoint.lua | 50 ++++++++++++++++++++++------ 4 files changed, 160 insertions(+), 40 deletions(-) diff --git a/1.6/tarantool-entrypoint.lua b/1.6/tarantool-entrypoint.lua index a71ec17..be2db02 100755 --- a/1.6/tarantool-entrypoint.lua +++ b/1.6/tarantool-entrypoint.lua @@ -10,7 +10,7 @@ local log = require('log') local yaml = require('yaml') local TARANTOOL_DEFAULT_PORT = 3301 -local TARANTOOL_DEFAULT_SNAPSHOT_PERIOD = 3600 -- seconds +local TARANTOOL_DEFAULT_CHECKPOINT_INTERVAL = 3600 -- seconds local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' local CFG_FILE_PATH = '/etc/tarantool/config.yml' @@ -149,6 +149,16 @@ function set_credentials(user_name, user_password) create_user(user_name, user_password) end +local function choose_option(main, substitute, cfg) + if cfg[main] then + return main + end + if cfg[substitute] then + return substitute + end + return main +end + local function wrapper_cfg(override) local work_dir = '/var/lib/tarantool' local snap_filename = "*.snap" @@ -174,7 +184,12 @@ local function wrapper_cfg(override) file_cfg.TARANTOOL_PORT = os.getenv('TARANTOOL_PORT') file_cfg.TARANTOOL_WAL_MODE = os.getenv('TARANTOOL_WAL_MODE') file_cfg.TARANTOOL_REPLICATION_SOURCE = os.getenv('TARANTOOL_REPLICATION_SOURCE') + file_cfg.TARANTOOL_REPLICATION = os.getenv('TARANTOOL_REPLICATION') file_cfg.TARANTOOL_SNAPSHOT_PERIOD = os.getenv('TARANTOOL_SNAPSHOT_PERIOD') + file_cfg.TARANTOOL_MEMTX_MEMORY = os.getenv('TARANTOOL_MEMTX_MEMORY') + file_cfg.TARANTOOL_CHECKPOINT_INTERVAL = os.getenv('TARANTOOL_CHECKPOINT_INTERVAL') + file_cfg.TARANTOOL_MEMTX_MIN_TUPLE_SIZE = os.getenv('TARANTOOL_MEMTX_MIN_TUPLE_SIZE') + file_cfg.TARANTOOL_MEMTX_MAX_TUPLE_SIZE = os.getenv('TARANTOOL_MEMTX_MAX_TUPLE_SIZE') write_config(file_cfg) else @@ -190,34 +205,49 @@ local function wrapper_cfg(override) local cfg = override or {} + -- Placeholders for deprecated options cfg.slab_alloc_arena = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_ARENA) or override.slab_alloc_arena - cfg.slab_alloc_factor = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_FACTOR) or - override.slab_alloc_factor cfg.slab_alloc_maximal = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_MAXIMAL) or override.slab_alloc_maximal cfg.slab_alloc_minimal = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_MINIMAL) or override.slab_alloc_minimal + -- Replacements for deprecated options + cfg.memtx_memory = tonumber(file_cfg.TARANTOOL_MEMTX_MEMORY) or + override.memtx_memory + cfg.memtx_min_tuple_size = tonumber(file_cfg.TARANTOOL_MEMTX_MIN_TUPLE_SIZE) or + override.memtx_min_tuple_size + cfg.memtx_max_tuple_size = tonumber(file_cfg.TARANTOOL_MEMTX_MAX_TUPLE_SIZE) or + override.memtx_max_tuple_size + -- Deprecated options with default values + local choice = choose_option('memtx_dir', 'snap_dir', override) + cfg[choice] = override[choice] or '/var/lib/tarantool' + local choice = choose_option('checkpoint_interval', 'snapshot_period', override) + local choice2 = choose_option('TARANTOOL_CHECKPOINT_INTERVAL', 'TARANTOOL_SNAPSHOT_PERIOD', file_cfg) + cfg[choice] = tonumber(file_cfg[choice2]) or override[choice] or + TARANTOOL_DEFAULT_CHECKPOINT_INTERVAL + + -- Remaining configuration + cfg.slab_alloc_factor = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_FACTOR) or + override.slab_alloc_factor cfg.listen = tonumber(file_cfg.TARANTOOL_PORT) or override.listen or TARANTOOL_DEFAULT_PORT cfg.wal_mode = file_cfg.TARANTOOL_WAL_MODE or override.wal_mode - cfg.snapshot_period = tonumber(file_cfg.TARANTOOL_SNAPSHOT_PERIOD) or - override.snapshot_period or TARANTOOL_DEFAULT_SNAPSHOT_PERIOD cfg.wal_dir = override.wal_dir or '/var/lib/tarantool' - cfg.snap_dir = override.snap_dir or '/var/lib/tarantool' cfg.pid_file = override.pid_file or '/var/run/tarantool/tarantool.pid' - local replication_source = file_cfg.TARANTOOL_REPLICATION_SOURCE - local replication_source_table = parse_replication_source(replication_source, + local choice = choose_option('TARANTOOL_REPLICATION', 'TARANTOOL_REPLICATION_SOURCE', file_cfg) + local replication_source_table = parse_replication_source(file_cfg[choice], user_name, user_password) if replication_source then - cfg.replication_source = replication_source_table + cfg.replication = replication_source_table else - cfg.replication_source = override.replication_source + local choice = choose_option('replication', 'replication_source', override) + cfg[choice] = override[choice] end log.info("Config:\n" .. yaml.encode(cfg)) diff --git a/1.7-centos7/tarantool-entrypoint.lua b/1.7-centos7/tarantool-entrypoint.lua index a925d31..72f70aa 100755 --- a/1.7-centos7/tarantool-entrypoint.lua +++ b/1.7-centos7/tarantool-entrypoint.lua @@ -10,7 +10,7 @@ local log = require('log') local yaml = require('yaml') local TARANTOOL_DEFAULT_PORT = 3301 -local TARANTOOL_DEFAULT_SNAPSHOT_PERIOD = 3600 -- seconds +local TARANTOOL_DEFAULT_CHECKPOINT_INTERVAL = 3600 -- seconds local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' local CFG_FILE_PATH = '/etc/tarantool/config.yml' @@ -149,6 +149,16 @@ function set_credentials(user_name, user_password) create_user(user_name, user_password) end +local function choose_option(main, substitute, cfg) + if cfg[main] then + return main + end + if cfg[substitute] then + return substitute + end + return main +end + local function wrapper_cfg(override) local work_dir = '/var/lib/tarantool' local snap_filename = "*.snap" @@ -174,7 +184,12 @@ local function wrapper_cfg(override) file_cfg.TARANTOOL_PORT = os.getenv('TARANTOOL_PORT') file_cfg.TARANTOOL_WAL_MODE = os.getenv('TARANTOOL_WAL_MODE') file_cfg.TARANTOOL_REPLICATION_SOURCE = os.getenv('TARANTOOL_REPLICATION_SOURCE') + file_cfg.TARANTOOL_REPLICATION = os.getenv('TARANTOOL_REPLICATION') file_cfg.TARANTOOL_SNAPSHOT_PERIOD = os.getenv('TARANTOOL_SNAPSHOT_PERIOD') + file_cfg.TARANTOOL_MEMTX_MEMORY = os.getenv('TARANTOOL_MEMTX_MEMORY') + file_cfg.TARANTOOL_CHECKPOINT_INTERVAL = os.getenv('TARANTOOL_CHECKPOINT_INTERVAL') + file_cfg.TARANTOOL_MEMTX_MIN_TUPLE_SIZE = os.getenv('TARANTOOL_MEMTX_MIN_TUPLE_SIZE') + file_cfg.TARANTOOL_MEMTX_MAX_TUPLE_SIZE = os.getenv('TARANTOOL_MEMTX_MAX_TUPLE_SIZE') write_config(file_cfg) else @@ -190,35 +205,50 @@ local function wrapper_cfg(override) local cfg = override or {} + -- Placeholders for deprecated options cfg.slab_alloc_arena = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_ARENA) or override.slab_alloc_arena - cfg.slab_alloc_factor = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_FACTOR) or - override.slab_alloc_factor cfg.slab_alloc_maximal = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_MAXIMAL) or override.slab_alloc_maximal cfg.slab_alloc_minimal = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_MINIMAL) or override.slab_alloc_minimal + -- Replacements for deprecated options + cfg.memtx_memory = tonumber(file_cfg.TARANTOOL_MEMTX_MEMORY) or + override.memtx_memory + cfg.memtx_min_tuple_size = tonumber(file_cfg.TARANTOOL_MEMTX_MIN_TUPLE_SIZE) or + override.memtx_min_tuple_size + cfg.memtx_max_tuple_size = tonumber(file_cfg.TARANTOOL_MEMTX_MAX_TUPLE_SIZE) or + override.memtx_max_tuple_size + -- Deprecated options with default values + local choice = choose_option('memtx_dir', 'snap_dir', override) + cfg[choice] = override[choice] or '/var/lib/tarantool' + local choice = choose_option('checkpoint_interval', 'snapshot_period', override) + local choice2 = choose_option('TARANTOOL_CHECKPOINT_INTERVAL', 'TARANTOOL_SNAPSHOT_PERIOD', file_cfg) + cfg[choice] = tonumber(file_cfg[choice2]) or override[choice] or + TARANTOOL_DEFAULT_CHECKPOINT_INTERVAL + + -- Remaining configuration + cfg.slab_alloc_factor = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_FACTOR) or + override.slab_alloc_factor cfg.listen = tonumber(file_cfg.TARANTOOL_PORT) or override.listen or TARANTOOL_DEFAULT_PORT cfg.wal_mode = file_cfg.TARANTOOL_WAL_MODE or override.wal_mode - cfg.snapshot_period = tonumber(file_cfg.TARANTOOL_SNAPSHOT_PERIOD) or - override.snapshot_period or TARANTOOL_DEFAULT_SNAPSHOT_PERIOD cfg.wal_dir = override.wal_dir or '/var/lib/tarantool' - cfg.snap_dir = override.snap_dir or '/var/lib/tarantool' cfg.vinyl_dir = override.vinyl_dir or '/var/lib/tarantool' cfg.pid_file = override.pid_file or '/var/run/tarantool/tarantool.pid' - local replication_source = file_cfg.TARANTOOL_REPLICATION_SOURCE - local replication_source_table = parse_replication_source(replication_source, + local choice = choose_option('TARANTOOL_REPLICATION', 'TARANTOOL_REPLICATION_SOURCE', file_cfg) + local replication_source_table = parse_replication_source(file_cfg[choice], user_name, user_password) if replication_source then - cfg.replication_source = replication_source_table + cfg.replication = replication_source_table else - cfg.replication_source = override.replication_source + local choice = choose_option('replication', 'replication_source', override) + cfg[choice] = override[choice] end log.info("Config:\n" .. yaml.encode(cfg)) diff --git a/1.7/tarantool-entrypoint.lua b/1.7/tarantool-entrypoint.lua index a925d31..72f70aa 100755 --- a/1.7/tarantool-entrypoint.lua +++ b/1.7/tarantool-entrypoint.lua @@ -10,7 +10,7 @@ local log = require('log') local yaml = require('yaml') local TARANTOOL_DEFAULT_PORT = 3301 -local TARANTOOL_DEFAULT_SNAPSHOT_PERIOD = 3600 -- seconds +local TARANTOOL_DEFAULT_CHECKPOINT_INTERVAL = 3600 -- seconds local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' local CFG_FILE_PATH = '/etc/tarantool/config.yml' @@ -149,6 +149,16 @@ function set_credentials(user_name, user_password) create_user(user_name, user_password) end +local function choose_option(main, substitute, cfg) + if cfg[main] then + return main + end + if cfg[substitute] then + return substitute + end + return main +end + local function wrapper_cfg(override) local work_dir = '/var/lib/tarantool' local snap_filename = "*.snap" @@ -174,7 +184,12 @@ local function wrapper_cfg(override) file_cfg.TARANTOOL_PORT = os.getenv('TARANTOOL_PORT') file_cfg.TARANTOOL_WAL_MODE = os.getenv('TARANTOOL_WAL_MODE') file_cfg.TARANTOOL_REPLICATION_SOURCE = os.getenv('TARANTOOL_REPLICATION_SOURCE') + file_cfg.TARANTOOL_REPLICATION = os.getenv('TARANTOOL_REPLICATION') file_cfg.TARANTOOL_SNAPSHOT_PERIOD = os.getenv('TARANTOOL_SNAPSHOT_PERIOD') + file_cfg.TARANTOOL_MEMTX_MEMORY = os.getenv('TARANTOOL_MEMTX_MEMORY') + file_cfg.TARANTOOL_CHECKPOINT_INTERVAL = os.getenv('TARANTOOL_CHECKPOINT_INTERVAL') + file_cfg.TARANTOOL_MEMTX_MIN_TUPLE_SIZE = os.getenv('TARANTOOL_MEMTX_MIN_TUPLE_SIZE') + file_cfg.TARANTOOL_MEMTX_MAX_TUPLE_SIZE = os.getenv('TARANTOOL_MEMTX_MAX_TUPLE_SIZE') write_config(file_cfg) else @@ -190,35 +205,50 @@ local function wrapper_cfg(override) local cfg = override or {} + -- Placeholders for deprecated options cfg.slab_alloc_arena = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_ARENA) or override.slab_alloc_arena - cfg.slab_alloc_factor = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_FACTOR) or - override.slab_alloc_factor cfg.slab_alloc_maximal = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_MAXIMAL) or override.slab_alloc_maximal cfg.slab_alloc_minimal = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_MINIMAL) or override.slab_alloc_minimal + -- Replacements for deprecated options + cfg.memtx_memory = tonumber(file_cfg.TARANTOOL_MEMTX_MEMORY) or + override.memtx_memory + cfg.memtx_min_tuple_size = tonumber(file_cfg.TARANTOOL_MEMTX_MIN_TUPLE_SIZE) or + override.memtx_min_tuple_size + cfg.memtx_max_tuple_size = tonumber(file_cfg.TARANTOOL_MEMTX_MAX_TUPLE_SIZE) or + override.memtx_max_tuple_size + -- Deprecated options with default values + local choice = choose_option('memtx_dir', 'snap_dir', override) + cfg[choice] = override[choice] or '/var/lib/tarantool' + local choice = choose_option('checkpoint_interval', 'snapshot_period', override) + local choice2 = choose_option('TARANTOOL_CHECKPOINT_INTERVAL', 'TARANTOOL_SNAPSHOT_PERIOD', file_cfg) + cfg[choice] = tonumber(file_cfg[choice2]) or override[choice] or + TARANTOOL_DEFAULT_CHECKPOINT_INTERVAL + + -- Remaining configuration + cfg.slab_alloc_factor = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_FACTOR) or + override.slab_alloc_factor cfg.listen = tonumber(file_cfg.TARANTOOL_PORT) or override.listen or TARANTOOL_DEFAULT_PORT cfg.wal_mode = file_cfg.TARANTOOL_WAL_MODE or override.wal_mode - cfg.snapshot_period = tonumber(file_cfg.TARANTOOL_SNAPSHOT_PERIOD) or - override.snapshot_period or TARANTOOL_DEFAULT_SNAPSHOT_PERIOD cfg.wal_dir = override.wal_dir or '/var/lib/tarantool' - cfg.snap_dir = override.snap_dir or '/var/lib/tarantool' cfg.vinyl_dir = override.vinyl_dir or '/var/lib/tarantool' cfg.pid_file = override.pid_file or '/var/run/tarantool/tarantool.pid' - local replication_source = file_cfg.TARANTOOL_REPLICATION_SOURCE - local replication_source_table = parse_replication_source(replication_source, + local choice = choose_option('TARANTOOL_REPLICATION', 'TARANTOOL_REPLICATION_SOURCE', file_cfg) + local replication_source_table = parse_replication_source(file_cfg[choice], user_name, user_password) if replication_source then - cfg.replication_source = replication_source_table + cfg.replication = replication_source_table else - cfg.replication_source = override.replication_source + local choice = choose_option('replication', 'replication_source', override) + cfg[choice] = override[choice] end log.info("Config:\n" .. yaml.encode(cfg)) diff --git a/1.8/tarantool-entrypoint.lua b/1.8/tarantool-entrypoint.lua index a925d31..72f70aa 100755 --- a/1.8/tarantool-entrypoint.lua +++ b/1.8/tarantool-entrypoint.lua @@ -10,7 +10,7 @@ local log = require('log') local yaml = require('yaml') local TARANTOOL_DEFAULT_PORT = 3301 -local TARANTOOL_DEFAULT_SNAPSHOT_PERIOD = 3600 -- seconds +local TARANTOOL_DEFAULT_CHECKPOINT_INTERVAL = 3600 -- seconds local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' local CFG_FILE_PATH = '/etc/tarantool/config.yml' @@ -149,6 +149,16 @@ function set_credentials(user_name, user_password) create_user(user_name, user_password) end +local function choose_option(main, substitute, cfg) + if cfg[main] then + return main + end + if cfg[substitute] then + return substitute + end + return main +end + local function wrapper_cfg(override) local work_dir = '/var/lib/tarantool' local snap_filename = "*.snap" @@ -174,7 +184,12 @@ local function wrapper_cfg(override) file_cfg.TARANTOOL_PORT = os.getenv('TARANTOOL_PORT') file_cfg.TARANTOOL_WAL_MODE = os.getenv('TARANTOOL_WAL_MODE') file_cfg.TARANTOOL_REPLICATION_SOURCE = os.getenv('TARANTOOL_REPLICATION_SOURCE') + file_cfg.TARANTOOL_REPLICATION = os.getenv('TARANTOOL_REPLICATION') file_cfg.TARANTOOL_SNAPSHOT_PERIOD = os.getenv('TARANTOOL_SNAPSHOT_PERIOD') + file_cfg.TARANTOOL_MEMTX_MEMORY = os.getenv('TARANTOOL_MEMTX_MEMORY') + file_cfg.TARANTOOL_CHECKPOINT_INTERVAL = os.getenv('TARANTOOL_CHECKPOINT_INTERVAL') + file_cfg.TARANTOOL_MEMTX_MIN_TUPLE_SIZE = os.getenv('TARANTOOL_MEMTX_MIN_TUPLE_SIZE') + file_cfg.TARANTOOL_MEMTX_MAX_TUPLE_SIZE = os.getenv('TARANTOOL_MEMTX_MAX_TUPLE_SIZE') write_config(file_cfg) else @@ -190,35 +205,50 @@ local function wrapper_cfg(override) local cfg = override or {} + -- Placeholders for deprecated options cfg.slab_alloc_arena = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_ARENA) or override.slab_alloc_arena - cfg.slab_alloc_factor = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_FACTOR) or - override.slab_alloc_factor cfg.slab_alloc_maximal = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_MAXIMAL) or override.slab_alloc_maximal cfg.slab_alloc_minimal = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_MINIMAL) or override.slab_alloc_minimal + -- Replacements for deprecated options + cfg.memtx_memory = tonumber(file_cfg.TARANTOOL_MEMTX_MEMORY) or + override.memtx_memory + cfg.memtx_min_tuple_size = tonumber(file_cfg.TARANTOOL_MEMTX_MIN_TUPLE_SIZE) or + override.memtx_min_tuple_size + cfg.memtx_max_tuple_size = tonumber(file_cfg.TARANTOOL_MEMTX_MAX_TUPLE_SIZE) or + override.memtx_max_tuple_size + -- Deprecated options with default values + local choice = choose_option('memtx_dir', 'snap_dir', override) + cfg[choice] = override[choice] or '/var/lib/tarantool' + local choice = choose_option('checkpoint_interval', 'snapshot_period', override) + local choice2 = choose_option('TARANTOOL_CHECKPOINT_INTERVAL', 'TARANTOOL_SNAPSHOT_PERIOD', file_cfg) + cfg[choice] = tonumber(file_cfg[choice2]) or override[choice] or + TARANTOOL_DEFAULT_CHECKPOINT_INTERVAL + + -- Remaining configuration + cfg.slab_alloc_factor = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_FACTOR) or + override.slab_alloc_factor cfg.listen = tonumber(file_cfg.TARANTOOL_PORT) or override.listen or TARANTOOL_DEFAULT_PORT cfg.wal_mode = file_cfg.TARANTOOL_WAL_MODE or override.wal_mode - cfg.snapshot_period = tonumber(file_cfg.TARANTOOL_SNAPSHOT_PERIOD) or - override.snapshot_period or TARANTOOL_DEFAULT_SNAPSHOT_PERIOD cfg.wal_dir = override.wal_dir or '/var/lib/tarantool' - cfg.snap_dir = override.snap_dir or '/var/lib/tarantool' cfg.vinyl_dir = override.vinyl_dir or '/var/lib/tarantool' cfg.pid_file = override.pid_file or '/var/run/tarantool/tarantool.pid' - local replication_source = file_cfg.TARANTOOL_REPLICATION_SOURCE - local replication_source_table = parse_replication_source(replication_source, + local choice = choose_option('TARANTOOL_REPLICATION', 'TARANTOOL_REPLICATION_SOURCE', file_cfg) + local replication_source_table = parse_replication_source(file_cfg[choice], user_name, user_password) if replication_source then - cfg.replication_source = replication_source_table + cfg.replication = replication_source_table else - cfg.replication_source = override.replication_source + local choice = choose_option('replication', 'replication_source', override) + cfg[choice] = override[choice] end log.info("Config:\n" .. yaml.encode(cfg)) From 2aa5fa82eb007f7e4943399807e0a1c6aca06117 Mon Sep 17 00:00:00 2001 From: Roman Proskin Date: Fri, 29 Sep 2017 14:51:44 +0300 Subject: [PATCH 093/286] Remove chekpoint_interval default value from 1.7 and 1.8 --- 1.7-centos7/tarantool-entrypoint.lua | 9 ++++----- 1.7/tarantool-entrypoint.lua | 9 ++++----- 1.8/tarantool-entrypoint.lua | 9 ++++----- 3 files changed, 12 insertions(+), 15 deletions(-) diff --git a/1.7-centos7/tarantool-entrypoint.lua b/1.7-centos7/tarantool-entrypoint.lua index 72f70aa..c4bd76a 100755 --- a/1.7-centos7/tarantool-entrypoint.lua +++ b/1.7-centos7/tarantool-entrypoint.lua @@ -10,7 +10,6 @@ local log = require('log') local yaml = require('yaml') local TARANTOOL_DEFAULT_PORT = 3301 -local TARANTOOL_DEFAULT_CHECKPOINT_INTERVAL = 3600 -- seconds local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' local CFG_FILE_PATH = '/etc/tarantool/config.yml' @@ -212,6 +211,8 @@ local function wrapper_cfg(override) override.slab_alloc_maximal cfg.slab_alloc_minimal = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_MINIMAL) or override.slab_alloc_minimal + cfg.snapshot_period = tonumber(file_cfg.TARANTOOL_SNAPSHOT_PERIOD) or + override.snapshot_period -- Replacements for deprecated options cfg.memtx_memory = tonumber(file_cfg.TARANTOOL_MEMTX_MEMORY) or override.memtx_memory @@ -219,13 +220,11 @@ local function wrapper_cfg(override) override.memtx_min_tuple_size cfg.memtx_max_tuple_size = tonumber(file_cfg.TARANTOOL_MEMTX_MAX_TUPLE_SIZE) or override.memtx_max_tuple_size + cfg.checkpoint_interval = tonumber(file_cfg.TARANTOOL_CHECKPOINT_INTERVAL) or + override.checkpoint_interval -- Deprecated options with default values local choice = choose_option('memtx_dir', 'snap_dir', override) cfg[choice] = override[choice] or '/var/lib/tarantool' - local choice = choose_option('checkpoint_interval', 'snapshot_period', override) - local choice2 = choose_option('TARANTOOL_CHECKPOINT_INTERVAL', 'TARANTOOL_SNAPSHOT_PERIOD', file_cfg) - cfg[choice] = tonumber(file_cfg[choice2]) or override[choice] or - TARANTOOL_DEFAULT_CHECKPOINT_INTERVAL -- Remaining configuration cfg.slab_alloc_factor = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_FACTOR) or diff --git a/1.7/tarantool-entrypoint.lua b/1.7/tarantool-entrypoint.lua index 72f70aa..c4bd76a 100755 --- a/1.7/tarantool-entrypoint.lua +++ b/1.7/tarantool-entrypoint.lua @@ -10,7 +10,6 @@ local log = require('log') local yaml = require('yaml') local TARANTOOL_DEFAULT_PORT = 3301 -local TARANTOOL_DEFAULT_CHECKPOINT_INTERVAL = 3600 -- seconds local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' local CFG_FILE_PATH = '/etc/tarantool/config.yml' @@ -212,6 +211,8 @@ local function wrapper_cfg(override) override.slab_alloc_maximal cfg.slab_alloc_minimal = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_MINIMAL) or override.slab_alloc_minimal + cfg.snapshot_period = tonumber(file_cfg.TARANTOOL_SNAPSHOT_PERIOD) or + override.snapshot_period -- Replacements for deprecated options cfg.memtx_memory = tonumber(file_cfg.TARANTOOL_MEMTX_MEMORY) or override.memtx_memory @@ -219,13 +220,11 @@ local function wrapper_cfg(override) override.memtx_min_tuple_size cfg.memtx_max_tuple_size = tonumber(file_cfg.TARANTOOL_MEMTX_MAX_TUPLE_SIZE) or override.memtx_max_tuple_size + cfg.checkpoint_interval = tonumber(file_cfg.TARANTOOL_CHECKPOINT_INTERVAL) or + override.checkpoint_interval -- Deprecated options with default values local choice = choose_option('memtx_dir', 'snap_dir', override) cfg[choice] = override[choice] or '/var/lib/tarantool' - local choice = choose_option('checkpoint_interval', 'snapshot_period', override) - local choice2 = choose_option('TARANTOOL_CHECKPOINT_INTERVAL', 'TARANTOOL_SNAPSHOT_PERIOD', file_cfg) - cfg[choice] = tonumber(file_cfg[choice2]) or override[choice] or - TARANTOOL_DEFAULT_CHECKPOINT_INTERVAL -- Remaining configuration cfg.slab_alloc_factor = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_FACTOR) or diff --git a/1.8/tarantool-entrypoint.lua b/1.8/tarantool-entrypoint.lua index 72f70aa..c4bd76a 100755 --- a/1.8/tarantool-entrypoint.lua +++ b/1.8/tarantool-entrypoint.lua @@ -10,7 +10,6 @@ local log = require('log') local yaml = require('yaml') local TARANTOOL_DEFAULT_PORT = 3301 -local TARANTOOL_DEFAULT_CHECKPOINT_INTERVAL = 3600 -- seconds local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' local CFG_FILE_PATH = '/etc/tarantool/config.yml' @@ -212,6 +211,8 @@ local function wrapper_cfg(override) override.slab_alloc_maximal cfg.slab_alloc_minimal = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_MINIMAL) or override.slab_alloc_minimal + cfg.snapshot_period = tonumber(file_cfg.TARANTOOL_SNAPSHOT_PERIOD) or + override.snapshot_period -- Replacements for deprecated options cfg.memtx_memory = tonumber(file_cfg.TARANTOOL_MEMTX_MEMORY) or override.memtx_memory @@ -219,13 +220,11 @@ local function wrapper_cfg(override) override.memtx_min_tuple_size cfg.memtx_max_tuple_size = tonumber(file_cfg.TARANTOOL_MEMTX_MAX_TUPLE_SIZE) or override.memtx_max_tuple_size + cfg.checkpoint_interval = tonumber(file_cfg.TARANTOOL_CHECKPOINT_INTERVAL) or + override.checkpoint_interval -- Deprecated options with default values local choice = choose_option('memtx_dir', 'snap_dir', override) cfg[choice] = override[choice] or '/var/lib/tarantool' - local choice = choose_option('checkpoint_interval', 'snapshot_period', override) - local choice2 = choose_option('TARANTOOL_CHECKPOINT_INTERVAL', 'TARANTOOL_SNAPSHOT_PERIOD', file_cfg) - cfg[choice] = tonumber(file_cfg[choice2]) or override[choice] or - TARANTOOL_DEFAULT_CHECKPOINT_INTERVAL -- Remaining configuration cfg.slab_alloc_factor = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_FACTOR) or From fbb3d881e088071906aa43a1512b34239caff41a Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Fri, 6 Oct 2017 18:04:19 +0300 Subject: [PATCH 094/286] Add ldoc rock --- 1.6/Dockerfile | 1 + 1.7-centos7/Dockerfile | 1 + 1.7/Dockerfile | 1 + 1.8/Dockerfile | 1 + 4 files changed, 4 insertions(+) diff --git a/1.6/Dockerfile b/1.6/Dockerfile index e82c0bf..118e692 100644 --- a/1.6/Dockerfile +++ b/1.6/Dockerfile @@ -181,6 +181,7 @@ RUN set -x \ && rm -rf /usr/src/geos \ && : "---------- luarocks ----------" \ && luarocks install lua-term \ + && luarocks install ldoc \ && : "avro" \ && git clone $LUAROCK_AVRO_SCHEMA_REPO /rocks/avro \ && git -C /rocks/avro checkout $LUAROCK_AVRO_SCHEMA_TAG \ diff --git a/1.7-centos7/Dockerfile b/1.7-centos7/Dockerfile index 7838fcc..c561d45 100644 --- a/1.7-centos7/Dockerfile +++ b/1.7-centos7/Dockerfile @@ -185,6 +185,7 @@ RUN set -x \ && mkdir -p /rocks \ && : "---------- luarocks ----------" \ && luarocks install lua-term \ + && luarocks install ldoc \ && : "avro" \ && git clone $LUAROCK_AVRO_SCHEMA_REPO /rocks/avro \ && (cd /rocks/avro; git checkout $LUAROCK_AVRO_SCHEMA_TAG) \ diff --git a/1.7/Dockerfile b/1.7/Dockerfile index 0b39ce2..0498ffe 100644 --- a/1.7/Dockerfile +++ b/1.7/Dockerfile @@ -186,6 +186,7 @@ RUN set -x \ && rm -rf /usr/src/geos \ && : "---------- luarocks ----------" \ && luarocks install lua-term \ + && luarocks install ldoc \ && : "avro" \ && git clone $LUAROCK_AVRO_SCHEMA_REPO /rocks/avro \ && git -C /rocks/avro checkout $LUAROCK_AVRO_SCHEMA_TAG \ diff --git a/1.8/Dockerfile b/1.8/Dockerfile index ecdce86..9aec48f 100644 --- a/1.8/Dockerfile +++ b/1.8/Dockerfile @@ -189,6 +189,7 @@ RUN set -x \ && rm -rf /usr/src/geos \ && : "---------- luarocks ----------" \ && luarocks install lua-term \ + && luarocks install ldoc \ && : "avro" \ && git clone $LUAROCK_AVRO_SCHEMA_REPO /rocks/avro \ && git -C /rocks/avro checkout $LUAROCK_AVRO_SCHEMA_TAG \ From 24f9f7e4c0814273590ff5094b4bf79dab9b95e9 Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Thu, 19 Oct 2017 14:31:16 +0300 Subject: [PATCH 095/286] Fix a typo that prevents TARANTOOL_REPLICATION from working --- 1.7/tarantool-entrypoint.lua | 2 +- 1.8/tarantool-entrypoint.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/1.7/tarantool-entrypoint.lua b/1.7/tarantool-entrypoint.lua index c4bd76a..76f4b27 100755 --- a/1.7/tarantool-entrypoint.lua +++ b/1.7/tarantool-entrypoint.lua @@ -243,7 +243,7 @@ local function wrapper_cfg(override) user_name, user_password) - if replication_source then + if replication_source_table then cfg.replication = replication_source_table else local choice = choose_option('replication', 'replication_source', override) diff --git a/1.8/tarantool-entrypoint.lua b/1.8/tarantool-entrypoint.lua index c4bd76a..76f4b27 100755 --- a/1.8/tarantool-entrypoint.lua +++ b/1.8/tarantool-entrypoint.lua @@ -243,7 +243,7 @@ local function wrapper_cfg(override) user_name, user_password) - if replication_source then + if replication_source_table then cfg.replication = replication_source_table else local choice = choose_option('replication', 'replication_source', override) From 32c36207de1333060a904ef4fe241ef40b3dd740 Mon Sep 17 00:00:00 2001 From: Roman Proskin Date: Thu, 19 Oct 2017 17:00:18 +0300 Subject: [PATCH 096/286] Correct replication option and set_replication_source function In order to use tarantool_set_config.lua set_replication_source function has been corrected. Removed new options from 1.6 since they had become deprecated only in 1.7 --- 1.6/tarantool-entrypoint.lua | 50 ++++++---------------------- 1.7-centos7/tarantool-entrypoint.lua | 33 +++++++++--------- 1.7-centos7/tarantool_set_config.lua | 3 +- 1.7/tarantool-entrypoint.lua | 31 ++++++++--------- 1.7/tarantool_set_config.lua | 3 +- 1.8/tarantool-entrypoint.lua | 31 ++++++++--------- 1.8/tarantool_set_config.lua | 3 +- 7 files changed, 65 insertions(+), 89 deletions(-) diff --git a/1.6/tarantool-entrypoint.lua b/1.6/tarantool-entrypoint.lua index be2db02..a71ec17 100755 --- a/1.6/tarantool-entrypoint.lua +++ b/1.6/tarantool-entrypoint.lua @@ -10,7 +10,7 @@ local log = require('log') local yaml = require('yaml') local TARANTOOL_DEFAULT_PORT = 3301 -local TARANTOOL_DEFAULT_CHECKPOINT_INTERVAL = 3600 -- seconds +local TARANTOOL_DEFAULT_SNAPSHOT_PERIOD = 3600 -- seconds local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' local CFG_FILE_PATH = '/etc/tarantool/config.yml' @@ -149,16 +149,6 @@ function set_credentials(user_name, user_password) create_user(user_name, user_password) end -local function choose_option(main, substitute, cfg) - if cfg[main] then - return main - end - if cfg[substitute] then - return substitute - end - return main -end - local function wrapper_cfg(override) local work_dir = '/var/lib/tarantool' local snap_filename = "*.snap" @@ -184,12 +174,7 @@ local function wrapper_cfg(override) file_cfg.TARANTOOL_PORT = os.getenv('TARANTOOL_PORT') file_cfg.TARANTOOL_WAL_MODE = os.getenv('TARANTOOL_WAL_MODE') file_cfg.TARANTOOL_REPLICATION_SOURCE = os.getenv('TARANTOOL_REPLICATION_SOURCE') - file_cfg.TARANTOOL_REPLICATION = os.getenv('TARANTOOL_REPLICATION') file_cfg.TARANTOOL_SNAPSHOT_PERIOD = os.getenv('TARANTOOL_SNAPSHOT_PERIOD') - file_cfg.TARANTOOL_MEMTX_MEMORY = os.getenv('TARANTOOL_MEMTX_MEMORY') - file_cfg.TARANTOOL_CHECKPOINT_INTERVAL = os.getenv('TARANTOOL_CHECKPOINT_INTERVAL') - file_cfg.TARANTOOL_MEMTX_MIN_TUPLE_SIZE = os.getenv('TARANTOOL_MEMTX_MIN_TUPLE_SIZE') - file_cfg.TARANTOOL_MEMTX_MAX_TUPLE_SIZE = os.getenv('TARANTOOL_MEMTX_MAX_TUPLE_SIZE') write_config(file_cfg) else @@ -205,49 +190,34 @@ local function wrapper_cfg(override) local cfg = override or {} - -- Placeholders for deprecated options cfg.slab_alloc_arena = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_ARENA) or override.slab_alloc_arena + cfg.slab_alloc_factor = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_FACTOR) or + override.slab_alloc_factor cfg.slab_alloc_maximal = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_MAXIMAL) or override.slab_alloc_maximal cfg.slab_alloc_minimal = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_MINIMAL) or override.slab_alloc_minimal - -- Replacements for deprecated options - cfg.memtx_memory = tonumber(file_cfg.TARANTOOL_MEMTX_MEMORY) or - override.memtx_memory - cfg.memtx_min_tuple_size = tonumber(file_cfg.TARANTOOL_MEMTX_MIN_TUPLE_SIZE) or - override.memtx_min_tuple_size - cfg.memtx_max_tuple_size = tonumber(file_cfg.TARANTOOL_MEMTX_MAX_TUPLE_SIZE) or - override.memtx_max_tuple_size - -- Deprecated options with default values - local choice = choose_option('memtx_dir', 'snap_dir', override) - cfg[choice] = override[choice] or '/var/lib/tarantool' - local choice = choose_option('checkpoint_interval', 'snapshot_period', override) - local choice2 = choose_option('TARANTOOL_CHECKPOINT_INTERVAL', 'TARANTOOL_SNAPSHOT_PERIOD', file_cfg) - cfg[choice] = tonumber(file_cfg[choice2]) or override[choice] or - TARANTOOL_DEFAULT_CHECKPOINT_INTERVAL - - -- Remaining configuration - cfg.slab_alloc_factor = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_FACTOR) or - override.slab_alloc_factor cfg.listen = tonumber(file_cfg.TARANTOOL_PORT) or override.listen or TARANTOOL_DEFAULT_PORT cfg.wal_mode = file_cfg.TARANTOOL_WAL_MODE or override.wal_mode + cfg.snapshot_period = tonumber(file_cfg.TARANTOOL_SNAPSHOT_PERIOD) or + override.snapshot_period or TARANTOOL_DEFAULT_SNAPSHOT_PERIOD cfg.wal_dir = override.wal_dir or '/var/lib/tarantool' + cfg.snap_dir = override.snap_dir or '/var/lib/tarantool' cfg.pid_file = override.pid_file or '/var/run/tarantool/tarantool.pid' - local choice = choose_option('TARANTOOL_REPLICATION', 'TARANTOOL_REPLICATION_SOURCE', file_cfg) - local replication_source_table = parse_replication_source(file_cfg[choice], + local replication_source = file_cfg.TARANTOOL_REPLICATION_SOURCE + local replication_source_table = parse_replication_source(replication_source, user_name, user_password) if replication_source then - cfg.replication = replication_source_table + cfg.replication_source = replication_source_table else - local choice = choose_option('replication', 'replication_source', override) - cfg[choice] = override[choice] + cfg.replication_source = override.replication_source end log.info("Config:\n" .. yaml.encode(cfg)) diff --git a/1.7-centos7/tarantool-entrypoint.lua b/1.7-centos7/tarantool-entrypoint.lua index c4bd76a..11cd89d 100755 --- a/1.7-centos7/tarantool-entrypoint.lua +++ b/1.7-centos7/tarantool-entrypoint.lua @@ -69,12 +69,23 @@ local function parse_replication_source(replication_source, user_name, user_pass return replication_source_table end -function set_replication_source(replication_source, user_name, user_password) - local replication_source_table = - parse_replication_source(replication_source, user_name, user_password) - box.cfg{replication_source = replication_source_table} +local function choose_option(main, substitute, cfg) + if cfg[main] then + return main + end + if cfg[substitute] then + return substitute + end + return main +end - log.info("Updated box.cfg{replication_source} to "..replication_source) +function set_replication_source(replication_source, user_name, user_password) + local replication_source_table = parse_replication_source( + replication_source, user_name, user_password + ) + local choice = choose_option('replication', 'replication_source', box.cfg) + box.cfg{[choice] = replication_source_table} + log.info("Updated box.cfg.%s to %s", choice, replication_source) end local function create_user(user_name, user_password) @@ -148,16 +159,6 @@ function set_credentials(user_name, user_password) create_user(user_name, user_password) end -local function choose_option(main, substitute, cfg) - if cfg[main] then - return main - end - if cfg[substitute] then - return substitute - end - return main -end - local function wrapper_cfg(override) local work_dir = '/var/lib/tarantool' local snap_filename = "*.snap" @@ -243,7 +244,7 @@ local function wrapper_cfg(override) user_name, user_password) - if replication_source then + if replication_source_table then cfg.replication = replication_source_table else local choice = choose_option('replication', 'replication_source', override) diff --git a/1.7-centos7/tarantool_set_config.lua b/1.7-centos7/tarantool_set_config.lua index f6b2a55..ddca36c 100755 --- a/1.7-centos7/tarantool_set_config.lua +++ b/1.7-centos7/tarantool_set_config.lua @@ -90,7 +90,8 @@ local vars = { TARANTOOL_WAL_MODE=nop, TARANTOOL_USER_NAME=update_credentials, TARANTOOL_USER_PASSWORD=update_credentials, - TARANTOOL_REPLICATION_SOURCE=update_replication_source + TARANTOOL_REPLICATION_SOURCE=update_replication_source, + TARANTOOL_REPLICATION=update_replication_source, } console.on_start(function(self) diff --git a/1.7/tarantool-entrypoint.lua b/1.7/tarantool-entrypoint.lua index 76f4b27..11cd89d 100755 --- a/1.7/tarantool-entrypoint.lua +++ b/1.7/tarantool-entrypoint.lua @@ -69,12 +69,23 @@ local function parse_replication_source(replication_source, user_name, user_pass return replication_source_table end -function set_replication_source(replication_source, user_name, user_password) - local replication_source_table = - parse_replication_source(replication_source, user_name, user_password) - box.cfg{replication_source = replication_source_table} +local function choose_option(main, substitute, cfg) + if cfg[main] then + return main + end + if cfg[substitute] then + return substitute + end + return main +end - log.info("Updated box.cfg{replication_source} to "..replication_source) +function set_replication_source(replication_source, user_name, user_password) + local replication_source_table = parse_replication_source( + replication_source, user_name, user_password + ) + local choice = choose_option('replication', 'replication_source', box.cfg) + box.cfg{[choice] = replication_source_table} + log.info("Updated box.cfg.%s to %s", choice, replication_source) end local function create_user(user_name, user_password) @@ -148,16 +159,6 @@ function set_credentials(user_name, user_password) create_user(user_name, user_password) end -local function choose_option(main, substitute, cfg) - if cfg[main] then - return main - end - if cfg[substitute] then - return substitute - end - return main -end - local function wrapper_cfg(override) local work_dir = '/var/lib/tarantool' local snap_filename = "*.snap" diff --git a/1.7/tarantool_set_config.lua b/1.7/tarantool_set_config.lua index f6b2a55..ddca36c 100755 --- a/1.7/tarantool_set_config.lua +++ b/1.7/tarantool_set_config.lua @@ -90,7 +90,8 @@ local vars = { TARANTOOL_WAL_MODE=nop, TARANTOOL_USER_NAME=update_credentials, TARANTOOL_USER_PASSWORD=update_credentials, - TARANTOOL_REPLICATION_SOURCE=update_replication_source + TARANTOOL_REPLICATION_SOURCE=update_replication_source, + TARANTOOL_REPLICATION=update_replication_source, } console.on_start(function(self) diff --git a/1.8/tarantool-entrypoint.lua b/1.8/tarantool-entrypoint.lua index 76f4b27..11cd89d 100755 --- a/1.8/tarantool-entrypoint.lua +++ b/1.8/tarantool-entrypoint.lua @@ -69,12 +69,23 @@ local function parse_replication_source(replication_source, user_name, user_pass return replication_source_table end -function set_replication_source(replication_source, user_name, user_password) - local replication_source_table = - parse_replication_source(replication_source, user_name, user_password) - box.cfg{replication_source = replication_source_table} +local function choose_option(main, substitute, cfg) + if cfg[main] then + return main + end + if cfg[substitute] then + return substitute + end + return main +end - log.info("Updated box.cfg{replication_source} to "..replication_source) +function set_replication_source(replication_source, user_name, user_password) + local replication_source_table = parse_replication_source( + replication_source, user_name, user_password + ) + local choice = choose_option('replication', 'replication_source', box.cfg) + box.cfg{[choice] = replication_source_table} + log.info("Updated box.cfg.%s to %s", choice, replication_source) end local function create_user(user_name, user_password) @@ -148,16 +159,6 @@ function set_credentials(user_name, user_password) create_user(user_name, user_password) end -local function choose_option(main, substitute, cfg) - if cfg[main] then - return main - end - if cfg[substitute] then - return substitute - end - return main -end - local function wrapper_cfg(override) local work_dir = '/var/lib/tarantool' local snap_filename = "*.snap" diff --git a/1.8/tarantool_set_config.lua b/1.8/tarantool_set_config.lua index f6b2a55..ddca36c 100755 --- a/1.8/tarantool_set_config.lua +++ b/1.8/tarantool_set_config.lua @@ -90,7 +90,8 @@ local vars = { TARANTOOL_WAL_MODE=nop, TARANTOOL_USER_NAME=update_credentials, TARANTOOL_USER_PASSWORD=update_credentials, - TARANTOOL_REPLICATION_SOURCE=update_replication_source + TARANTOOL_REPLICATION_SOURCE=update_replication_source, + TARANTOOL_REPLICATION=update_replication_source, } console.on_start(function(self) From d1038211e16fb1de36199b1c27d1ce3a2728c4fe Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Fri, 27 Oct 2017 17:01:30 +0300 Subject: [PATCH 097/286] Bump tarantool version --- 1.7-centos7/Dockerfile | 5 ++++- 1.7/Dockerfile | 4 +++- 1.8/Dockerfile | 4 +++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/1.7-centos7/Dockerfile b/1.7-centos7/Dockerfile index c561d45..73fb462 100644 --- a/1.7-centos7/Dockerfile +++ b/1.7-centos7/Dockerfile @@ -4,7 +4,7 @@ MAINTAINER mail@racktear.com RUN groupadd tarantool \ && adduser -g tarantool tarantool -ENV TARANTOOL_VERSION=1.7.5-0-g24b70de10 \ +ENV TARANTOOL_VERSION=1.7.5-250-g8c55b4993 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ LUAROCKS_URL=http://keplerproject.github.io/luarocks/releases/luarocks-2.3.0.tar.gz \ @@ -57,6 +57,7 @@ RUN set -x \ zip \ libunwind \ libcurl \ + libicu \ && yum -y install \ perl \ gcc-c++ \ @@ -77,6 +78,7 @@ RUN set -x \ go \ wget \ curl-devel \ + libicu-devel \ && : "---------- gperftools ----------" \ && yum install -y gperftools-libs \ && (GOPATH=/usr/src/go go get github.com/google/pprof; \ @@ -148,6 +150,7 @@ RUN set -x \ kernel-headers \ golang-src \ curl-devel \ + libicu-devel \ && rpm -qa | grep devel | xargs yum -y remove \ && rm -rf /var/cache/yum diff --git a/1.7/Dockerfile b/1.7/Dockerfile index 0498ffe..b4a089f 100644 --- a/1.7/Dockerfile +++ b/1.7/Dockerfile @@ -5,7 +5,7 @@ RUN addgroup -S tarantool \ && adduser -S -G tarantool tarantool \ && apk add --no-cache 'su-exec>=0.2' -ENV TARANTOOL_VERSION=1.7.5-0-g24b70de10 \ +ENV TARANTOOL_VERSION=1.7.5-250-g8c55b4993 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ @@ -58,6 +58,7 @@ RUN set -x \ zip \ libunwind \ libcurl \ + icu \ && apk add --no-cache --virtual .build-deps \ perl \ gcc \ @@ -80,6 +81,7 @@ RUN set -x \ linux-headers \ go \ curl-dev \ + icu-dev \ && : "---------- gperftools ----------" \ && mkdir -p /usr/src/gperftools \ && git clone "$GPERFTOOLS_REPO" /usr/src/gperftools \ diff --git a/1.8/Dockerfile b/1.8/Dockerfile index 9aec48f..4592ddd 100644 --- a/1.8/Dockerfile +++ b/1.8/Dockerfile @@ -5,7 +5,7 @@ RUN addgroup -S tarantool \ && adduser -S -G tarantool tarantool \ && apk add --no-cache 'su-exec>=0.2' -ENV TARANTOOL_VERSION=1.8.1-415-ge3d2485c7 \ +ENV TARANTOOL_VERSION=1.8.2-279-gbecd1e826 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ @@ -58,6 +58,7 @@ RUN set -x \ zip \ libunwind \ libcurl \ + icu \ && apk add --no-cache --virtual .build-deps \ perl \ gcc \ @@ -81,6 +82,7 @@ RUN set -x \ go \ tcl \ curl-dev \ + icu-dev \ && : "---------- gperftools ----------" \ && mkdir -p /usr/src/gperftools \ && git clone "$GPERFTOOLS_REPO" /usr/src/gperftools \ From 2ef4b6ee5028e742c5a43e43a8773a5fc3e94b36 Mon Sep 17 00:00:00 2001 From: Roman Tsisyk Date: Mon, 4 Dec 2017 08:54:46 +0300 Subject: [PATCH 098/286] Bump Tarantool version Tarantool 1.7.5-250-g8c55b4993 was an intermediate nighly version. Switch to released 1.7.6+hotfixes to and multiple bugs. --- 1.7-centos7/Dockerfile | 2 +- 1.7/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/1.7-centos7/Dockerfile b/1.7-centos7/Dockerfile index 73fb462..b89b3d8 100644 --- a/1.7-centos7/Dockerfile +++ b/1.7-centos7/Dockerfile @@ -4,7 +4,7 @@ MAINTAINER mail@racktear.com RUN groupadd tarantool \ && adduser -g tarantool tarantool -ENV TARANTOOL_VERSION=1.7.5-250-g8c55b4993 \ +ENV TARANTOOL_VERSION=1.7.6-11-gcd17b77f9 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ LUAROCKS_URL=http://keplerproject.github.io/luarocks/releases/luarocks-2.3.0.tar.gz \ diff --git a/1.7/Dockerfile b/1.7/Dockerfile index b4a089f..c7e947c 100644 --- a/1.7/Dockerfile +++ b/1.7/Dockerfile @@ -5,7 +5,7 @@ RUN addgroup -S tarantool \ && adduser -S -G tarantool tarantool \ && apk add --no-cache 'su-exec>=0.2' -ENV TARANTOOL_VERSION=1.7.5-250-g8c55b4993 \ +ENV TARANTOOL_VERSION=1.7.6-11-gcd17b77f9 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ From fbb36264a95d4241a97b36a52ea5749d025b446e Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Thu, 18 Jan 2018 16:05:10 +0300 Subject: [PATCH 099/286] Update prometheus rock to 1.0.0 --- 1.7-centos7/Dockerfile | 7 ++----- 1.7/Dockerfile | 7 ++----- 1.8/Dockerfile | 7 ++----- 3 files changed, 6 insertions(+), 15 deletions(-) diff --git a/1.7-centos7/Dockerfile b/1.7-centos7/Dockerfile index b89b3d8..6c564c6 100644 --- a/1.7-centos7/Dockerfile +++ b/1.7-centos7/Dockerfile @@ -26,8 +26,7 @@ ENV TARANTOOL_VERSION=1.7.6-11-gcd17b77f9 \ LUAROCK_MYSQL_TAG=3203633 \ LUAROCK_MEMCACHED_REPO=https://github.com/tarantool/memcached.git \ LUAROCK_MEMCACHED_TAG=7aa78b2 \ - LUAROCK_TARANTOOL_PROMETHEUS_REPO=https://github.com/tarantool/prometheus.git \ - LUAROCK_TARANTOOL_PROMETHEUS_TAG=0654304 \ + LUAROCK_TARANTOOL_PROMETHEUS_VERSION=1.0.0 \ LUAROCK_TARANTOOL_CURL_REPO=https://github.com/tarantool/curl.git \ LUAROCK_TARANTOOL_CURL_TAG=2.2.7 \ LUAROCK_MQTT_REPO=https://github.com/tarantool/mqtt.git \ @@ -226,9 +225,7 @@ RUN set -x \ && (cd /rocks/memcached; git checkout $LUAROCK_MEMCACHED_TAG) \ && (cd /rocks/memcached && luarocks make *rockspec) \ && : "prometheus" \ - && git clone $LUAROCK_TARANTOOL_PROMETHEUS_REPO /rocks/prometheus \ - && (cd /rocks/prometheus; git checkout $LUAROCK_TARANTOOL_PROMETHEUS_TAG) \ - && (cd /rocks/prometheus && luarocks make *rockspec) \ + && luarocks install prometheus $LUAROCK_TARANTOOL_PROMETHEUS_VERSION \ && : "curl" \ && git clone $LUAROCK_TARANTOOL_CURL_REPO /rocks/curl \ && (cd /rocks/curl; git checkout $LUAROCK_TARANTOOL_CURL_TAG) \ diff --git a/1.7/Dockerfile b/1.7/Dockerfile index c7e947c..86a2513 100644 --- a/1.7/Dockerfile +++ b/1.7/Dockerfile @@ -29,8 +29,7 @@ ENV TARANTOOL_VERSION=1.7.6-11-gcd17b77f9 \ LUAROCK_MYSQL_TAG=3203633 \ LUAROCK_MEMCACHED_REPO=https://github.com/tarantool/memcached.git \ LUAROCK_MEMCACHED_TAG=7aa78b2 \ - LUAROCK_TARANTOOL_PROMETHEUS_REPO=https://github.com/tarantool/prometheus.git \ - LUAROCK_TARANTOOL_PROMETHEUS_TAG=0654304 \ + LUAROCK_TARANTOOL_PROMETHEUS_VERSION=1.0.0 \ LUAROCK_TARANTOOL_CURL_REPO=https://github.com/tarantool/curl.git \ LUAROCK_TARANTOOL_CURL_TAG=2.2.7 \ LUAROCK_MQTT_REPO=https://github.com/tarantool/mqtt.git \ @@ -226,9 +225,7 @@ RUN set -x \ && git -C /rocks/memcached checkout $LUAROCK_MEMCACHED_TAG \ && (cd /rocks/memcached && luarocks make *rockspec) \ && : "prometheus" \ - && git clone $LUAROCK_TARANTOOL_PROMETHEUS_REPO /rocks/prometheus \ - && git -C /rocks/prometheus checkout $LUAROCK_TARANTOOL_PROMETHEUS_TAG \ - && (cd /rocks/prometheus && luarocks make *rockspec) \ + && luarocks install prometheus $LUAROCK_TARANTOOL_PROMETHEUS_VERSION \ && : "curl" \ && git clone $LUAROCK_TARANTOOL_CURL_REPO /rocks/curl \ && git -C /rocks/curl checkout $LUAROCK_TARANTOOL_CURL_TAG \ diff --git a/1.8/Dockerfile b/1.8/Dockerfile index 4592ddd..d1b5ce3 100644 --- a/1.8/Dockerfile +++ b/1.8/Dockerfile @@ -29,8 +29,7 @@ ENV TARANTOOL_VERSION=1.8.2-279-gbecd1e826 \ LUAROCK_MYSQL_TAG=3203633 \ LUAROCK_MEMCACHED_REPO=https://github.com/tarantool/memcached.git \ LUAROCK_MEMCACHED_TAG=7aa78b2 \ - LUAROCK_TARANTOOL_PROMETHEUS_REPO=https://github.com/tarantool/prometheus.git \ - LUAROCK_TARANTOOL_PROMETHEUS_TAG=0654304 \ + LUAROCK_TARANTOOL_PROMETHEUS_VERSION=1.0.0 \ LUAROCK_TARANTOOL_CURL_REPO=https://github.com/tarantool/curl.git \ LUAROCK_TARANTOOL_CURL_TAG=2.2.7 \ LUAROCK_MQTT_REPO=https://github.com/tarantool/mqtt.git \ @@ -229,9 +228,7 @@ RUN set -x \ && git -C /rocks/memcached checkout $LUAROCK_MEMCACHED_TAG \ && (cd /rocks/memcached && luarocks make *rockspec) \ && : "prometheus" \ - && git clone $LUAROCK_TARANTOOL_PROMETHEUS_REPO /rocks/prometheus \ - && git -C /rocks/prometheus checkout $LUAROCK_TARANTOOL_PROMETHEUS_TAG \ - && (cd /rocks/prometheus && luarocks make *rockspec) \ + && luarocks install prometheus $LUAROCK_TARANTOOL_PROMETHEUS_VERSION \ && : "curl" \ && git clone $LUAROCK_TARANTOOL_CURL_REPO /rocks/curl \ && git -C /rocks/curl checkout $LUAROCK_TARANTOOL_CURL_TAG \ From 60365de8e2c746779f6e87d070f45783b9af7d14 Mon Sep 17 00:00:00 2001 From: Roman Proskin Date: Fri, 26 Jan 2018 19:09:57 +0300 Subject: [PATCH 100/286] Use new released rockspecs --- 1.7-centos7/Dockerfile | 87 +++++++++++++----------------------------- 1.7/Dockerfile | 86 ++++++++++++----------------------------- 1.8/Dockerfile | 86 ++++++++++++----------------------------- 3 files changed, 76 insertions(+), 183 deletions(-) diff --git a/1.7-centos7/Dockerfile b/1.7-centos7/Dockerfile index 6c564c6..3f65b5e 100644 --- a/1.7-centos7/Dockerfile +++ b/1.7-centos7/Dockerfile @@ -7,34 +7,22 @@ RUN groupadd tarantool \ ENV TARANTOOL_VERSION=1.7.6-11-gcd17b77f9 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ - LUAROCKS_URL=http://keplerproject.github.io/luarocks/releases/luarocks-2.3.0.tar.gz \ - LUAROCK_AVRO_SCHEMA_REPO=https://github.com/tarantool/avro-schema.git \ - LUAROCK_AVRO_SCHEMA_TAG=b49efa8 \ - LUAROCK_EXPIRATIOND_REPO=https://github.com/tarantool/expirationd.git \ - LUAROCK_EXPIRATIOND_TAG=9ec22b6 \ - LUAROCK_QUEUE_REPO=https://github.com/tarantool/queue.git \ - LUAROCK_QUEUE_TAG=24d730c \ - LUAROCK_CONNPOOL_REPO=https://github.com/tarantool/connpool.git \ - LUAROCK_CONNPOOL_TAG=89c2fe4 \ + LUAROCKS_URL=https://github.com/tarantool/luarocks/archive/6e6fe62d9409fe2103c0fd091cccb3da0451faf5.tar.gz \ LUAROCK_SHARD_REPO=https://github.com/tarantool/shard.git \ LUAROCK_SHARD_TAG=8f8c5a7 \ - LUAROCK_HTTP_REPO=https://github.com/tarantool/http.git \ - LUAROCK_HTTP_TAG=67d8a9b \ - LUAROCK_PG_REPO=https://github.com/tarantool/pg.git \ - LUAROCK_PG_TAG=8bb4164 \ - LUAROCK_MYSQL_REPO=https://github.com/tarantool/mysql.git \ - LUAROCK_MYSQL_TAG=3203633 \ - LUAROCK_MEMCACHED_REPO=https://github.com/tarantool/memcached.git \ - LUAROCK_MEMCACHED_TAG=7aa78b2 \ + LUAROCK_AVRO_SCHEMA_VERSION=2.0.1 \ + LUAROCK_EXPERATIOND_VERSION=1.0.1 \ + LUAROCK_QUEUE_VERSION=1.0.2 \ + LUAROCK_CONNPOOL_VERSION=1.1.1 \ + LUAROCK_HTTP_VERSION=1.0.1 \ + LUAROCK_MEMCACHED_VERSION=1.0.0 \ + LUAROCK_TARANTOOL_PG_VERSION=2.0.1 \ + LUAROCK_TARANTOOL_MYSQL_VERSION=2.0.1 \ + LUAROCK_TARANTOOL_CURL_VERSION=2.3.1 \ + LUAROCK_TARANTOOL_MQTT_VERSION=1.2.1 \ + LUAROCK_TARANTOOL_GIS_VERSION=1.0.0 \ LUAROCK_TARANTOOL_PROMETHEUS_VERSION=1.0.0 \ - LUAROCK_TARANTOOL_CURL_REPO=https://github.com/tarantool/curl.git \ - LUAROCK_TARANTOOL_CURL_TAG=2.2.7 \ - LUAROCK_MQTT_REPO=https://github.com/tarantool/mqtt.git \ - LUAROCK_MQTT_TAG=238fd2e \ - LUAROCK_TARANTOOL_GIS_REPO=https://github.com/tarantool/gis.git \ - LUAROCK_TARANTOOL_GIS_TAG=25209fc \ - LUAROCK_GPERFTOOLS_REPO=https://github.com/tarantool/gperftools.git \ - LUAROCK_GPERFTOOLS_TAG=12a7ac2 + LUAROCK_TARANTOOL_GPERFTOOLS_VERSION=1.0.1 RUN yum -y install epel-release && \ yum -y update && \ @@ -54,6 +42,7 @@ RUN set -x \ curl \ tar \ zip \ + unzip \ libunwind \ libcurl \ libicu \ @@ -189,59 +178,35 @@ RUN set -x \ && luarocks install lua-term \ && luarocks install ldoc \ && : "avro" \ - && git clone $LUAROCK_AVRO_SCHEMA_REPO /rocks/avro \ - && (cd /rocks/avro; git checkout $LUAROCK_AVRO_SCHEMA_TAG) \ - && (cd /rocks/avro && luarocks make *rockspec) \ + && luarocks install avro-schema $LUAROCK_AVRO_SCHEMA_VERSION \ && : "expirationd" \ - && git clone $LUAROCK_EXPIRATIOND_REPO /rocks/expirationd \ - && (cd /rocks/expirationd; git checkout $LUAROCK_EXPIRATIOND_TAG) \ - && (cd /rocks/expirationd && luarocks make *rockspec) \ + && luarocks install expirationd $LUAROCK_EXPERATIOND_VERSION \ && : "queue" \ - && git clone $LUAROCK_QUEUE_REPO /rocks/queue \ - && (cd /rocks/queue; git checkout $LUAROCK_QUEUE_TAG) \ - && (cd /rocks/queue && luarocks make *rockspec) \ + && luarocks install queue $LUAROCK_QUEUE_VERSION \ && : "connpool" \ - && git clone $LUAROCK_CONNPOOL_REPO /rocks/connpool \ - && (cd /rocks/connpool; git checkout $LUAROCK_CONNPOOL_TAG) \ - && (cd /rocks/connpool && luarocks make *rockspec) \ + && luarocks install connpool $LUAROCK_CONNPOOL_VERSION \ && : "shard" \ && git clone $LUAROCK_SHARD_REPO /rocks/shard \ && (cd /rocks/shard; git checkout $LUAROCK_SHARD_TAG) \ && (cd /rocks/shard && luarocks make *rockspec) \ && : "http" \ - && git clone $LUAROCK_HTTP_REPO /rocks/http \ - && (cd /rocks/http; git checkout $LUAROCK_HTTP_TAG) \ - && (cd /rocks/http && luarocks make *rockspec) \ + && luarocks install http $LUAROCK_HTTP_VERSION \ && : "pg" \ - && git clone $LUAROCK_PG_REPO /rocks/pg \ - && (cd /rocks/pg; git checkout $LUAROCK_PG_TAG) \ - && (cd /rocks/pg && luarocks make *rockspec) \ + && luarocks install pg $LUAROCK_TARANTOOL_PG_VERSION \ && : "mysql" \ - && git clone $LUAROCK_MYSQL_REPO /rocks/mysql \ - && (cd /rocks/mysql; git checkout $LUAROCK_MYSQL_TAG) \ - && (cd /rocks/mysql && luarocks make *rockspec) \ + && luarocks install mysql $LUAROCK_TARANTOOL_MYSQL_VERSION \ && : "memcached" \ - && git clone $LUAROCK_MEMCACHED_REPO /rocks/memcached \ - && (cd /rocks/memcached; git checkout $LUAROCK_MEMCACHED_TAG) \ - && (cd /rocks/memcached && luarocks make *rockspec) \ + && luarocks install memcached $LUAROCK_MEMCACHED_VERSION \ && : "prometheus" \ && luarocks install prometheus $LUAROCK_TARANTOOL_PROMETHEUS_VERSION \ && : "curl" \ - && git clone $LUAROCK_TARANTOOL_CURL_REPO /rocks/curl \ - && (cd /rocks/curl; git checkout $LUAROCK_TARANTOOL_CURL_TAG) \ - && (cd /rocks/curl && luarocks make *rockspec) \ + && luarocks install tarantool-curl $LUAROCK_TARANTOOL_CURL_VERSION \ && : "mqtt" \ - && git clone $LUAROCK_MQTT_REPO /rocks/mqtt \ - && (cd /rocks/mqtt; git checkout $LUAROCK_MQTT_TAG) \ - && (cd /rocks/mqtt && luarocks make *rockspec) \ + && luarocks install mqtt $LUAROCK_TARANTOOL_MQTT_VERSION \ && : "gis" \ - && git clone $LUAROCK_TARANTOOL_GIS_REPO /rocks/gis \ - && (cd /rocks/gis; git checkout $LUAROCK_TARANTOOL_GIS_TAG) \ - && (cd /rocks/gis && luarocks make *rockspec) \ + && luarocks install gis $LUAROCK_TARANTOOL_GIS_VERSION \ && : "gperftools" \ - && git clone $LUAROCK_GPERFTOOLS_REPO /rocks/gperftools \ - && (cd /rocks/gperftools; git checkout $LUAROCK_GPERFTOOLS_TAG) \ - && (cd /rocks/gperftools && luarocks make *rockspec) \ + && luarocks install gperftools $LUAROCK_TARANTOOL_GPERFTOOLS_VERSION \ && : "---------- remove build deps ----------" \ && rm -rf /rocks \ && yum -y remove \ diff --git a/1.7/Dockerfile b/1.7/Dockerfile index 86a2513..2884f86 100644 --- a/1.7/Dockerfile +++ b/1.7/Dockerfile @@ -10,34 +10,22 @@ ENV TARANTOOL_VERSION=1.7.6-11-gcd17b77f9 \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ GPERFTOOLS_TAG=gperftools-2.5 \ - LUAROCKS_URL=http://keplerproject.github.io/luarocks/releases/luarocks-2.3.0.tar.gz \ - LUAROCK_AVRO_SCHEMA_REPO=https://github.com/tarantool/avro-schema.git \ - LUAROCK_AVRO_SCHEMA_TAG=b49efa8 \ - LUAROCK_EXPIRATIOND_REPO=https://github.com/tarantool/expirationd.git \ - LUAROCK_EXPIRATIOND_TAG=9ec22b6 \ - LUAROCK_QUEUE_REPO=https://github.com/tarantool/queue.git \ - LUAROCK_QUEUE_TAG=24d730c \ - LUAROCK_CONNPOOL_REPO=https://github.com/tarantool/connpool.git \ - LUAROCK_CONNPOOL_TAG=89c2fe4 \ + LUAROCKS_URL=https://github.com/tarantool/luarocks/archive/6e6fe62d9409fe2103c0fd091cccb3da0451faf5.tar.gz \ LUAROCK_SHARD_REPO=https://github.com/tarantool/shard.git \ LUAROCK_SHARD_TAG=8f8c5a7 \ - LUAROCK_HTTP_REPO=https://github.com/tarantool/http.git \ - LUAROCK_HTTP_TAG=67d8a9b \ - LUAROCK_PG_REPO=https://github.com/tarantool/pg.git \ - LUAROCK_PG_TAG=8bb4164 \ - LUAROCK_MYSQL_REPO=https://github.com/tarantool/mysql.git \ - LUAROCK_MYSQL_TAG=3203633 \ - LUAROCK_MEMCACHED_REPO=https://github.com/tarantool/memcached.git \ - LUAROCK_MEMCACHED_TAG=7aa78b2 \ + LUAROCK_AVRO_SCHEMA_VERSION=2.0.1 \ + LUAROCK_EXPERATIOND_VERSION=1.0.1 \ + LUAROCK_QUEUE_VERSION=1.0.2 \ + LUAROCK_CONNPOOL_VERSION=1.1.1 \ + LUAROCK_HTTP_VERSION=1.0.1 \ + LUAROCK_MEMCACHED_VERSION=1.0.0 \ + LUAROCK_TARANTOOL_PG_VERSION=2.0.1 \ + LUAROCK_TARANTOOL_MYSQL_VERSION=2.0.1 \ + LUAROCK_TARANTOOL_CURL_VERSION=2.3.1 \ + LUAROCK_TARANTOOL_MQTT_VERSION=1.2.1 \ + LUAROCK_TARANTOOL_GIS_VERSION=1.0.0 \ LUAROCK_TARANTOOL_PROMETHEUS_VERSION=1.0.0 \ - LUAROCK_TARANTOOL_CURL_REPO=https://github.com/tarantool/curl.git \ - LUAROCK_TARANTOOL_CURL_TAG=2.2.7 \ - LUAROCK_MQTT_REPO=https://github.com/tarantool/mqtt.git \ - LUAROCK_MQTT_TAG=238fd2e \ - LUAROCK_TARANTOOL_GIS_REPO=https://github.com/tarantool/gis.git \ - LUAROCK_TARANTOOL_GIS_TAG=25209fc \ - LUAROCK_GPERFTOOLS_REPO=https://github.com/tarantool/gperftools.git \ - LUAROCK_GPERFTOOLS_TAG=12a7ac2 + LUAROCK_TARANTOOL_GPERFTOOLS_VERSION=1.0.1 COPY gperftools_alpine.diff / @@ -189,59 +177,35 @@ RUN set -x \ && luarocks install lua-term \ && luarocks install ldoc \ && : "avro" \ - && git clone $LUAROCK_AVRO_SCHEMA_REPO /rocks/avro \ - && git -C /rocks/avro checkout $LUAROCK_AVRO_SCHEMA_TAG \ - && (cd /rocks/avro && luarocks make *rockspec) \ + && luarocks install avro-schema $LUAROCK_AVRO_SCHEMA_VERSION \ && : "expirationd" \ - && git clone $LUAROCK_EXPIRATIOND_REPO /rocks/expirationd \ - && git -C /rocks/expirationd checkout $LUAROCK_EXPIRATIOND_TAG \ - && (cd /rocks/expirationd && luarocks make *rockspec) \ + && luarocks install expirationd $LUAROCK_EXPERATIOND_VERSION \ && : "queue" \ - && git clone $LUAROCK_QUEUE_REPO /rocks/queue \ - && git -C /rocks/queue checkout $LUAROCK_QUEUE_TAG \ - && (cd /rocks/queue && luarocks make *rockspec) \ + && luarocks install queue $LUAROCK_QUEUE_VERSION \ && : "connpool" \ - && git clone $LUAROCK_CONNPOOL_REPO /rocks/connpool \ - && git -C /rocks/connpool checkout $LUAROCK_CONNPOOL_TAG \ - && (cd /rocks/connpool && luarocks make *rockspec) \ + && luarocks install connpool $LUAROCK_CONNPOOL_VERSION \ && : "shard" \ && git clone $LUAROCK_SHARD_REPO /rocks/shard \ && git -C /rocks/shard checkout $LUAROCK_SHARD_TAG \ && (cd /rocks/shard && luarocks make *rockspec) \ && : "http" \ - && git clone $LUAROCK_HTTP_REPO /rocks/http \ - && git -C /rocks/http checkout $LUAROCK_HTTP_TAG \ - && (cd /rocks/http && luarocks make *rockspec) \ + && luarocks install http $LUAROCK_HTTP_VERSION \ && : "pg" \ - && git clone $LUAROCK_PG_REPO /rocks/pg \ - && git -C /rocks/pg checkout $LUAROCK_PG_TAG \ - && (cd /rocks/pg && luarocks make *rockspec) \ + && luarocks install pg $LUAROCK_TARANTOOL_PG_VERSION \ && : "mysql" \ - && git clone $LUAROCK_MYSQL_REPO /rocks/mysql \ - && git -C /rocks/mysql checkout $LUAROCK_MYSQL_TAG \ - && (cd /rocks/mysql && luarocks make *rockspec) \ + && luarocks install mysql $LUAROCK_TARANTOOL_MYSQL_VERSION \ && : "memcached" \ - && git clone $LUAROCK_MEMCACHED_REPO /rocks/memcached \ - && git -C /rocks/memcached checkout $LUAROCK_MEMCACHED_TAG \ - && (cd /rocks/memcached && luarocks make *rockspec) \ + && luarocks install memcached $LUAROCK_MEMCACHED_VERSION \ && : "prometheus" \ && luarocks install prometheus $LUAROCK_TARANTOOL_PROMETHEUS_VERSION \ && : "curl" \ - && git clone $LUAROCK_TARANTOOL_CURL_REPO /rocks/curl \ - && git -C /rocks/curl checkout $LUAROCK_TARANTOOL_CURL_TAG \ - && (cd /rocks/curl && luarocks make *rockspec) \ + && luarocks install tarantool-curl $LUAROCK_TARANTOOL_CURL_VERSION \ && : "mqtt" \ - && git clone $LUAROCK_MQTT_REPO /rocks/mqtt \ - && git -C /rocks/mqtt checkout $LUAROCK_MQTT_TAG \ - && (cd /rocks/mqtt && luarocks make *rockspec) \ + && luarocks install mqtt $LUAROCK_TARANTOOL_MQTT_VERSION \ && : "gis" \ - && git clone $LUAROCK_TARANTOOL_GIS_REPO /rocks/gis \ - && git -C /rocks/gis checkout $LUAROCK_TARANTOOL_GIS_TAG \ - && (cd /rocks/gis && luarocks make *rockspec) \ + && luarocks install gis $LUAROCK_TARANTOOL_GIS_VERSION \ && : "gperftools" \ - && git clone $LUAROCK_GPERFTOOLS_REPO /rocks/gperftools \ - && git -C /rocks/gperftools checkout $LUAROCK_GPERFTOOLS_TAG \ - && (cd /rocks/gperftools && luarocks make *rockspec) \ + && luarocks install gperftools $LUAROCK_TARANTOOL_GPERFTOOLS_VERSION \ && : "---------- remove build deps ----------" \ && apk del .build-deps \ && rm -rf /rocks diff --git a/1.8/Dockerfile b/1.8/Dockerfile index d1b5ce3..01df343 100644 --- a/1.8/Dockerfile +++ b/1.8/Dockerfile @@ -10,34 +10,22 @@ ENV TARANTOOL_VERSION=1.8.2-279-gbecd1e826 \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ GPERFTOOLS_TAG=gperftools-2.5 \ - LUAROCKS_URL=http://keplerproject.github.io/luarocks/releases/luarocks-2.3.0.tar.gz \ - LUAROCK_AVRO_SCHEMA_REPO=https://github.com/tarantool/avro-schema.git \ - LUAROCK_AVRO_SCHEMA_TAG=b49efa8 \ - LUAROCK_EXPIRATIOND_REPO=https://github.com/tarantool/expirationd.git \ - LUAROCK_EXPIRATIOND_TAG=9ec22b6 \ - LUAROCK_QUEUE_REPO=https://github.com/tarantool/queue.git \ - LUAROCK_QUEUE_TAG=24d730c \ - LUAROCK_CONNPOOL_REPO=https://github.com/tarantool/connpool.git \ - LUAROCK_CONNPOOL_TAG=89c2fe4 \ + LUAROCKS_URL=https://github.com/tarantool/luarocks/archive/6e6fe62d9409fe2103c0fd091cccb3da0451faf5.tar.gz \ LUAROCK_SHARD_REPO=https://github.com/tarantool/shard.git \ LUAROCK_SHARD_TAG=8f8c5a7 \ - LUAROCK_HTTP_REPO=https://github.com/tarantool/http.git \ - LUAROCK_HTTP_TAG=67d8a9b \ - LUAROCK_PG_REPO=https://github.com/tarantool/pg.git \ - LUAROCK_PG_TAG=8bb4164 \ - LUAROCK_MYSQL_REPO=https://github.com/tarantool/mysql.git \ - LUAROCK_MYSQL_TAG=3203633 \ - LUAROCK_MEMCACHED_REPO=https://github.com/tarantool/memcached.git \ - LUAROCK_MEMCACHED_TAG=7aa78b2 \ + LUAROCK_AVRO_SCHEMA_VERSION=2.0.1 \ + LUAROCK_EXPERATIOND_VERSION=1.0.1 \ + LUAROCK_QUEUE_VERSION=1.0.2 \ + LUAROCK_CONNPOOL_VERSION=1.1.1 \ + LUAROCK_HTTP_VERSION=1.0.1 \ + LUAROCK_MEMCACHED_VERSION=1.0.0 \ + LUAROCK_TARANTOOL_PG_VERSION=2.0.1 \ + LUAROCK_TARANTOOL_MYSQL_VERSION=2.0.1 \ + LUAROCK_TARANTOOL_CURL_VERSION=2.3.1 \ + LUAROCK_TARANTOOL_MQTT_VERSION=1.2.1 \ + LUAROCK_TARANTOOL_GIS_VERSION=1.0.0 \ LUAROCK_TARANTOOL_PROMETHEUS_VERSION=1.0.0 \ - LUAROCK_TARANTOOL_CURL_REPO=https://github.com/tarantool/curl.git \ - LUAROCK_TARANTOOL_CURL_TAG=2.2.7 \ - LUAROCK_MQTT_REPO=https://github.com/tarantool/mqtt.git \ - LUAROCK_MQTT_TAG=238fd2e \ - LUAROCK_TARANTOOL_GIS_REPO=https://github.com/tarantool/gis.git \ - LUAROCK_TARANTOOL_GIS_TAG=25209fc \ - LUAROCK_GPERFTOOLS_REPO=https://github.com/tarantool/gperftools.git \ - LUAROCK_GPERFTOOLS_TAG=12a7ac2 + LUAROCK_TARANTOOL_GPERFTOOLS_VERSION=1.0.1 COPY gperftools_alpine.diff / @@ -192,59 +180,35 @@ RUN set -x \ && luarocks install lua-term \ && luarocks install ldoc \ && : "avro" \ - && git clone $LUAROCK_AVRO_SCHEMA_REPO /rocks/avro \ - && git -C /rocks/avro checkout $LUAROCK_AVRO_SCHEMA_TAG \ - && (cd /rocks/avro && luarocks make *rockspec) \ + && luarocks install avro-schema $LUAROCK_AVRO_SCHEMA_VERSION \ && : "expirationd" \ - && git clone $LUAROCK_EXPIRATIOND_REPO /rocks/expirationd \ - && git -C /rocks/expirationd checkout $LUAROCK_EXPIRATIOND_TAG \ - && (cd /rocks/expirationd && luarocks make *rockspec) \ + && luarocks install expirationd $LUAROCK_EXPERATIOND_VERSION \ && : "queue" \ - && git clone $LUAROCK_QUEUE_REPO /rocks/queue \ - && git -C /rocks/queue checkout $LUAROCK_QUEUE_TAG \ - && (cd /rocks/queue && luarocks make *rockspec) \ + && luarocks install queue $LUAROCK_QUEUE_VERSION \ && : "connpool" \ - && git clone $LUAROCK_CONNPOOL_REPO /rocks/connpool \ - && git -C /rocks/connpool checkout $LUAROCK_CONNPOOL_TAG \ - && (cd /rocks/connpool && luarocks make *rockspec) \ + && luarocks install connpool $LUAROCK_CONNPOOL_VERSION \ && : "shard" \ && git clone $LUAROCK_SHARD_REPO /rocks/shard \ && git -C /rocks/shard checkout $LUAROCK_SHARD_TAG \ && (cd /rocks/shard && luarocks make *rockspec) \ && : "http" \ - && git clone $LUAROCK_HTTP_REPO /rocks/http \ - && git -C /rocks/http checkout $LUAROCK_HTTP_TAG \ - && (cd /rocks/http && luarocks make *rockspec) \ + && luarocks install http $LUAROCK_HTTP_VERSION \ && : "pg" \ - && git clone $LUAROCK_PG_REPO /rocks/pg \ - && git -C /rocks/pg checkout $LUAROCK_PG_TAG \ - && (cd /rocks/pg && luarocks make *rockspec) \ + && luarocks install pg $LUAROCK_TARANTOOL_PG_VERSION \ && : "mysql" \ - && git clone $LUAROCK_MYSQL_REPO /rocks/mysql \ - && git -C /rocks/mysql checkout $LUAROCK_MYSQL_TAG \ - && (cd /rocks/mysql && luarocks make *rockspec) \ + && luarocks install mysql $LUAROCK_TARANTOOL_MYSQL_VERSION \ && : "memcached" \ - && git clone $LUAROCK_MEMCACHED_REPO /rocks/memcached \ - && git -C /rocks/memcached checkout $LUAROCK_MEMCACHED_TAG \ - && (cd /rocks/memcached && luarocks make *rockspec) \ + && luarocks install memcached $LUAROCK_MEMCACHED_VERSION \ && : "prometheus" \ && luarocks install prometheus $LUAROCK_TARANTOOL_PROMETHEUS_VERSION \ && : "curl" \ - && git clone $LUAROCK_TARANTOOL_CURL_REPO /rocks/curl \ - && git -C /rocks/curl checkout $LUAROCK_TARANTOOL_CURL_TAG \ - && (cd /rocks/curl && luarocks make *rockspec) \ + && luarocks install tarantool-curl $LUAROCK_TARANTOOL_CURL_VERSION \ && : "mqtt" \ - && git clone $LUAROCK_MQTT_REPO /rocks/mqtt \ - && git -C /rocks/mqtt checkout $LUAROCK_MQTT_TAG \ - && (cd /rocks/mqtt && luarocks make *rockspec) \ + && luarocks install mqtt $LUAROCK_TARANTOOL_MQTT_VERSION \ && : "gis" \ - && git clone $LUAROCK_TARANTOOL_GIS_REPO /rocks/gis \ - && git -C /rocks/gis checkout $LUAROCK_TARANTOOL_GIS_TAG \ - && (cd /rocks/gis && luarocks make *rockspec) \ + && luarocks install gis $LUAROCK_TARANTOOL_GIS_VERSION \ && : "gperftools" \ - && git clone $LUAROCK_GPERFTOOLS_REPO /rocks/gperftools \ - && git -C /rocks/gperftools checkout $LUAROCK_GPERFTOOLS_TAG \ - && (cd /rocks/gperftools && luarocks make *rockspec) \ + && luarocks install gperftools $LUAROCK_TARANTOOL_GPERFTOOLS_VERSION \ && : "---------- remove build deps ----------" \ && apk del .build-deps \ && rm -rf /rocks From 4c4ded40bfbbe7c2848db1557e58f1bb9a330ec8 Mon Sep 17 00:00:00 2001 From: Yaroslav Dynnikov Date: Thu, 22 Feb 2018 17:12:37 +0300 Subject: [PATCH 101/286] Add 1.x referencing 1.9.0 --- 1.x/Dockerfile | 238 ++++++++++++++++++++++++++++ 1.x/console | 15 ++ 1.x/docker-entrypoint.sh | 22 +++ 1.x/gperftools_alpine.diff | 110 +++++++++++++ 1.x/luarocks-config.lua | 9 ++ 1.x/tarantool-entrypoint.lua | 292 +++++++++++++++++++++++++++++++++++ 1.x/tarantool.default | 22 +++ 1.x/tarantool_is_up | 41 +++++ 1.x/tarantool_set_config.lua | 130 ++++++++++++++++ 9 files changed, 879 insertions(+) create mode 100644 1.x/Dockerfile create mode 100755 1.x/console create mode 100755 1.x/docker-entrypoint.sh create mode 100644 1.x/gperftools_alpine.diff create mode 100644 1.x/luarocks-config.lua create mode 100755 1.x/tarantool-entrypoint.lua create mode 100644 1.x/tarantool.default create mode 100755 1.x/tarantool_is_up create mode 100755 1.x/tarantool_set_config.lua diff --git a/1.x/Dockerfile b/1.x/Dockerfile new file mode 100644 index 0000000..82448f5 --- /dev/null +++ b/1.x/Dockerfile @@ -0,0 +1,238 @@ +FROM alpine:3.5 +MAINTAINER mail@racktear.com + +RUN addgroup -S tarantool \ + && adduser -S -G tarantool tarantool \ + && apk add --no-cache 'su-exec>=0.2' + +ENV TARANTOOL_VERSION=1.9.0 \ + TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ + TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ + GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ + GPERFTOOLS_TAG=gperftools-2.5 \ + LUAROCKS_URL=https://github.com/tarantool/luarocks/archive/6e6fe62d9409fe2103c0fd091cccb3da0451faf5.tar.gz \ + LUAROCK_SHARD_REPO=https://github.com/tarantool/shard.git \ + LUAROCK_SHARD_TAG=8f8c5a7 \ + LUAROCK_AVRO_SCHEMA_VERSION=2.0.1 \ + LUAROCK_EXPERATIOND_VERSION=1.0.1 \ + LUAROCK_QUEUE_VERSION=1.0.2 \ + LUAROCK_CONNPOOL_VERSION=1.1.1 \ + LUAROCK_HTTP_VERSION=1.0.1 \ + LUAROCK_MEMCACHED_VERSION=1.0.0 \ + LUAROCK_TARANTOOL_PG_VERSION=2.0.1 \ + LUAROCK_TARANTOOL_MYSQL_VERSION=2.0.1 \ + LUAROCK_TARANTOOL_CURL_VERSION=2.3.1 \ + LUAROCK_TARANTOOL_MQTT_VERSION=1.2.1 \ + LUAROCK_TARANTOOL_GIS_VERSION=1.0.0 \ + LUAROCK_TARANTOOL_PROMETHEUS_VERSION=1.0.0 \ + LUAROCK_TARANTOOL_GPERFTOOLS_VERSION=1.0.1 + +COPY gperftools_alpine.diff / + +RUN set -x \ + && apk add --no-cache --virtual .run-deps \ + libstdc++ \ + readline \ + libressl \ + yaml \ + lz4 \ + binutils \ + ncurses \ + libgomp \ + lua \ + curl \ + tar \ + zip \ + libunwind \ + libcurl \ + icu \ + && apk add --no-cache --virtual .build-deps \ + perl \ + gcc \ + g++ \ + cmake \ + readline-dev \ + libressl-dev \ + yaml-dev \ + lz4-dev \ + binutils-dev \ + ncurses-dev \ + lua-dev \ + musl-dev \ + make \ + git \ + libunwind-dev \ + autoconf \ + automake \ + libtool \ + linux-headers \ + go \ + curl-dev \ + icu-dev \ + && : "---------- gperftools ----------" \ + && mkdir -p /usr/src/gperftools \ + && git clone "$GPERFTOOLS_REPO" /usr/src/gperftools \ + && git -C /usr/src/gperftools checkout "$GPERFTOOLS_TAG" \ + && (cd /usr/src/gperftools; \ + patch -p1 < /gperftools_alpine.diff; \ + rm /gperftools_alpine.diff; \ + ./autogen.sh; \ + ./configure; \ + make; \ + cp .libs/libprofiler.so* /usr/local/lib;) \ + && (GOPATH=/usr/src/go go get github.com/google/pprof; \ + cp /usr/src/go/bin/pprof /usr/local/bin) \ + && : "---------- tarantool ----------" \ + && mkdir -p /usr/src/tarantool \ + && git clone "$TARANTOOL_DOWNLOAD_URL" /usr/src/tarantool \ + && git -C /usr/src/tarantool checkout "$TARANTOOL_VERSION" \ + && git -C /usr/src/tarantool submodule update --init --recursive \ + && (cd /usr/src/tarantool; \ + cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo\ + -DENABLE_BUNDLED_LIBYAML:BOOL=OFF\ + -DENABLE_BACKTRACE:BOOL=ON\ + -DENABLE_DIST:BOOL=ON\ + .) \ + && make -C /usr/src/tarantool -j\ + && make -C /usr/src/tarantool install \ + && make -C /usr/src/tarantool clean \ + && : "---------- small ----------" \ + && (cd /usr/src/tarantool/src/lib/small; \ + cmake -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + .) \ + && make -C /usr/src/tarantool/src/lib/small \ + && make -C /usr/src/tarantool/src/lib/small install \ + && make -C /usr/src/tarantool/src/lib/small clean \ + && : "---------- msgpuck ----------" \ + && (cd /usr/src/tarantool/src/lib/msgpuck; \ + cmake -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + .) \ + && make -C /usr/src/tarantool/src/lib/msgpuck \ + && make -C /usr/src/tarantool/src/lib/msgpuck install \ + && make -C /usr/src/tarantool/src/lib/msgpuck clean \ + && : "---------- luarocks ----------" \ + && wget -O luarocks.tar.gz "$LUAROCKS_URL" \ + && mkdir -p /usr/src/luarocks \ + && tar -xzf luarocks.tar.gz -C /usr/src/luarocks --strip-components=1 \ + && (cd /usr/src/luarocks; \ + ./configure; \ + make build; \ + make install) \ + && rm -r /usr/src/luarocks \ + && rm -rf /usr/src/tarantool \ + && rm -rf /usr/src/gperftools \ + && rm -rf /usr/src/go \ + && : "---------- remove build deps ----------" \ + && apk del .build-deps + +COPY luarocks-config.lua /usr/local/etc/luarocks/config-5.1.lua + +RUN set -x \ + && apk add --no-cache --virtual .run-deps \ + mariadb-client-libs \ + libpq \ + cyrus-sasl \ + mosquitto-libs \ + libev \ + && apk add --no-cache --virtual .build-deps \ + git \ + cmake \ + make \ + coreutils \ + gcc \ + g++ \ + postgresql-dev \ + lua-dev \ + musl-dev \ + cyrus-sasl-dev \ + curl-dev \ + mosquitto-dev \ + libev-dev \ + && mkdir -p /rocks \ + && : "---------- proj (for gis module) ----------" \ + && wget -O proj.tar.gz http://download.osgeo.org/proj/proj-4.9.3.tar.gz \ + && mkdir -p /usr/src/proj \ + && tar -xzf proj.tar.gz -C /usr/src/proj --strip-components=1 \ + && (cd /usr/src/proj; \ + ./configure; \ + make; \ + make install) \ + && rm -r /usr/src/proj \ + && rm -rf /usr/src/proj \ + && : "---------- geos (for gis module) ----------" \ + && wget -O geos.tar.bz2 http://download.osgeo.org/geos/geos-3.6.0.tar.bz2 \ + && mkdir -p /usr/src/geos \ + && tar -xjf geos.tar.bz2 -C /usr/src/geos --strip-components=1 \ + && (cd /usr/src/geos; \ + ./configure; \ + make; \ + make install) \ + && rm -r /usr/src/geos \ + && rm -rf /usr/src/geos \ + && : "---------- luarocks ----------" \ + && luarocks install lua-term \ + && luarocks install ldoc \ + && : "avro" \ + && luarocks install avro-schema $LUAROCK_AVRO_SCHEMA_VERSION \ + && : "expirationd" \ + && luarocks install expirationd $LUAROCK_EXPERATIOND_VERSION \ + && : "queue" \ + && luarocks install queue $LUAROCK_QUEUE_VERSION \ + && : "connpool" \ + && luarocks install connpool $LUAROCK_CONNPOOL_VERSION \ + && : "shard" \ + && git clone $LUAROCK_SHARD_REPO /rocks/shard \ + && git -C /rocks/shard checkout $LUAROCK_SHARD_TAG \ + && (cd /rocks/shard && luarocks make *rockspec) \ + && : "http" \ + && luarocks install http $LUAROCK_HTTP_VERSION \ + && : "pg" \ + && luarocks install pg $LUAROCK_TARANTOOL_PG_VERSION \ + && : "mysql" \ + && luarocks install mysql $LUAROCK_TARANTOOL_MYSQL_VERSION \ + && : "memcached" \ + && luarocks install memcached $LUAROCK_MEMCACHED_VERSION \ + && : "prometheus" \ + && luarocks install prometheus $LUAROCK_TARANTOOL_PROMETHEUS_VERSION \ + && : "curl" \ + && luarocks install tarantool-curl $LUAROCK_TARANTOOL_CURL_VERSION \ + && : "mqtt" \ + && luarocks install mqtt $LUAROCK_TARANTOOL_MQTT_VERSION \ + && : "gis" \ + && luarocks install gis $LUAROCK_TARANTOOL_GIS_VERSION \ + && : "gperftools" \ + && luarocks install gperftools $LUAROCK_TARANTOOL_GPERFTOOLS_VERSION \ + && : "---------- remove build deps ----------" \ + && apk del .build-deps \ + && rm -rf /rocks + +RUN mkdir -p /var/lib/tarantool \ + && chown tarantool:tarantool /var/lib/tarantool \ + && mkdir -p /opt/tarantool \ + && chown tarantool:tarantool /opt/tarantool \ + && mkdir -p /var/run/tarantool \ + && chown tarantool:tarantool /var/run/tarantool \ + && mkdir /etc/tarantool \ + && chown tarantool:tarantool /etc/tarantool + +VOLUME /var/lib/tarantool +WORKDIR /opt/tarantool + +COPY tarantool-entrypoint.lua /usr/local/bin/ +COPY tarantool_set_config.lua /usr/local/bin/ +COPY docker-entrypoint.sh /usr/local/bin/ +COPY console /usr/local/bin/ +COPY tarantool_is_up /usr/local/bin/ +COPY tarantool.default /usr/local/etc/default/tarantool + +RUN ln -s usr/local/bin/docker-entrypoint.sh /entrypoint.sh # backwards compat +ENTRYPOINT ["docker-entrypoint.sh"] + +HEALTHCHECK CMD tarantool_is_up + +EXPOSE 3301 +CMD [ "tarantool" ] diff --git a/1.x/console b/1.x/console new file mode 100755 index 0000000..d6fb192 --- /dev/null +++ b/1.x/console @@ -0,0 +1,15 @@ +#!/usr/bin/env tarantool + +local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' + +console = require('console') +console.on_start(function(self) + local status, reason + status, reason = pcall(function() require('console').connect(CONSOLE_SOCKET_PATH) end) + if not status then + self:print(reason) + self.running = false + end +end) +console.on_client_disconnect(function(self) self.running = false end) +console.start() diff --git a/1.x/docker-entrypoint.sh b/1.x/docker-entrypoint.sh new file mode 100755 index 0000000..3a9f5e4 --- /dev/null +++ b/1.x/docker-entrypoint.sh @@ -0,0 +1,22 @@ +#!/bin/sh +set -e + +# first arg is `-f` or `--some-option` +# or first arg is `something.conf` +if [ "${1:0:1}" = '-' ]; then + set -- tarantool "$@" +fi + +# allow the container to be started with `--user` +if [ "$1" = 'tarantool' -a "$(id -u)" = '0' ]; then + chown -R tarantool /var/lib/tarantool + exec su-exec tarantool "$0" "$@" +fi + +# entry point wraps the passed script to do basic setup +if [ "$1" = 'tarantool' ]; then + shift + exec tarantool "/usr/local/bin/tarantool-entrypoint.lua" "$@" +fi + +exec "$@" diff --git a/1.x/gperftools_alpine.diff b/1.x/gperftools_alpine.diff new file mode 100644 index 0000000..e768381 --- /dev/null +++ b/1.x/gperftools_alpine.diff @@ -0,0 +1,110 @@ +diff --git a/src/base/linux_syscall_support.h b/src/base/linux_syscall_support.h +index 5d578cd..fceebe2 100644 +--- a/src/base/linux_syscall_support.h ++++ b/src/base/linux_syscall_support.h +@@ -2432,9 +2432,9 @@ struct kernel_stat { + #if defined(__s390x__) + LSS_INLINE _syscall1(void*, mmap, void*, a) + #else +- /* Need to make sure __off64_t isn't truncated to 32-bits under x32. */ ++ /* Need to make sure off64_t isn't truncated to 32-bits under x32. */ + LSS_INLINE void* LSS_NAME(mmap)(void *s, size_t l, int p, int f, int d, +- __off64_t o) { ++ off64_t o) { + LSS_BODY(6, void*, mmap, LSS_SYSCALL_ARG(s), LSS_SYSCALL_ARG(l), + LSS_SYSCALL_ARG(p), LSS_SYSCALL_ARG(f), + LSS_SYSCALL_ARG(d), (uint64_t)(o)); +@@ -2475,7 +2475,7 @@ struct kernel_stat { + LSS_INLINE _syscall6(void*, mmap, void*, s, + size_t, l, int, p, + int, f, int, d, +- __off64_t, o) ++ off64_t, o) + LSS_INLINE int LSS_NAME(sigaction)(int signum, + const struct kernel_sigaction *act, + struct kernel_sigaction *oldact) { +diff --git a/src/malloc_hook_mmap_linux.h b/src/malloc_hook_mmap_linux.h +index 1c4c766..b2aa8ed 100755 +--- a/src/malloc_hook_mmap_linux.h ++++ b/src/malloc_hook_mmap_linux.h +@@ -56,7 +56,7 @@ + + static inline void* do_mmap64(void *start, size_t length, + int prot, int flags, +- int fd, __off64_t offset) __THROW { ++ int fd, off64_t offset) __THROW { + return sys_mmap(start, length, prot, flags, fd, offset); + } + +@@ -67,7 +67,7 @@ static inline void* do_mmap64(void *start, size_t length, + + static inline void* do_mmap64(void *start, size_t length, + int prot, int flags, +- int fd, __off64_t offset) __THROW { ++ int fd, off64_t offset) __THROW { + void *result; + + // Try mmap2() unless it's not supported +@@ -151,9 +151,11 @@ static inline void* do_mmap64(void *start, size_t length, + # undef mmap + + extern "C" { ++ #ifndef mmap64 + void* mmap64(void *start, size_t length, int prot, int flags, +- int fd, __off64_t offset ) __THROW ++ int fd, off64_t offset ) __THROW + ATTRIBUTE_SECTION(malloc_hook); ++ #endif + void* mmap(void *start, size_t length,int prot, int flags, + int fd, off_t offset) __THROW + ATTRIBUTE_SECTION(malloc_hook); +@@ -166,8 +168,9 @@ extern "C" { + ATTRIBUTE_SECTION(malloc_hook); + } + ++#ifndef mmap64 + extern "C" void* mmap64(void *start, size_t length, int prot, int flags, +- int fd, __off64_t offset) __THROW { ++ int fd, off64_t offset) __THROW { + MallocHook::InvokePreMmapHook(start, length, prot, flags, fd, offset); + void *result; + if (!MallocHook::InvokeMmapReplacement( +@@ -177,6 +180,7 @@ extern "C" void* mmap64(void *start, size_t length, int prot, int flags, + MallocHook::InvokeMmapHook(result, start, length, prot, flags, fd, offset); + return result; + } ++#endif + + # if !defined(__USE_FILE_OFFSET64) || !defined(__REDIRECT_NTH) + +@@ -216,7 +220,7 @@ extern "C" void* mremap(void* old_addr, size_t old_size, size_t new_size, + return result; + } + +-#ifndef __UCLIBC__ ++#if defined(__GLIBC__) && ! defined(__UCLIBC__) + // libc's version: + extern "C" void* __sbrk(ptrdiff_t increment); + +diff --git a/src/tests/stacktrace_unittest.cc b/src/tests/stacktrace_unittest.cc +index 3c9f735..2d39ad9 100644 +--- a/src/tests/stacktrace_unittest.cc ++++ b/src/tests/stacktrace_unittest.cc +@@ -120,17 +120,6 @@ void ATTRIBUTE_NOINLINE CheckStackTraceLeaf(void) { + CHECK_GE(size, 1); + CHECK_LE(size, STACK_LEN); + +-#ifdef HAVE_EXECINFO_H +- { +- char **strings = backtrace_symbols(stack, size); +- printf("Obtained %d stack frames.\n", size); +- for (int i = 0; i < size; i++) +- printf("%s %p\n", strings[i], stack[i]); +- printf("CheckStackTrace() addr: %p\n", &CheckStackTrace); +- free(strings); +- } +-#endif +- + for (int i = 0; i < BACKTRACE_STEPS; i++) { + printf("Backtrace %d: expected: %p..%p actual: %p ... ", + i, expected_range[i].start, expected_range[i].end, stack[i]); diff --git a/1.x/luarocks-config.lua b/1.x/luarocks-config.lua new file mode 100644 index 0000000..111f955 --- /dev/null +++ b/1.x/luarocks-config.lua @@ -0,0 +1,9 @@ +rocks_trees = { + { name = [[user]], root = home..[[/.luarocks]] }, + { name = [[system]], root = [[/usr/local]] } +} + +rocks_servers = { + [[http://rocks.tarantool.org/]], + [[http://luarocks.org/repositories/rocks]] +} diff --git a/1.x/tarantool-entrypoint.lua b/1.x/tarantool-entrypoint.lua new file mode 100755 index 0000000..11cd89d --- /dev/null +++ b/1.x/tarantool-entrypoint.lua @@ -0,0 +1,292 @@ +#!/usr/bin/env tarantool + +local fio = require('fio') +local errno = require('errno') +local fun = require('fun') +local urilib = require('uri') +local console = require('console') +local term = require('term') +local log = require('log') +local yaml = require('yaml') + +local TARANTOOL_DEFAULT_PORT = 3301 +local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' +local CFG_FILE_PATH = '/etc/tarantool/config.yml' + + +local orig_cfg = box.cfg + +local function read_config() + local f = io.open(CFG_FILE_PATH, "rb") + if f == nil then + log.error("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) + os.exit(1) + end + local content = f:read("*all") + f:close() + return yaml.decode(content) +end + +local function write_config(cfg) + local f = io.open(CFG_FILE_PATH, "w+") + if f == nil then + print("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) + os.exit(1) + end + local content = yaml.encode(cfg) + f:write(content) + f:close() +end + +local function parse_replication_source(replication_source, user_name, user_password) + if replication_source == nil then + return nil + end + + local replication_source_table = {} + for uri in string.gmatch(replication_source, "[^,]+") do + local parsed_uri = urilib.parse(uri) + if parsed_uri == nil then + error("Incorrect replication source URI format: '"..uri.."'") + end + local host = parsed_uri.host + local port = parsed_uri.service or TARANTOOL_DEFAULT_PORT + local user = parsed_uri.login or user_name + local password = parsed_uri.password or user_password + + if user == 'guest' or user == nil then + replication_source = string.format("%s:%s", host, port) + elseif password == nil then + replication_source = string.format("%s:@%s:%s", user, host, port) + else + replication_source = string.format("%s:%s@%s:%s", user, password, + host, port) + end + + table.insert(replication_source_table, replication_source) + end + + return replication_source_table +end + +local function choose_option(main, substitute, cfg) + if cfg[main] then + return main + end + if cfg[substitute] then + return substitute + end + return main +end + +function set_replication_source(replication_source, user_name, user_password) + local replication_source_table = parse_replication_source( + replication_source, user_name, user_password + ) + local choice = choose_option('replication', 'replication_source', box.cfg) + box.cfg{[choice] = replication_source_table} + log.info("Updated box.cfg.%s to %s", choice, replication_source) +end + +local function create_user(user_name, user_password) + if user_name ~= 'guest' and user_password == nil then + user_password = "" + + local warn_str = [[**************************************************** +WARNING: No password has been set for the database. + This will allow anyone with access to the + Tarantool port to access your database. In + Docker's default configuration, this is + effectively any other container on the same + system. + Use "-e TARANTOOL_USER_PASSWORD=password" + to set it in "docker run". +****************************************************]] + log.warn('\n'..warn_str) + end + + if user_name == 'guest' and user_password == nil then + local warn_str = [[**************************************************** +WARNING: 'guest' is chosen as primary user. + Since it is not allowed to set a password for + guest user, your instance will be accessible + by anyone having direct access to the Tarantool + port. + If you wanted to create an authenticated user, + specify "-e TARANTOOL_USER_NAME=username" and + pick a user name other than "guest". +****************************************************]] + log.warn('\n'..warn_str) + end + + if user_name == 'guest' and user_password ~= nil then + user_password = nil + + local warn_str = [[**************************************************** +WARNING: A password for guest user has been specified. + In Tarantool, guest user can't have a password + and is always allowed to login, if it has + enough privileges. + If you wanted to create an authenticated user, + specify "-e TARANTOOL_USER_NAME=username" and + pick a user name other than "guest". +****************************************************]] + log.warn('\n'..warn_str) + end + + if user_name ~= 'admin' and user_name ~= 'guest' then + if not box.schema.user.exists(user_name) then + log.info("Creating user '%s'", user_name) + box.schema.user.create(user_name) + end + end + + if user_name ~= 'admin' then + log.info("Granting admin privileges to user '%s'", user_name) + box.schema.user.grant(user_name, 'read,write,execute', + 'universe', nil, {if_not_exists = true}) + box.schema.user.grant(user_name, 'replication', + nil, nil, {if_not_exists = true}) + end + + if user_name ~= 'guest' then + log.info("Setting password for user '%s'", user_name) + box.schema.user.passwd(user_name, user_password) + end +end + +function set_credentials(user_name, user_password) + create_user(user_name, user_password) +end + +local function wrapper_cfg(override) + local work_dir = '/var/lib/tarantool' + local snap_filename = "*.snap" + local snap_path = work_dir..'/'..snap_filename + + local first_run = false + if next(fio.glob(snap_path)) == nil then + first_run = true + end + + + local file_cfg = {} + local config_file_exists = fio.stat(CFG_FILE_PATH) ~= nil + if not config_file_exists then + log.info("Creating configuration file: " .. CFG_FILE_PATH) + + file_cfg.TARANTOOL_USER_NAME = os.getenv('TARANTOOL_USER_NAME') + file_cfg.TARANTOOL_USER_PASSWORD = os.getenv('TARANTOOL_USER_PASSWORD') + file_cfg.TARANTOOL_SLAB_ALLOC_ARENA = os.getenv('TARANTOOL_SLAB_ALLOC_ARENA') + file_cfg.TARANTOOL_SLAB_ALLOC_FACTOR = os.getenv('TARANTOOL_SLAB_ALLOC_FACTOR') + file_cfg.TARANTOOL_SLAB_ALLOC_MINIMAL = os.getenv('TARANTOOL_SLAB_ALLOC_MINIMAL') + file_cfg.TARANTOOL_SLAB_ALLOC_MAXIMAL = os.getenv('TARANTOOL_SLAB_ALLOC_MAXIMAL') + file_cfg.TARANTOOL_PORT = os.getenv('TARANTOOL_PORT') + file_cfg.TARANTOOL_WAL_MODE = os.getenv('TARANTOOL_WAL_MODE') + file_cfg.TARANTOOL_REPLICATION_SOURCE = os.getenv('TARANTOOL_REPLICATION_SOURCE') + file_cfg.TARANTOOL_REPLICATION = os.getenv('TARANTOOL_REPLICATION') + file_cfg.TARANTOOL_SNAPSHOT_PERIOD = os.getenv('TARANTOOL_SNAPSHOT_PERIOD') + file_cfg.TARANTOOL_MEMTX_MEMORY = os.getenv('TARANTOOL_MEMTX_MEMORY') + file_cfg.TARANTOOL_CHECKPOINT_INTERVAL = os.getenv('TARANTOOL_CHECKPOINT_INTERVAL') + file_cfg.TARANTOOL_MEMTX_MIN_TUPLE_SIZE = os.getenv('TARANTOOL_MEMTX_MIN_TUPLE_SIZE') + file_cfg.TARANTOOL_MEMTX_MAX_TUPLE_SIZE = os.getenv('TARANTOOL_MEMTX_MAX_TUPLE_SIZE') + + write_config(file_cfg) + else + log.info("Loading existing configuration file: " .. CFG_FILE_PATH) + + file_cfg = read_config() + end + + local user_name = file_cfg.TARANTOOL_USER_NAME or + os.getenv('TARANTOOL_USER_NAME') or 'guest' + local user_password = file_cfg.TARANTOOL_USER_PASSWORD or + os.getenv('TARANTOOL_USER_PASSWORD') + + + local cfg = override or {} + -- Placeholders for deprecated options + cfg.slab_alloc_arena = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_ARENA) or + override.slab_alloc_arena + cfg.slab_alloc_maximal = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_MAXIMAL) or + override.slab_alloc_maximal + cfg.slab_alloc_minimal = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_MINIMAL) or + override.slab_alloc_minimal + cfg.snapshot_period = tonumber(file_cfg.TARANTOOL_SNAPSHOT_PERIOD) or + override.snapshot_period + -- Replacements for deprecated options + cfg.memtx_memory = tonumber(file_cfg.TARANTOOL_MEMTX_MEMORY) or + override.memtx_memory + cfg.memtx_min_tuple_size = tonumber(file_cfg.TARANTOOL_MEMTX_MIN_TUPLE_SIZE) or + override.memtx_min_tuple_size + cfg.memtx_max_tuple_size = tonumber(file_cfg.TARANTOOL_MEMTX_MAX_TUPLE_SIZE) or + override.memtx_max_tuple_size + cfg.checkpoint_interval = tonumber(file_cfg.TARANTOOL_CHECKPOINT_INTERVAL) or + override.checkpoint_interval + -- Deprecated options with default values + local choice = choose_option('memtx_dir', 'snap_dir', override) + cfg[choice] = override[choice] or '/var/lib/tarantool' + + -- Remaining configuration + cfg.slab_alloc_factor = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_FACTOR) or + override.slab_alloc_factor + cfg.listen = tonumber(file_cfg.TARANTOOL_PORT) or + override.listen or TARANTOOL_DEFAULT_PORT + cfg.wal_mode = file_cfg.TARANTOOL_WAL_MODE or + override.wal_mode + + cfg.wal_dir = override.wal_dir or '/var/lib/tarantool' + cfg.vinyl_dir = override.vinyl_dir or '/var/lib/tarantool' + cfg.pid_file = override.pid_file or '/var/run/tarantool/tarantool.pid' + + local choice = choose_option('TARANTOOL_REPLICATION', 'TARANTOOL_REPLICATION_SOURCE', file_cfg) + local replication_source_table = parse_replication_source(file_cfg[choice], + user_name, + user_password) + + if replication_source_table then + cfg.replication = replication_source_table + else + local choice = choose_option('replication', 'replication_source', override) + cfg[choice] = override[choice] + end + + log.info("Config:\n" .. yaml.encode(cfg)) + + orig_cfg(cfg) + + box.once('tarantool-entrypoint', function () + if first_run then + log.info("Initializing database") + + create_user(user_name, user_password) + end + end) + + console.listen(CONSOLE_SOCKET_PATH) + +end + +box.cfg = wrapper_cfg + +-- re-run the script passed as parameter with all arguments that follow +execute_script = arg[1] +if execute_script == nil then + box.cfg {} + + if term.isatty(io.stdout) then + console.start() + os.exit(0) + end +else + narg = 0 + while true do + arg[narg] = arg[narg + 1] + if arg[narg] == nil then + break + end + narg = narg + 1 + end + + dofile(execute_script) +end diff --git a/1.x/tarantool.default b/1.x/tarantool.default new file mode 100644 index 0000000..fffe3b0 --- /dev/null +++ b/1.x/tarantool.default @@ -0,0 +1,22 @@ +-- +-- System-wide settings for tarantoolctl and init scripts +-- +-- This file is meant to enable the usage of tarantoolctl inside +-- docker containers. Since there is no init system, most of its +-- functionality will not work, except 'tarantoolctl enter' or +-- 'tarantoolctl status'. +-- + +default_cfg = { + pid_file = "/var/run/tarantool", -- /var/run/tarantool/${INSTANCE}.pid + wal_dir = "/var/lib/tarantool", -- /var/lib/tarantool/${INSTANCE}/ + snap_dir = "/var/lib/tarantool", -- /var/lib/tarantool/${INSTANCE} + vinyl_dir = "/var/lib/tarantool", -- /var/lib/tarantool/${INSTANCE} + logger = "/var/log/tarantool", -- /var/log/tarantool/${INSTANCE}.log + username = "tarantool", +} + +-- instances.available - all available instances +-- instances.enabled - instances to autostart by sysvinit +instance_dir = "/usr/local/etc/tarantool/instances.enabled" +-- vim: set ft=lua : diff --git a/1.x/tarantool_is_up b/1.x/tarantool_is_up new file mode 100755 index 0000000..71148d5 --- /dev/null +++ b/1.x/tarantool_is_up @@ -0,0 +1,41 @@ +#!/bin/sh + +status=$( (tarantool <<-'EOF' +local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' +local console = require('console') +local os = require("os") +local yaml = require("yaml") + +console.on_start(function(self) + local status, reason + status, reason = pcall(function() require('console').connect(CONSOLE_SOCKET_PATH) end) + if not status then + self:print(reason) + os.exit(1) + end + + cmd = 'box.info.status' + local res = self:eval(cmd) + if res ~= nil then + res = yaml.decode(res) + print(res[1]) + end + + os.exit(0) +end) + +console.on_client_disconnect(function(self) self.running = false end) +console.start() + +os.exit(0) +EOF +) 2>/dev/null) + + +echo "$status" + +if [ "$status" = "running" ]; then + exit 0 +else + exit 1 +fi diff --git a/1.x/tarantool_set_config.lua b/1.x/tarantool_set_config.lua new file mode 100755 index 0000000..ddca36c --- /dev/null +++ b/1.x/tarantool_set_config.lua @@ -0,0 +1,130 @@ +#!/usr/bin/env tarantool + +local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' +local CFG_FILE_PATH = '/etc/tarantool/config.yml' + +local fio = require('fio') +local yaml = require('yaml') +local console = require('console') +local errno = require('errno') + +local function read_config() + local f = io.open(CFG_FILE_PATH, "rb") + if f == nil then + print("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) + os.exit(1) + end + local content = f:read("*all") + f:close() + return yaml.decode(content) +end + +local function write_config(cfg) + local f = io.open(CFG_FILE_PATH, "w+") + if f == nil then + print("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) + os.exit(1) + end + local content = yaml.encode(cfg) + f:write(content) + f:close() +end + +local function nop(console, cfg, value) +end + +local function update_replication_source(console, cfg, value) + local user_name = "nil" + if cfg['TARANTOOL_USER_NAME'] then + user_name = "'" .. cfg['TARANTOOL_USER_NAME'] .. "'" + end + + local user_password = "nil" + if cfg['TARANTOOL_USER_PASSWORD'] then + user_password = "'" .. cfg['TARANTOOL_USER_PASSWORD'] .. "'" + end + + local cmd = "set_replication_source('"..value.."', " .. user_name .. "," .. user_password .. ")" + print("cmd: ", cmd) + + local res = console:eval(cmd) + + if res ~= nil then + print(res) + end +end + +local function update_credentials(console, cfg, value) + local user_name = "nil" + if cfg['TARANTOOL_USER_NAME'] then + user_name = "'" .. cfg['TARANTOOL_USER_NAME'] .. "'" + end + + local user_password = "nil" + if cfg['TARANTOOL_USER_PASSWORD'] then + user_password = "'" .. cfg['TARANTOOL_USER_PASSWORD'] .. "'" + end + + local cmd = "set_credentials(" .. user_name .. "," .. user_password .. ")" + + local res = console:eval(cmd) + + if res ~= nil then + print(res) + end + + local replication_source = cfg['TARANTOOL_REPLICATION_SOURCE'] + + if replication_source ~= nil then + update_replication_source(console, cfg, replication_source) + end +end + + +local vars = { + TARANTOOL_SLAB_ALLOC_ARENA=nop, + TARANTOOL_SLAB_ALLOC_FACTOR=nop, + TARANTOOL_SLAB_ALLOC_MAXIMAL=nop, + TARANTOOL_SLAB_ALLOC_MINIMAL=nop, + TARANTOOL_PORT=nop, + TARANTOOL_WAL_MODE=nop, + TARANTOOL_USER_NAME=update_credentials, + TARANTOOL_USER_PASSWORD=update_credentials, + TARANTOOL_REPLICATION_SOURCE=update_replication_source, + TARANTOOL_REPLICATION=update_replication_source, +} + +console.on_start(function(self) + local status, reason + status, reason = pcall(function() require('console').connect(CONSOLE_SOCKET_PATH) end) + if not status then + self:print(reason) + os.exit(1) + end + + if arg[1] == nil or arg[2] == nil then + self:print("Usage: " .. arg[0] .. " ") + os.exit(1) + end + + if vars[arg[1]] == nil then + self:print("Unknown var: " .. arg[1]) + os.exit(1) + end + + local cfg = read_config() + cfg[arg[1]] = arg[2] + + local func = vars[arg[1]] + func(self, cfg, arg[2]) + + write_config(cfg) + + self.running = false + os.exit(0) +end) + +console.on_client_disconnect(function(self) self.running = false end) +console.start() + +os.exit(0) From 8ba66c7447684e7a569fc1fe0b8dfd91bbf67f3d Mon Sep 17 00:00:00 2001 From: Yaroslav Dynnikov Date: Thu, 22 Feb 2018 17:14:15 +0300 Subject: [PATCH 102/286] Rename 1.8 to 2.x --- {1.8 => 2.x}/Dockerfile | 0 {1.8 => 2.x}/console | 0 {1.8 => 2.x}/docker-entrypoint.sh | 0 {1.8 => 2.x}/gperftools_alpine.diff | 0 {1.8 => 2.x}/luarocks-config.lua | 0 {1.8 => 2.x}/tarantool-entrypoint.lua | 0 {1.8 => 2.x}/tarantool.default | 0 {1.8 => 2.x}/tarantool_is_up | 0 {1.8 => 2.x}/tarantool_set_config.lua | 0 9 files changed, 0 insertions(+), 0 deletions(-) rename {1.8 => 2.x}/Dockerfile (100%) rename {1.8 => 2.x}/console (100%) rename {1.8 => 2.x}/docker-entrypoint.sh (100%) rename {1.8 => 2.x}/gperftools_alpine.diff (100%) rename {1.8 => 2.x}/luarocks-config.lua (100%) rename {1.8 => 2.x}/tarantool-entrypoint.lua (100%) rename {1.8 => 2.x}/tarantool.default (100%) rename {1.8 => 2.x}/tarantool_is_up (100%) rename {1.8 => 2.x}/tarantool_set_config.lua (100%) diff --git a/1.8/Dockerfile b/2.x/Dockerfile similarity index 100% rename from 1.8/Dockerfile rename to 2.x/Dockerfile diff --git a/1.8/console b/2.x/console similarity index 100% rename from 1.8/console rename to 2.x/console diff --git a/1.8/docker-entrypoint.sh b/2.x/docker-entrypoint.sh similarity index 100% rename from 1.8/docker-entrypoint.sh rename to 2.x/docker-entrypoint.sh diff --git a/1.8/gperftools_alpine.diff b/2.x/gperftools_alpine.diff similarity index 100% rename from 1.8/gperftools_alpine.diff rename to 2.x/gperftools_alpine.diff diff --git a/1.8/luarocks-config.lua b/2.x/luarocks-config.lua similarity index 100% rename from 1.8/luarocks-config.lua rename to 2.x/luarocks-config.lua diff --git a/1.8/tarantool-entrypoint.lua b/2.x/tarantool-entrypoint.lua similarity index 100% rename from 1.8/tarantool-entrypoint.lua rename to 2.x/tarantool-entrypoint.lua diff --git a/1.8/tarantool.default b/2.x/tarantool.default similarity index 100% rename from 1.8/tarantool.default rename to 2.x/tarantool.default diff --git a/1.8/tarantool_is_up b/2.x/tarantool_is_up similarity index 100% rename from 1.8/tarantool_is_up rename to 2.x/tarantool_is_up diff --git a/1.8/tarantool_set_config.lua b/2.x/tarantool_set_config.lua similarity index 100% rename from 1.8/tarantool_set_config.lua rename to 2.x/tarantool_set_config.lua From 4d1618cb0ee85774874fa58a15074adba4d7d06a Mon Sep 17 00:00:00 2001 From: Yaroslav Dynnikov Date: Thu, 22 Feb 2018 17:16:29 +0300 Subject: [PATCH 103/286] Update 2.x referencing 2.0.4 --- 2.x/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/2.x/Dockerfile b/2.x/Dockerfile index 01df343..fd9a4c5 100644 --- a/2.x/Dockerfile +++ b/2.x/Dockerfile @@ -5,7 +5,7 @@ RUN addgroup -S tarantool \ && adduser -S -G tarantool tarantool \ && apk add --no-cache 'su-exec>=0.2' -ENV TARANTOOL_VERSION=1.8.2-279-gbecd1e826 \ +ENV TARANTOOL_VERSION=2.0.4 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ From 90ec56be0d8afe473026793e48baa676193ca776 Mon Sep 17 00:00:00 2001 From: Yaroslav Dynnikov Date: Thu, 15 Mar 2018 18:10:00 +0300 Subject: [PATCH 104/286] Update 1.x to 1.9.0-52-g38b2a29ff --- 1.x/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1.x/Dockerfile b/1.x/Dockerfile index 82448f5..eadb9ad 100644 --- a/1.x/Dockerfile +++ b/1.x/Dockerfile @@ -5,7 +5,7 @@ RUN addgroup -S tarantool \ && adduser -S -G tarantool tarantool \ && apk add --no-cache 'su-exec>=0.2' -ENV TARANTOOL_VERSION=1.9.0 \ +ENV TARANTOOL_VERSION=1.9.0-52-g38b2a29ff \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ From f4d3738dc5cb097f848b326e254cccafbc1b7934 Mon Sep 17 00:00:00 2001 From: Arseny Antonov Date: Tue, 15 May 2018 21:31:32 +0300 Subject: [PATCH 105/286] Update 1.x docker for release Update 1.x dockerfile after tagging tarantool project up to 1.9.1. --- 1.x/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1.x/Dockerfile b/1.x/Dockerfile index eadb9ad..0829bf4 100644 --- a/1.x/Dockerfile +++ b/1.x/Dockerfile @@ -5,7 +5,7 @@ RUN addgroup -S tarantool \ && adduser -S -G tarantool tarantool \ && apk add --no-cache 'su-exec>=0.2' -ENV TARANTOOL_VERSION=1.9.0-52-g38b2a29ff \ +ENV TARANTOOL_VERSION=1.9.1-0-g06ec3d50d \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ From 7dd0d1ce81854cc5016cb68cc459c8d03f4a2df5 Mon Sep 17 00:00:00 2001 From: "d.sharonov" Date: Fri, 25 May 2018 19:05:21 +0300 Subject: [PATCH 106/286] bump centos image 1.7 -> 1.x --- {1.7-centos7 => 1.x-centos7}/.dockerignore | 0 {1.7-centos7 => 1.x-centos7}/Dockerfile | 6 ++++-- {1.7-centos7 => 1.x-centos7}/console | 0 {1.7-centos7 => 1.x-centos7}/docker-entrypoint.sh | 0 {1.7-centos7 => 1.x-centos7}/luarocks-config.lua | 0 {1.7-centos7 => 1.x-centos7}/mosquitto.repo | 0 {1.7-centos7 => 1.x-centos7}/tarantool-entrypoint.lua | 0 {1.7-centos7 => 1.x-centos7}/tarantool.default | 0 {1.7-centos7 => 1.x-centos7}/tarantool_is_up | 0 {1.7-centos7 => 1.x-centos7}/tarantool_set_config.lua | 0 10 files changed, 4 insertions(+), 2 deletions(-) rename {1.7-centos7 => 1.x-centos7}/.dockerignore (100%) rename {1.7-centos7 => 1.x-centos7}/Dockerfile (98%) rename {1.7-centos7 => 1.x-centos7}/console (100%) rename {1.7-centos7 => 1.x-centos7}/docker-entrypoint.sh (100%) rename {1.7-centos7 => 1.x-centos7}/luarocks-config.lua (100%) rename {1.7-centos7 => 1.x-centos7}/mosquitto.repo (100%) rename {1.7-centos7 => 1.x-centos7}/tarantool-entrypoint.lua (100%) rename {1.7-centos7 => 1.x-centos7}/tarantool.default (100%) rename {1.7-centos7 => 1.x-centos7}/tarantool_is_up (100%) rename {1.7-centos7 => 1.x-centos7}/tarantool_set_config.lua (100%) diff --git a/1.7-centos7/.dockerignore b/1.x-centos7/.dockerignore similarity index 100% rename from 1.7-centos7/.dockerignore rename to 1.x-centos7/.dockerignore diff --git a/1.7-centos7/Dockerfile b/1.x-centos7/Dockerfile similarity index 98% rename from 1.7-centos7/Dockerfile rename to 1.x-centos7/Dockerfile index 3f65b5e..bb61fd5 100644 --- a/1.7-centos7/Dockerfile +++ b/1.x-centos7/Dockerfile @@ -4,13 +4,13 @@ MAINTAINER mail@racktear.com RUN groupadd tarantool \ && adduser -g tarantool tarantool -ENV TARANTOOL_VERSION=1.7.6-11-gcd17b77f9 \ +ENV TARANTOOL_VERSION=1.9.1-11-gcd17b77f9 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ LUAROCKS_URL=https://github.com/tarantool/luarocks/archive/6e6fe62d9409fe2103c0fd091cccb3da0451faf5.tar.gz \ LUAROCK_SHARD_REPO=https://github.com/tarantool/shard.git \ LUAROCK_SHARD_TAG=8f8c5a7 \ - LUAROCK_AVRO_SCHEMA_VERSION=2.0.1 \ + LUAROCK_CHECKS_VERSION=1.0.0 \ LUAROCK_EXPERATIOND_VERSION=1.0.1 \ LUAROCK_QUEUE_VERSION=1.0.2 \ LUAROCK_CONNPOOL_VERSION=1.1.1 \ @@ -177,6 +177,8 @@ RUN set -x \ && : "---------- luarocks ----------" \ && luarocks install lua-term \ && luarocks install ldoc \ + && : "checks" \ + && luarocks install checks $LUAROCK_CHECKS_VERSION \ && : "avro" \ && luarocks install avro-schema $LUAROCK_AVRO_SCHEMA_VERSION \ && : "expirationd" \ diff --git a/1.7-centos7/console b/1.x-centos7/console similarity index 100% rename from 1.7-centos7/console rename to 1.x-centos7/console diff --git a/1.7-centos7/docker-entrypoint.sh b/1.x-centos7/docker-entrypoint.sh similarity index 100% rename from 1.7-centos7/docker-entrypoint.sh rename to 1.x-centos7/docker-entrypoint.sh diff --git a/1.7-centos7/luarocks-config.lua b/1.x-centos7/luarocks-config.lua similarity index 100% rename from 1.7-centos7/luarocks-config.lua rename to 1.x-centos7/luarocks-config.lua diff --git a/1.7-centos7/mosquitto.repo b/1.x-centos7/mosquitto.repo similarity index 100% rename from 1.7-centos7/mosquitto.repo rename to 1.x-centos7/mosquitto.repo diff --git a/1.7-centos7/tarantool-entrypoint.lua b/1.x-centos7/tarantool-entrypoint.lua similarity index 100% rename from 1.7-centos7/tarantool-entrypoint.lua rename to 1.x-centos7/tarantool-entrypoint.lua diff --git a/1.7-centos7/tarantool.default b/1.x-centos7/tarantool.default similarity index 100% rename from 1.7-centos7/tarantool.default rename to 1.x-centos7/tarantool.default diff --git a/1.7-centos7/tarantool_is_up b/1.x-centos7/tarantool_is_up similarity index 100% rename from 1.7-centos7/tarantool_is_up rename to 1.x-centos7/tarantool_is_up diff --git a/1.7-centos7/tarantool_set_config.lua b/1.x-centos7/tarantool_set_config.lua similarity index 100% rename from 1.7-centos7/tarantool_set_config.lua rename to 1.x-centos7/tarantool_set_config.lua From 98731f0ed3ecb74ed9bab3ecb3be190e4f37aaef Mon Sep 17 00:00:00 2001 From: "d.sharonov" Date: Fri, 25 May 2018 19:48:55 +0300 Subject: [PATCH 107/286] put back avro schema version --- 1.x-centos7/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/1.x-centos7/Dockerfile b/1.x-centos7/Dockerfile index bb61fd5..15cafa4 100644 --- a/1.x-centos7/Dockerfile +++ b/1.x-centos7/Dockerfile @@ -11,6 +11,7 @@ ENV TARANTOOL_VERSION=1.9.1-11-gcd17b77f9 \ LUAROCK_SHARD_REPO=https://github.com/tarantool/shard.git \ LUAROCK_SHARD_TAG=8f8c5a7 \ LUAROCK_CHECKS_VERSION=1.0.0 \ + LUAROCK_AVRO_SCHEMA_VERSION=2.0.1 \ LUAROCK_EXPERATIOND_VERSION=1.0.1 \ LUAROCK_QUEUE_VERSION=1.0.2 \ LUAROCK_CONNPOOL_VERSION=1.1.1 \ From c54d038f4d333f6369bbcbc7a8d84e4a1734f689 Mon Sep 17 00:00:00 2001 From: "d.sharonov" Date: Mon, 28 May 2018 13:41:49 +0300 Subject: [PATCH 108/286] set proper 1.9.1 tag for centos dockerfile --- 1.x-centos7/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1.x-centos7/Dockerfile b/1.x-centos7/Dockerfile index 15cafa4..9b66f24 100644 --- a/1.x-centos7/Dockerfile +++ b/1.x-centos7/Dockerfile @@ -4,7 +4,7 @@ MAINTAINER mail@racktear.com RUN groupadd tarantool \ && adduser -g tarantool tarantool -ENV TARANTOOL_VERSION=1.9.1-11-gcd17b77f9 \ +ENV TARANTOOL_VERSION=1.9.1-0-g06ec3d50d \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ LUAROCKS_URL=https://github.com/tarantool/luarocks/archive/6e6fe62d9409fe2103c0fd091cccb3da0451faf5.tar.gz \ From 877f33b2c73d3b13ff495269e94e51b8603c3649 Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Wed, 18 Jul 2018 18:53:16 +0300 Subject: [PATCH 109/286] Bump tarantool to 1.10 for centos7 --- 1.x-centos7/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1.x-centos7/Dockerfile b/1.x-centos7/Dockerfile index 9b66f24..98517be 100644 --- a/1.x-centos7/Dockerfile +++ b/1.x-centos7/Dockerfile @@ -4,7 +4,7 @@ MAINTAINER mail@racktear.com RUN groupadd tarantool \ && adduser -g tarantool tarantool -ENV TARANTOOL_VERSION=1.9.1-0-g06ec3d50d \ +ENV TARANTOOL_VERSION=1.10.1-206-g0ae3bbedc \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ LUAROCKS_URL=https://github.com/tarantool/luarocks/archive/6e6fe62d9409fe2103c0fd091cccb3da0451faf5.tar.gz \ From 3299c8912902f89faaa16730f57b11ef409b1bbe Mon Sep 17 00:00:00 2001 From: "d.sharonov" Date: Wed, 8 Aug 2018 16:05:02 +0300 Subject: [PATCH 110/286] bump centos tarantool --- 1.x-centos7/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1.x-centos7/Dockerfile b/1.x-centos7/Dockerfile index 98517be..26bdbfc 100644 --- a/1.x-centos7/Dockerfile +++ b/1.x-centos7/Dockerfile @@ -4,7 +4,7 @@ MAINTAINER mail@racktear.com RUN groupadd tarantool \ && adduser -g tarantool tarantool -ENV TARANTOOL_VERSION=1.10.1-206-g0ae3bbedc \ +ENV TARANTOOL_VERSION=1.10.1-258-ge39b4c193 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ LUAROCKS_URL=https://github.com/tarantool/luarocks/archive/6e6fe62d9409fe2103c0fd091cccb3da0451faf5.tar.gz \ From 0d9926bd5fe1f5803ae26e32e754e5ed6ed6f859 Mon Sep 17 00:00:00 2001 From: "d.sharonov" Date: Thu, 9 Aug 2018 16:04:50 +0300 Subject: [PATCH 111/286] remove mqtt support --- 1.x-centos7/Dockerfile | 7 ------- 1 file changed, 7 deletions(-) diff --git a/1.x-centos7/Dockerfile b/1.x-centos7/Dockerfile index 26bdbfc..2f65260 100644 --- a/1.x-centos7/Dockerfile +++ b/1.x-centos7/Dockerfile @@ -20,7 +20,6 @@ ENV TARANTOOL_VERSION=1.10.1-258-ge39b4c193 \ LUAROCK_TARANTOOL_PG_VERSION=2.0.1 \ LUAROCK_TARANTOOL_MYSQL_VERSION=2.0.1 \ LUAROCK_TARANTOOL_CURL_VERSION=2.3.1 \ - LUAROCK_TARANTOOL_MQTT_VERSION=1.2.1 \ LUAROCK_TARANTOOL_GIS_VERSION=1.0.0 \ LUAROCK_TARANTOOL_PROMETHEUS_VERSION=1.0.0 \ LUAROCK_TARANTOOL_GPERFTOOLS_VERSION=1.0.1 @@ -145,7 +144,6 @@ RUN set -x \ COPY luarocks-config.lua /usr/local/etc/luarocks/config-5.1.lua -COPY mosquitto.repo /etc/yum.repos.d/ RUN set -x \ && yum -y install https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-redhat96-9.6-3.noarch.rpm \ @@ -154,7 +152,6 @@ RUN set -x \ postgresql96-libs \ cyrus-sasl \ libcurl \ - libmosquitto1 \ libev \ proj \ geos \ @@ -168,7 +165,6 @@ RUN set -x \ lua-devel \ cyrus-sasl-devel \ curl-devel \ - libmosquitto-devel \ libev-devel \ wget \ proj-devel \ @@ -204,8 +200,6 @@ RUN set -x \ && luarocks install prometheus $LUAROCK_TARANTOOL_PROMETHEUS_VERSION \ && : "curl" \ && luarocks install tarantool-curl $LUAROCK_TARANTOOL_CURL_VERSION \ - && : "mqtt" \ - && luarocks install mqtt $LUAROCK_TARANTOOL_MQTT_VERSION \ && : "gis" \ && luarocks install gis $LUAROCK_TARANTOOL_GIS_VERSION \ && : "gperftools" \ @@ -221,7 +215,6 @@ RUN set -x \ lua-devel \ cyrus-sasl-devel \ curl-devel \ - libmosquitto-devel \ libev-devel \ wget \ proj-devel \ From 0ae0c261b0e6e79dc45a16bc3ca1db36cc5e4989 Mon Sep 17 00:00:00 2001 From: Eugine Blikh Date: Wed, 5 Sep 2018 18:09:55 +0300 Subject: [PATCH 112/286] Add real wget installation Native busybox wget emulation fails to check github.com certificate --- 1.x/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/1.x/Dockerfile b/1.x/Dockerfile index 0829bf4..be302c6 100644 --- a/1.x/Dockerfile +++ b/1.x/Dockerfile @@ -69,6 +69,7 @@ RUN set -x \ go \ curl-dev \ icu-dev \ + wget \ && : "---------- gperftools ----------" \ && mkdir -p /usr/src/gperftools \ && git clone "$GPERFTOOLS_REPO" /usr/src/gperftools \ From b13c272a55e820e3609bd89b118abd9b58e05245 Mon Sep 17 00:00:00 2001 From: Eugine Blikh Date: Wed, 5 Sep 2018 16:49:50 +0300 Subject: [PATCH 113/286] Bump 1.x version to 1.9.2 --- 1.x/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1.x/Dockerfile b/1.x/Dockerfile index be302c6..fd9e8a1 100644 --- a/1.x/Dockerfile +++ b/1.x/Dockerfile @@ -5,7 +5,7 @@ RUN addgroup -S tarantool \ && adduser -S -G tarantool tarantool \ && apk add --no-cache 'su-exec>=0.2' -ENV TARANTOOL_VERSION=1.9.1-0-g06ec3d50d \ +ENV TARANTOOL_VERSION=1.9.2-0-g113ade24e \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ From af47e62af64df0791aeeb5926bc121e5cc820d77 Mon Sep 17 00:00:00 2001 From: Oleg Babin Date: Fri, 21 Sep 2018 08:57:42 +0300 Subject: [PATCH 114/286] replace libicu from centos repo to build the latest version --- 1.x-centos7/Dockerfile | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/1.x-centos7/Dockerfile b/1.x-centos7/Dockerfile index 2f65260..062a0db 100644 --- a/1.x-centos7/Dockerfile +++ b/1.x-centos7/Dockerfile @@ -45,7 +45,6 @@ RUN set -x \ unzip \ libunwind \ libcurl \ - libicu \ && yum -y install \ perl \ gcc-c++ \ @@ -66,7 +65,18 @@ RUN set -x \ go \ wget \ curl-devel \ - libicu-devel \ + && : "---------- libicu ----------" \ + && wget http://download.icu-project.org/files/icu4c/62.1/icu4c-62_1-src.tgz \ + && mkdir -p /usr/src/icu \ + && tar -xzf icu4c-62_1-src.tgz -C /usr/src/icu --strip-components=1 \ + && (cd /usr/src/icu/source; \ + chmod +x runConfigureICU configure install-sh; \ + ./runConfigureICU Linux/gcc; \ + make; \ + make install; \ + echo '/usr/local/lib' > /etc/ld.so.conf.d/local.conf; \ + cat /etc/ld.so.conf.d/local.conf; \ + ldconfig )\ && : "---------- gperftools ----------" \ && yum install -y gperftools-libs \ && (GOPATH=/usr/src/go go get github.com/google/pprof; \ @@ -114,6 +124,7 @@ RUN set -x \ && rm -r /usr/src/luarocks \ && rm -rf /usr/src/tarantool \ && rm -rf /usr/src/go \ + && rm -rf /usr/src/icu \ && : "---------- remove build deps ----------" \ && yum -y remove \ perl \ @@ -138,7 +149,6 @@ RUN set -x \ kernel-headers \ golang-src \ curl-devel \ - libicu-devel \ && rpm -qa | grep devel | xargs yum -y remove \ && rm -rf /var/cache/yum From 8aca953e438bd48e6b644eca49473a8acfc89d3c Mon Sep 17 00:00:00 2001 From: Oleg Babin Date: Tue, 25 Sep 2018 08:35:26 +0300 Subject: [PATCH 115/286] update tarantool-centos7 from 1.10.1-258-ge39b4c193 to 1.10.1-393-g4e7050855 --- 1.x-centos7/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1.x-centos7/Dockerfile b/1.x-centos7/Dockerfile index 062a0db..fa5c493 100644 --- a/1.x-centos7/Dockerfile +++ b/1.x-centos7/Dockerfile @@ -4,7 +4,7 @@ MAINTAINER mail@racktear.com RUN groupadd tarantool \ && adduser -g tarantool tarantool -ENV TARANTOOL_VERSION=1.10.1-258-ge39b4c193 \ +ENV TARANTOOL_VERSION=1.10.1-393-g4e7050855 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ LUAROCKS_URL=https://github.com/tarantool/luarocks/archive/6e6fe62d9409fe2103c0fd091cccb3da0451faf5.tar.gz \ From 990d5f0773f4deed3124827c19ffc6b10a1c3d14 Mon Sep 17 00:00:00 2001 From: Oleg Babin Date: Sat, 13 Oct 2018 10:07:39 +0300 Subject: [PATCH 116/286] update 1.x-centos image to 1.10.2 --- 1.x-centos7/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/1.x-centos7/Dockerfile b/1.x-centos7/Dockerfile index fa5c493..4686377 100644 --- a/1.x-centos7/Dockerfile +++ b/1.x-centos7/Dockerfile @@ -4,7 +4,7 @@ MAINTAINER mail@racktear.com RUN groupadd tarantool \ && adduser -g tarantool tarantool -ENV TARANTOOL_VERSION=1.10.1-393-g4e7050855 \ +ENV TARANTOOL_VERSION=1.10.2-0-gc0d8063b6 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ LUAROCKS_URL=https://github.com/tarantool/luarocks/archive/6e6fe62d9409fe2103c0fd091cccb3da0451faf5.tar.gz \ @@ -69,6 +69,7 @@ RUN set -x \ && wget http://download.icu-project.org/files/icu4c/62.1/icu4c-62_1-src.tgz \ && mkdir -p /usr/src/icu \ && tar -xzf icu4c-62_1-src.tgz -C /usr/src/icu --strip-components=1 \ + && rm icu4c-62_1-src.tgz \ && (cd /usr/src/icu/source; \ chmod +x runConfigureICU configure install-sh; \ ./runConfigureICU Linux/gcc; \ From 59cd534381643226e45f58bf092e38fd9bb382a7 Mon Sep 17 00:00:00 2001 From: Alexander Turenko Date: Sun, 14 Oct 2018 02:23:12 +0300 Subject: [PATCH 117/286] Bump 1.x version to 1.10.2 --- 1.x/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1.x/Dockerfile b/1.x/Dockerfile index fd9e8a1..f1142d6 100644 --- a/1.x/Dockerfile +++ b/1.x/Dockerfile @@ -5,7 +5,7 @@ RUN addgroup -S tarantool \ && adduser -S -G tarantool tarantool \ && apk add --no-cache 'su-exec>=0.2' -ENV TARANTOOL_VERSION=1.9.2-0-g113ade24e \ +ENV TARANTOOL_VERSION=1.10.2-0-gc0d8063b6 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ From f81a091246cb94827d193ef4e515a85f150aedec Mon Sep 17 00:00:00 2001 From: Alexander Turenko Date: Sun, 14 Oct 2018 06:05:51 +0300 Subject: [PATCH 118/286] Add real wget in 1.* and 2.x docker files It is needed to successfully pass github.com certificate validation. The commit is follow up of 0ae0c261b0e6e79dc45a16bc3ca1db36cc5e4989. --- 1.5/Dockerfile | 1 + 1.6/Dockerfile | 1 + 1.7/Dockerfile | 1 + 2.x/Dockerfile | 1 + 4 files changed, 4 insertions(+) diff --git a/1.5/Dockerfile b/1.5/Dockerfile index 760a7ae..753af94 100644 --- a/1.5/Dockerfile +++ b/1.5/Dockerfile @@ -50,6 +50,7 @@ RUN set -x \ postgresql-dev \ lua-dev \ mariadb-dev \ + wget \ && : "---------- tarantool ----------" \ && mkdir -p /usr/src/tarantool \ && git clone "$TARANTOOL_DOWNLOAD_URL" /usr/src/tarantool \ diff --git a/1.6/Dockerfile b/1.6/Dockerfile index 118e692..4c086df 100644 --- a/1.6/Dockerfile +++ b/1.6/Dockerfile @@ -76,6 +76,7 @@ RUN set -x \ libtool \ linux-headers \ go \ + wget \ && : "---------- gperftools ----------" \ && mkdir -p /usr/src/gperftools \ && git clone "$GPERFTOOLS_REPO" /usr/src/gperftools \ diff --git a/1.7/Dockerfile b/1.7/Dockerfile index 2884f86..e3d1835 100644 --- a/1.7/Dockerfile +++ b/1.7/Dockerfile @@ -69,6 +69,7 @@ RUN set -x \ go \ curl-dev \ icu-dev \ + wget \ && : "---------- gperftools ----------" \ && mkdir -p /usr/src/gperftools \ && git clone "$GPERFTOOLS_REPO" /usr/src/gperftools \ diff --git a/2.x/Dockerfile b/2.x/Dockerfile index fd9a4c5..a9c370a 100644 --- a/2.x/Dockerfile +++ b/2.x/Dockerfile @@ -70,6 +70,7 @@ RUN set -x \ tcl \ curl-dev \ icu-dev \ + wget \ && : "---------- gperftools ----------" \ && mkdir -p /usr/src/gperftools \ && git clone "$GPERFTOOLS_REPO" /usr/src/gperftools \ From ccf1fa46b78c4c2afcdc360b10c0a66a416b13ed Mon Sep 17 00:00:00 2001 From: Roman Proskin Date: Wed, 17 Oct 2018 19:12:10 +0300 Subject: [PATCH 119/286] Fix curl version to 7.59 See https://github.com/tarantool/docker/issues/59 --- 1.x/Dockerfile | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/1.x/Dockerfile b/1.x/Dockerfile index fd9e8a1..7a0cfe4 100644 --- a/1.x/Dockerfile +++ b/1.x/Dockerfile @@ -8,6 +8,8 @@ RUN addgroup -S tarantool \ ENV TARANTOOL_VERSION=1.9.2-0-g113ade24e \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ + CURL_REPO=https://github.com/curl/curl.git \ + CURL_TAG=curl-7_59_0 \ GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ GPERFTOOLS_TAG=gperftools-2.5 \ LUAROCKS_URL=https://github.com/tarantool/luarocks/archive/6e6fe62d9409fe2103c0fd091cccb3da0451faf5.tar.gz \ @@ -40,11 +42,9 @@ RUN set -x \ ncurses \ libgomp \ lua \ - curl \ tar \ zip \ libunwind \ - libcurl \ icu \ && apk add --no-cache --virtual .build-deps \ perl \ @@ -67,9 +67,17 @@ RUN set -x \ libtool \ linux-headers \ go \ - curl-dev \ icu-dev \ wget \ + && : "---------- curl ----------" \ + && mkdir -p /usr/src/curl \ + && git clone "$CURL_REPO" /usr/src/curl \ + && git -C /usr/src/curl checkout "$CURL_TAG" \ + && (cd /usr/src/curl \ + && ./buildconf \ + && ./configure --prefix "/usr/local" \ + && make -j \ + && make install) \ && : "---------- gperftools ----------" \ && mkdir -p /usr/src/gperftools \ && git clone "$GPERFTOOLS_REPO" /usr/src/gperftools \ From 42f2113bc392a56f07ee7f8c2c626d3937a1bc0f Mon Sep 17 00:00:00 2001 From: Alexander Turenko Date: Mon, 22 Oct 2018 16:08:39 +0300 Subject: [PATCH 120/286] Add contributing section --- README.md | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/README.md b/README.md index 55f81bf..8756596 100644 --- a/README.md +++ b/README.md @@ -287,3 +287,70 @@ You can report problems and request features [on our GitHub](https://github.com/tarantool/docker). Alternatively you may get help on our [Telegram channel](https://t.me/tarantool). + +# Contributing + +## How to contribute + +Open a pull request to the master branch. A maintaner is responsible for +updating all relevant branches when merging the PR. + +## How to check + +Say, we have updated 1.x/Dockerfile and want to check it: + +```sh +$ docker build 1.x/ -t t1.x +$ docker run -it t1.x +...perform a test... +``` + +## Build pipelines + +Fixed versions: + +| Branch | Dockerfile | Docker tag | +| ------ | ---------- | ---------- | +| 1.7.3 | 1.7/Dockerfile | 1.7.3 | +| 1.7.4 | 1.7/Dockerfile | 1.7.4 | +| 1.7.5 | 1.7/Dockerfile | 1.7.5 | +| 1.7.6 | 1.7/Dockerfile | 1.7.6 | +| 1.8.1 | 1.8/Dockerfile | 1.8.1 | +| 1.9.1 | 1.x/Dockerfile | 1.9.1 | +| 1.9.2 | 1.x/Dockerfile | 1.9.2 | +| 1.10.0 | 1.x/Dockerfile | 1.10.0 | +| 1.10.2 | 1.x/Dockerfile | 1.10.2 | + +Rolling versions: + +| Branch | Dockerfile | Docker tag | +| ------ | ---------- | ---------- | +| master | 1.5/Dockerfile | 1.5 | +| master | 1.6/Dockerfile | 1.6 | +| master | 1.7/Dockerfile | 1.7 | +| master | 1.x/Dockerfile | 1 | +| master | 1.x/Dockerfile | latest | +| master | 2.x/Dockerfile | 2 | + +Special builds: + +| Branch | Dockerfile | Docker tag | +| ------ | ---------- | ---------- | +| master | 1.x-centos7/Dockerfile | 1.x-centos7 | + +## How to push changes (for maintainers) + +When the change is about specific tarantool version or versions range, update +all relevant fixed versions & rolling versions in all relevant branches +according to the pipelines listed above. + +When the change is about the environment at all, all versions need to be +updated in all relevent branches. + +Add a new release (say, `x.y.z`). Create / update rolling versions `x` and +`x.y` in master, create fixed version `x.y.z` on the corresponding branch, add +corresponding build pipeline on Docker Hub. ([Related][1].) + +A maintainer is responsible to check updated images. + +[1]: https://tarantool.io/en/doc/1.9/dev_guide/release_management/#how-to-make-a-minor-release From 6855049f59f2051d3fbe014f48e67d25faa40593 Mon Sep 17 00:00:00 2001 From: Pavel Yudin Date: Wed, 17 Oct 2018 20:00:28 +0300 Subject: [PATCH 121/286] Removed packaged curl which replaces files installed from a source code --- 1.x/Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/1.x/Dockerfile b/1.x/Dockerfile index 8f35da5..fb6b0bc 100644 --- a/1.x/Dockerfile +++ b/1.x/Dockerfile @@ -158,7 +158,6 @@ RUN set -x \ lua-dev \ musl-dev \ cyrus-sasl-dev \ - curl-dev \ mosquitto-dev \ libev-dev \ && mkdir -p /rocks \ From 33d373350a6f166c45acf556fb1e174dbcaf42f2 Mon Sep 17 00:00:00 2001 From: Alexander Turenko Date: Mon, 22 Oct 2018 16:23:11 +0300 Subject: [PATCH 122/286] Fix HTTPS after recent curl changes --- 1.x/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/1.x/Dockerfile b/1.x/Dockerfile index fb6b0bc..491d30f 100644 --- a/1.x/Dockerfile +++ b/1.x/Dockerfile @@ -46,6 +46,7 @@ RUN set -x \ zip \ libunwind \ icu \ + ca-certificates \ && apk add --no-cache --virtual .build-deps \ perl \ gcc \ From 0448f8017f5f24ea9cb69dc726904f9b50487017 Mon Sep 17 00:00:00 2001 From: Alexander Turenko Date: Tue, 23 Oct 2018 03:49:05 +0300 Subject: [PATCH 123/286] Backport curl / http.client crash workaround Updated 1.6, 1.7 and 2.x (1.x was updated before). 1.5 didn't updated, because tarantool-1.5 does not require curl itself and tarantool/curl seems to support only 1.6+ (as rpm dependencies suggests). Moved from openssl for libressl in 1.6, because git clone fails after installing curl builded from source with openssl (don't sure about an exact reason). 1.7 and later already use libressl. CentOS 7 have curl 7.29, so the 1.x-centos7 image is not affected. The problem we workaround is described here: https://github.com/tarantool/tarantool/issues/3569 Fixes #59. --- 1.6/Dockerfile | 19 ++++++++++++++----- 1.7/Dockerfile | 16 ++++++++++++---- 2.x/Dockerfile | 17 ++++++++++++----- 3 files changed, 38 insertions(+), 14 deletions(-) diff --git a/1.6/Dockerfile b/1.6/Dockerfile index 4c086df..ece5f04 100644 --- a/1.6/Dockerfile +++ b/1.6/Dockerfile @@ -8,6 +8,8 @@ RUN addgroup -S tarantool \ ENV TARANTOOL_VERSION=1.6.9-11-gf4619d0 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ + CURL_REPO=https://github.com/curl/curl.git \ + CURL_TAG=curl-7_59_0 \ GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ GPERFTOOLS_TAG=gperftools-2.5 \ LUAROCKS_URL=http://keplerproject.github.io/luarocks/releases/luarocks-2.3.0.tar.gz \ @@ -46,22 +48,22 @@ RUN set -x \ && apk add --no-cache --virtual .run-deps \ libstdc++ \ readline \ - openssl \ + libressl \ yaml \ lz4 \ binutils \ ncurses \ libgomp \ lua \ - curl \ tar \ zip \ + ca-certificates \ && apk add --no-cache --virtual .build-deps \ gcc \ g++ \ cmake \ readline-dev \ - openssl-dev \ + libressl-dev \ yaml-dev \ lz4-dev \ binutils-dev \ @@ -77,6 +79,15 @@ RUN set -x \ linux-headers \ go \ wget \ + && : "---------- curl ----------" \ + && mkdir -p /usr/src/curl \ + && git clone "$CURL_REPO" /usr/src/curl \ + && git -C /usr/src/curl checkout "$CURL_TAG" \ + && (cd /usr/src/curl \ + && ./buildconf \ + && ./configure --prefix "/usr/local" \ + && make -j \ + && make install) \ && : "---------- gperftools ----------" \ && mkdir -p /usr/src/gperftools \ && git clone "$GPERFTOOLS_REPO" /usr/src/gperftools \ @@ -144,7 +155,6 @@ RUN set -x \ mariadb-client-libs \ libpq \ cyrus-sasl \ - libcurl \ mosquitto-libs \ libev \ && apk add --no-cache --virtual .build-deps \ @@ -157,7 +167,6 @@ RUN set -x \ lua-dev \ musl-dev \ cyrus-sasl-dev \ - curl-dev \ mosquitto-dev \ libev-dev \ && : "---------- proj (for gis module) ----------" \ diff --git a/1.7/Dockerfile b/1.7/Dockerfile index e3d1835..ead44c7 100644 --- a/1.7/Dockerfile +++ b/1.7/Dockerfile @@ -8,6 +8,8 @@ RUN addgroup -S tarantool \ ENV TARANTOOL_VERSION=1.7.6-11-gcd17b77f9 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ + CURL_REPO=https://github.com/curl/curl.git \ + CURL_TAG=curl-7_59_0 \ GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ GPERFTOOLS_TAG=gperftools-2.5 \ LUAROCKS_URL=https://github.com/tarantool/luarocks/archive/6e6fe62d9409fe2103c0fd091cccb3da0451faf5.tar.gz \ @@ -40,12 +42,11 @@ RUN set -x \ ncurses \ libgomp \ lua \ - curl \ tar \ zip \ libunwind \ - libcurl \ icu \ + ca-certificates \ && apk add --no-cache --virtual .build-deps \ perl \ gcc \ @@ -67,9 +68,17 @@ RUN set -x \ libtool \ linux-headers \ go \ - curl-dev \ icu-dev \ wget \ + && : "---------- curl ----------" \ + && mkdir -p /usr/src/curl \ + && git clone "$CURL_REPO" /usr/src/curl \ + && git -C /usr/src/curl checkout "$CURL_TAG" \ + && (cd /usr/src/curl \ + && ./buildconf \ + && ./configure --prefix "/usr/local" \ + && make -j \ + && make install) \ && : "---------- gperftools ----------" \ && mkdir -p /usr/src/gperftools \ && git clone "$GPERFTOOLS_REPO" /usr/src/gperftools \ @@ -150,7 +159,6 @@ RUN set -x \ lua-dev \ musl-dev \ cyrus-sasl-dev \ - curl-dev \ mosquitto-dev \ libev-dev \ && mkdir -p /rocks \ diff --git a/2.x/Dockerfile b/2.x/Dockerfile index a9c370a..d53bb12 100644 --- a/2.x/Dockerfile +++ b/2.x/Dockerfile @@ -8,6 +8,8 @@ RUN addgroup -S tarantool \ ENV TARANTOOL_VERSION=2.0.4 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ + CURL_REPO=https://github.com/curl/curl.git \ + CURL_TAG=curl-7_59_0 \ GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ GPERFTOOLS_TAG=gperftools-2.5 \ LUAROCKS_URL=https://github.com/tarantool/luarocks/archive/6e6fe62d9409fe2103c0fd091cccb3da0451faf5.tar.gz \ @@ -40,12 +42,11 @@ RUN set -x \ ncurses \ libgomp \ lua \ - curl \ tar \ zip \ libunwind \ - libcurl \ icu \ + ca-certificates \ && apk add --no-cache --virtual .build-deps \ perl \ gcc \ @@ -68,9 +69,17 @@ RUN set -x \ linux-headers \ go \ tcl \ - curl-dev \ icu-dev \ wget \ + && : "---------- curl ----------" \ + && mkdir -p /usr/src/curl \ + && git clone "$CURL_REPO" /usr/src/curl \ + && git -C /usr/src/curl checkout "$CURL_TAG" \ + && (cd /usr/src/curl \ + && ./buildconf \ + && ./configure --prefix "/usr/local" \ + && make -j \ + && make install) \ && : "---------- gperftools ----------" \ && mkdir -p /usr/src/gperftools \ && git clone "$GPERFTOOLS_REPO" /usr/src/gperftools \ @@ -138,7 +147,6 @@ RUN set -x \ mariadb-client-libs \ libpq \ cyrus-sasl \ - libcurl \ mosquitto-libs \ libev \ && apk add --no-cache --virtual .build-deps \ @@ -152,7 +160,6 @@ RUN set -x \ lua-dev \ musl-dev \ cyrus-sasl-dev \ - curl-dev \ mosquitto-dev \ libev-dev \ libressl-dev \ From 27fd9ef9aab366b3b42fbd9cddf6e2c5ca32068b Mon Sep 17 00:00:00 2001 From: Maxim Belousov Date: Thu, 1 Nov 2018 16:15:22 +0300 Subject: [PATCH 124/286] Fix small typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8756596..93ee0e2 100644 --- a/README.md +++ b/README.md @@ -102,7 +102,7 @@ $ docker run --name mytarantool -p3301:3301 -d tarantool/tarantool:1.7 This will start an instance of Tarantool 1.7 and expose it on port 3301. Note, that by default there is no password protection, so -don't expose this instance to the ouside world. +don't expose this instance to the outside world. In this case, when there is no lua code provided, the entry point script initializes database using a sane set of defaults. Some of them From 7d2ec47df39971995a48d8e9459c27d351757e7a Mon Sep 17 00:00:00 2001 From: Alexander Turenko Date: Fri, 16 Nov 2018 18:37:50 +0300 Subject: [PATCH 125/286] Update tarantool:2 to 2.1 beta release --- 2.x/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/2.x/Dockerfile b/2.x/Dockerfile index d53bb12..4dc1ca7 100644 --- a/2.x/Dockerfile +++ b/2.x/Dockerfile @@ -5,7 +5,7 @@ RUN addgroup -S tarantool \ && adduser -S -G tarantool tarantool \ && apk add --no-cache 'su-exec>=0.2' -ENV TARANTOOL_VERSION=2.0.4 \ +ENV TARANTOOL_VERSION=2.1.1-7-gd381a45b6 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ CURL_REPO=https://github.com/curl/curl.git \ From b6f64a13e4356f954dac45e28da60bf5925c78af Mon Sep 17 00:00:00 2001 From: Oleg Babin Date: Mon, 3 Dec 2018 15:36:02 +0300 Subject: [PATCH 126/286] Update 1.x-centos7 from 1.10.2-0-gc0d8063b6 to 1.10.2-63-g844b45b89 --- 1.x-centos7/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1.x-centos7/Dockerfile b/1.x-centos7/Dockerfile index 4686377..fe65614 100644 --- a/1.x-centos7/Dockerfile +++ b/1.x-centos7/Dockerfile @@ -4,7 +4,7 @@ MAINTAINER mail@racktear.com RUN groupadd tarantool \ && adduser -g tarantool tarantool -ENV TARANTOOL_VERSION=1.10.2-0-gc0d8063b6 \ +ENV TARANTOOL_VERSION=1.10.2-63-g844b45b89 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ LUAROCKS_URL=https://github.com/tarantool/luarocks/archive/6e6fe62d9409fe2103c0fd091cccb3da0451faf5.tar.gz \ From 02f71993a75e8179243ed2facf5eff8d4c95d34f Mon Sep 17 00:00:00 2001 From: Oleg Babin Date: Thu, 20 Dec 2018 19:24:17 +0300 Subject: [PATCH 127/286] Upgrade centos-1.x to 1.10.2-80-g0b6e25f46 Fix: https://github.com/tarantool/tarantool/commit/0b6e25f46bd798a195cddb39d434b41283ae280f --- 1.x-centos7/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1.x-centos7/Dockerfile b/1.x-centos7/Dockerfile index fe65614..d68fdd7 100644 --- a/1.x-centos7/Dockerfile +++ b/1.x-centos7/Dockerfile @@ -4,7 +4,7 @@ MAINTAINER mail@racktear.com RUN groupadd tarantool \ && adduser -g tarantool tarantool -ENV TARANTOOL_VERSION=1.10.2-63-g844b45b89 \ +ENV TARANTOOL_VERSION=1.10.2-80-g0b6e25f46 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ LUAROCKS_URL=https://github.com/tarantool/luarocks/archive/6e6fe62d9409fe2103c0fd091cccb3da0451faf5.tar.gz \ From 030909b048c9c4c67647387f7a94e531e47abb7f Mon Sep 17 00:00:00 2001 From: Alexander Turenko Date: Sat, 19 Jan 2019 20:48:12 +0300 Subject: [PATCH 128/286] Update old option names in README --- README.md | 61 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 31 insertions(+), 30 deletions(-) diff --git a/README.md b/README.md index 93ee0e2..6f10fa6 100644 --- a/README.md +++ b/README.md @@ -18,19 +18,19 @@ controlled fail-over, and executing Lua code triggered by database events. Remote database instances are accessible transparently via a remote-procedure-invocation API. -For more information, visit [tarantool.org](http://tarantool.org). +For more information, visit [tarantool.io](https://tarantool.io). # Quickstart If you just want to quickly try out tarantool, run this command: ```console -$ docker run --rm -t -i tarantool/tarantool:1.7 +$ docker run --rm -t -i tarantool/tarantool ``` This will create a one-off Tarantool instance and open an interactive console. From there you can either type `tutorial()` or follow -[official documentation](https://tarantool.org/doc/book/index.html). +[official documentation](https://tarantool.io/en/doc/1.10/). # About this image @@ -56,7 +56,7 @@ is only one Tarantool instance running in the container. # What's on board -- [avro](https://github.com/tarantool/avro-schema): Apache Avro scheme for your data +- [avro-schema](https://github.com/tarantool/avro-schema): Apache Avro scheme for your data - [expirationd](https://github.com/tarantool/expirationd): Automatically delete tuples based on expiration time - [queue](https://github.com/tarantool/queue): Priority queues with TTL and confirmations - [connpool](https://github.com/tarantool/connpool): Keep a pool of connections to other Tarantool instances @@ -97,12 +97,12 @@ If the module you need is not listed here, there is a good chance we may add it. ## Start a Tarantool instance ```console -$ docker run --name mytarantool -p3301:3301 -d tarantool/tarantool:1.7 +$ docker run --name mytarantool -p3301:3301 -d tarantool/tarantool ``` -This will start an instance of Tarantool 1.7 and expose it on -port 3301. Note, that by default there is no password protection, so -don't expose this instance to the outside world. +This will start an instance of Tarantool and expose it on +port 3301. Note, that by default there is no password protection, +so don't expose this instance to the outside world. In this case, when there is no lua code provided, the entry point script initializes database using a sane set of defaults. Some of them @@ -111,10 +111,10 @@ can be tuned with environment variables (see below). ## Start a secure Tarantool instance ```console -$ docker run --name mytarantool -p3301:3301 -e TARANTOOL_USER_NAME=myusername -e TARANTOOL_USER_PASSWORD=mysecretpassword -d tarantool/tarantool:1.7 +$ docker run --name mytarantool -p3301:3301 -e TARANTOOL_USER_NAME=myusername -e TARANTOOL_USER_PASSWORD=mysecretpassword -d tarantool/tarantool ``` -This starts an instance of Tarantool 1.7, disables guest login and +This starts an instance of Tarantool, disables guest login and creates user named `myusername` with admin privileges and password `mysecretpassword`. @@ -149,7 +149,7 @@ version: '2' services: tarantool1: - image: tarantool/tarantool:1.7 + image: tarantool/tarantool:1.10.2 environment: TARANTOOL_REPLICATION_SOURCE: "tarantool1,tarantool2" networks: @@ -158,7 +158,7 @@ services: - "3301:3301" tarantool2: - image: tarantool/tarantool:1.7 + image: tarantool/tarantool:1.10.2 environment: TARANTOOL_REPLICATION_SOURCE: "tarantool1,tarantool2" networks: @@ -183,7 +183,7 @@ The simplest way to provide application code is to mount your code directory to `/opt/tarantool`: ```console -$ docker run --name mytarantool -p3301:3301 -d -v /path/to/my/app:/opt/tarantool tarantool/tarantool:1.7 tarantool /opt/tarantool/app.lua +$ docker run --name mytarantool -p3301:3301 -d -v /path/to/my/app:/opt/tarantool tarantool/tarantool tarantool /opt/tarantool/app.lua ``` Where `/path/to/my/app` is a host directory containing lua code. Note @@ -198,7 +198,7 @@ If you want to pack and distribute an image with your code, you may create your own Dockerfile as follows: ```bash -FROM tarantool/tarantool:1.7 +FROM tarantool/tarantool:1.10.2 COPY app.lua /opt/tarantool CMD ["tarantool", "/opt/tarantool/app.lua"] ``` @@ -238,45 +238,46 @@ Tarantool. In the above example, it is set to "mysecretpassword". Optional. Specifying this variable will tell Tarantool to listen for incoming connections on a specific port. Default is 3301. -### `TARANTOOL_REPLICATION_SOURCE` +### `TARANTOOL_REPLICATION` Optional. Comma-separated list of URIs to treat as replication -sources. Upon the start, Tarantool will attempt to connect to those -instances, fetch the data snapshot and start replicating transaction -logs. In other words, it will become a slave. For the multi-master -configuration, other participating instances of Tarantool should be -started with the same TARANTOOL_REPLICATION_SOURCE. (NB: applicable -only to 1.7) +sources. Upon the start, Tarantool will attempt to connect to +those instances, fetch the data snapshot and start replicating +transaction logs. In other words, it will become a slave. For the +multi-master configuration, other participating instances of +Tarantool should be started with the same TARANTOOL_REPLICATION. +(NB: applicable only to >=1.7) Example: `user1:pass@host1:3301,user2:pass@host2:3301` -### `TARANTOOL_SLAB_ALLOC_ARENA` +### `TARANTOOL_MEMTX_MEMORY` -Optional. Specifies how much memory Tarantool allocates to actually -store tuples, in gigabytes. When the limit is reached, INSERT or -UPDATE requests begin failing. Default is 1.0. +Optional. Specifies how much memory Tarantool allocates to +actually store tuples, in bytes. When the limit is reached, INSERT +or UPDATE requests begin failing. Default is 268435456 (256 +megabytes). ### `TARANTOOL_SLAB_ALLOC_FACTOR` Optional. Used as the multiplier for computing the sizes of memory chunks that tuples are stored in. A lower value may result in less -wasted memory depending on the total amount of memory available and -the distribution of item sizes. Default is 1.1. +wasted memory depending on the total amount of memory available +and the distribution of item sizes. Default is 1.05. -### `TARANTOOL_SLAB_ALLOC_MAXIMAL` +### `TARANTOOL_MEMTX_MAX_TUPLE_SIZE` Optional. Size of the largest allocation unit in bytes. It can be increased if it is necessary to store large tuples. Default is 1048576. -### `TARANTOOL_SLAB_ALLOC_MINIMAL` +### `TARANTOOL_MEMTX_MIN_TUPLE_SIZE` Optional. Size of the smallest allocation unit, in bytes. It can be decreased if most of the tuples are very small. Default is 16. -### `TARANTOOL_SNAPSHOT_PERIOD` +### `TARANTOOL_CHECKPOINT_INTERVAL` Optional. Specifies how often snapshots will be made, in seconds. Default is 3600 (every 1 hour). From 571bb9c822bfc553d6d32bcfeaedb9ab540cdf9c Mon Sep 17 00:00:00 2001 From: Oleg Babin Date: Wed, 30 Jan 2019 11:49:01 +0300 Subject: [PATCH 129/286] update tarantool 1.x-centos7 image --- 1.x-centos7/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1.x-centos7/Dockerfile b/1.x-centos7/Dockerfile index d68fdd7..b189ad7 100644 --- a/1.x-centos7/Dockerfile +++ b/1.x-centos7/Dockerfile @@ -4,7 +4,7 @@ MAINTAINER mail@racktear.com RUN groupadd tarantool \ && adduser -g tarantool tarantool -ENV TARANTOOL_VERSION=1.10.2-80-g0b6e25f46 \ +ENV TARANTOOL_VERSION=1.10.2-119-g21f87c30d \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ LUAROCKS_URL=https://github.com/tarantool/luarocks/archive/6e6fe62d9409fe2103c0fd091cccb3da0451faf5.tar.gz \ From 6e15832d6d304ef05c9345f54e1c6d46b2d6f08c Mon Sep 17 00:00:00 2001 From: Oleg Babin Date: Wed, 30 Jan 2019 11:52:16 +0300 Subject: [PATCH 130/286] Update icu4c version --- 1.x-centos7/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/1.x-centos7/Dockerfile b/1.x-centos7/Dockerfile index b189ad7..cf514cd 100644 --- a/1.x-centos7/Dockerfile +++ b/1.x-centos7/Dockerfile @@ -66,10 +66,10 @@ RUN set -x \ wget \ curl-devel \ && : "---------- libicu ----------" \ - && wget http://download.icu-project.org/files/icu4c/62.1/icu4c-62_1-src.tgz \ + && wget http://download.icu-project.org/files/icu4c/63.1/icu4c-63_1-src.tgz \ && mkdir -p /usr/src/icu \ - && tar -xzf icu4c-62_1-src.tgz -C /usr/src/icu --strip-components=1 \ - && rm icu4c-62_1-src.tgz \ + && tar -xzf icu4c-63_1-src.tgz -C /usr/src/icu --strip-components=1 \ + && rm icu4c-63_1-src.tgz \ && (cd /usr/src/icu/source; \ chmod +x runConfigureICU configure install-sh; \ ./runConfigureICU Linux/gcc; \ From 97d059acbd1d53079a636e972a33946b380caa1a Mon Sep 17 00:00:00 2001 From: Oleg Babin Date: Mon, 25 Feb 2019 21:11:32 +0300 Subject: [PATCH 131/286] Bump 1.x-centos7 image to Tarantool 1.10.2-158-g9cb2dc005 --- 1.x-centos7/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1.x-centos7/Dockerfile b/1.x-centos7/Dockerfile index cf514cd..c72624d 100644 --- a/1.x-centos7/Dockerfile +++ b/1.x-centos7/Dockerfile @@ -4,7 +4,7 @@ MAINTAINER mail@racktear.com RUN groupadd tarantool \ && adduser -g tarantool tarantool -ENV TARANTOOL_VERSION=1.10.2-119-g21f87c30d \ +ENV TARANTOOL_VERSION=1.10.2-158-g9cb2dc005 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ LUAROCKS_URL=https://github.com/tarantool/luarocks/archive/6e6fe62d9409fe2103c0fd091cccb3da0451faf5.tar.gz \ From 85f7998ac5fc885a70c4bfb8438d421e707c88fa Mon Sep 17 00:00:00 2001 From: Oleg Babin Date: Tue, 12 Mar 2019 13:05:21 +0300 Subject: [PATCH 132/286] Update centos7 image to 1.10.2-177-g13896a731 --- 1.x-centos7/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1.x-centos7/Dockerfile b/1.x-centos7/Dockerfile index c72624d..8c6b2f9 100644 --- a/1.x-centos7/Dockerfile +++ b/1.x-centos7/Dockerfile @@ -4,7 +4,7 @@ MAINTAINER mail@racktear.com RUN groupadd tarantool \ && adduser -g tarantool tarantool -ENV TARANTOOL_VERSION=1.10.2-158-g9cb2dc005 \ +ENV TARANTOOL_VERSION=1.10.2-177-g13896a731 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ LUAROCKS_URL=https://github.com/tarantool/luarocks/archive/6e6fe62d9409fe2103c0fd091cccb3da0451faf5.tar.gz \ From f37768b91ea0e655a768f6fa2d3f74930cbeed9b Mon Sep 17 00:00:00 2001 From: Oleg Babin Date: Fri, 15 Mar 2019 18:42:22 +0300 Subject: [PATCH 133/286] Update 1.x-centos image to 1.10.2-179-ge5e259a82 --- 1.x-centos7/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1.x-centos7/Dockerfile b/1.x-centos7/Dockerfile index 8c6b2f9..1e4d67a 100644 --- a/1.x-centos7/Dockerfile +++ b/1.x-centos7/Dockerfile @@ -4,7 +4,7 @@ MAINTAINER mail@racktear.com RUN groupadd tarantool \ && adduser -g tarantool tarantool -ENV TARANTOOL_VERSION=1.10.2-177-g13896a731 \ +ENV TARANTOOL_VERSION=1.10.2-179-ge5e259a82 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ LUAROCKS_URL=https://github.com/tarantool/luarocks/archive/6e6fe62d9409fe2103c0fd091cccb3da0451faf5.tar.gz \ From 80636c4a3e23fa7c72a6279149256288d94ff76c Mon Sep 17 00:00:00 2001 From: Oleg Babin Date: Fri, 15 Mar 2019 18:43:02 +0300 Subject: [PATCH 134/286] Update 1.x image to 1.10.2-179-ge5e259a82 --- 1.x/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1.x/Dockerfile b/1.x/Dockerfile index 491d30f..6bbefad 100644 --- a/1.x/Dockerfile +++ b/1.x/Dockerfile @@ -5,7 +5,7 @@ RUN addgroup -S tarantool \ && adduser -S -G tarantool tarantool \ && apk add --no-cache 'su-exec>=0.2' -ENV TARANTOOL_VERSION=1.10.2-0-gc0d8063b6 \ +ENV TARANTOOL_VERSION=1.10.2-179-ge5e259a82 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ CURL_REPO=https://github.com/curl/curl.git \ From cc20dc78d46f6cd55ce371f55c97a86a9e6e9791 Mon Sep 17 00:00:00 2001 From: Oleg Babin Date: Tue, 19 Mar 2019 14:35:18 +0300 Subject: [PATCH 135/286] Update 1.x-centos7 container to 1.10.2-185-g8a1a0a9ff and add curl build --- 1.x-centos7/Dockerfile | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/1.x-centos7/Dockerfile b/1.x-centos7/Dockerfile index 1e4d67a..a705fdc 100644 --- a/1.x-centos7/Dockerfile +++ b/1.x-centos7/Dockerfile @@ -4,9 +4,11 @@ MAINTAINER mail@racktear.com RUN groupadd tarantool \ && adduser -g tarantool tarantool -ENV TARANTOOL_VERSION=1.10.2-179-ge5e259a82 \ +ENV TARANTOOL_VERSION=1.10.2-185-g8a1a0a9ff \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ + CURL_REPO=https://github.com/curl/curl.git \ + CURL_TAG=curl-7_64_0 \ LUAROCKS_URL=https://github.com/tarantool/luarocks/archive/6e6fe62d9409fe2103c0fd091cccb3da0451faf5.tar.gz \ LUAROCK_SHARD_REPO=https://github.com/tarantool/shard.git \ LUAROCK_SHARD_TAG=8f8c5a7 \ @@ -39,12 +41,11 @@ RUN set -x \ ncurses \ libgomp \ lua \ - curl \ tar \ zip \ unzip \ libunwind \ - libcurl \ + ca-certificates \ && yum -y install \ perl \ gcc-c++ \ @@ -64,7 +65,6 @@ RUN set -x \ libtool \ go \ wget \ - curl-devel \ && : "---------- libicu ----------" \ && wget http://download.icu-project.org/files/icu4c/63.1/icu4c-63_1-src.tgz \ && mkdir -p /usr/src/icu \ @@ -76,8 +76,17 @@ RUN set -x \ make; \ make install; \ echo '/usr/local/lib' > /etc/ld.so.conf.d/local.conf; \ - cat /etc/ld.so.conf.d/local.conf; \ - ldconfig )\ + ldconfig ) \ + && : "---------- curl ----------" \ + && mkdir -p /usr/src/curl \ + && git clone "$CURL_REPO" /usr/src/curl \ + && (cd /usr/src/curl; \ + git checkout "$CURL_TAG"; \ + ./buildconf; \ + ./configure --with-ssl --prefix "/usr/local"; \ + make -j; \ + make install; \ + ldconfig ) \ && : "---------- gperftools ----------" \ && yum install -y gperftools-libs \ && (GOPATH=/usr/src/go go get github.com/google/pprof; \ @@ -126,6 +135,7 @@ RUN set -x \ && rm -rf /usr/src/tarantool \ && rm -rf /usr/src/go \ && rm -rf /usr/src/icu \ + && rm -rf /usr/src/curl \ && : "---------- remove build deps ----------" \ && yum -y remove \ perl \ @@ -149,7 +159,6 @@ RUN set -x \ perl \ kernel-headers \ golang-src \ - curl-devel \ && rpm -qa | grep devel | xargs yum -y remove \ && rm -rf /var/cache/yum @@ -162,11 +171,11 @@ RUN set -x \ mariadb-libs \ postgresql96-libs \ cyrus-sasl \ - libcurl \ libev \ proj \ geos \ unzip \ + openssl-libs \ && yum -y install \ git \ cmake \ @@ -175,7 +184,6 @@ RUN set -x \ postgresql96-devel \ lua-devel \ cyrus-sasl-devel \ - curl-devel \ libev-devel \ wget \ proj-devel \ @@ -225,7 +233,6 @@ RUN set -x \ postgresql96-devel \ lua-devel \ cyrus-sasl-devel \ - curl-devel \ libev-devel \ wget \ proj-devel \ From a04277c0361b1b3b9612996304659ef058a5fa65 Mon Sep 17 00:00:00 2001 From: avtikhon Date: Fri, 22 Mar 2019 16:53:09 +0300 Subject: [PATCH 136/286] Updated 2.x version from master latest commit Update 2.x version from master latest commit. --- 2.x/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/2.x/Dockerfile b/2.x/Dockerfile index 4dc1ca7..c703975 100644 --- a/2.x/Dockerfile +++ b/2.x/Dockerfile @@ -5,7 +5,7 @@ RUN addgroup -S tarantool \ && adduser -S -G tarantool tarantool \ && apk add --no-cache 'su-exec>=0.2' -ENV TARANTOOL_VERSION=2.1.1-7-gd381a45b6 \ +ENV TARANTOOL_VERSION=2.2.0-5-g51e2d002e \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ CURL_REPO=https://github.com/curl/curl.git \ From cbc72ec1d26d414dc2660b2ec31161ad3018814f Mon Sep 17 00:00:00 2001 From: Alexander Turenko Date: Wed, 27 Mar 2019 16:53:07 +0300 Subject: [PATCH 137/286] Update tarantool version in 2.x Fixes #87. --- 2.x/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/2.x/Dockerfile b/2.x/Dockerfile index c703975..eff2472 100644 --- a/2.x/Dockerfile +++ b/2.x/Dockerfile @@ -5,7 +5,7 @@ RUN addgroup -S tarantool \ && adduser -S -G tarantool tarantool \ && apk add --no-cache 'su-exec>=0.2' -ENV TARANTOOL_VERSION=2.2.0-5-g51e2d002e \ +ENV TARANTOOL_VERSION=2.2.0-26-g28d512134 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ CURL_REPO=https://github.com/curl/curl.git \ From 5696618e23a7aac11e39676b85eee2d80c24c0cb Mon Sep 17 00:00:00 2001 From: avtikhon Date: Thu, 28 Mar 2019 17:18:14 +0300 Subject: [PATCH 138/286] Add tarantool 1.9 rolling version --- 1.9/Dockerfile | 247 +++++++++++++++++++++++++++++ 1.9/console | 15 ++ 1.9/docker-entrypoint.sh | 22 +++ 1.9/gperftools_alpine.diff | 110 +++++++++++++ 1.9/luarocks-config.lua | 9 ++ 1.9/tarantool-entrypoint.lua | 292 +++++++++++++++++++++++++++++++++++ 1.9/tarantool.default | 22 +++ 1.9/tarantool_is_up | 41 +++++ 1.9/tarantool_set_config.lua | 130 ++++++++++++++++ 9 files changed, 888 insertions(+) create mode 100644 1.9/Dockerfile create mode 100755 1.9/console create mode 100755 1.9/docker-entrypoint.sh create mode 100644 1.9/gperftools_alpine.diff create mode 100644 1.9/luarocks-config.lua create mode 100755 1.9/tarantool-entrypoint.lua create mode 100644 1.9/tarantool.default create mode 100755 1.9/tarantool_is_up create mode 100755 1.9/tarantool_set_config.lua diff --git a/1.9/Dockerfile b/1.9/Dockerfile new file mode 100644 index 0000000..536a06b --- /dev/null +++ b/1.9/Dockerfile @@ -0,0 +1,247 @@ +FROM alpine:3.5 +MAINTAINER mail@racktear.com + +RUN addgroup -S tarantool \ + && adduser -S -G tarantool tarantool \ + && apk add --no-cache 'su-exec>=0.2' + +ENV TARANTOOL_VERSION=1.9.2-13-gfa7c74b4d \ + TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ + TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ + CURL_REPO=https://github.com/curl/curl.git \ + CURL_TAG=curl-7_59_0 \ + GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ + GPERFTOOLS_TAG=gperftools-2.5 \ + LUAROCKS_URL=https://github.com/tarantool/luarocks/archive/6e6fe62d9409fe2103c0fd091cccb3da0451faf5.tar.gz \ + LUAROCK_SHARD_REPO=https://github.com/tarantool/shard.git \ + LUAROCK_SHARD_TAG=8f8c5a7 \ + LUAROCK_AVRO_SCHEMA_VERSION=2.0.1 \ + LUAROCK_EXPERATIOND_VERSION=1.0.1 \ + LUAROCK_QUEUE_VERSION=1.0.2 \ + LUAROCK_CONNPOOL_VERSION=1.1.1 \ + LUAROCK_HTTP_VERSION=1.0.1 \ + LUAROCK_MEMCACHED_VERSION=1.0.0 \ + LUAROCK_TARANTOOL_PG_VERSION=2.0.1 \ + LUAROCK_TARANTOOL_MYSQL_VERSION=2.0.1 \ + LUAROCK_TARANTOOL_CURL_VERSION=2.3.1 \ + LUAROCK_TARANTOOL_MQTT_VERSION=1.2.1 \ + LUAROCK_TARANTOOL_GIS_VERSION=1.0.0 \ + LUAROCK_TARANTOOL_PROMETHEUS_VERSION=1.0.0 \ + LUAROCK_TARANTOOL_GPERFTOOLS_VERSION=1.0.1 + +COPY gperftools_alpine.diff / + +RUN set -x \ + && apk add --no-cache --virtual .run-deps \ + libstdc++ \ + readline \ + libressl \ + yaml \ + lz4 \ + binutils \ + ncurses \ + libgomp \ + lua \ + tar \ + zip \ + libunwind \ + icu \ + ca-certificates \ + && apk add --no-cache --virtual .build-deps \ + perl \ + gcc \ + g++ \ + cmake \ + readline-dev \ + libressl-dev \ + yaml-dev \ + lz4-dev \ + binutils-dev \ + ncurses-dev \ + lua-dev \ + musl-dev \ + make \ + git \ + libunwind-dev \ + autoconf \ + automake \ + libtool \ + linux-headers \ + go \ + icu-dev \ + wget \ + && : "---------- curl ----------" \ + && mkdir -p /usr/src/curl \ + && git clone "$CURL_REPO" /usr/src/curl \ + && git -C /usr/src/curl checkout "$CURL_TAG" \ + && (cd /usr/src/curl \ + && ./buildconf \ + && ./configure --prefix "/usr/local" \ + && make -j \ + && make install) \ + && : "---------- gperftools ----------" \ + && mkdir -p /usr/src/gperftools \ + && git clone "$GPERFTOOLS_REPO" /usr/src/gperftools \ + && git -C /usr/src/gperftools checkout "$GPERFTOOLS_TAG" \ + && (cd /usr/src/gperftools; \ + patch -p1 < /gperftools_alpine.diff; \ + rm /gperftools_alpine.diff; \ + ./autogen.sh; \ + ./configure; \ + make; \ + cp .libs/libprofiler.so* /usr/local/lib;) \ + && (GOPATH=/usr/src/go go get github.com/google/pprof; \ + cp /usr/src/go/bin/pprof /usr/local/bin) \ + && : "---------- tarantool ----------" \ + && mkdir -p /usr/src/tarantool \ + && git clone "$TARANTOOL_DOWNLOAD_URL" /usr/src/tarantool \ + && git -C /usr/src/tarantool checkout "$TARANTOOL_VERSION" \ + && git -C /usr/src/tarantool submodule update --init --recursive \ + && (cd /usr/src/tarantool; \ + cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo\ + -DENABLE_BUNDLED_LIBYAML:BOOL=OFF\ + -DENABLE_BACKTRACE:BOOL=ON\ + -DENABLE_DIST:BOOL=ON\ + .) \ + && make -C /usr/src/tarantool -j\ + && make -C /usr/src/tarantool install \ + && make -C /usr/src/tarantool clean \ + && : "---------- small ----------" \ + && (cd /usr/src/tarantool/src/lib/small; \ + cmake -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + .) \ + && make -C /usr/src/tarantool/src/lib/small \ + && make -C /usr/src/tarantool/src/lib/small install \ + && make -C /usr/src/tarantool/src/lib/small clean \ + && : "---------- msgpuck ----------" \ + && (cd /usr/src/tarantool/src/lib/msgpuck; \ + cmake -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + .) \ + && make -C /usr/src/tarantool/src/lib/msgpuck \ + && make -C /usr/src/tarantool/src/lib/msgpuck install \ + && make -C /usr/src/tarantool/src/lib/msgpuck clean \ + && : "---------- luarocks ----------" \ + && wget -O luarocks.tar.gz "$LUAROCKS_URL" \ + && mkdir -p /usr/src/luarocks \ + && tar -xzf luarocks.tar.gz -C /usr/src/luarocks --strip-components=1 \ + && (cd /usr/src/luarocks; \ + ./configure; \ + make build; \ + make install) \ + && rm -r /usr/src/luarocks \ + && rm -rf /usr/src/tarantool \ + && rm -rf /usr/src/gperftools \ + && rm -rf /usr/src/go \ + && : "---------- remove build deps ----------" \ + && apk del .build-deps + +COPY luarocks-config.lua /usr/local/etc/luarocks/config-5.1.lua + +RUN set -x \ + && apk add --no-cache --virtual .run-deps \ + mariadb-client-libs \ + libpq \ + cyrus-sasl \ + mosquitto-libs \ + libev \ + && apk add --no-cache --virtual .build-deps \ + git \ + cmake \ + make \ + coreutils \ + gcc \ + g++ \ + postgresql-dev \ + lua-dev \ + musl-dev \ + cyrus-sasl-dev \ + mosquitto-dev \ + libev-dev \ + && mkdir -p /rocks \ + && : "---------- proj (for gis module) ----------" \ + && wget -O proj.tar.gz http://download.osgeo.org/proj/proj-4.9.3.tar.gz \ + && mkdir -p /usr/src/proj \ + && tar -xzf proj.tar.gz -C /usr/src/proj --strip-components=1 \ + && (cd /usr/src/proj; \ + ./configure; \ + make; \ + make install) \ + && rm -r /usr/src/proj \ + && rm -rf /usr/src/proj \ + && : "---------- geos (for gis module) ----------" \ + && wget -O geos.tar.bz2 http://download.osgeo.org/geos/geos-3.6.0.tar.bz2 \ + && mkdir -p /usr/src/geos \ + && tar -xjf geos.tar.bz2 -C /usr/src/geos --strip-components=1 \ + && (cd /usr/src/geos; \ + ./configure; \ + make; \ + make install) \ + && rm -r /usr/src/geos \ + && rm -rf /usr/src/geos \ + && : "---------- luarocks ----------" \ + && luarocks install lua-term \ + && luarocks install ldoc \ + && : "avro" \ + && luarocks install avro-schema $LUAROCK_AVRO_SCHEMA_VERSION \ + && : "expirationd" \ + && luarocks install expirationd $LUAROCK_EXPERATIOND_VERSION \ + && : "queue" \ + && luarocks install queue $LUAROCK_QUEUE_VERSION \ + && : "connpool" \ + && luarocks install connpool $LUAROCK_CONNPOOL_VERSION \ + && : "shard" \ + && git clone $LUAROCK_SHARD_REPO /rocks/shard \ + && git -C /rocks/shard checkout $LUAROCK_SHARD_TAG \ + && (cd /rocks/shard && luarocks make *rockspec) \ + && : "http" \ + && luarocks install http $LUAROCK_HTTP_VERSION \ + && : "pg" \ + && luarocks install pg $LUAROCK_TARANTOOL_PG_VERSION \ + && : "mysql" \ + && luarocks install mysql $LUAROCK_TARANTOOL_MYSQL_VERSION \ + && : "memcached" \ + && luarocks install memcached $LUAROCK_MEMCACHED_VERSION \ + && : "prometheus" \ + && luarocks install prometheus $LUAROCK_TARANTOOL_PROMETHEUS_VERSION \ + && : "curl" \ + && luarocks install tarantool-curl $LUAROCK_TARANTOOL_CURL_VERSION \ + && : "mqtt" \ + && luarocks install mqtt $LUAROCK_TARANTOOL_MQTT_VERSION \ + && : "gis" \ + && luarocks install gis $LUAROCK_TARANTOOL_GIS_VERSION \ + && : "gperftools" \ + && luarocks install gperftools $LUAROCK_TARANTOOL_GPERFTOOLS_VERSION \ + && : "---------- remove build deps ----------" \ + && apk del .build-deps \ + && rm -rf /rocks + +RUN mkdir -p /var/lib/tarantool \ + && chown tarantool:tarantool /var/lib/tarantool \ + && mkdir -p /opt/tarantool \ + && chown tarantool:tarantool /opt/tarantool \ + && mkdir -p /var/run/tarantool \ + && chown tarantool:tarantool /var/run/tarantool \ + && mkdir /etc/tarantool \ + && chown tarantool:tarantool /etc/tarantool + +VOLUME /var/lib/tarantool +WORKDIR /opt/tarantool + +COPY tarantool-entrypoint.lua /usr/local/bin/ +COPY tarantool_set_config.lua /usr/local/bin/ +COPY docker-entrypoint.sh /usr/local/bin/ +COPY console /usr/local/bin/ +COPY tarantool_is_up /usr/local/bin/ +COPY tarantool.default /usr/local/etc/default/tarantool + +RUN ln -s usr/local/bin/docker-entrypoint.sh /entrypoint.sh # backwards compat +ENTRYPOINT ["docker-entrypoint.sh"] + +HEALTHCHECK CMD tarantool_is_up + +EXPOSE 3301 +CMD [ "tarantool" ] diff --git a/1.9/console b/1.9/console new file mode 100755 index 0000000..d6fb192 --- /dev/null +++ b/1.9/console @@ -0,0 +1,15 @@ +#!/usr/bin/env tarantool + +local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' + +console = require('console') +console.on_start(function(self) + local status, reason + status, reason = pcall(function() require('console').connect(CONSOLE_SOCKET_PATH) end) + if not status then + self:print(reason) + self.running = false + end +end) +console.on_client_disconnect(function(self) self.running = false end) +console.start() diff --git a/1.9/docker-entrypoint.sh b/1.9/docker-entrypoint.sh new file mode 100755 index 0000000..3a9f5e4 --- /dev/null +++ b/1.9/docker-entrypoint.sh @@ -0,0 +1,22 @@ +#!/bin/sh +set -e + +# first arg is `-f` or `--some-option` +# or first arg is `something.conf` +if [ "${1:0:1}" = '-' ]; then + set -- tarantool "$@" +fi + +# allow the container to be started with `--user` +if [ "$1" = 'tarantool' -a "$(id -u)" = '0' ]; then + chown -R tarantool /var/lib/tarantool + exec su-exec tarantool "$0" "$@" +fi + +# entry point wraps the passed script to do basic setup +if [ "$1" = 'tarantool' ]; then + shift + exec tarantool "/usr/local/bin/tarantool-entrypoint.lua" "$@" +fi + +exec "$@" diff --git a/1.9/gperftools_alpine.diff b/1.9/gperftools_alpine.diff new file mode 100644 index 0000000..e768381 --- /dev/null +++ b/1.9/gperftools_alpine.diff @@ -0,0 +1,110 @@ +diff --git a/src/base/linux_syscall_support.h b/src/base/linux_syscall_support.h +index 5d578cd..fceebe2 100644 +--- a/src/base/linux_syscall_support.h ++++ b/src/base/linux_syscall_support.h +@@ -2432,9 +2432,9 @@ struct kernel_stat { + #if defined(__s390x__) + LSS_INLINE _syscall1(void*, mmap, void*, a) + #else +- /* Need to make sure __off64_t isn't truncated to 32-bits under x32. */ ++ /* Need to make sure off64_t isn't truncated to 32-bits under x32. */ + LSS_INLINE void* LSS_NAME(mmap)(void *s, size_t l, int p, int f, int d, +- __off64_t o) { ++ off64_t o) { + LSS_BODY(6, void*, mmap, LSS_SYSCALL_ARG(s), LSS_SYSCALL_ARG(l), + LSS_SYSCALL_ARG(p), LSS_SYSCALL_ARG(f), + LSS_SYSCALL_ARG(d), (uint64_t)(o)); +@@ -2475,7 +2475,7 @@ struct kernel_stat { + LSS_INLINE _syscall6(void*, mmap, void*, s, + size_t, l, int, p, + int, f, int, d, +- __off64_t, o) ++ off64_t, o) + LSS_INLINE int LSS_NAME(sigaction)(int signum, + const struct kernel_sigaction *act, + struct kernel_sigaction *oldact) { +diff --git a/src/malloc_hook_mmap_linux.h b/src/malloc_hook_mmap_linux.h +index 1c4c766..b2aa8ed 100755 +--- a/src/malloc_hook_mmap_linux.h ++++ b/src/malloc_hook_mmap_linux.h +@@ -56,7 +56,7 @@ + + static inline void* do_mmap64(void *start, size_t length, + int prot, int flags, +- int fd, __off64_t offset) __THROW { ++ int fd, off64_t offset) __THROW { + return sys_mmap(start, length, prot, flags, fd, offset); + } + +@@ -67,7 +67,7 @@ static inline void* do_mmap64(void *start, size_t length, + + static inline void* do_mmap64(void *start, size_t length, + int prot, int flags, +- int fd, __off64_t offset) __THROW { ++ int fd, off64_t offset) __THROW { + void *result; + + // Try mmap2() unless it's not supported +@@ -151,9 +151,11 @@ static inline void* do_mmap64(void *start, size_t length, + # undef mmap + + extern "C" { ++ #ifndef mmap64 + void* mmap64(void *start, size_t length, int prot, int flags, +- int fd, __off64_t offset ) __THROW ++ int fd, off64_t offset ) __THROW + ATTRIBUTE_SECTION(malloc_hook); ++ #endif + void* mmap(void *start, size_t length,int prot, int flags, + int fd, off_t offset) __THROW + ATTRIBUTE_SECTION(malloc_hook); +@@ -166,8 +168,9 @@ extern "C" { + ATTRIBUTE_SECTION(malloc_hook); + } + ++#ifndef mmap64 + extern "C" void* mmap64(void *start, size_t length, int prot, int flags, +- int fd, __off64_t offset) __THROW { ++ int fd, off64_t offset) __THROW { + MallocHook::InvokePreMmapHook(start, length, prot, flags, fd, offset); + void *result; + if (!MallocHook::InvokeMmapReplacement( +@@ -177,6 +180,7 @@ extern "C" void* mmap64(void *start, size_t length, int prot, int flags, + MallocHook::InvokeMmapHook(result, start, length, prot, flags, fd, offset); + return result; + } ++#endif + + # if !defined(__USE_FILE_OFFSET64) || !defined(__REDIRECT_NTH) + +@@ -216,7 +220,7 @@ extern "C" void* mremap(void* old_addr, size_t old_size, size_t new_size, + return result; + } + +-#ifndef __UCLIBC__ ++#if defined(__GLIBC__) && ! defined(__UCLIBC__) + // libc's version: + extern "C" void* __sbrk(ptrdiff_t increment); + +diff --git a/src/tests/stacktrace_unittest.cc b/src/tests/stacktrace_unittest.cc +index 3c9f735..2d39ad9 100644 +--- a/src/tests/stacktrace_unittest.cc ++++ b/src/tests/stacktrace_unittest.cc +@@ -120,17 +120,6 @@ void ATTRIBUTE_NOINLINE CheckStackTraceLeaf(void) { + CHECK_GE(size, 1); + CHECK_LE(size, STACK_LEN); + +-#ifdef HAVE_EXECINFO_H +- { +- char **strings = backtrace_symbols(stack, size); +- printf("Obtained %d stack frames.\n", size); +- for (int i = 0; i < size; i++) +- printf("%s %p\n", strings[i], stack[i]); +- printf("CheckStackTrace() addr: %p\n", &CheckStackTrace); +- free(strings); +- } +-#endif +- + for (int i = 0; i < BACKTRACE_STEPS; i++) { + printf("Backtrace %d: expected: %p..%p actual: %p ... ", + i, expected_range[i].start, expected_range[i].end, stack[i]); diff --git a/1.9/luarocks-config.lua b/1.9/luarocks-config.lua new file mode 100644 index 0000000..111f955 --- /dev/null +++ b/1.9/luarocks-config.lua @@ -0,0 +1,9 @@ +rocks_trees = { + { name = [[user]], root = home..[[/.luarocks]] }, + { name = [[system]], root = [[/usr/local]] } +} + +rocks_servers = { + [[http://rocks.tarantool.org/]], + [[http://luarocks.org/repositories/rocks]] +} diff --git a/1.9/tarantool-entrypoint.lua b/1.9/tarantool-entrypoint.lua new file mode 100755 index 0000000..11cd89d --- /dev/null +++ b/1.9/tarantool-entrypoint.lua @@ -0,0 +1,292 @@ +#!/usr/bin/env tarantool + +local fio = require('fio') +local errno = require('errno') +local fun = require('fun') +local urilib = require('uri') +local console = require('console') +local term = require('term') +local log = require('log') +local yaml = require('yaml') + +local TARANTOOL_DEFAULT_PORT = 3301 +local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' +local CFG_FILE_PATH = '/etc/tarantool/config.yml' + + +local orig_cfg = box.cfg + +local function read_config() + local f = io.open(CFG_FILE_PATH, "rb") + if f == nil then + log.error("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) + os.exit(1) + end + local content = f:read("*all") + f:close() + return yaml.decode(content) +end + +local function write_config(cfg) + local f = io.open(CFG_FILE_PATH, "w+") + if f == nil then + print("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) + os.exit(1) + end + local content = yaml.encode(cfg) + f:write(content) + f:close() +end + +local function parse_replication_source(replication_source, user_name, user_password) + if replication_source == nil then + return nil + end + + local replication_source_table = {} + for uri in string.gmatch(replication_source, "[^,]+") do + local parsed_uri = urilib.parse(uri) + if parsed_uri == nil then + error("Incorrect replication source URI format: '"..uri.."'") + end + local host = parsed_uri.host + local port = parsed_uri.service or TARANTOOL_DEFAULT_PORT + local user = parsed_uri.login or user_name + local password = parsed_uri.password or user_password + + if user == 'guest' or user == nil then + replication_source = string.format("%s:%s", host, port) + elseif password == nil then + replication_source = string.format("%s:@%s:%s", user, host, port) + else + replication_source = string.format("%s:%s@%s:%s", user, password, + host, port) + end + + table.insert(replication_source_table, replication_source) + end + + return replication_source_table +end + +local function choose_option(main, substitute, cfg) + if cfg[main] then + return main + end + if cfg[substitute] then + return substitute + end + return main +end + +function set_replication_source(replication_source, user_name, user_password) + local replication_source_table = parse_replication_source( + replication_source, user_name, user_password + ) + local choice = choose_option('replication', 'replication_source', box.cfg) + box.cfg{[choice] = replication_source_table} + log.info("Updated box.cfg.%s to %s", choice, replication_source) +end + +local function create_user(user_name, user_password) + if user_name ~= 'guest' and user_password == nil then + user_password = "" + + local warn_str = [[**************************************************** +WARNING: No password has been set for the database. + This will allow anyone with access to the + Tarantool port to access your database. In + Docker's default configuration, this is + effectively any other container on the same + system. + Use "-e TARANTOOL_USER_PASSWORD=password" + to set it in "docker run". +****************************************************]] + log.warn('\n'..warn_str) + end + + if user_name == 'guest' and user_password == nil then + local warn_str = [[**************************************************** +WARNING: 'guest' is chosen as primary user. + Since it is not allowed to set a password for + guest user, your instance will be accessible + by anyone having direct access to the Tarantool + port. + If you wanted to create an authenticated user, + specify "-e TARANTOOL_USER_NAME=username" and + pick a user name other than "guest". +****************************************************]] + log.warn('\n'..warn_str) + end + + if user_name == 'guest' and user_password ~= nil then + user_password = nil + + local warn_str = [[**************************************************** +WARNING: A password for guest user has been specified. + In Tarantool, guest user can't have a password + and is always allowed to login, if it has + enough privileges. + If you wanted to create an authenticated user, + specify "-e TARANTOOL_USER_NAME=username" and + pick a user name other than "guest". +****************************************************]] + log.warn('\n'..warn_str) + end + + if user_name ~= 'admin' and user_name ~= 'guest' then + if not box.schema.user.exists(user_name) then + log.info("Creating user '%s'", user_name) + box.schema.user.create(user_name) + end + end + + if user_name ~= 'admin' then + log.info("Granting admin privileges to user '%s'", user_name) + box.schema.user.grant(user_name, 'read,write,execute', + 'universe', nil, {if_not_exists = true}) + box.schema.user.grant(user_name, 'replication', + nil, nil, {if_not_exists = true}) + end + + if user_name ~= 'guest' then + log.info("Setting password for user '%s'", user_name) + box.schema.user.passwd(user_name, user_password) + end +end + +function set_credentials(user_name, user_password) + create_user(user_name, user_password) +end + +local function wrapper_cfg(override) + local work_dir = '/var/lib/tarantool' + local snap_filename = "*.snap" + local snap_path = work_dir..'/'..snap_filename + + local first_run = false + if next(fio.glob(snap_path)) == nil then + first_run = true + end + + + local file_cfg = {} + local config_file_exists = fio.stat(CFG_FILE_PATH) ~= nil + if not config_file_exists then + log.info("Creating configuration file: " .. CFG_FILE_PATH) + + file_cfg.TARANTOOL_USER_NAME = os.getenv('TARANTOOL_USER_NAME') + file_cfg.TARANTOOL_USER_PASSWORD = os.getenv('TARANTOOL_USER_PASSWORD') + file_cfg.TARANTOOL_SLAB_ALLOC_ARENA = os.getenv('TARANTOOL_SLAB_ALLOC_ARENA') + file_cfg.TARANTOOL_SLAB_ALLOC_FACTOR = os.getenv('TARANTOOL_SLAB_ALLOC_FACTOR') + file_cfg.TARANTOOL_SLAB_ALLOC_MINIMAL = os.getenv('TARANTOOL_SLAB_ALLOC_MINIMAL') + file_cfg.TARANTOOL_SLAB_ALLOC_MAXIMAL = os.getenv('TARANTOOL_SLAB_ALLOC_MAXIMAL') + file_cfg.TARANTOOL_PORT = os.getenv('TARANTOOL_PORT') + file_cfg.TARANTOOL_WAL_MODE = os.getenv('TARANTOOL_WAL_MODE') + file_cfg.TARANTOOL_REPLICATION_SOURCE = os.getenv('TARANTOOL_REPLICATION_SOURCE') + file_cfg.TARANTOOL_REPLICATION = os.getenv('TARANTOOL_REPLICATION') + file_cfg.TARANTOOL_SNAPSHOT_PERIOD = os.getenv('TARANTOOL_SNAPSHOT_PERIOD') + file_cfg.TARANTOOL_MEMTX_MEMORY = os.getenv('TARANTOOL_MEMTX_MEMORY') + file_cfg.TARANTOOL_CHECKPOINT_INTERVAL = os.getenv('TARANTOOL_CHECKPOINT_INTERVAL') + file_cfg.TARANTOOL_MEMTX_MIN_TUPLE_SIZE = os.getenv('TARANTOOL_MEMTX_MIN_TUPLE_SIZE') + file_cfg.TARANTOOL_MEMTX_MAX_TUPLE_SIZE = os.getenv('TARANTOOL_MEMTX_MAX_TUPLE_SIZE') + + write_config(file_cfg) + else + log.info("Loading existing configuration file: " .. CFG_FILE_PATH) + + file_cfg = read_config() + end + + local user_name = file_cfg.TARANTOOL_USER_NAME or + os.getenv('TARANTOOL_USER_NAME') or 'guest' + local user_password = file_cfg.TARANTOOL_USER_PASSWORD or + os.getenv('TARANTOOL_USER_PASSWORD') + + + local cfg = override or {} + -- Placeholders for deprecated options + cfg.slab_alloc_arena = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_ARENA) or + override.slab_alloc_arena + cfg.slab_alloc_maximal = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_MAXIMAL) or + override.slab_alloc_maximal + cfg.slab_alloc_minimal = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_MINIMAL) or + override.slab_alloc_minimal + cfg.snapshot_period = tonumber(file_cfg.TARANTOOL_SNAPSHOT_PERIOD) or + override.snapshot_period + -- Replacements for deprecated options + cfg.memtx_memory = tonumber(file_cfg.TARANTOOL_MEMTX_MEMORY) or + override.memtx_memory + cfg.memtx_min_tuple_size = tonumber(file_cfg.TARANTOOL_MEMTX_MIN_TUPLE_SIZE) or + override.memtx_min_tuple_size + cfg.memtx_max_tuple_size = tonumber(file_cfg.TARANTOOL_MEMTX_MAX_TUPLE_SIZE) or + override.memtx_max_tuple_size + cfg.checkpoint_interval = tonumber(file_cfg.TARANTOOL_CHECKPOINT_INTERVAL) or + override.checkpoint_interval + -- Deprecated options with default values + local choice = choose_option('memtx_dir', 'snap_dir', override) + cfg[choice] = override[choice] or '/var/lib/tarantool' + + -- Remaining configuration + cfg.slab_alloc_factor = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_FACTOR) or + override.slab_alloc_factor + cfg.listen = tonumber(file_cfg.TARANTOOL_PORT) or + override.listen or TARANTOOL_DEFAULT_PORT + cfg.wal_mode = file_cfg.TARANTOOL_WAL_MODE or + override.wal_mode + + cfg.wal_dir = override.wal_dir or '/var/lib/tarantool' + cfg.vinyl_dir = override.vinyl_dir or '/var/lib/tarantool' + cfg.pid_file = override.pid_file or '/var/run/tarantool/tarantool.pid' + + local choice = choose_option('TARANTOOL_REPLICATION', 'TARANTOOL_REPLICATION_SOURCE', file_cfg) + local replication_source_table = parse_replication_source(file_cfg[choice], + user_name, + user_password) + + if replication_source_table then + cfg.replication = replication_source_table + else + local choice = choose_option('replication', 'replication_source', override) + cfg[choice] = override[choice] + end + + log.info("Config:\n" .. yaml.encode(cfg)) + + orig_cfg(cfg) + + box.once('tarantool-entrypoint', function () + if first_run then + log.info("Initializing database") + + create_user(user_name, user_password) + end + end) + + console.listen(CONSOLE_SOCKET_PATH) + +end + +box.cfg = wrapper_cfg + +-- re-run the script passed as parameter with all arguments that follow +execute_script = arg[1] +if execute_script == nil then + box.cfg {} + + if term.isatty(io.stdout) then + console.start() + os.exit(0) + end +else + narg = 0 + while true do + arg[narg] = arg[narg + 1] + if arg[narg] == nil then + break + end + narg = narg + 1 + end + + dofile(execute_script) +end diff --git a/1.9/tarantool.default b/1.9/tarantool.default new file mode 100644 index 0000000..fffe3b0 --- /dev/null +++ b/1.9/tarantool.default @@ -0,0 +1,22 @@ +-- +-- System-wide settings for tarantoolctl and init scripts +-- +-- This file is meant to enable the usage of tarantoolctl inside +-- docker containers. Since there is no init system, most of its +-- functionality will not work, except 'tarantoolctl enter' or +-- 'tarantoolctl status'. +-- + +default_cfg = { + pid_file = "/var/run/tarantool", -- /var/run/tarantool/${INSTANCE}.pid + wal_dir = "/var/lib/tarantool", -- /var/lib/tarantool/${INSTANCE}/ + snap_dir = "/var/lib/tarantool", -- /var/lib/tarantool/${INSTANCE} + vinyl_dir = "/var/lib/tarantool", -- /var/lib/tarantool/${INSTANCE} + logger = "/var/log/tarantool", -- /var/log/tarantool/${INSTANCE}.log + username = "tarantool", +} + +-- instances.available - all available instances +-- instances.enabled - instances to autostart by sysvinit +instance_dir = "/usr/local/etc/tarantool/instances.enabled" +-- vim: set ft=lua : diff --git a/1.9/tarantool_is_up b/1.9/tarantool_is_up new file mode 100755 index 0000000..71148d5 --- /dev/null +++ b/1.9/tarantool_is_up @@ -0,0 +1,41 @@ +#!/bin/sh + +status=$( (tarantool <<-'EOF' +local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' +local console = require('console') +local os = require("os") +local yaml = require("yaml") + +console.on_start(function(self) + local status, reason + status, reason = pcall(function() require('console').connect(CONSOLE_SOCKET_PATH) end) + if not status then + self:print(reason) + os.exit(1) + end + + cmd = 'box.info.status' + local res = self:eval(cmd) + if res ~= nil then + res = yaml.decode(res) + print(res[1]) + end + + os.exit(0) +end) + +console.on_client_disconnect(function(self) self.running = false end) +console.start() + +os.exit(0) +EOF +) 2>/dev/null) + + +echo "$status" + +if [ "$status" = "running" ]; then + exit 0 +else + exit 1 +fi diff --git a/1.9/tarantool_set_config.lua b/1.9/tarantool_set_config.lua new file mode 100755 index 0000000..ddca36c --- /dev/null +++ b/1.9/tarantool_set_config.lua @@ -0,0 +1,130 @@ +#!/usr/bin/env tarantool + +local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' +local CFG_FILE_PATH = '/etc/tarantool/config.yml' + +local fio = require('fio') +local yaml = require('yaml') +local console = require('console') +local errno = require('errno') + +local function read_config() + local f = io.open(CFG_FILE_PATH, "rb") + if f == nil then + print("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) + os.exit(1) + end + local content = f:read("*all") + f:close() + return yaml.decode(content) +end + +local function write_config(cfg) + local f = io.open(CFG_FILE_PATH, "w+") + if f == nil then + print("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) + os.exit(1) + end + local content = yaml.encode(cfg) + f:write(content) + f:close() +end + +local function nop(console, cfg, value) +end + +local function update_replication_source(console, cfg, value) + local user_name = "nil" + if cfg['TARANTOOL_USER_NAME'] then + user_name = "'" .. cfg['TARANTOOL_USER_NAME'] .. "'" + end + + local user_password = "nil" + if cfg['TARANTOOL_USER_PASSWORD'] then + user_password = "'" .. cfg['TARANTOOL_USER_PASSWORD'] .. "'" + end + + local cmd = "set_replication_source('"..value.."', " .. user_name .. "," .. user_password .. ")" + print("cmd: ", cmd) + + local res = console:eval(cmd) + + if res ~= nil then + print(res) + end +end + +local function update_credentials(console, cfg, value) + local user_name = "nil" + if cfg['TARANTOOL_USER_NAME'] then + user_name = "'" .. cfg['TARANTOOL_USER_NAME'] .. "'" + end + + local user_password = "nil" + if cfg['TARANTOOL_USER_PASSWORD'] then + user_password = "'" .. cfg['TARANTOOL_USER_PASSWORD'] .. "'" + end + + local cmd = "set_credentials(" .. user_name .. "," .. user_password .. ")" + + local res = console:eval(cmd) + + if res ~= nil then + print(res) + end + + local replication_source = cfg['TARANTOOL_REPLICATION_SOURCE'] + + if replication_source ~= nil then + update_replication_source(console, cfg, replication_source) + end +end + + +local vars = { + TARANTOOL_SLAB_ALLOC_ARENA=nop, + TARANTOOL_SLAB_ALLOC_FACTOR=nop, + TARANTOOL_SLAB_ALLOC_MAXIMAL=nop, + TARANTOOL_SLAB_ALLOC_MINIMAL=nop, + TARANTOOL_PORT=nop, + TARANTOOL_WAL_MODE=nop, + TARANTOOL_USER_NAME=update_credentials, + TARANTOOL_USER_PASSWORD=update_credentials, + TARANTOOL_REPLICATION_SOURCE=update_replication_source, + TARANTOOL_REPLICATION=update_replication_source, +} + +console.on_start(function(self) + local status, reason + status, reason = pcall(function() require('console').connect(CONSOLE_SOCKET_PATH) end) + if not status then + self:print(reason) + os.exit(1) + end + + if arg[1] == nil or arg[2] == nil then + self:print("Usage: " .. arg[0] .. " ") + os.exit(1) + end + + if vars[arg[1]] == nil then + self:print("Unknown var: " .. arg[1]) + os.exit(1) + end + + local cfg = read_config() + cfg[arg[1]] = arg[2] + + local func = vars[arg[1]] + func(self, cfg, arg[2]) + + write_config(cfg) + + self.running = false + os.exit(0) +end) + +console.on_client_disconnect(function(self) self.running = false end) +console.start() + +os.exit(0) From c327fa1e6232f5316036a70340f8245234fdd0ef Mon Sep 17 00:00:00 2001 From: avtikhon Date: Thu, 28 Mar 2019 17:19:40 +0300 Subject: [PATCH 139/286] Add tarantool 2.1 rolling version --- 2.1/Dockerfile | 249 +++++++++++++++++++++++++++++ 2.1/console | 15 ++ 2.1/docker-entrypoint.sh | 22 +++ 2.1/gperftools_alpine.diff | 110 +++++++++++++ 2.1/luarocks-config.lua | 9 ++ 2.1/tarantool-entrypoint.lua | 292 +++++++++++++++++++++++++++++++++++ 2.1/tarantool.default | 22 +++ 2.1/tarantool_is_up | 41 +++++ 2.1/tarantool_set_config.lua | 130 ++++++++++++++++ 9 files changed, 890 insertions(+) create mode 100644 2.1/Dockerfile create mode 100755 2.1/console create mode 100755 2.1/docker-entrypoint.sh create mode 100644 2.1/gperftools_alpine.diff create mode 100644 2.1/luarocks-config.lua create mode 100755 2.1/tarantool-entrypoint.lua create mode 100644 2.1/tarantool.default create mode 100755 2.1/tarantool_is_up create mode 100755 2.1/tarantool_set_config.lua diff --git a/2.1/Dockerfile b/2.1/Dockerfile new file mode 100644 index 0000000..dac51d2 --- /dev/null +++ b/2.1/Dockerfile @@ -0,0 +1,249 @@ +FROM alpine:3.5 +MAINTAINER mail@racktear.com + +RUN addgroup -S tarantool \ + && adduser -S -G tarantool tarantool \ + && apk add --no-cache 'su-exec>=0.2' + +ENV TARANTOOL_VERSION=2.1.1-453-gb103475e5 \ + TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ + TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ + CURL_REPO=https://github.com/curl/curl.git \ + CURL_TAG=curl-7_59_0 \ + GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ + GPERFTOOLS_TAG=gperftools-2.5 \ + LUAROCKS_URL=https://github.com/tarantool/luarocks/archive/6e6fe62d9409fe2103c0fd091cccb3da0451faf5.tar.gz \ + LUAROCK_SHARD_REPO=https://github.com/tarantool/shard.git \ + LUAROCK_SHARD_TAG=8f8c5a7 \ + LUAROCK_AVRO_SCHEMA_VERSION=2.0.1 \ + LUAROCK_EXPERATIOND_VERSION=1.0.1 \ + LUAROCK_QUEUE_VERSION=1.0.2 \ + LUAROCK_CONNPOOL_VERSION=1.1.1 \ + LUAROCK_HTTP_VERSION=1.0.1 \ + LUAROCK_MEMCACHED_VERSION=1.0.0 \ + LUAROCK_TARANTOOL_PG_VERSION=2.0.1 \ + LUAROCK_TARANTOOL_MYSQL_VERSION=2.0.1 \ + LUAROCK_TARANTOOL_CURL_VERSION=2.3.1 \ + LUAROCK_TARANTOOL_MQTT_VERSION=1.2.1 \ + LUAROCK_TARANTOOL_GIS_VERSION=1.0.0 \ + LUAROCK_TARANTOOL_PROMETHEUS_VERSION=1.0.0 \ + LUAROCK_TARANTOOL_GPERFTOOLS_VERSION=1.0.1 + +COPY gperftools_alpine.diff / + +RUN set -x \ + && apk add --no-cache --virtual .run-deps \ + libstdc++ \ + readline \ + libressl \ + yaml \ + lz4 \ + binutils \ + ncurses \ + libgomp \ + lua \ + tar \ + zip \ + libunwind \ + icu \ + ca-certificates \ + && apk add --no-cache --virtual .build-deps \ + perl \ + gcc \ + g++ \ + cmake \ + readline-dev \ + libressl-dev \ + yaml-dev \ + lz4-dev \ + binutils-dev \ + ncurses-dev \ + lua-dev \ + musl-dev \ + make \ + git \ + libunwind-dev \ + autoconf \ + automake \ + libtool \ + linux-headers \ + go \ + tcl \ + icu-dev \ + wget \ + && : "---------- curl ----------" \ + && mkdir -p /usr/src/curl \ + && git clone "$CURL_REPO" /usr/src/curl \ + && git -C /usr/src/curl checkout "$CURL_TAG" \ + && (cd /usr/src/curl \ + && ./buildconf \ + && ./configure --prefix "/usr/local" \ + && make -j \ + && make install) \ + && : "---------- gperftools ----------" \ + && mkdir -p /usr/src/gperftools \ + && git clone "$GPERFTOOLS_REPO" /usr/src/gperftools \ + && git -C /usr/src/gperftools checkout "$GPERFTOOLS_TAG" \ + && (cd /usr/src/gperftools; \ + patch -p1 < /gperftools_alpine.diff; \ + rm /gperftools_alpine.diff; \ + ./autogen.sh; \ + ./configure; \ + make; \ + cp .libs/libprofiler.so* /usr/local/lib;) \ + && (GOPATH=/usr/src/go go get github.com/google/pprof; \ + cp /usr/src/go/bin/pprof /usr/local/bin) \ + && : "---------- tarantool ----------" \ + && mkdir -p /usr/src/tarantool \ + && git clone "$TARANTOOL_DOWNLOAD_URL" /usr/src/tarantool \ + && git -C /usr/src/tarantool checkout "$TARANTOOL_VERSION" \ + && git -C /usr/src/tarantool submodule update --init --recursive \ + && (cd /usr/src/tarantool; \ + cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo\ + -DENABLE_BUNDLED_LIBYAML:BOOL=OFF\ + -DENABLE_BACKTRACE:BOOL=ON\ + -DENABLE_DIST:BOOL=ON\ + .) \ + && make -C /usr/src/tarantool -j\ + && make -C /usr/src/tarantool install \ + && make -C /usr/src/tarantool clean \ + && : "---------- small ----------" \ + && (cd /usr/src/tarantool/src/lib/small; \ + cmake -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + .) \ + && make -C /usr/src/tarantool/src/lib/small \ + && make -C /usr/src/tarantool/src/lib/small install \ + && make -C /usr/src/tarantool/src/lib/small clean \ + && : "---------- msgpuck ----------" \ + && (cd /usr/src/tarantool/src/lib/msgpuck; \ + cmake -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + .) \ + && make -C /usr/src/tarantool/src/lib/msgpuck \ + && make -C /usr/src/tarantool/src/lib/msgpuck install \ + && make -C /usr/src/tarantool/src/lib/msgpuck clean \ + && : "---------- luarocks ----------" \ + && wget -O luarocks.tar.gz "$LUAROCKS_URL" \ + && mkdir -p /usr/src/luarocks \ + && tar -xzf luarocks.tar.gz -C /usr/src/luarocks --strip-components=1 \ + && (cd /usr/src/luarocks; \ + ./configure; \ + make build; \ + make install) \ + && rm -r /usr/src/luarocks \ + && rm -rf /usr/src/tarantool \ + && rm -rf /usr/src/gperftools \ + && rm -rf /usr/src/go \ + && : "---------- remove build deps ----------" \ + && apk del .build-deps + +COPY luarocks-config.lua /usr/local/etc/luarocks/config-5.1.lua + +RUN set -x \ + && apk add --no-cache --virtual .run-deps \ + mariadb-client-libs \ + libpq \ + cyrus-sasl \ + mosquitto-libs \ + libev \ + && apk add --no-cache --virtual .build-deps \ + git \ + cmake \ + make \ + coreutils \ + gcc \ + g++ \ + postgresql-dev \ + lua-dev \ + musl-dev \ + cyrus-sasl-dev \ + mosquitto-dev \ + libev-dev \ + libressl-dev \ + && mkdir -p /rocks \ + && : "---------- proj (for gis module) ----------" \ + && wget -O proj.tar.gz http://download.osgeo.org/proj/proj-4.9.3.tar.gz \ + && mkdir -p /usr/src/proj \ + && tar -xzf proj.tar.gz -C /usr/src/proj --strip-components=1 \ + && (cd /usr/src/proj; \ + ./configure; \ + make; \ + make install) \ + && rm -r /usr/src/proj \ + && rm -rf /usr/src/proj \ + && : "---------- geos (for gis module) ----------" \ + && wget -O geos.tar.bz2 http://download.osgeo.org/geos/geos-3.6.0.tar.bz2 \ + && mkdir -p /usr/src/geos \ + && tar -xjf geos.tar.bz2 -C /usr/src/geos --strip-components=1 \ + && (cd /usr/src/geos; \ + ./configure; \ + make; \ + make install) \ + && rm -r /usr/src/geos \ + && rm -rf /usr/src/geos \ + && : "---------- luarocks ----------" \ + && luarocks install lua-term \ + && luarocks install ldoc \ + && : "avro" \ + && luarocks install avro-schema $LUAROCK_AVRO_SCHEMA_VERSION \ + && : "expirationd" \ + && luarocks install expirationd $LUAROCK_EXPERATIOND_VERSION \ + && : "queue" \ + && luarocks install queue $LUAROCK_QUEUE_VERSION \ + && : "connpool" \ + && luarocks install connpool $LUAROCK_CONNPOOL_VERSION \ + && : "shard" \ + && git clone $LUAROCK_SHARD_REPO /rocks/shard \ + && git -C /rocks/shard checkout $LUAROCK_SHARD_TAG \ + && (cd /rocks/shard && luarocks make *rockspec) \ + && : "http" \ + && luarocks install http $LUAROCK_HTTP_VERSION \ + && : "pg" \ + && luarocks install pg $LUAROCK_TARANTOOL_PG_VERSION \ + && : "mysql" \ + && luarocks install mysql $LUAROCK_TARANTOOL_MYSQL_VERSION \ + && : "memcached" \ + && luarocks install memcached $LUAROCK_MEMCACHED_VERSION \ + && : "prometheus" \ + && luarocks install prometheus $LUAROCK_TARANTOOL_PROMETHEUS_VERSION \ + && : "curl" \ + && luarocks install tarantool-curl $LUAROCK_TARANTOOL_CURL_VERSION \ + && : "mqtt" \ + && luarocks install mqtt $LUAROCK_TARANTOOL_MQTT_VERSION \ + && : "gis" \ + && luarocks install gis $LUAROCK_TARANTOOL_GIS_VERSION \ + && : "gperftools" \ + && luarocks install gperftools $LUAROCK_TARANTOOL_GPERFTOOLS_VERSION \ + && : "---------- remove build deps ----------" \ + && apk del .build-deps \ + && rm -rf /rocks + +RUN mkdir -p /var/lib/tarantool \ + && chown tarantool:tarantool /var/lib/tarantool \ + && mkdir -p /opt/tarantool \ + && chown tarantool:tarantool /opt/tarantool \ + && mkdir -p /var/run/tarantool \ + && chown tarantool:tarantool /var/run/tarantool \ + && mkdir /etc/tarantool \ + && chown tarantool:tarantool /etc/tarantool + +VOLUME /var/lib/tarantool +WORKDIR /opt/tarantool + +COPY tarantool-entrypoint.lua /usr/local/bin/ +COPY tarantool_set_config.lua /usr/local/bin/ +COPY docker-entrypoint.sh /usr/local/bin/ +COPY console /usr/local/bin/ +COPY tarantool_is_up /usr/local/bin/ +COPY tarantool.default /usr/local/etc/default/tarantool + +RUN ln -s usr/local/bin/docker-entrypoint.sh /entrypoint.sh # backwards compat +ENTRYPOINT ["docker-entrypoint.sh"] + +HEALTHCHECK CMD tarantool_is_up + +EXPOSE 3301 +CMD [ "tarantool" ] diff --git a/2.1/console b/2.1/console new file mode 100755 index 0000000..d6fb192 --- /dev/null +++ b/2.1/console @@ -0,0 +1,15 @@ +#!/usr/bin/env tarantool + +local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' + +console = require('console') +console.on_start(function(self) + local status, reason + status, reason = pcall(function() require('console').connect(CONSOLE_SOCKET_PATH) end) + if not status then + self:print(reason) + self.running = false + end +end) +console.on_client_disconnect(function(self) self.running = false end) +console.start() diff --git a/2.1/docker-entrypoint.sh b/2.1/docker-entrypoint.sh new file mode 100755 index 0000000..3a9f5e4 --- /dev/null +++ b/2.1/docker-entrypoint.sh @@ -0,0 +1,22 @@ +#!/bin/sh +set -e + +# first arg is `-f` or `--some-option` +# or first arg is `something.conf` +if [ "${1:0:1}" = '-' ]; then + set -- tarantool "$@" +fi + +# allow the container to be started with `--user` +if [ "$1" = 'tarantool' -a "$(id -u)" = '0' ]; then + chown -R tarantool /var/lib/tarantool + exec su-exec tarantool "$0" "$@" +fi + +# entry point wraps the passed script to do basic setup +if [ "$1" = 'tarantool' ]; then + shift + exec tarantool "/usr/local/bin/tarantool-entrypoint.lua" "$@" +fi + +exec "$@" diff --git a/2.1/gperftools_alpine.diff b/2.1/gperftools_alpine.diff new file mode 100644 index 0000000..e768381 --- /dev/null +++ b/2.1/gperftools_alpine.diff @@ -0,0 +1,110 @@ +diff --git a/src/base/linux_syscall_support.h b/src/base/linux_syscall_support.h +index 5d578cd..fceebe2 100644 +--- a/src/base/linux_syscall_support.h ++++ b/src/base/linux_syscall_support.h +@@ -2432,9 +2432,9 @@ struct kernel_stat { + #if defined(__s390x__) + LSS_INLINE _syscall1(void*, mmap, void*, a) + #else +- /* Need to make sure __off64_t isn't truncated to 32-bits under x32. */ ++ /* Need to make sure off64_t isn't truncated to 32-bits under x32. */ + LSS_INLINE void* LSS_NAME(mmap)(void *s, size_t l, int p, int f, int d, +- __off64_t o) { ++ off64_t o) { + LSS_BODY(6, void*, mmap, LSS_SYSCALL_ARG(s), LSS_SYSCALL_ARG(l), + LSS_SYSCALL_ARG(p), LSS_SYSCALL_ARG(f), + LSS_SYSCALL_ARG(d), (uint64_t)(o)); +@@ -2475,7 +2475,7 @@ struct kernel_stat { + LSS_INLINE _syscall6(void*, mmap, void*, s, + size_t, l, int, p, + int, f, int, d, +- __off64_t, o) ++ off64_t, o) + LSS_INLINE int LSS_NAME(sigaction)(int signum, + const struct kernel_sigaction *act, + struct kernel_sigaction *oldact) { +diff --git a/src/malloc_hook_mmap_linux.h b/src/malloc_hook_mmap_linux.h +index 1c4c766..b2aa8ed 100755 +--- a/src/malloc_hook_mmap_linux.h ++++ b/src/malloc_hook_mmap_linux.h +@@ -56,7 +56,7 @@ + + static inline void* do_mmap64(void *start, size_t length, + int prot, int flags, +- int fd, __off64_t offset) __THROW { ++ int fd, off64_t offset) __THROW { + return sys_mmap(start, length, prot, flags, fd, offset); + } + +@@ -67,7 +67,7 @@ static inline void* do_mmap64(void *start, size_t length, + + static inline void* do_mmap64(void *start, size_t length, + int prot, int flags, +- int fd, __off64_t offset) __THROW { ++ int fd, off64_t offset) __THROW { + void *result; + + // Try mmap2() unless it's not supported +@@ -151,9 +151,11 @@ static inline void* do_mmap64(void *start, size_t length, + # undef mmap + + extern "C" { ++ #ifndef mmap64 + void* mmap64(void *start, size_t length, int prot, int flags, +- int fd, __off64_t offset ) __THROW ++ int fd, off64_t offset ) __THROW + ATTRIBUTE_SECTION(malloc_hook); ++ #endif + void* mmap(void *start, size_t length,int prot, int flags, + int fd, off_t offset) __THROW + ATTRIBUTE_SECTION(malloc_hook); +@@ -166,8 +168,9 @@ extern "C" { + ATTRIBUTE_SECTION(malloc_hook); + } + ++#ifndef mmap64 + extern "C" void* mmap64(void *start, size_t length, int prot, int flags, +- int fd, __off64_t offset) __THROW { ++ int fd, off64_t offset) __THROW { + MallocHook::InvokePreMmapHook(start, length, prot, flags, fd, offset); + void *result; + if (!MallocHook::InvokeMmapReplacement( +@@ -177,6 +180,7 @@ extern "C" void* mmap64(void *start, size_t length, int prot, int flags, + MallocHook::InvokeMmapHook(result, start, length, prot, flags, fd, offset); + return result; + } ++#endif + + # if !defined(__USE_FILE_OFFSET64) || !defined(__REDIRECT_NTH) + +@@ -216,7 +220,7 @@ extern "C" void* mremap(void* old_addr, size_t old_size, size_t new_size, + return result; + } + +-#ifndef __UCLIBC__ ++#if defined(__GLIBC__) && ! defined(__UCLIBC__) + // libc's version: + extern "C" void* __sbrk(ptrdiff_t increment); + +diff --git a/src/tests/stacktrace_unittest.cc b/src/tests/stacktrace_unittest.cc +index 3c9f735..2d39ad9 100644 +--- a/src/tests/stacktrace_unittest.cc ++++ b/src/tests/stacktrace_unittest.cc +@@ -120,17 +120,6 @@ void ATTRIBUTE_NOINLINE CheckStackTraceLeaf(void) { + CHECK_GE(size, 1); + CHECK_LE(size, STACK_LEN); + +-#ifdef HAVE_EXECINFO_H +- { +- char **strings = backtrace_symbols(stack, size); +- printf("Obtained %d stack frames.\n", size); +- for (int i = 0; i < size; i++) +- printf("%s %p\n", strings[i], stack[i]); +- printf("CheckStackTrace() addr: %p\n", &CheckStackTrace); +- free(strings); +- } +-#endif +- + for (int i = 0; i < BACKTRACE_STEPS; i++) { + printf("Backtrace %d: expected: %p..%p actual: %p ... ", + i, expected_range[i].start, expected_range[i].end, stack[i]); diff --git a/2.1/luarocks-config.lua b/2.1/luarocks-config.lua new file mode 100644 index 0000000..111f955 --- /dev/null +++ b/2.1/luarocks-config.lua @@ -0,0 +1,9 @@ +rocks_trees = { + { name = [[user]], root = home..[[/.luarocks]] }, + { name = [[system]], root = [[/usr/local]] } +} + +rocks_servers = { + [[http://rocks.tarantool.org/]], + [[http://luarocks.org/repositories/rocks]] +} diff --git a/2.1/tarantool-entrypoint.lua b/2.1/tarantool-entrypoint.lua new file mode 100755 index 0000000..11cd89d --- /dev/null +++ b/2.1/tarantool-entrypoint.lua @@ -0,0 +1,292 @@ +#!/usr/bin/env tarantool + +local fio = require('fio') +local errno = require('errno') +local fun = require('fun') +local urilib = require('uri') +local console = require('console') +local term = require('term') +local log = require('log') +local yaml = require('yaml') + +local TARANTOOL_DEFAULT_PORT = 3301 +local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' +local CFG_FILE_PATH = '/etc/tarantool/config.yml' + + +local orig_cfg = box.cfg + +local function read_config() + local f = io.open(CFG_FILE_PATH, "rb") + if f == nil then + log.error("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) + os.exit(1) + end + local content = f:read("*all") + f:close() + return yaml.decode(content) +end + +local function write_config(cfg) + local f = io.open(CFG_FILE_PATH, "w+") + if f == nil then + print("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) + os.exit(1) + end + local content = yaml.encode(cfg) + f:write(content) + f:close() +end + +local function parse_replication_source(replication_source, user_name, user_password) + if replication_source == nil then + return nil + end + + local replication_source_table = {} + for uri in string.gmatch(replication_source, "[^,]+") do + local parsed_uri = urilib.parse(uri) + if parsed_uri == nil then + error("Incorrect replication source URI format: '"..uri.."'") + end + local host = parsed_uri.host + local port = parsed_uri.service or TARANTOOL_DEFAULT_PORT + local user = parsed_uri.login or user_name + local password = parsed_uri.password or user_password + + if user == 'guest' or user == nil then + replication_source = string.format("%s:%s", host, port) + elseif password == nil then + replication_source = string.format("%s:@%s:%s", user, host, port) + else + replication_source = string.format("%s:%s@%s:%s", user, password, + host, port) + end + + table.insert(replication_source_table, replication_source) + end + + return replication_source_table +end + +local function choose_option(main, substitute, cfg) + if cfg[main] then + return main + end + if cfg[substitute] then + return substitute + end + return main +end + +function set_replication_source(replication_source, user_name, user_password) + local replication_source_table = parse_replication_source( + replication_source, user_name, user_password + ) + local choice = choose_option('replication', 'replication_source', box.cfg) + box.cfg{[choice] = replication_source_table} + log.info("Updated box.cfg.%s to %s", choice, replication_source) +end + +local function create_user(user_name, user_password) + if user_name ~= 'guest' and user_password == nil then + user_password = "" + + local warn_str = [[**************************************************** +WARNING: No password has been set for the database. + This will allow anyone with access to the + Tarantool port to access your database. In + Docker's default configuration, this is + effectively any other container on the same + system. + Use "-e TARANTOOL_USER_PASSWORD=password" + to set it in "docker run". +****************************************************]] + log.warn('\n'..warn_str) + end + + if user_name == 'guest' and user_password == nil then + local warn_str = [[**************************************************** +WARNING: 'guest' is chosen as primary user. + Since it is not allowed to set a password for + guest user, your instance will be accessible + by anyone having direct access to the Tarantool + port. + If you wanted to create an authenticated user, + specify "-e TARANTOOL_USER_NAME=username" and + pick a user name other than "guest". +****************************************************]] + log.warn('\n'..warn_str) + end + + if user_name == 'guest' and user_password ~= nil then + user_password = nil + + local warn_str = [[**************************************************** +WARNING: A password for guest user has been specified. + In Tarantool, guest user can't have a password + and is always allowed to login, if it has + enough privileges. + If you wanted to create an authenticated user, + specify "-e TARANTOOL_USER_NAME=username" and + pick a user name other than "guest". +****************************************************]] + log.warn('\n'..warn_str) + end + + if user_name ~= 'admin' and user_name ~= 'guest' then + if not box.schema.user.exists(user_name) then + log.info("Creating user '%s'", user_name) + box.schema.user.create(user_name) + end + end + + if user_name ~= 'admin' then + log.info("Granting admin privileges to user '%s'", user_name) + box.schema.user.grant(user_name, 'read,write,execute', + 'universe', nil, {if_not_exists = true}) + box.schema.user.grant(user_name, 'replication', + nil, nil, {if_not_exists = true}) + end + + if user_name ~= 'guest' then + log.info("Setting password for user '%s'", user_name) + box.schema.user.passwd(user_name, user_password) + end +end + +function set_credentials(user_name, user_password) + create_user(user_name, user_password) +end + +local function wrapper_cfg(override) + local work_dir = '/var/lib/tarantool' + local snap_filename = "*.snap" + local snap_path = work_dir..'/'..snap_filename + + local first_run = false + if next(fio.glob(snap_path)) == nil then + first_run = true + end + + + local file_cfg = {} + local config_file_exists = fio.stat(CFG_FILE_PATH) ~= nil + if not config_file_exists then + log.info("Creating configuration file: " .. CFG_FILE_PATH) + + file_cfg.TARANTOOL_USER_NAME = os.getenv('TARANTOOL_USER_NAME') + file_cfg.TARANTOOL_USER_PASSWORD = os.getenv('TARANTOOL_USER_PASSWORD') + file_cfg.TARANTOOL_SLAB_ALLOC_ARENA = os.getenv('TARANTOOL_SLAB_ALLOC_ARENA') + file_cfg.TARANTOOL_SLAB_ALLOC_FACTOR = os.getenv('TARANTOOL_SLAB_ALLOC_FACTOR') + file_cfg.TARANTOOL_SLAB_ALLOC_MINIMAL = os.getenv('TARANTOOL_SLAB_ALLOC_MINIMAL') + file_cfg.TARANTOOL_SLAB_ALLOC_MAXIMAL = os.getenv('TARANTOOL_SLAB_ALLOC_MAXIMAL') + file_cfg.TARANTOOL_PORT = os.getenv('TARANTOOL_PORT') + file_cfg.TARANTOOL_WAL_MODE = os.getenv('TARANTOOL_WAL_MODE') + file_cfg.TARANTOOL_REPLICATION_SOURCE = os.getenv('TARANTOOL_REPLICATION_SOURCE') + file_cfg.TARANTOOL_REPLICATION = os.getenv('TARANTOOL_REPLICATION') + file_cfg.TARANTOOL_SNAPSHOT_PERIOD = os.getenv('TARANTOOL_SNAPSHOT_PERIOD') + file_cfg.TARANTOOL_MEMTX_MEMORY = os.getenv('TARANTOOL_MEMTX_MEMORY') + file_cfg.TARANTOOL_CHECKPOINT_INTERVAL = os.getenv('TARANTOOL_CHECKPOINT_INTERVAL') + file_cfg.TARANTOOL_MEMTX_MIN_TUPLE_SIZE = os.getenv('TARANTOOL_MEMTX_MIN_TUPLE_SIZE') + file_cfg.TARANTOOL_MEMTX_MAX_TUPLE_SIZE = os.getenv('TARANTOOL_MEMTX_MAX_TUPLE_SIZE') + + write_config(file_cfg) + else + log.info("Loading existing configuration file: " .. CFG_FILE_PATH) + + file_cfg = read_config() + end + + local user_name = file_cfg.TARANTOOL_USER_NAME or + os.getenv('TARANTOOL_USER_NAME') or 'guest' + local user_password = file_cfg.TARANTOOL_USER_PASSWORD or + os.getenv('TARANTOOL_USER_PASSWORD') + + + local cfg = override or {} + -- Placeholders for deprecated options + cfg.slab_alloc_arena = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_ARENA) or + override.slab_alloc_arena + cfg.slab_alloc_maximal = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_MAXIMAL) or + override.slab_alloc_maximal + cfg.slab_alloc_minimal = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_MINIMAL) or + override.slab_alloc_minimal + cfg.snapshot_period = tonumber(file_cfg.TARANTOOL_SNAPSHOT_PERIOD) or + override.snapshot_period + -- Replacements for deprecated options + cfg.memtx_memory = tonumber(file_cfg.TARANTOOL_MEMTX_MEMORY) or + override.memtx_memory + cfg.memtx_min_tuple_size = tonumber(file_cfg.TARANTOOL_MEMTX_MIN_TUPLE_SIZE) or + override.memtx_min_tuple_size + cfg.memtx_max_tuple_size = tonumber(file_cfg.TARANTOOL_MEMTX_MAX_TUPLE_SIZE) or + override.memtx_max_tuple_size + cfg.checkpoint_interval = tonumber(file_cfg.TARANTOOL_CHECKPOINT_INTERVAL) or + override.checkpoint_interval + -- Deprecated options with default values + local choice = choose_option('memtx_dir', 'snap_dir', override) + cfg[choice] = override[choice] or '/var/lib/tarantool' + + -- Remaining configuration + cfg.slab_alloc_factor = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_FACTOR) or + override.slab_alloc_factor + cfg.listen = tonumber(file_cfg.TARANTOOL_PORT) or + override.listen or TARANTOOL_DEFAULT_PORT + cfg.wal_mode = file_cfg.TARANTOOL_WAL_MODE or + override.wal_mode + + cfg.wal_dir = override.wal_dir or '/var/lib/tarantool' + cfg.vinyl_dir = override.vinyl_dir or '/var/lib/tarantool' + cfg.pid_file = override.pid_file or '/var/run/tarantool/tarantool.pid' + + local choice = choose_option('TARANTOOL_REPLICATION', 'TARANTOOL_REPLICATION_SOURCE', file_cfg) + local replication_source_table = parse_replication_source(file_cfg[choice], + user_name, + user_password) + + if replication_source_table then + cfg.replication = replication_source_table + else + local choice = choose_option('replication', 'replication_source', override) + cfg[choice] = override[choice] + end + + log.info("Config:\n" .. yaml.encode(cfg)) + + orig_cfg(cfg) + + box.once('tarantool-entrypoint', function () + if first_run then + log.info("Initializing database") + + create_user(user_name, user_password) + end + end) + + console.listen(CONSOLE_SOCKET_PATH) + +end + +box.cfg = wrapper_cfg + +-- re-run the script passed as parameter with all arguments that follow +execute_script = arg[1] +if execute_script == nil then + box.cfg {} + + if term.isatty(io.stdout) then + console.start() + os.exit(0) + end +else + narg = 0 + while true do + arg[narg] = arg[narg + 1] + if arg[narg] == nil then + break + end + narg = narg + 1 + end + + dofile(execute_script) +end diff --git a/2.1/tarantool.default b/2.1/tarantool.default new file mode 100644 index 0000000..fffe3b0 --- /dev/null +++ b/2.1/tarantool.default @@ -0,0 +1,22 @@ +-- +-- System-wide settings for tarantoolctl and init scripts +-- +-- This file is meant to enable the usage of tarantoolctl inside +-- docker containers. Since there is no init system, most of its +-- functionality will not work, except 'tarantoolctl enter' or +-- 'tarantoolctl status'. +-- + +default_cfg = { + pid_file = "/var/run/tarantool", -- /var/run/tarantool/${INSTANCE}.pid + wal_dir = "/var/lib/tarantool", -- /var/lib/tarantool/${INSTANCE}/ + snap_dir = "/var/lib/tarantool", -- /var/lib/tarantool/${INSTANCE} + vinyl_dir = "/var/lib/tarantool", -- /var/lib/tarantool/${INSTANCE} + logger = "/var/log/tarantool", -- /var/log/tarantool/${INSTANCE}.log + username = "tarantool", +} + +-- instances.available - all available instances +-- instances.enabled - instances to autostart by sysvinit +instance_dir = "/usr/local/etc/tarantool/instances.enabled" +-- vim: set ft=lua : diff --git a/2.1/tarantool_is_up b/2.1/tarantool_is_up new file mode 100755 index 0000000..71148d5 --- /dev/null +++ b/2.1/tarantool_is_up @@ -0,0 +1,41 @@ +#!/bin/sh + +status=$( (tarantool <<-'EOF' +local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' +local console = require('console') +local os = require("os") +local yaml = require("yaml") + +console.on_start(function(self) + local status, reason + status, reason = pcall(function() require('console').connect(CONSOLE_SOCKET_PATH) end) + if not status then + self:print(reason) + os.exit(1) + end + + cmd = 'box.info.status' + local res = self:eval(cmd) + if res ~= nil then + res = yaml.decode(res) + print(res[1]) + end + + os.exit(0) +end) + +console.on_client_disconnect(function(self) self.running = false end) +console.start() + +os.exit(0) +EOF +) 2>/dev/null) + + +echo "$status" + +if [ "$status" = "running" ]; then + exit 0 +else + exit 1 +fi diff --git a/2.1/tarantool_set_config.lua b/2.1/tarantool_set_config.lua new file mode 100755 index 0000000..ddca36c --- /dev/null +++ b/2.1/tarantool_set_config.lua @@ -0,0 +1,130 @@ +#!/usr/bin/env tarantool + +local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' +local CFG_FILE_PATH = '/etc/tarantool/config.yml' + +local fio = require('fio') +local yaml = require('yaml') +local console = require('console') +local errno = require('errno') + +local function read_config() + local f = io.open(CFG_FILE_PATH, "rb") + if f == nil then + print("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) + os.exit(1) + end + local content = f:read("*all") + f:close() + return yaml.decode(content) +end + +local function write_config(cfg) + local f = io.open(CFG_FILE_PATH, "w+") + if f == nil then + print("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) + os.exit(1) + end + local content = yaml.encode(cfg) + f:write(content) + f:close() +end + +local function nop(console, cfg, value) +end + +local function update_replication_source(console, cfg, value) + local user_name = "nil" + if cfg['TARANTOOL_USER_NAME'] then + user_name = "'" .. cfg['TARANTOOL_USER_NAME'] .. "'" + end + + local user_password = "nil" + if cfg['TARANTOOL_USER_PASSWORD'] then + user_password = "'" .. cfg['TARANTOOL_USER_PASSWORD'] .. "'" + end + + local cmd = "set_replication_source('"..value.."', " .. user_name .. "," .. user_password .. ")" + print("cmd: ", cmd) + + local res = console:eval(cmd) + + if res ~= nil then + print(res) + end +end + +local function update_credentials(console, cfg, value) + local user_name = "nil" + if cfg['TARANTOOL_USER_NAME'] then + user_name = "'" .. cfg['TARANTOOL_USER_NAME'] .. "'" + end + + local user_password = "nil" + if cfg['TARANTOOL_USER_PASSWORD'] then + user_password = "'" .. cfg['TARANTOOL_USER_PASSWORD'] .. "'" + end + + local cmd = "set_credentials(" .. user_name .. "," .. user_password .. ")" + + local res = console:eval(cmd) + + if res ~= nil then + print(res) + end + + local replication_source = cfg['TARANTOOL_REPLICATION_SOURCE'] + + if replication_source ~= nil then + update_replication_source(console, cfg, replication_source) + end +end + + +local vars = { + TARANTOOL_SLAB_ALLOC_ARENA=nop, + TARANTOOL_SLAB_ALLOC_FACTOR=nop, + TARANTOOL_SLAB_ALLOC_MAXIMAL=nop, + TARANTOOL_SLAB_ALLOC_MINIMAL=nop, + TARANTOOL_PORT=nop, + TARANTOOL_WAL_MODE=nop, + TARANTOOL_USER_NAME=update_credentials, + TARANTOOL_USER_PASSWORD=update_credentials, + TARANTOOL_REPLICATION_SOURCE=update_replication_source, + TARANTOOL_REPLICATION=update_replication_source, +} + +console.on_start(function(self) + local status, reason + status, reason = pcall(function() require('console').connect(CONSOLE_SOCKET_PATH) end) + if not status then + self:print(reason) + os.exit(1) + end + + if arg[1] == nil or arg[2] == nil then + self:print("Usage: " .. arg[0] .. " ") + os.exit(1) + end + + if vars[arg[1]] == nil then + self:print("Unknown var: " .. arg[1]) + os.exit(1) + end + + local cfg = read_config() + cfg[arg[1]] = arg[2] + + local func = vars[arg[1]] + func(self, cfg, arg[2]) + + write_config(cfg) + + self.running = false + os.exit(0) +end) + +console.on_client_disconnect(function(self) self.running = false end) +console.start() + +os.exit(0) From f6fab386b91541ecb45ff1e59f674a3093266748 Mon Sep 17 00:00:00 2001 From: avtikhon Date: Thu, 28 Mar 2019 17:22:44 +0300 Subject: [PATCH 140/286] Update 1.x version --- 1.x/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1.x/Dockerfile b/1.x/Dockerfile index 6bbefad..5564698 100644 --- a/1.x/Dockerfile +++ b/1.x/Dockerfile @@ -5,7 +5,7 @@ RUN addgroup -S tarantool \ && adduser -S -G tarantool tarantool \ && apk add --no-cache 'su-exec>=0.2' -ENV TARANTOOL_VERSION=1.10.2-179-ge5e259a82 \ +ENV TARANTOOL_VERSION=1.10.2-193-gb1612f0bf \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ CURL_REPO=https://github.com/curl/curl.git \ From bb4c97dd9aae706613c904b3bbae57275b1c5e0a Mon Sep 17 00:00:00 2001 From: avtikhon Date: Thu, 28 Mar 2019 17:23:54 +0300 Subject: [PATCH 141/286] Update 2.x version --- 2.x/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/2.x/Dockerfile b/2.x/Dockerfile index eff2472..ea8b440 100644 --- a/2.x/Dockerfile +++ b/2.x/Dockerfile @@ -5,7 +5,7 @@ RUN addgroup -S tarantool \ && adduser -S -G tarantool tarantool \ && apk add --no-cache 'su-exec>=0.2' -ENV TARANTOOL_VERSION=2.2.0-26-g28d512134 \ +ENV TARANTOOL_VERSION=2.2.0-40-g1f5cc898d \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ CURL_REPO=https://github.com/curl/curl.git \ From bbc4e96fb4435765cf71057b8c7ba5ba13599f5c Mon Sep 17 00:00:00 2001 From: avtikhon Date: Thu, 28 Mar 2019 18:13:28 +0300 Subject: [PATCH 142/286] Add information on new tags --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 6f10fa6..c4f4885 100644 --- a/README.md +++ b/README.md @@ -321,6 +321,8 @@ Fixed versions: | 1.9.2 | 1.x/Dockerfile | 1.9.2 | | 1.10.0 | 1.x/Dockerfile | 1.10.0 | | 1.10.2 | 1.x/Dockerfile | 1.10.2 | +| 2.1.1 | 2.x/Dockerfile | 2.1.1 | +| 2.2.0 | 2.x/Dockerfile | 2.2.0 | Rolling versions: @@ -329,8 +331,10 @@ Rolling versions: | master | 1.5/Dockerfile | 1.5 | | master | 1.6/Dockerfile | 1.6 | | master | 1.7/Dockerfile | 1.7 | +| master | 1.9/Dockerfile | 1.9 | | master | 1.x/Dockerfile | 1 | | master | 1.x/Dockerfile | latest | +| master | 2.1/Dockerfile | 2.1 | | master | 2.x/Dockerfile | 2 | Special builds: From 0993ac6f4f389f7667dcb6db57e1972a048b5c0c Mon Sep 17 00:00:00 2001 From: Kirill Motkov Date: Thu, 28 Mar 2019 20:19:31 +0300 Subject: [PATCH 143/286] Update old option name in README.md example --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c4f4885..300b8a2 100644 --- a/README.md +++ b/README.md @@ -151,7 +151,7 @@ services: tarantool1: image: tarantool/tarantool:1.10.2 environment: - TARANTOOL_REPLICATION_SOURCE: "tarantool1,tarantool2" + TARANTOOL_REPLICATION: "tarantool1,tarantool2" networks: - mynet ports: @@ -160,7 +160,7 @@ services: tarantool2: image: tarantool/tarantool:1.10.2 environment: - TARANTOOL_REPLICATION_SOURCE: "tarantool1,tarantool2" + TARANTOOL_REPLICATION: "tarantool1,tarantool2" networks: - mynet ports: From a54cc3f45c0682351719b6ba27f9d85946d1e355 Mon Sep 17 00:00:00 2001 From: Oleg Babin Date: Mon, 1 Apr 2019 11:58:16 +0300 Subject: [PATCH 144/286] Update centos image to 1.10.3 --- 1.x-centos7/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1.x-centos7/Dockerfile b/1.x-centos7/Dockerfile index a705fdc..206506f 100644 --- a/1.x-centos7/Dockerfile +++ b/1.x-centos7/Dockerfile @@ -4,7 +4,7 @@ MAINTAINER mail@racktear.com RUN groupadd tarantool \ && adduser -g tarantool tarantool -ENV TARANTOOL_VERSION=1.10.2-185-g8a1a0a9ff \ +ENV TARANTOOL_VERSION=1.10.3-1-gfc6d6a338 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ CURL_REPO=https://github.com/curl/curl.git \ From 9c887df0e8b646901e02e6ab347a504eabeeddb7 Mon Sep 17 00:00:00 2001 From: avtikhon Date: Fri, 5 Apr 2019 18:32:54 +0300 Subject: [PATCH 145/286] Add 1.10.3 version --- 1.x/Dockerfile | 2 +- README.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/1.x/Dockerfile b/1.x/Dockerfile index 5564698..d0b2caf 100644 --- a/1.x/Dockerfile +++ b/1.x/Dockerfile @@ -5,7 +5,7 @@ RUN addgroup -S tarantool \ && adduser -S -G tarantool tarantool \ && apk add --no-cache 'su-exec>=0.2' -ENV TARANTOOL_VERSION=1.10.2-193-gb1612f0bf \ +ENV TARANTOOL_VERSION=1.10.3 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ CURL_REPO=https://github.com/curl/curl.git \ diff --git a/README.md b/README.md index 300b8a2..bd7aa87 100644 --- a/README.md +++ b/README.md @@ -321,6 +321,7 @@ Fixed versions: | 1.9.2 | 1.x/Dockerfile | 1.9.2 | | 1.10.0 | 1.x/Dockerfile | 1.10.0 | | 1.10.2 | 1.x/Dockerfile | 1.10.2 | +| 1.10.3 | 1.x/Dockerfile | 1.10.3 | | 2.1.1 | 2.x/Dockerfile | 2.1.1 | | 2.2.0 | 2.x/Dockerfile | 2.2.0 | From fac5774ea13a972c75b5359ae9703a0fc6b2296f Mon Sep 17 00:00:00 2001 From: avtikhon Date: Fri, 5 Apr 2019 18:31:25 +0300 Subject: [PATCH 146/286] Add 2.1.2 version based on 2.1.2-2-gd06f95fc1 --- 2.x/Dockerfile | 2 +- README.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/2.x/Dockerfile b/2.x/Dockerfile index ea8b440..96ed558 100644 --- a/2.x/Dockerfile +++ b/2.x/Dockerfile @@ -5,7 +5,7 @@ RUN addgroup -S tarantool \ && adduser -S -G tarantool tarantool \ && apk add --no-cache 'su-exec>=0.2' -ENV TARANTOOL_VERSION=2.2.0-40-g1f5cc898d \ +ENV TARANTOOL_VERSION=2.1.2-2-gd06f95fc1 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ CURL_REPO=https://github.com/curl/curl.git \ diff --git a/README.md b/README.md index bd7aa87..1b61ec9 100644 --- a/README.md +++ b/README.md @@ -323,6 +323,7 @@ Fixed versions: | 1.10.2 | 1.x/Dockerfile | 1.10.2 | | 1.10.3 | 1.x/Dockerfile | 1.10.3 | | 2.1.1 | 2.x/Dockerfile | 2.1.1 | +| 2.1.2 | 2.x/Dockerfile | 2.1.2 | | 2.2.0 | 2.x/Dockerfile | 2.2.0 | Rolling versions: From 50a6dc2e127a9a7e2b2408cd76bed93dd5781b94 Mon Sep 17 00:00:00 2001 From: avtikhon Date: Tue, 9 Apr 2019 00:35:31 +0300 Subject: [PATCH 147/286] Fix wrong 2.x version from 2.1.2-2 to 2.2.0-128 Wrongly cherry-picked the commit with 2.1.2 release for master branch. Wrong commit was e7e709f2b5c1a887c176040ea3058a90c7b9a5d4 --- 2.x/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/2.x/Dockerfile b/2.x/Dockerfile index 96ed558..7c19ea3 100644 --- a/2.x/Dockerfile +++ b/2.x/Dockerfile @@ -5,7 +5,7 @@ RUN addgroup -S tarantool \ && adduser -S -G tarantool tarantool \ && apk add --no-cache 'su-exec>=0.2' -ENV TARANTOOL_VERSION=2.1.2-2-gd06f95fc1 \ +ENV TARANTOOL_VERSION=2.2.0-128-g7b56f1fef \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ CURL_REPO=https://github.com/curl/curl.git \ From dbeef08e88c18de19ab27512e7a1b0474cc5f565 Mon Sep 17 00:00:00 2001 From: avtikhon Date: Tue, 9 Apr 2019 13:36:32 +0300 Subject: [PATCH 148/286] Update the 1.x image to 1.10.3-6-g5dc6d79f4 --- 1.x/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1.x/Dockerfile b/1.x/Dockerfile index d0b2caf..8b0e189 100644 --- a/1.x/Dockerfile +++ b/1.x/Dockerfile @@ -5,7 +5,7 @@ RUN addgroup -S tarantool \ && adduser -S -G tarantool tarantool \ && apk add --no-cache 'su-exec>=0.2' -ENV TARANTOOL_VERSION=1.10.3 \ +ENV TARANTOOL_VERSION=1.10.3-6-g5dc6d79f4 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ CURL_REPO=https://github.com/curl/curl.git \ From 4bf912f4297901838c52984c0957d426bbfa6711 Mon Sep 17 00:00:00 2001 From: Oleg Babin Date: Tue, 30 Apr 2019 07:16:23 +0300 Subject: [PATCH 149/286] Bump 1.x-centos7 image 1.10.3-33-gfd303466c --- 1.x-centos7/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1.x-centos7/Dockerfile b/1.x-centos7/Dockerfile index 206506f..33e5705 100644 --- a/1.x-centos7/Dockerfile +++ b/1.x-centos7/Dockerfile @@ -4,7 +4,7 @@ MAINTAINER mail@racktear.com RUN groupadd tarantool \ && adduser -g tarantool tarantool -ENV TARANTOOL_VERSION=1.10.3-1-gfc6d6a338 \ +ENV TARANTOOL_VERSION=1.10.3-33-gfd303466c \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ CURL_REPO=https://github.com/curl/curl.git \ From c16689b293a48c5bbc04800a2cc676930838e1b1 Mon Sep 17 00:00:00 2001 From: Oleg Babin Date: Tue, 9 Apr 2019 15:07:55 +0300 Subject: [PATCH 150/286] Add 2.x-centos7 image --- 2.x-centos7/.dockerignore | 0 2.x-centos7/Dockerfile | 281 ++++++++++++++++++++++++++ 2.x-centos7/console | 15 ++ 2.x-centos7/docker-entrypoint.sh | 22 ++ 2.x-centos7/luarocks-config.lua | 11 + 2.x-centos7/mosquitto.repo | 7 + 2.x-centos7/tarantool-entrypoint.lua | 292 +++++++++++++++++++++++++++ 2.x-centos7/tarantool.default | 22 ++ 2.x-centos7/tarantool_is_up | 41 ++++ 2.x-centos7/tarantool_set_config.lua | 130 ++++++++++++ README.md | 1 + 11 files changed, 822 insertions(+) create mode 100644 2.x-centos7/.dockerignore create mode 100644 2.x-centos7/Dockerfile create mode 100755 2.x-centos7/console create mode 100755 2.x-centos7/docker-entrypoint.sh create mode 100644 2.x-centos7/luarocks-config.lua create mode 100644 2.x-centos7/mosquitto.repo create mode 100755 2.x-centos7/tarantool-entrypoint.lua create mode 100644 2.x-centos7/tarantool.default create mode 100755 2.x-centos7/tarantool_is_up create mode 100755 2.x-centos7/tarantool_set_config.lua diff --git a/2.x-centos7/.dockerignore b/2.x-centos7/.dockerignore new file mode 100644 index 0000000..e69de29 diff --git a/2.x-centos7/Dockerfile b/2.x-centos7/Dockerfile new file mode 100644 index 0000000..39da0cc --- /dev/null +++ b/2.x-centos7/Dockerfile @@ -0,0 +1,281 @@ +FROM centos:7 +MAINTAINER mail@racktear.com + +RUN groupadd tarantool \ + && adduser -g tarantool tarantool + +ENV TARANTOOL_VERSION=2.1.2-52-g154345fc5 \ + TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ + TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ + CURL_REPO=https://github.com/curl/curl.git \ + CURL_TAG=curl-7_64_0 \ + LUAROCKS_URL=https://github.com/tarantool/luarocks/archive/6e6fe62d9409fe2103c0fd091cccb3da0451faf5.tar.gz \ + LUAROCK_VSHARD_VERSION=0.1.8 \ + LUAROCK_CHECKS_VERSION=3.0.0 \ + LUAROCK_AVRO_SCHEMA_VERSION=3.0.3 \ + LUAROCK_EXPERATIOND_VERSION=1.0.1 \ + LUAROCK_QUEUE_VERSION=1.0.3 \ + LUAROCK_CONNPOOL_VERSION=1.1.1 \ + LUAROCK_HTTP_VERSION=1.0.5 \ + LUAROCK_MEMCACHED_VERSION=1.0.0 \ + LUAROCK_TARANTOOL_PG_VERSION=2.0.2 \ + LUAROCK_TARANTOOL_MYSQL_VERSION=2.0.1 \ + LUAROCK_TARANTOOL_GIS_VERSION=1.0.0 \ + LUAROCK_TARANTOOL_PROMETHEUS_VERSION=1.0.4 \ + LUAROCK_TARANTOOL_GPERFTOOLS_VERSION=1.0.1 + +RUN yum -y install epel-release && \ + yum -y update && \ + yum -y clean all + +RUN set -x \ + && yum -y install \ + libstdc++ \ + readline \ + openssl \ + yaml \ + lz4 \ + binutils \ + ncurses \ + libgomp \ + lua \ + tar \ + zip \ + unzip \ + libunwind \ + ca-certificates \ + && yum -y install \ + perl \ + gcc-c++ \ + cmake \ + readline-devel \ + openssl-devel \ + libyaml-devel \ + lz4-devel \ + binutils-devel \ + ncurses-devel \ + lua-devel \ + make \ + git \ + libunwind-devel \ + autoconf \ + automake \ + libtool \ + go \ + wget \ + && : "---------- libicu ----------" \ + && wget http://download.icu-project.org/files/icu4c/63.1/icu4c-63_1-src.tgz \ + && mkdir -p /usr/src/icu \ + && tar -xzf icu4c-63_1-src.tgz -C /usr/src/icu --strip-components=1 \ + && rm icu4c-63_1-src.tgz \ + && (cd /usr/src/icu/source; \ + chmod +x runConfigureICU configure install-sh; \ + ./runConfigureICU Linux/gcc; \ + make; \ + make install; \ + echo '/usr/local/lib' > /etc/ld.so.conf.d/local.conf; \ + ldconfig ) \ + && : "---------- curl ----------" \ + && mkdir -p /usr/src/curl \ + && git clone "$CURL_REPO" /usr/src/curl \ + && (cd /usr/src/curl; \ + git checkout "$CURL_TAG"; \ + ./buildconf; \ + ./configure --with-ssl --prefix "/usr/local"; \ + make -j; \ + make install; \ + ldconfig ) \ + && : "---------- gperftools ----------" \ + && yum install -y gperftools-libs \ + && (GOPATH=/usr/src/go go get github.com/google/pprof; \ + cp /usr/src/go/bin/pprof /usr/local/bin) \ + && : "---------- tarantool ----------" \ + && mkdir -p /usr/src/tarantool \ + && git clone "$TARANTOOL_DOWNLOAD_URL" /usr/src/tarantool \ + && (cd /usr/src/tarantool; git checkout "$TARANTOOL_VERSION";) \ + && (cd /usr/src/tarantool; git submodule update --init --recursive;) \ + && (cd /usr/src/tarantool; \ + cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo\ + -DENABLE_BUNDLED_LIBYAML:BOOL=OFF\ + -DENABLE_BACKTRACE:BOOL=ON\ + -DENABLE_DIST:BOOL=ON\ + .) \ + && make -C /usr/src/tarantool -j\ + && make -C /usr/src/tarantool install \ + && make -C /usr/src/tarantool clean \ + && : "---------- small ----------" \ + && (cd /usr/src/tarantool/src/lib/small; \ + cmake -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + .) \ + && make -C /usr/src/tarantool/src/lib/small \ + && make -C /usr/src/tarantool/src/lib/small install \ + && make -C /usr/src/tarantool/src/lib/small clean \ + && : "---------- msgpuck ----------" \ + && (cd /usr/src/tarantool/src/lib/msgpuck; \ + cmake -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + .) \ + && make -C /usr/src/tarantool/src/lib/msgpuck \ + && make -C /usr/src/tarantool/src/lib/msgpuck install \ + && make -C /usr/src/tarantool/src/lib/msgpuck clean \ + && : "---------- luarocks ----------" \ + && wget -O luarocks.tar.gz "$LUAROCKS_URL" \ + && mkdir -p /usr/src/luarocks \ + && tar -xzf luarocks.tar.gz -C /usr/src/luarocks --strip-components=1 \ + && (cd /usr/src/luarocks; \ + ./configure; \ + make build; \ + make install) \ + && rm -r /usr/src/luarocks \ + && rm -rf /usr/src/tarantool \ + && rm -rf /usr/src/go \ + && rm -rf /usr/src/icu \ + && rm -rf /usr/src/curl \ + && : "---------- remove build deps ----------" \ + && yum -y remove \ + perl \ + gcc-c++ \ + cmake \ + readline-devel \ + openssl-devel \ + libyaml-devel \ + lz4-devel \ + binutils-devel \ + ncurses-devel \ + lua-devel \ + make \ + git \ + libunwind-devel \ + autoconf \ + automake \ + libtool \ + go \ + wget \ + perl \ + kernel-headers \ + golang-src \ + && rpm -qa | grep devel | xargs yum -y remove \ + && rm -rf /var/cache/yum + + +COPY luarocks-config.lua /usr/local/etc/luarocks/config-5.1.lua + +RUN set -x \ + && yum -y install https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-redhat96-9.6-3.noarch.rpm \ + && yum -y install \ + mariadb-libs \ + postgresql96-libs \ + cyrus-sasl \ + libev \ + proj \ + geos \ + unzip \ + openssl-libs \ + && yum -y install \ + git \ + cmake \ + make \ + gcc-c++ \ + postgresql96-devel \ + lua-devel \ + cyrus-sasl-devel \ + libev-devel \ + wget \ + proj-devel \ + geos-devel \ + openssl-devel \ + && mkdir -p /rocks \ + && : "---------- luarocks ----------" \ + && luarocks install lua-term \ + && luarocks install ldoc \ + && : "vshard" \ + && luarocks install vshard $LUAROCK_VSHARD_VERSION \ + && : "checks" \ + && luarocks install checks $LUAROCK_CHECKS_VERSION \ + && : "avro" \ + && luarocks install avro-schema $LUAROCK_AVRO_SCHEMA_VERSION \ + && : "expirationd" \ + && luarocks install expirationd $LUAROCK_EXPERATIOND_VERSION \ + && : "queue" \ + && luarocks install queue $LUAROCK_QUEUE_VERSION \ + && : "connpool" \ + && luarocks install connpool $LUAROCK_CONNPOOL_VERSION \ + && : "http" \ + && luarocks install http $LUAROCK_HTTP_VERSION \ + && : "pg" \ + && luarocks install pg $LUAROCK_TARANTOOL_PG_VERSION \ + && : "mysql" \ + && luarocks install mysql $LUAROCK_TARANTOOL_MYSQL_VERSION \ + && : "memcached" \ + && luarocks install memcached $LUAROCK_MEMCACHED_VERSION \ + && : "prometheus" \ + && luarocks install prometheus $LUAROCK_TARANTOOL_PROMETHEUS_VERSION \ + && : "gis" \ + && luarocks install gis $LUAROCK_TARANTOOL_GIS_VERSION \ + && : "gperftools" \ + && luarocks install gperftools $LUAROCK_TARANTOOL_GPERFTOOLS_VERSION \ + && : "---------- remove build deps ----------" \ + && rm -rf /rocks \ + && yum -y remove \ + git \ + cmake \ + make \ + gcc-c++ \ + postgresql96-devel \ + lua-devel \ + cyrus-sasl-devel \ + libev-devel \ + wget \ + proj-devel \ + geos-devel \ + openssl-devel \ + perl \ + kernel-headers \ + golang-src \ + && rpm -qa | grep devel | xargs yum -y remove \ + && rm -rf /var/cache/yum + + +RUN set -x \ + && : "---------- gosu ----------" \ + && gpg --keyserver pool.sks-keyservers.net --recv-keys \ + B42F6819007F00F88E364FD4036A9C25BF357DD4 \ + && curl -o /usr/local/bin/gosu -SL \ + "https://github.com/tianon/gosu/releases/download/1.2/gosu-amd64" \ + && curl -o /usr/local/bin/gosu.asc -SL \ + "https://github.com/tianon/gosu/releases/download/1.2/gosu-amd64.asc" \ + && gpg --verify /usr/local/bin/gosu.asc \ + && rm /usr/local/bin/gosu.asc \ + && rm -r /root/.gnupg/ \ + && chmod +x /usr/local/bin/gosu + + +RUN mkdir -p /var/lib/tarantool \ + && chown tarantool:tarantool /var/lib/tarantool \ + && mkdir -p /opt/tarantool \ + && chown tarantool:tarantool /opt/tarantool \ + && mkdir -p /var/run/tarantool \ + && chown tarantool:tarantool /var/run/tarantool \ + && mkdir /etc/tarantool \ + && chown tarantool:tarantool /etc/tarantool + +VOLUME /var/lib/tarantool +WORKDIR /opt/tarantool + +COPY tarantool-entrypoint.lua /usr/local/bin/ +COPY tarantool_set_config.lua /usr/local/bin/ +COPY docker-entrypoint.sh /usr/local/bin/ +COPY console /usr/local/bin/ +COPY tarantool_is_up /usr/local/bin/ +COPY tarantool.default /usr/local/etc/default/tarantool + +RUN ln -s usr/local/bin/docker-entrypoint.sh /entrypoint.sh # backwards compat +ENTRYPOINT ["docker-entrypoint.sh"] + +HEALTHCHECK CMD tarantool_is_up + +EXPOSE 3301 +CMD [ "tarantool" ] diff --git a/2.x-centos7/console b/2.x-centos7/console new file mode 100755 index 0000000..d6fb192 --- /dev/null +++ b/2.x-centos7/console @@ -0,0 +1,15 @@ +#!/usr/bin/env tarantool + +local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' + +console = require('console') +console.on_start(function(self) + local status, reason + status, reason = pcall(function() require('console').connect(CONSOLE_SOCKET_PATH) end) + if not status then + self:print(reason) + self.running = false + end +end) +console.on_client_disconnect(function(self) self.running = false end) +console.start() diff --git a/2.x-centos7/docker-entrypoint.sh b/2.x-centos7/docker-entrypoint.sh new file mode 100755 index 0000000..6d48fdd --- /dev/null +++ b/2.x-centos7/docker-entrypoint.sh @@ -0,0 +1,22 @@ +#!/bin/sh +set -e + +# first arg is `-f` or `--some-option` +# or first arg is `something.conf` +if [ "${1:0:1}" = '-' ]; then + set -- tarantool "$@" +fi + +# allow the container to be started with `--user` +if [ "$1" = 'tarantool' -a "$(id -u)" = '0' ]; then + chown -R tarantool /var/lib/tarantool + exec gosu tarantool "$0" "$@" +fi + +# entry point wraps the passed script to do basic setup +if [ "$1" = 'tarantool' ]; then + shift + exec tarantool "/usr/local/bin/tarantool-entrypoint.lua" "$@" +fi + +exec "$@" diff --git a/2.x-centos7/luarocks-config.lua b/2.x-centos7/luarocks-config.lua new file mode 100644 index 0000000..4c48b74 --- /dev/null +++ b/2.x-centos7/luarocks-config.lua @@ -0,0 +1,11 @@ +rocks_trees = { + { name = [[user]], root = home..[[/.luarocks]] }, + { name = [[system]], root = [[/usr/local]] } +} + +lib_modules_path="/lib64/lua/"..lua_version + +rocks_servers = { + [[http://rocks.tarantool.org/]], + [[http://luarocks.org/repositories/rocks]] +} diff --git a/2.x-centos7/mosquitto.repo b/2.x-centos7/mosquitto.repo new file mode 100644 index 0000000..4df10dc --- /dev/null +++ b/2.x-centos7/mosquitto.repo @@ -0,0 +1,7 @@ +[home_oojah_mqtt] +name=mqtt (CentOS_CentOS-7) +type=rpm-md +baseurl=http://download.opensuse.org/repositories/home:/oojah:/mqtt/CentOS_CentOS-7/ +gpgcheck=1 +gpgkey=http://download.opensuse.org/repositories/home:/oojah:/mqtt/CentOS_CentOS-7//repodata/repomd.xml.key +enabled=1 \ No newline at end of file diff --git a/2.x-centos7/tarantool-entrypoint.lua b/2.x-centos7/tarantool-entrypoint.lua new file mode 100755 index 0000000..11cd89d --- /dev/null +++ b/2.x-centos7/tarantool-entrypoint.lua @@ -0,0 +1,292 @@ +#!/usr/bin/env tarantool + +local fio = require('fio') +local errno = require('errno') +local fun = require('fun') +local urilib = require('uri') +local console = require('console') +local term = require('term') +local log = require('log') +local yaml = require('yaml') + +local TARANTOOL_DEFAULT_PORT = 3301 +local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' +local CFG_FILE_PATH = '/etc/tarantool/config.yml' + + +local orig_cfg = box.cfg + +local function read_config() + local f = io.open(CFG_FILE_PATH, "rb") + if f == nil then + log.error("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) + os.exit(1) + end + local content = f:read("*all") + f:close() + return yaml.decode(content) +end + +local function write_config(cfg) + local f = io.open(CFG_FILE_PATH, "w+") + if f == nil then + print("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) + os.exit(1) + end + local content = yaml.encode(cfg) + f:write(content) + f:close() +end + +local function parse_replication_source(replication_source, user_name, user_password) + if replication_source == nil then + return nil + end + + local replication_source_table = {} + for uri in string.gmatch(replication_source, "[^,]+") do + local parsed_uri = urilib.parse(uri) + if parsed_uri == nil then + error("Incorrect replication source URI format: '"..uri.."'") + end + local host = parsed_uri.host + local port = parsed_uri.service or TARANTOOL_DEFAULT_PORT + local user = parsed_uri.login or user_name + local password = parsed_uri.password or user_password + + if user == 'guest' or user == nil then + replication_source = string.format("%s:%s", host, port) + elseif password == nil then + replication_source = string.format("%s:@%s:%s", user, host, port) + else + replication_source = string.format("%s:%s@%s:%s", user, password, + host, port) + end + + table.insert(replication_source_table, replication_source) + end + + return replication_source_table +end + +local function choose_option(main, substitute, cfg) + if cfg[main] then + return main + end + if cfg[substitute] then + return substitute + end + return main +end + +function set_replication_source(replication_source, user_name, user_password) + local replication_source_table = parse_replication_source( + replication_source, user_name, user_password + ) + local choice = choose_option('replication', 'replication_source', box.cfg) + box.cfg{[choice] = replication_source_table} + log.info("Updated box.cfg.%s to %s", choice, replication_source) +end + +local function create_user(user_name, user_password) + if user_name ~= 'guest' and user_password == nil then + user_password = "" + + local warn_str = [[**************************************************** +WARNING: No password has been set for the database. + This will allow anyone with access to the + Tarantool port to access your database. In + Docker's default configuration, this is + effectively any other container on the same + system. + Use "-e TARANTOOL_USER_PASSWORD=password" + to set it in "docker run". +****************************************************]] + log.warn('\n'..warn_str) + end + + if user_name == 'guest' and user_password == nil then + local warn_str = [[**************************************************** +WARNING: 'guest' is chosen as primary user. + Since it is not allowed to set a password for + guest user, your instance will be accessible + by anyone having direct access to the Tarantool + port. + If you wanted to create an authenticated user, + specify "-e TARANTOOL_USER_NAME=username" and + pick a user name other than "guest". +****************************************************]] + log.warn('\n'..warn_str) + end + + if user_name == 'guest' and user_password ~= nil then + user_password = nil + + local warn_str = [[**************************************************** +WARNING: A password for guest user has been specified. + In Tarantool, guest user can't have a password + and is always allowed to login, if it has + enough privileges. + If you wanted to create an authenticated user, + specify "-e TARANTOOL_USER_NAME=username" and + pick a user name other than "guest". +****************************************************]] + log.warn('\n'..warn_str) + end + + if user_name ~= 'admin' and user_name ~= 'guest' then + if not box.schema.user.exists(user_name) then + log.info("Creating user '%s'", user_name) + box.schema.user.create(user_name) + end + end + + if user_name ~= 'admin' then + log.info("Granting admin privileges to user '%s'", user_name) + box.schema.user.grant(user_name, 'read,write,execute', + 'universe', nil, {if_not_exists = true}) + box.schema.user.grant(user_name, 'replication', + nil, nil, {if_not_exists = true}) + end + + if user_name ~= 'guest' then + log.info("Setting password for user '%s'", user_name) + box.schema.user.passwd(user_name, user_password) + end +end + +function set_credentials(user_name, user_password) + create_user(user_name, user_password) +end + +local function wrapper_cfg(override) + local work_dir = '/var/lib/tarantool' + local snap_filename = "*.snap" + local snap_path = work_dir..'/'..snap_filename + + local first_run = false + if next(fio.glob(snap_path)) == nil then + first_run = true + end + + + local file_cfg = {} + local config_file_exists = fio.stat(CFG_FILE_PATH) ~= nil + if not config_file_exists then + log.info("Creating configuration file: " .. CFG_FILE_PATH) + + file_cfg.TARANTOOL_USER_NAME = os.getenv('TARANTOOL_USER_NAME') + file_cfg.TARANTOOL_USER_PASSWORD = os.getenv('TARANTOOL_USER_PASSWORD') + file_cfg.TARANTOOL_SLAB_ALLOC_ARENA = os.getenv('TARANTOOL_SLAB_ALLOC_ARENA') + file_cfg.TARANTOOL_SLAB_ALLOC_FACTOR = os.getenv('TARANTOOL_SLAB_ALLOC_FACTOR') + file_cfg.TARANTOOL_SLAB_ALLOC_MINIMAL = os.getenv('TARANTOOL_SLAB_ALLOC_MINIMAL') + file_cfg.TARANTOOL_SLAB_ALLOC_MAXIMAL = os.getenv('TARANTOOL_SLAB_ALLOC_MAXIMAL') + file_cfg.TARANTOOL_PORT = os.getenv('TARANTOOL_PORT') + file_cfg.TARANTOOL_WAL_MODE = os.getenv('TARANTOOL_WAL_MODE') + file_cfg.TARANTOOL_REPLICATION_SOURCE = os.getenv('TARANTOOL_REPLICATION_SOURCE') + file_cfg.TARANTOOL_REPLICATION = os.getenv('TARANTOOL_REPLICATION') + file_cfg.TARANTOOL_SNAPSHOT_PERIOD = os.getenv('TARANTOOL_SNAPSHOT_PERIOD') + file_cfg.TARANTOOL_MEMTX_MEMORY = os.getenv('TARANTOOL_MEMTX_MEMORY') + file_cfg.TARANTOOL_CHECKPOINT_INTERVAL = os.getenv('TARANTOOL_CHECKPOINT_INTERVAL') + file_cfg.TARANTOOL_MEMTX_MIN_TUPLE_SIZE = os.getenv('TARANTOOL_MEMTX_MIN_TUPLE_SIZE') + file_cfg.TARANTOOL_MEMTX_MAX_TUPLE_SIZE = os.getenv('TARANTOOL_MEMTX_MAX_TUPLE_SIZE') + + write_config(file_cfg) + else + log.info("Loading existing configuration file: " .. CFG_FILE_PATH) + + file_cfg = read_config() + end + + local user_name = file_cfg.TARANTOOL_USER_NAME or + os.getenv('TARANTOOL_USER_NAME') or 'guest' + local user_password = file_cfg.TARANTOOL_USER_PASSWORD or + os.getenv('TARANTOOL_USER_PASSWORD') + + + local cfg = override or {} + -- Placeholders for deprecated options + cfg.slab_alloc_arena = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_ARENA) or + override.slab_alloc_arena + cfg.slab_alloc_maximal = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_MAXIMAL) or + override.slab_alloc_maximal + cfg.slab_alloc_minimal = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_MINIMAL) or + override.slab_alloc_minimal + cfg.snapshot_period = tonumber(file_cfg.TARANTOOL_SNAPSHOT_PERIOD) or + override.snapshot_period + -- Replacements for deprecated options + cfg.memtx_memory = tonumber(file_cfg.TARANTOOL_MEMTX_MEMORY) or + override.memtx_memory + cfg.memtx_min_tuple_size = tonumber(file_cfg.TARANTOOL_MEMTX_MIN_TUPLE_SIZE) or + override.memtx_min_tuple_size + cfg.memtx_max_tuple_size = tonumber(file_cfg.TARANTOOL_MEMTX_MAX_TUPLE_SIZE) or + override.memtx_max_tuple_size + cfg.checkpoint_interval = tonumber(file_cfg.TARANTOOL_CHECKPOINT_INTERVAL) or + override.checkpoint_interval + -- Deprecated options with default values + local choice = choose_option('memtx_dir', 'snap_dir', override) + cfg[choice] = override[choice] or '/var/lib/tarantool' + + -- Remaining configuration + cfg.slab_alloc_factor = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_FACTOR) or + override.slab_alloc_factor + cfg.listen = tonumber(file_cfg.TARANTOOL_PORT) or + override.listen or TARANTOOL_DEFAULT_PORT + cfg.wal_mode = file_cfg.TARANTOOL_WAL_MODE or + override.wal_mode + + cfg.wal_dir = override.wal_dir or '/var/lib/tarantool' + cfg.vinyl_dir = override.vinyl_dir or '/var/lib/tarantool' + cfg.pid_file = override.pid_file or '/var/run/tarantool/tarantool.pid' + + local choice = choose_option('TARANTOOL_REPLICATION', 'TARANTOOL_REPLICATION_SOURCE', file_cfg) + local replication_source_table = parse_replication_source(file_cfg[choice], + user_name, + user_password) + + if replication_source_table then + cfg.replication = replication_source_table + else + local choice = choose_option('replication', 'replication_source', override) + cfg[choice] = override[choice] + end + + log.info("Config:\n" .. yaml.encode(cfg)) + + orig_cfg(cfg) + + box.once('tarantool-entrypoint', function () + if first_run then + log.info("Initializing database") + + create_user(user_name, user_password) + end + end) + + console.listen(CONSOLE_SOCKET_PATH) + +end + +box.cfg = wrapper_cfg + +-- re-run the script passed as parameter with all arguments that follow +execute_script = arg[1] +if execute_script == nil then + box.cfg {} + + if term.isatty(io.stdout) then + console.start() + os.exit(0) + end +else + narg = 0 + while true do + arg[narg] = arg[narg + 1] + if arg[narg] == nil then + break + end + narg = narg + 1 + end + + dofile(execute_script) +end diff --git a/2.x-centos7/tarantool.default b/2.x-centos7/tarantool.default new file mode 100644 index 0000000..fffe3b0 --- /dev/null +++ b/2.x-centos7/tarantool.default @@ -0,0 +1,22 @@ +-- +-- System-wide settings for tarantoolctl and init scripts +-- +-- This file is meant to enable the usage of tarantoolctl inside +-- docker containers. Since there is no init system, most of its +-- functionality will not work, except 'tarantoolctl enter' or +-- 'tarantoolctl status'. +-- + +default_cfg = { + pid_file = "/var/run/tarantool", -- /var/run/tarantool/${INSTANCE}.pid + wal_dir = "/var/lib/tarantool", -- /var/lib/tarantool/${INSTANCE}/ + snap_dir = "/var/lib/tarantool", -- /var/lib/tarantool/${INSTANCE} + vinyl_dir = "/var/lib/tarantool", -- /var/lib/tarantool/${INSTANCE} + logger = "/var/log/tarantool", -- /var/log/tarantool/${INSTANCE}.log + username = "tarantool", +} + +-- instances.available - all available instances +-- instances.enabled - instances to autostart by sysvinit +instance_dir = "/usr/local/etc/tarantool/instances.enabled" +-- vim: set ft=lua : diff --git a/2.x-centos7/tarantool_is_up b/2.x-centos7/tarantool_is_up new file mode 100755 index 0000000..71148d5 --- /dev/null +++ b/2.x-centos7/tarantool_is_up @@ -0,0 +1,41 @@ +#!/bin/sh + +status=$( (tarantool <<-'EOF' +local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' +local console = require('console') +local os = require("os") +local yaml = require("yaml") + +console.on_start(function(self) + local status, reason + status, reason = pcall(function() require('console').connect(CONSOLE_SOCKET_PATH) end) + if not status then + self:print(reason) + os.exit(1) + end + + cmd = 'box.info.status' + local res = self:eval(cmd) + if res ~= nil then + res = yaml.decode(res) + print(res[1]) + end + + os.exit(0) +end) + +console.on_client_disconnect(function(self) self.running = false end) +console.start() + +os.exit(0) +EOF +) 2>/dev/null) + + +echo "$status" + +if [ "$status" = "running" ]; then + exit 0 +else + exit 1 +fi diff --git a/2.x-centos7/tarantool_set_config.lua b/2.x-centos7/tarantool_set_config.lua new file mode 100755 index 0000000..ddca36c --- /dev/null +++ b/2.x-centos7/tarantool_set_config.lua @@ -0,0 +1,130 @@ +#!/usr/bin/env tarantool + +local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' +local CFG_FILE_PATH = '/etc/tarantool/config.yml' + +local fio = require('fio') +local yaml = require('yaml') +local console = require('console') +local errno = require('errno') + +local function read_config() + local f = io.open(CFG_FILE_PATH, "rb") + if f == nil then + print("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) + os.exit(1) + end + local content = f:read("*all") + f:close() + return yaml.decode(content) +end + +local function write_config(cfg) + local f = io.open(CFG_FILE_PATH, "w+") + if f == nil then + print("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) + os.exit(1) + end + local content = yaml.encode(cfg) + f:write(content) + f:close() +end + +local function nop(console, cfg, value) +end + +local function update_replication_source(console, cfg, value) + local user_name = "nil" + if cfg['TARANTOOL_USER_NAME'] then + user_name = "'" .. cfg['TARANTOOL_USER_NAME'] .. "'" + end + + local user_password = "nil" + if cfg['TARANTOOL_USER_PASSWORD'] then + user_password = "'" .. cfg['TARANTOOL_USER_PASSWORD'] .. "'" + end + + local cmd = "set_replication_source('"..value.."', " .. user_name .. "," .. user_password .. ")" + print("cmd: ", cmd) + + local res = console:eval(cmd) + + if res ~= nil then + print(res) + end +end + +local function update_credentials(console, cfg, value) + local user_name = "nil" + if cfg['TARANTOOL_USER_NAME'] then + user_name = "'" .. cfg['TARANTOOL_USER_NAME'] .. "'" + end + + local user_password = "nil" + if cfg['TARANTOOL_USER_PASSWORD'] then + user_password = "'" .. cfg['TARANTOOL_USER_PASSWORD'] .. "'" + end + + local cmd = "set_credentials(" .. user_name .. "," .. user_password .. ")" + + local res = console:eval(cmd) + + if res ~= nil then + print(res) + end + + local replication_source = cfg['TARANTOOL_REPLICATION_SOURCE'] + + if replication_source ~= nil then + update_replication_source(console, cfg, replication_source) + end +end + + +local vars = { + TARANTOOL_SLAB_ALLOC_ARENA=nop, + TARANTOOL_SLAB_ALLOC_FACTOR=nop, + TARANTOOL_SLAB_ALLOC_MAXIMAL=nop, + TARANTOOL_SLAB_ALLOC_MINIMAL=nop, + TARANTOOL_PORT=nop, + TARANTOOL_WAL_MODE=nop, + TARANTOOL_USER_NAME=update_credentials, + TARANTOOL_USER_PASSWORD=update_credentials, + TARANTOOL_REPLICATION_SOURCE=update_replication_source, + TARANTOOL_REPLICATION=update_replication_source, +} + +console.on_start(function(self) + local status, reason + status, reason = pcall(function() require('console').connect(CONSOLE_SOCKET_PATH) end) + if not status then + self:print(reason) + os.exit(1) + end + + if arg[1] == nil or arg[2] == nil then + self:print("Usage: " .. arg[0] .. " ") + os.exit(1) + end + + if vars[arg[1]] == nil then + self:print("Unknown var: " .. arg[1]) + os.exit(1) + end + + local cfg = read_config() + cfg[arg[1]] = arg[2] + + local func = vars[arg[1]] + func(self, cfg, arg[2]) + + write_config(cfg) + + self.running = false + os.exit(0) +end) + +console.on_client_disconnect(function(self) self.running = false end) +console.start() + +os.exit(0) diff --git a/README.md b/README.md index 1b61ec9..5063f2d 100644 --- a/README.md +++ b/README.md @@ -344,6 +344,7 @@ Special builds: | Branch | Dockerfile | Docker tag | | ------ | ---------- | ---------- | | master | 1.x-centos7/Dockerfile | 1.x-centos7 | +| master | 2.x-centos7/Dockerfile | 2.x-centos7 | ## How to push changes (for maintainers) From b8c9e24a417cf7dcea4919ae780a3c20c8fe846b Mon Sep 17 00:00:00 2001 From: Dmitry Krokhin Date: Tue, 14 May 2019 16:35:08 +0300 Subject: [PATCH 151/286] extend admin privilege list due sequence feature --- 1.x-centos7/tarantool-entrypoint.lua | 2 +- 1.x/tarantool-entrypoint.lua | 2 +- 2.1/tarantool-entrypoint.lua | 2 +- 2.x-centos7/tarantool-entrypoint.lua | 2 +- 2.x/tarantool-entrypoint.lua | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/1.x-centos7/tarantool-entrypoint.lua b/1.x-centos7/tarantool-entrypoint.lua index 11cd89d..ffbf2fc 100755 --- a/1.x-centos7/tarantool-entrypoint.lua +++ b/1.x-centos7/tarantool-entrypoint.lua @@ -143,7 +143,7 @@ WARNING: A password for guest user has been specified. if user_name ~= 'admin' then log.info("Granting admin privileges to user '%s'", user_name) - box.schema.user.grant(user_name, 'read,write,execute', + box.schema.user.grant(user_name, 'read,write,execute,create,drop', 'universe', nil, {if_not_exists = true}) box.schema.user.grant(user_name, 'replication', nil, nil, {if_not_exists = true}) diff --git a/1.x/tarantool-entrypoint.lua b/1.x/tarantool-entrypoint.lua index 11cd89d..ffbf2fc 100755 --- a/1.x/tarantool-entrypoint.lua +++ b/1.x/tarantool-entrypoint.lua @@ -143,7 +143,7 @@ WARNING: A password for guest user has been specified. if user_name ~= 'admin' then log.info("Granting admin privileges to user '%s'", user_name) - box.schema.user.grant(user_name, 'read,write,execute', + box.schema.user.grant(user_name, 'read,write,execute,create,drop', 'universe', nil, {if_not_exists = true}) box.schema.user.grant(user_name, 'replication', nil, nil, {if_not_exists = true}) diff --git a/2.1/tarantool-entrypoint.lua b/2.1/tarantool-entrypoint.lua index 11cd89d..ffbf2fc 100755 --- a/2.1/tarantool-entrypoint.lua +++ b/2.1/tarantool-entrypoint.lua @@ -143,7 +143,7 @@ WARNING: A password for guest user has been specified. if user_name ~= 'admin' then log.info("Granting admin privileges to user '%s'", user_name) - box.schema.user.grant(user_name, 'read,write,execute', + box.schema.user.grant(user_name, 'read,write,execute,create,drop', 'universe', nil, {if_not_exists = true}) box.schema.user.grant(user_name, 'replication', nil, nil, {if_not_exists = true}) diff --git a/2.x-centos7/tarantool-entrypoint.lua b/2.x-centos7/tarantool-entrypoint.lua index 11cd89d..ffbf2fc 100755 --- a/2.x-centos7/tarantool-entrypoint.lua +++ b/2.x-centos7/tarantool-entrypoint.lua @@ -143,7 +143,7 @@ WARNING: A password for guest user has been specified. if user_name ~= 'admin' then log.info("Granting admin privileges to user '%s'", user_name) - box.schema.user.grant(user_name, 'read,write,execute', + box.schema.user.grant(user_name, 'read,write,execute,create,drop', 'universe', nil, {if_not_exists = true}) box.schema.user.grant(user_name, 'replication', nil, nil, {if_not_exists = true}) diff --git a/2.x/tarantool-entrypoint.lua b/2.x/tarantool-entrypoint.lua index 11cd89d..ffbf2fc 100755 --- a/2.x/tarantool-entrypoint.lua +++ b/2.x/tarantool-entrypoint.lua @@ -143,7 +143,7 @@ WARNING: A password for guest user has been specified. if user_name ~= 'admin' then log.info("Granting admin privileges to user '%s'", user_name) - box.schema.user.grant(user_name, 'read,write,execute', + box.schema.user.grant(user_name, 'read,write,execute,create,drop', 'universe', nil, {if_not_exists = true}) box.schema.user.grant(user_name, 'replication', nil, nil, {if_not_exists = true}) From 4603b517d8c060921e48cf9f08615c5bed5073ee Mon Sep 17 00:00:00 2001 From: Oleg Babin Date: Wed, 15 May 2019 13:19:01 +0300 Subject: [PATCH 152/286] Update 1.x-centos7 image --- 1.x-centos7/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1.x-centos7/Dockerfile b/1.x-centos7/Dockerfile index 33e5705..28afab6 100644 --- a/1.x-centos7/Dockerfile +++ b/1.x-centos7/Dockerfile @@ -4,7 +4,7 @@ MAINTAINER mail@racktear.com RUN groupadd tarantool \ && adduser -g tarantool tarantool -ENV TARANTOOL_VERSION=1.10.3-33-gfd303466c \ +ENV TARANTOOL_VERSION=1.10.3-37-gbb53975aa \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ CURL_REPO=https://github.com/curl/curl.git \ From 04f419c9d166cc0ea41c26a85802058579d183f7 Mon Sep 17 00:00:00 2001 From: Oleg Babin Date: Wed, 15 May 2019 13:20:33 +0300 Subject: [PATCH 153/286] Update 2.x-centos7 image --- 2.x-centos7/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/2.x-centos7/Dockerfile b/2.x-centos7/Dockerfile index 39da0cc..f4b8109 100644 --- a/2.x-centos7/Dockerfile +++ b/2.x-centos7/Dockerfile @@ -4,13 +4,13 @@ MAINTAINER mail@racktear.com RUN groupadd tarantool \ && adduser -g tarantool tarantool -ENV TARANTOOL_VERSION=2.1.2-52-g154345fc5 \ +ENV TARANTOOL_VERSION=2.1.2-64-g69270b326 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ CURL_REPO=https://github.com/curl/curl.git \ CURL_TAG=curl-7_64_0 \ LUAROCKS_URL=https://github.com/tarantool/luarocks/archive/6e6fe62d9409fe2103c0fd091cccb3da0451faf5.tar.gz \ - LUAROCK_VSHARD_VERSION=0.1.8 \ + LUAROCK_VSHARD_VERSION=0.1.9 \ LUAROCK_CHECKS_VERSION=3.0.0 \ LUAROCK_AVRO_SCHEMA_VERSION=3.0.3 \ LUAROCK_EXPERATIOND_VERSION=1.0.1 \ From a3e2475903a1b9e27f6634891c3e60a2b0a42b96 Mon Sep 17 00:00:00 2001 From: Oleg Babin Date: Thu, 23 May 2019 16:42:13 +0300 Subject: [PATCH 154/286] Update 1.x-centos docker image --- 1.x-centos7/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1.x-centos7/Dockerfile b/1.x-centos7/Dockerfile index 28afab6..2821f82 100644 --- a/1.x-centos7/Dockerfile +++ b/1.x-centos7/Dockerfile @@ -4,7 +4,7 @@ MAINTAINER mail@racktear.com RUN groupadd tarantool \ && adduser -g tarantool tarantool -ENV TARANTOOL_VERSION=1.10.3-37-gbb53975aa \ +ENV TARANTOOL_VERSION=1.10.3-52-g02b5948bd \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ CURL_REPO=https://github.com/curl/curl.git \ From a247cfb7dd25c6e083a4381b7ef997e2a385a23c Mon Sep 17 00:00:00 2001 From: Oleg Babin Date: Thu, 23 May 2019 16:42:26 +0300 Subject: [PATCH 155/286] Update 2.x-centos docker image --- 2.x-centos7/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/2.x-centos7/Dockerfile b/2.x-centos7/Dockerfile index f4b8109..4bad8b6 100644 --- a/2.x-centos7/Dockerfile +++ b/2.x-centos7/Dockerfile @@ -4,7 +4,7 @@ MAINTAINER mail@racktear.com RUN groupadd tarantool \ && adduser -g tarantool tarantool -ENV TARANTOOL_VERSION=2.1.2-64-g69270b326 \ +ENV TARANTOOL_VERSION=2.1.2-81-gb635c262a \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ CURL_REPO=https://github.com/curl/curl.git \ From 3e274d98a09b4186d5e770e02b039d4c5205f5cc Mon Sep 17 00:00:00 2001 From: Oleg Babin Date: Tue, 11 Jun 2019 11:24:47 +0300 Subject: [PATCH 156/286] Update 1.x-centos7 Dockerfile --- 1.x-centos7/Dockerfile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/1.x-centos7/Dockerfile b/1.x-centos7/Dockerfile index 2821f82..ca58a6b 100644 --- a/1.x-centos7/Dockerfile +++ b/1.x-centos7/Dockerfile @@ -4,11 +4,11 @@ MAINTAINER mail@racktear.com RUN groupadd tarantool \ && adduser -g tarantool tarantool -ENV TARANTOOL_VERSION=1.10.3-52-g02b5948bd \ +ENV TARANTOOL_VERSION=1.10.3-71-gbeb4c0ce6 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ CURL_REPO=https://github.com/curl/curl.git \ - CURL_TAG=curl-7_64_0 \ + CURL_TAG=curl-7_65_1 \ LUAROCKS_URL=https://github.com/tarantool/luarocks/archive/6e6fe62d9409fe2103c0fd091cccb3da0451faf5.tar.gz \ LUAROCK_SHARD_REPO=https://github.com/tarantool/shard.git \ LUAROCK_SHARD_TAG=8f8c5a7 \ @@ -17,7 +17,7 @@ ENV TARANTOOL_VERSION=1.10.3-52-g02b5948bd \ LUAROCK_EXPERATIOND_VERSION=1.0.1 \ LUAROCK_QUEUE_VERSION=1.0.2 \ LUAROCK_CONNPOOL_VERSION=1.1.1 \ - LUAROCK_HTTP_VERSION=1.0.1 \ + LUAROCK_HTTP_VERSION=1.1.0 \ LUAROCK_MEMCACHED_VERSION=1.0.0 \ LUAROCK_TARANTOOL_PG_VERSION=2.0.1 \ LUAROCK_TARANTOOL_MYSQL_VERSION=2.0.1 \ @@ -66,10 +66,10 @@ RUN set -x \ go \ wget \ && : "---------- libicu ----------" \ - && wget http://download.icu-project.org/files/icu4c/63.1/icu4c-63_1-src.tgz \ + && wget http://download.icu-project.org/files/icu4c/64.2/icu4c-64_2-src.tgz \ && mkdir -p /usr/src/icu \ - && tar -xzf icu4c-63_1-src.tgz -C /usr/src/icu --strip-components=1 \ - && rm icu4c-63_1-src.tgz \ + && tar -xzf icu4c-64_2-src.tgz -C /usr/src/icu --strip-components=1 \ + && rm icu4c-64_2-src.tgz \ && (cd /usr/src/icu/source; \ chmod +x runConfigureICU configure install-sh; \ ./runConfigureICU Linux/gcc; \ From 14dea8c7da239d58950b3bcd71626d88b5d20b05 Mon Sep 17 00:00:00 2001 From: Oleg Babin Date: Tue, 11 Jun 2019 11:26:19 +0300 Subject: [PATCH 157/286] Update 2.x-centos7 Dockerfile --- 2.x-centos7/Dockerfile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/2.x-centos7/Dockerfile b/2.x-centos7/Dockerfile index 4bad8b6..9492b4c 100644 --- a/2.x-centos7/Dockerfile +++ b/2.x-centos7/Dockerfile @@ -4,19 +4,19 @@ MAINTAINER mail@racktear.com RUN groupadd tarantool \ && adduser -g tarantool tarantool -ENV TARANTOOL_VERSION=2.1.2-81-gb635c262a \ +ENV TARANTOOL_VERSION=2.1.2-108-g0bed174d0 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ CURL_REPO=https://github.com/curl/curl.git \ - CURL_TAG=curl-7_64_0 \ + CURL_TAG=curl-7_65_1 \ LUAROCKS_URL=https://github.com/tarantool/luarocks/archive/6e6fe62d9409fe2103c0fd091cccb3da0451faf5.tar.gz \ LUAROCK_VSHARD_VERSION=0.1.9 \ - LUAROCK_CHECKS_VERSION=3.0.0 \ + LUAROCK_CHECKS_VERSION=3.0.1 \ LUAROCK_AVRO_SCHEMA_VERSION=3.0.3 \ LUAROCK_EXPERATIOND_VERSION=1.0.1 \ LUAROCK_QUEUE_VERSION=1.0.3 \ LUAROCK_CONNPOOL_VERSION=1.1.1 \ - LUAROCK_HTTP_VERSION=1.0.5 \ + LUAROCK_HTTP_VERSION=1.1.0 \ LUAROCK_MEMCACHED_VERSION=1.0.0 \ LUAROCK_TARANTOOL_PG_VERSION=2.0.2 \ LUAROCK_TARANTOOL_MYSQL_VERSION=2.0.1 \ @@ -64,10 +64,10 @@ RUN set -x \ go \ wget \ && : "---------- libicu ----------" \ - && wget http://download.icu-project.org/files/icu4c/63.1/icu4c-63_1-src.tgz \ + && wget http://download.icu-project.org/files/icu4c/64.2/icu4c-64_2-src.tgz \ && mkdir -p /usr/src/icu \ - && tar -xzf icu4c-63_1-src.tgz -C /usr/src/icu --strip-components=1 \ - && rm icu4c-63_1-src.tgz \ + && tar -xzf icu4c-64_2-src.tgz -C /usr/src/icu --strip-components=1 \ + && rm icu4c-64_2-src.tgz \ && (cd /usr/src/icu/source; \ chmod +x runConfigureICU configure install-sh; \ ./runConfigureICU Linux/gcc; \ From 57e6ba5e36818af0e17b2a5e6bb75661494312e3 Mon Sep 17 00:00:00 2001 From: Oleg Babin Date: Wed, 26 Jun 2019 10:23:39 +0300 Subject: [PATCH 158/286] Bump 1.x docker images to fix vynil memory leak --- 1.x-centos7/Dockerfile | 2 +- 1.x/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/1.x-centos7/Dockerfile b/1.x-centos7/Dockerfile index ca58a6b..b4f06f1 100644 --- a/1.x-centos7/Dockerfile +++ b/1.x-centos7/Dockerfile @@ -4,7 +4,7 @@ MAINTAINER mail@racktear.com RUN groupadd tarantool \ && adduser -g tarantool tarantool -ENV TARANTOOL_VERSION=1.10.3-71-gbeb4c0ce6 \ +ENV TARANTOOL_VERSION=1.10.3-81-g759f0a809 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ CURL_REPO=https://github.com/curl/curl.git \ diff --git a/1.x/Dockerfile b/1.x/Dockerfile index 8b0e189..d025182 100644 --- a/1.x/Dockerfile +++ b/1.x/Dockerfile @@ -5,7 +5,7 @@ RUN addgroup -S tarantool \ && adduser -S -G tarantool tarantool \ && apk add --no-cache 'su-exec>=0.2' -ENV TARANTOOL_VERSION=1.10.3-6-g5dc6d79f4 \ +ENV TARANTOOL_VERSION=1.10.3-81-g759f0a809 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ CURL_REPO=https://github.com/curl/curl.git \ From 4a49182422c4e81c261e6f30cc597e9940219dbf Mon Sep 17 00:00:00 2001 From: Oleg Babin Date: Wed, 26 Jun 2019 10:26:21 +0300 Subject: [PATCH 159/286] Bump 2.x images --- 2.1/Dockerfile | 2 +- 2.x-centos7/Dockerfile | 2 +- 2.x/Dockerfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/2.1/Dockerfile b/2.1/Dockerfile index dac51d2..428977c 100644 --- a/2.1/Dockerfile +++ b/2.1/Dockerfile @@ -5,7 +5,7 @@ RUN addgroup -S tarantool \ && adduser -S -G tarantool tarantool \ && apk add --no-cache 'su-exec>=0.2' -ENV TARANTOOL_VERSION=2.1.1-453-gb103475e5 \ +ENV TARANTOOL_VERSION=2.1.2-119-gc118d5142 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ CURL_REPO=https://github.com/curl/curl.git \ diff --git a/2.x-centos7/Dockerfile b/2.x-centos7/Dockerfile index 9492b4c..f83424e 100644 --- a/2.x-centos7/Dockerfile +++ b/2.x-centos7/Dockerfile @@ -4,7 +4,7 @@ MAINTAINER mail@racktear.com RUN groupadd tarantool \ && adduser -g tarantool tarantool -ENV TARANTOOL_VERSION=2.1.2-108-g0bed174d0 \ +ENV TARANTOOL_VERSION=2.1.2-119-gc118d5142 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ CURL_REPO=https://github.com/curl/curl.git \ diff --git a/2.x/Dockerfile b/2.x/Dockerfile index 7c19ea3..718252b 100644 --- a/2.x/Dockerfile +++ b/2.x/Dockerfile @@ -5,7 +5,7 @@ RUN addgroup -S tarantool \ && adduser -S -G tarantool tarantool \ && apk add --no-cache 'su-exec>=0.2' -ENV TARANTOOL_VERSION=2.2.0-128-g7b56f1fef \ +ENV TARANTOOL_VERSION=2.2.0-482-g8c84932ad \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ CURL_REPO=https://github.com/curl/curl.git \ From 5339a9a402399dbc5a80675646c9c52a645adb99 Mon Sep 17 00:00:00 2001 From: Alexander Turenko Date: Mon, 8 Jul 2019 18:42:31 +0300 Subject: [PATCH 160/286] Update tarantool-1.10 to 1.10.3.93 Updated both Alpine and Centos 7 images. --- 1.x-centos7/Dockerfile | 2 +- 1.x/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/1.x-centos7/Dockerfile b/1.x-centos7/Dockerfile index b4f06f1..db50f07 100644 --- a/1.x-centos7/Dockerfile +++ b/1.x-centos7/Dockerfile @@ -4,7 +4,7 @@ MAINTAINER mail@racktear.com RUN groupadd tarantool \ && adduser -g tarantool tarantool -ENV TARANTOOL_VERSION=1.10.3-81-g759f0a809 \ +ENV TARANTOOL_VERSION=1.10.3-93-gdf8f1fdaa \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ CURL_REPO=https://github.com/curl/curl.git \ diff --git a/1.x/Dockerfile b/1.x/Dockerfile index d025182..1e06c7f 100644 --- a/1.x/Dockerfile +++ b/1.x/Dockerfile @@ -5,7 +5,7 @@ RUN addgroup -S tarantool \ && adduser -S -G tarantool tarantool \ && apk add --no-cache 'su-exec>=0.2' -ENV TARANTOOL_VERSION=1.10.3-81-g759f0a809 \ +ENV TARANTOOL_VERSION=1.10.3-93-gdf8f1fdaa \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ CURL_REPO=https://github.com/curl/curl.git \ From 0847979293070df248bdd5633ee0d89a0b0dc212 Mon Sep 17 00:00:00 2001 From: "Alexander V. Tikhonov" Date: Mon, 5 Aug 2019 08:14:56 +0300 Subject: [PATCH 161/286] Add the fixed 2.2.1 and update rolling versions Added fixed version 2.2.1. Updated rolling versions: 1.7: 1.7.6-11-gcd17b77f9 -> 1.7.6-27-g7ef5be2ee 1.10/1.x-centos7: 1.10.3-93-gdf8f1fdaa -> 1.10.3-107-g17db27170 2.1: 2.1.2-119-gc118d5142 -> 2.1.2-143-g3edaaed6c 2.x-centos7: 2.1.2-119-gc118d5142 -> 2.2.1-3-g878e2a42c 2.2: created with 2.2.1-3-g878e2a42c 2.x: 2.2.0-482-g8c84932ad -> 2.3.0-1-g35ef33200 Closes #115 --- 1.7/Dockerfile | 2 +- 1.x-centos7/Dockerfile | 2 +- 1.x/Dockerfile | 2 +- 2.1/Dockerfile | 2 +- 2.2/Dockerfile | 249 +++++++++++++++++++++++++++++ 2.2/console | 15 ++ 2.2/docker-entrypoint.sh | 22 +++ 2.2/gperftools_alpine.diff | 110 +++++++++++++ 2.2/luarocks-config.lua | 9 ++ 2.2/tarantool-entrypoint.lua | 292 +++++++++++++++++++++++++++++++++++ 2.2/tarantool.default | 22 +++ 2.2/tarantool_is_up | 41 +++++ 2.2/tarantool_set_config.lua | 130 ++++++++++++++++ 2.x-centos7/Dockerfile | 2 +- 2.x/Dockerfile | 2 +- README.md | 2 + 16 files changed, 898 insertions(+), 6 deletions(-) create mode 100644 2.2/Dockerfile create mode 100755 2.2/console create mode 100755 2.2/docker-entrypoint.sh create mode 100644 2.2/gperftools_alpine.diff create mode 100644 2.2/luarocks-config.lua create mode 100755 2.2/tarantool-entrypoint.lua create mode 100644 2.2/tarantool.default create mode 100755 2.2/tarantool_is_up create mode 100755 2.2/tarantool_set_config.lua diff --git a/1.7/Dockerfile b/1.7/Dockerfile index ead44c7..30b15c1 100644 --- a/1.7/Dockerfile +++ b/1.7/Dockerfile @@ -5,7 +5,7 @@ RUN addgroup -S tarantool \ && adduser -S -G tarantool tarantool \ && apk add --no-cache 'su-exec>=0.2' -ENV TARANTOOL_VERSION=1.7.6-11-gcd17b77f9 \ +ENV TARANTOOL_VERSION=1.7.6-27-g7ef5be2ee \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ CURL_REPO=https://github.com/curl/curl.git \ diff --git a/1.x-centos7/Dockerfile b/1.x-centos7/Dockerfile index db50f07..7cd140f 100644 --- a/1.x-centos7/Dockerfile +++ b/1.x-centos7/Dockerfile @@ -4,7 +4,7 @@ MAINTAINER mail@racktear.com RUN groupadd tarantool \ && adduser -g tarantool tarantool -ENV TARANTOOL_VERSION=1.10.3-93-gdf8f1fdaa \ +ENV TARANTOOL_VERSION=1.10.3-107-g17db27170 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ CURL_REPO=https://github.com/curl/curl.git \ diff --git a/1.x/Dockerfile b/1.x/Dockerfile index 1e06c7f..e0b5faa 100644 --- a/1.x/Dockerfile +++ b/1.x/Dockerfile @@ -5,7 +5,7 @@ RUN addgroup -S tarantool \ && adduser -S -G tarantool tarantool \ && apk add --no-cache 'su-exec>=0.2' -ENV TARANTOOL_VERSION=1.10.3-93-gdf8f1fdaa \ +ENV TARANTOOL_VERSION=1.10.3-107-g17db27170 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ CURL_REPO=https://github.com/curl/curl.git \ diff --git a/2.1/Dockerfile b/2.1/Dockerfile index 428977c..3d70b7c 100644 --- a/2.1/Dockerfile +++ b/2.1/Dockerfile @@ -5,7 +5,7 @@ RUN addgroup -S tarantool \ && adduser -S -G tarantool tarantool \ && apk add --no-cache 'su-exec>=0.2' -ENV TARANTOOL_VERSION=2.1.2-119-gc118d5142 \ +ENV TARANTOOL_VERSION=2.1.2-143-g3edaaed6c \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ CURL_REPO=https://github.com/curl/curl.git \ diff --git a/2.2/Dockerfile b/2.2/Dockerfile new file mode 100644 index 0000000..63abdce --- /dev/null +++ b/2.2/Dockerfile @@ -0,0 +1,249 @@ +FROM alpine:3.5 +MAINTAINER mail@racktear.com + +RUN addgroup -S tarantool \ + && adduser -S -G tarantool tarantool \ + && apk add --no-cache 'su-exec>=0.2' + +ENV TARANTOOL_VERSION=2.2.1-3-g878e2a42c \ + TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ + TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ + CURL_REPO=https://github.com/curl/curl.git \ + CURL_TAG=curl-7_59_0 \ + GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ + GPERFTOOLS_TAG=gperftools-2.5 \ + LUAROCKS_URL=https://github.com/tarantool/luarocks/archive/6e6fe62d9409fe2103c0fd091cccb3da0451faf5.tar.gz \ + LUAROCK_SHARD_REPO=https://github.com/tarantool/shard.git \ + LUAROCK_SHARD_TAG=8f8c5a7 \ + LUAROCK_AVRO_SCHEMA_VERSION=2.0.1 \ + LUAROCK_EXPERATIOND_VERSION=1.0.1 \ + LUAROCK_QUEUE_VERSION=1.0.2 \ + LUAROCK_CONNPOOL_VERSION=1.1.1 \ + LUAROCK_HTTP_VERSION=1.0.1 \ + LUAROCK_MEMCACHED_VERSION=1.0.0 \ + LUAROCK_TARANTOOL_PG_VERSION=2.0.1 \ + LUAROCK_TARANTOOL_MYSQL_VERSION=2.0.1 \ + LUAROCK_TARANTOOL_CURL_VERSION=2.3.1 \ + LUAROCK_TARANTOOL_MQTT_VERSION=1.2.1 \ + LUAROCK_TARANTOOL_GIS_VERSION=1.0.0 \ + LUAROCK_TARANTOOL_PROMETHEUS_VERSION=1.0.0 \ + LUAROCK_TARANTOOL_GPERFTOOLS_VERSION=1.0.1 + +COPY gperftools_alpine.diff / + +RUN set -x \ + && apk add --no-cache --virtual .run-deps \ + libstdc++ \ + readline \ + libressl \ + yaml \ + lz4 \ + binutils \ + ncurses \ + libgomp \ + lua \ + tar \ + zip \ + libunwind \ + icu \ + ca-certificates \ + && apk add --no-cache --virtual .build-deps \ + perl \ + gcc \ + g++ \ + cmake \ + readline-dev \ + libressl-dev \ + yaml-dev \ + lz4-dev \ + binutils-dev \ + ncurses-dev \ + lua-dev \ + musl-dev \ + make \ + git \ + libunwind-dev \ + autoconf \ + automake \ + libtool \ + linux-headers \ + go \ + tcl \ + icu-dev \ + wget \ + && : "---------- curl ----------" \ + && mkdir -p /usr/src/curl \ + && git clone "$CURL_REPO" /usr/src/curl \ + && git -C /usr/src/curl checkout "$CURL_TAG" \ + && (cd /usr/src/curl \ + && ./buildconf \ + && ./configure --prefix "/usr/local" \ + && make -j \ + && make install) \ + && : "---------- gperftools ----------" \ + && mkdir -p /usr/src/gperftools \ + && git clone "$GPERFTOOLS_REPO" /usr/src/gperftools \ + && git -C /usr/src/gperftools checkout "$GPERFTOOLS_TAG" \ + && (cd /usr/src/gperftools; \ + patch -p1 < /gperftools_alpine.diff; \ + rm /gperftools_alpine.diff; \ + ./autogen.sh; \ + ./configure; \ + make; \ + cp .libs/libprofiler.so* /usr/local/lib;) \ + && (GOPATH=/usr/src/go go get github.com/google/pprof; \ + cp /usr/src/go/bin/pprof /usr/local/bin) \ + && : "---------- tarantool ----------" \ + && mkdir -p /usr/src/tarantool \ + && git clone "$TARANTOOL_DOWNLOAD_URL" /usr/src/tarantool \ + && git -C /usr/src/tarantool checkout "$TARANTOOL_VERSION" \ + && git -C /usr/src/tarantool submodule update --init --recursive \ + && (cd /usr/src/tarantool; \ + cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo\ + -DENABLE_BUNDLED_LIBYAML:BOOL=OFF\ + -DENABLE_BACKTRACE:BOOL=ON\ + -DENABLE_DIST:BOOL=ON\ + .) \ + && make -C /usr/src/tarantool -j\ + && make -C /usr/src/tarantool install \ + && make -C /usr/src/tarantool clean \ + && : "---------- small ----------" \ + && (cd /usr/src/tarantool/src/lib/small; \ + cmake -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + .) \ + && make -C /usr/src/tarantool/src/lib/small \ + && make -C /usr/src/tarantool/src/lib/small install \ + && make -C /usr/src/tarantool/src/lib/small clean \ + && : "---------- msgpuck ----------" \ + && (cd /usr/src/tarantool/src/lib/msgpuck; \ + cmake -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + .) \ + && make -C /usr/src/tarantool/src/lib/msgpuck \ + && make -C /usr/src/tarantool/src/lib/msgpuck install \ + && make -C /usr/src/tarantool/src/lib/msgpuck clean \ + && : "---------- luarocks ----------" \ + && wget -O luarocks.tar.gz "$LUAROCKS_URL" \ + && mkdir -p /usr/src/luarocks \ + && tar -xzf luarocks.tar.gz -C /usr/src/luarocks --strip-components=1 \ + && (cd /usr/src/luarocks; \ + ./configure; \ + make build; \ + make install) \ + && rm -r /usr/src/luarocks \ + && rm -rf /usr/src/tarantool \ + && rm -rf /usr/src/gperftools \ + && rm -rf /usr/src/go \ + && : "---------- remove build deps ----------" \ + && apk del .build-deps + +COPY luarocks-config.lua /usr/local/etc/luarocks/config-5.1.lua + +RUN set -x \ + && apk add --no-cache --virtual .run-deps \ + mariadb-client-libs \ + libpq \ + cyrus-sasl \ + mosquitto-libs \ + libev \ + && apk add --no-cache --virtual .build-deps \ + git \ + cmake \ + make \ + coreutils \ + gcc \ + g++ \ + postgresql-dev \ + lua-dev \ + musl-dev \ + cyrus-sasl-dev \ + mosquitto-dev \ + libev-dev \ + libressl-dev \ + && mkdir -p /rocks \ + && : "---------- proj (for gis module) ----------" \ + && wget -O proj.tar.gz http://download.osgeo.org/proj/proj-4.9.3.tar.gz \ + && mkdir -p /usr/src/proj \ + && tar -xzf proj.tar.gz -C /usr/src/proj --strip-components=1 \ + && (cd /usr/src/proj; \ + ./configure; \ + make; \ + make install) \ + && rm -r /usr/src/proj \ + && rm -rf /usr/src/proj \ + && : "---------- geos (for gis module) ----------" \ + && wget -O geos.tar.bz2 http://download.osgeo.org/geos/geos-3.6.0.tar.bz2 \ + && mkdir -p /usr/src/geos \ + && tar -xjf geos.tar.bz2 -C /usr/src/geos --strip-components=1 \ + && (cd /usr/src/geos; \ + ./configure; \ + make; \ + make install) \ + && rm -r /usr/src/geos \ + && rm -rf /usr/src/geos \ + && : "---------- luarocks ----------" \ + && luarocks install lua-term \ + && luarocks install ldoc \ + && : "avro" \ + && luarocks install avro-schema $LUAROCK_AVRO_SCHEMA_VERSION \ + && : "expirationd" \ + && luarocks install expirationd $LUAROCK_EXPERATIOND_VERSION \ + && : "queue" \ + && luarocks install queue $LUAROCK_QUEUE_VERSION \ + && : "connpool" \ + && luarocks install connpool $LUAROCK_CONNPOOL_VERSION \ + && : "shard" \ + && git clone $LUAROCK_SHARD_REPO /rocks/shard \ + && git -C /rocks/shard checkout $LUAROCK_SHARD_TAG \ + && (cd /rocks/shard && luarocks make *rockspec) \ + && : "http" \ + && luarocks install http $LUAROCK_HTTP_VERSION \ + && : "pg" \ + && luarocks install pg $LUAROCK_TARANTOOL_PG_VERSION \ + && : "mysql" \ + && luarocks install mysql $LUAROCK_TARANTOOL_MYSQL_VERSION \ + && : "memcached" \ + && luarocks install memcached $LUAROCK_MEMCACHED_VERSION \ + && : "prometheus" \ + && luarocks install prometheus $LUAROCK_TARANTOOL_PROMETHEUS_VERSION \ + && : "curl" \ + && luarocks install tarantool-curl $LUAROCK_TARANTOOL_CURL_VERSION \ + && : "mqtt" \ + && luarocks install mqtt $LUAROCK_TARANTOOL_MQTT_VERSION \ + && : "gis" \ + && luarocks install gis $LUAROCK_TARANTOOL_GIS_VERSION \ + && : "gperftools" \ + && luarocks install gperftools $LUAROCK_TARANTOOL_GPERFTOOLS_VERSION \ + && : "---------- remove build deps ----------" \ + && apk del .build-deps \ + && rm -rf /rocks + +RUN mkdir -p /var/lib/tarantool \ + && chown tarantool:tarantool /var/lib/tarantool \ + && mkdir -p /opt/tarantool \ + && chown tarantool:tarantool /opt/tarantool \ + && mkdir -p /var/run/tarantool \ + && chown tarantool:tarantool /var/run/tarantool \ + && mkdir /etc/tarantool \ + && chown tarantool:tarantool /etc/tarantool + +VOLUME /var/lib/tarantool +WORKDIR /opt/tarantool + +COPY tarantool-entrypoint.lua /usr/local/bin/ +COPY tarantool_set_config.lua /usr/local/bin/ +COPY docker-entrypoint.sh /usr/local/bin/ +COPY console /usr/local/bin/ +COPY tarantool_is_up /usr/local/bin/ +COPY tarantool.default /usr/local/etc/default/tarantool + +RUN ln -s usr/local/bin/docker-entrypoint.sh /entrypoint.sh # backwards compat +ENTRYPOINT ["docker-entrypoint.sh"] + +HEALTHCHECK CMD tarantool_is_up + +EXPOSE 3301 +CMD [ "tarantool" ] diff --git a/2.2/console b/2.2/console new file mode 100755 index 0000000..d6fb192 --- /dev/null +++ b/2.2/console @@ -0,0 +1,15 @@ +#!/usr/bin/env tarantool + +local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' + +console = require('console') +console.on_start(function(self) + local status, reason + status, reason = pcall(function() require('console').connect(CONSOLE_SOCKET_PATH) end) + if not status then + self:print(reason) + self.running = false + end +end) +console.on_client_disconnect(function(self) self.running = false end) +console.start() diff --git a/2.2/docker-entrypoint.sh b/2.2/docker-entrypoint.sh new file mode 100755 index 0000000..3a9f5e4 --- /dev/null +++ b/2.2/docker-entrypoint.sh @@ -0,0 +1,22 @@ +#!/bin/sh +set -e + +# first arg is `-f` or `--some-option` +# or first arg is `something.conf` +if [ "${1:0:1}" = '-' ]; then + set -- tarantool "$@" +fi + +# allow the container to be started with `--user` +if [ "$1" = 'tarantool' -a "$(id -u)" = '0' ]; then + chown -R tarantool /var/lib/tarantool + exec su-exec tarantool "$0" "$@" +fi + +# entry point wraps the passed script to do basic setup +if [ "$1" = 'tarantool' ]; then + shift + exec tarantool "/usr/local/bin/tarantool-entrypoint.lua" "$@" +fi + +exec "$@" diff --git a/2.2/gperftools_alpine.diff b/2.2/gperftools_alpine.diff new file mode 100644 index 0000000..e768381 --- /dev/null +++ b/2.2/gperftools_alpine.diff @@ -0,0 +1,110 @@ +diff --git a/src/base/linux_syscall_support.h b/src/base/linux_syscall_support.h +index 5d578cd..fceebe2 100644 +--- a/src/base/linux_syscall_support.h ++++ b/src/base/linux_syscall_support.h +@@ -2432,9 +2432,9 @@ struct kernel_stat { + #if defined(__s390x__) + LSS_INLINE _syscall1(void*, mmap, void*, a) + #else +- /* Need to make sure __off64_t isn't truncated to 32-bits under x32. */ ++ /* Need to make sure off64_t isn't truncated to 32-bits under x32. */ + LSS_INLINE void* LSS_NAME(mmap)(void *s, size_t l, int p, int f, int d, +- __off64_t o) { ++ off64_t o) { + LSS_BODY(6, void*, mmap, LSS_SYSCALL_ARG(s), LSS_SYSCALL_ARG(l), + LSS_SYSCALL_ARG(p), LSS_SYSCALL_ARG(f), + LSS_SYSCALL_ARG(d), (uint64_t)(o)); +@@ -2475,7 +2475,7 @@ struct kernel_stat { + LSS_INLINE _syscall6(void*, mmap, void*, s, + size_t, l, int, p, + int, f, int, d, +- __off64_t, o) ++ off64_t, o) + LSS_INLINE int LSS_NAME(sigaction)(int signum, + const struct kernel_sigaction *act, + struct kernel_sigaction *oldact) { +diff --git a/src/malloc_hook_mmap_linux.h b/src/malloc_hook_mmap_linux.h +index 1c4c766..b2aa8ed 100755 +--- a/src/malloc_hook_mmap_linux.h ++++ b/src/malloc_hook_mmap_linux.h +@@ -56,7 +56,7 @@ + + static inline void* do_mmap64(void *start, size_t length, + int prot, int flags, +- int fd, __off64_t offset) __THROW { ++ int fd, off64_t offset) __THROW { + return sys_mmap(start, length, prot, flags, fd, offset); + } + +@@ -67,7 +67,7 @@ static inline void* do_mmap64(void *start, size_t length, + + static inline void* do_mmap64(void *start, size_t length, + int prot, int flags, +- int fd, __off64_t offset) __THROW { ++ int fd, off64_t offset) __THROW { + void *result; + + // Try mmap2() unless it's not supported +@@ -151,9 +151,11 @@ static inline void* do_mmap64(void *start, size_t length, + # undef mmap + + extern "C" { ++ #ifndef mmap64 + void* mmap64(void *start, size_t length, int prot, int flags, +- int fd, __off64_t offset ) __THROW ++ int fd, off64_t offset ) __THROW + ATTRIBUTE_SECTION(malloc_hook); ++ #endif + void* mmap(void *start, size_t length,int prot, int flags, + int fd, off_t offset) __THROW + ATTRIBUTE_SECTION(malloc_hook); +@@ -166,8 +168,9 @@ extern "C" { + ATTRIBUTE_SECTION(malloc_hook); + } + ++#ifndef mmap64 + extern "C" void* mmap64(void *start, size_t length, int prot, int flags, +- int fd, __off64_t offset) __THROW { ++ int fd, off64_t offset) __THROW { + MallocHook::InvokePreMmapHook(start, length, prot, flags, fd, offset); + void *result; + if (!MallocHook::InvokeMmapReplacement( +@@ -177,6 +180,7 @@ extern "C" void* mmap64(void *start, size_t length, int prot, int flags, + MallocHook::InvokeMmapHook(result, start, length, prot, flags, fd, offset); + return result; + } ++#endif + + # if !defined(__USE_FILE_OFFSET64) || !defined(__REDIRECT_NTH) + +@@ -216,7 +220,7 @@ extern "C" void* mremap(void* old_addr, size_t old_size, size_t new_size, + return result; + } + +-#ifndef __UCLIBC__ ++#if defined(__GLIBC__) && ! defined(__UCLIBC__) + // libc's version: + extern "C" void* __sbrk(ptrdiff_t increment); + +diff --git a/src/tests/stacktrace_unittest.cc b/src/tests/stacktrace_unittest.cc +index 3c9f735..2d39ad9 100644 +--- a/src/tests/stacktrace_unittest.cc ++++ b/src/tests/stacktrace_unittest.cc +@@ -120,17 +120,6 @@ void ATTRIBUTE_NOINLINE CheckStackTraceLeaf(void) { + CHECK_GE(size, 1); + CHECK_LE(size, STACK_LEN); + +-#ifdef HAVE_EXECINFO_H +- { +- char **strings = backtrace_symbols(stack, size); +- printf("Obtained %d stack frames.\n", size); +- for (int i = 0; i < size; i++) +- printf("%s %p\n", strings[i], stack[i]); +- printf("CheckStackTrace() addr: %p\n", &CheckStackTrace); +- free(strings); +- } +-#endif +- + for (int i = 0; i < BACKTRACE_STEPS; i++) { + printf("Backtrace %d: expected: %p..%p actual: %p ... ", + i, expected_range[i].start, expected_range[i].end, stack[i]); diff --git a/2.2/luarocks-config.lua b/2.2/luarocks-config.lua new file mode 100644 index 0000000..111f955 --- /dev/null +++ b/2.2/luarocks-config.lua @@ -0,0 +1,9 @@ +rocks_trees = { + { name = [[user]], root = home..[[/.luarocks]] }, + { name = [[system]], root = [[/usr/local]] } +} + +rocks_servers = { + [[http://rocks.tarantool.org/]], + [[http://luarocks.org/repositories/rocks]] +} diff --git a/2.2/tarantool-entrypoint.lua b/2.2/tarantool-entrypoint.lua new file mode 100755 index 0000000..ffbf2fc --- /dev/null +++ b/2.2/tarantool-entrypoint.lua @@ -0,0 +1,292 @@ +#!/usr/bin/env tarantool + +local fio = require('fio') +local errno = require('errno') +local fun = require('fun') +local urilib = require('uri') +local console = require('console') +local term = require('term') +local log = require('log') +local yaml = require('yaml') + +local TARANTOOL_DEFAULT_PORT = 3301 +local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' +local CFG_FILE_PATH = '/etc/tarantool/config.yml' + + +local orig_cfg = box.cfg + +local function read_config() + local f = io.open(CFG_FILE_PATH, "rb") + if f == nil then + log.error("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) + os.exit(1) + end + local content = f:read("*all") + f:close() + return yaml.decode(content) +end + +local function write_config(cfg) + local f = io.open(CFG_FILE_PATH, "w+") + if f == nil then + print("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) + os.exit(1) + end + local content = yaml.encode(cfg) + f:write(content) + f:close() +end + +local function parse_replication_source(replication_source, user_name, user_password) + if replication_source == nil then + return nil + end + + local replication_source_table = {} + for uri in string.gmatch(replication_source, "[^,]+") do + local parsed_uri = urilib.parse(uri) + if parsed_uri == nil then + error("Incorrect replication source URI format: '"..uri.."'") + end + local host = parsed_uri.host + local port = parsed_uri.service or TARANTOOL_DEFAULT_PORT + local user = parsed_uri.login or user_name + local password = parsed_uri.password or user_password + + if user == 'guest' or user == nil then + replication_source = string.format("%s:%s", host, port) + elseif password == nil then + replication_source = string.format("%s:@%s:%s", user, host, port) + else + replication_source = string.format("%s:%s@%s:%s", user, password, + host, port) + end + + table.insert(replication_source_table, replication_source) + end + + return replication_source_table +end + +local function choose_option(main, substitute, cfg) + if cfg[main] then + return main + end + if cfg[substitute] then + return substitute + end + return main +end + +function set_replication_source(replication_source, user_name, user_password) + local replication_source_table = parse_replication_source( + replication_source, user_name, user_password + ) + local choice = choose_option('replication', 'replication_source', box.cfg) + box.cfg{[choice] = replication_source_table} + log.info("Updated box.cfg.%s to %s", choice, replication_source) +end + +local function create_user(user_name, user_password) + if user_name ~= 'guest' and user_password == nil then + user_password = "" + + local warn_str = [[**************************************************** +WARNING: No password has been set for the database. + This will allow anyone with access to the + Tarantool port to access your database. In + Docker's default configuration, this is + effectively any other container on the same + system. + Use "-e TARANTOOL_USER_PASSWORD=password" + to set it in "docker run". +****************************************************]] + log.warn('\n'..warn_str) + end + + if user_name == 'guest' and user_password == nil then + local warn_str = [[**************************************************** +WARNING: 'guest' is chosen as primary user. + Since it is not allowed to set a password for + guest user, your instance will be accessible + by anyone having direct access to the Tarantool + port. + If you wanted to create an authenticated user, + specify "-e TARANTOOL_USER_NAME=username" and + pick a user name other than "guest". +****************************************************]] + log.warn('\n'..warn_str) + end + + if user_name == 'guest' and user_password ~= nil then + user_password = nil + + local warn_str = [[**************************************************** +WARNING: A password for guest user has been specified. + In Tarantool, guest user can't have a password + and is always allowed to login, if it has + enough privileges. + If you wanted to create an authenticated user, + specify "-e TARANTOOL_USER_NAME=username" and + pick a user name other than "guest". +****************************************************]] + log.warn('\n'..warn_str) + end + + if user_name ~= 'admin' and user_name ~= 'guest' then + if not box.schema.user.exists(user_name) then + log.info("Creating user '%s'", user_name) + box.schema.user.create(user_name) + end + end + + if user_name ~= 'admin' then + log.info("Granting admin privileges to user '%s'", user_name) + box.schema.user.grant(user_name, 'read,write,execute,create,drop', + 'universe', nil, {if_not_exists = true}) + box.schema.user.grant(user_name, 'replication', + nil, nil, {if_not_exists = true}) + end + + if user_name ~= 'guest' then + log.info("Setting password for user '%s'", user_name) + box.schema.user.passwd(user_name, user_password) + end +end + +function set_credentials(user_name, user_password) + create_user(user_name, user_password) +end + +local function wrapper_cfg(override) + local work_dir = '/var/lib/tarantool' + local snap_filename = "*.snap" + local snap_path = work_dir..'/'..snap_filename + + local first_run = false + if next(fio.glob(snap_path)) == nil then + first_run = true + end + + + local file_cfg = {} + local config_file_exists = fio.stat(CFG_FILE_PATH) ~= nil + if not config_file_exists then + log.info("Creating configuration file: " .. CFG_FILE_PATH) + + file_cfg.TARANTOOL_USER_NAME = os.getenv('TARANTOOL_USER_NAME') + file_cfg.TARANTOOL_USER_PASSWORD = os.getenv('TARANTOOL_USER_PASSWORD') + file_cfg.TARANTOOL_SLAB_ALLOC_ARENA = os.getenv('TARANTOOL_SLAB_ALLOC_ARENA') + file_cfg.TARANTOOL_SLAB_ALLOC_FACTOR = os.getenv('TARANTOOL_SLAB_ALLOC_FACTOR') + file_cfg.TARANTOOL_SLAB_ALLOC_MINIMAL = os.getenv('TARANTOOL_SLAB_ALLOC_MINIMAL') + file_cfg.TARANTOOL_SLAB_ALLOC_MAXIMAL = os.getenv('TARANTOOL_SLAB_ALLOC_MAXIMAL') + file_cfg.TARANTOOL_PORT = os.getenv('TARANTOOL_PORT') + file_cfg.TARANTOOL_WAL_MODE = os.getenv('TARANTOOL_WAL_MODE') + file_cfg.TARANTOOL_REPLICATION_SOURCE = os.getenv('TARANTOOL_REPLICATION_SOURCE') + file_cfg.TARANTOOL_REPLICATION = os.getenv('TARANTOOL_REPLICATION') + file_cfg.TARANTOOL_SNAPSHOT_PERIOD = os.getenv('TARANTOOL_SNAPSHOT_PERIOD') + file_cfg.TARANTOOL_MEMTX_MEMORY = os.getenv('TARANTOOL_MEMTX_MEMORY') + file_cfg.TARANTOOL_CHECKPOINT_INTERVAL = os.getenv('TARANTOOL_CHECKPOINT_INTERVAL') + file_cfg.TARANTOOL_MEMTX_MIN_TUPLE_SIZE = os.getenv('TARANTOOL_MEMTX_MIN_TUPLE_SIZE') + file_cfg.TARANTOOL_MEMTX_MAX_TUPLE_SIZE = os.getenv('TARANTOOL_MEMTX_MAX_TUPLE_SIZE') + + write_config(file_cfg) + else + log.info("Loading existing configuration file: " .. CFG_FILE_PATH) + + file_cfg = read_config() + end + + local user_name = file_cfg.TARANTOOL_USER_NAME or + os.getenv('TARANTOOL_USER_NAME') or 'guest' + local user_password = file_cfg.TARANTOOL_USER_PASSWORD or + os.getenv('TARANTOOL_USER_PASSWORD') + + + local cfg = override or {} + -- Placeholders for deprecated options + cfg.slab_alloc_arena = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_ARENA) or + override.slab_alloc_arena + cfg.slab_alloc_maximal = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_MAXIMAL) or + override.slab_alloc_maximal + cfg.slab_alloc_minimal = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_MINIMAL) or + override.slab_alloc_minimal + cfg.snapshot_period = tonumber(file_cfg.TARANTOOL_SNAPSHOT_PERIOD) or + override.snapshot_period + -- Replacements for deprecated options + cfg.memtx_memory = tonumber(file_cfg.TARANTOOL_MEMTX_MEMORY) or + override.memtx_memory + cfg.memtx_min_tuple_size = tonumber(file_cfg.TARANTOOL_MEMTX_MIN_TUPLE_SIZE) or + override.memtx_min_tuple_size + cfg.memtx_max_tuple_size = tonumber(file_cfg.TARANTOOL_MEMTX_MAX_TUPLE_SIZE) or + override.memtx_max_tuple_size + cfg.checkpoint_interval = tonumber(file_cfg.TARANTOOL_CHECKPOINT_INTERVAL) or + override.checkpoint_interval + -- Deprecated options with default values + local choice = choose_option('memtx_dir', 'snap_dir', override) + cfg[choice] = override[choice] or '/var/lib/tarantool' + + -- Remaining configuration + cfg.slab_alloc_factor = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_FACTOR) or + override.slab_alloc_factor + cfg.listen = tonumber(file_cfg.TARANTOOL_PORT) or + override.listen or TARANTOOL_DEFAULT_PORT + cfg.wal_mode = file_cfg.TARANTOOL_WAL_MODE or + override.wal_mode + + cfg.wal_dir = override.wal_dir or '/var/lib/tarantool' + cfg.vinyl_dir = override.vinyl_dir or '/var/lib/tarantool' + cfg.pid_file = override.pid_file or '/var/run/tarantool/tarantool.pid' + + local choice = choose_option('TARANTOOL_REPLICATION', 'TARANTOOL_REPLICATION_SOURCE', file_cfg) + local replication_source_table = parse_replication_source(file_cfg[choice], + user_name, + user_password) + + if replication_source_table then + cfg.replication = replication_source_table + else + local choice = choose_option('replication', 'replication_source', override) + cfg[choice] = override[choice] + end + + log.info("Config:\n" .. yaml.encode(cfg)) + + orig_cfg(cfg) + + box.once('tarantool-entrypoint', function () + if first_run then + log.info("Initializing database") + + create_user(user_name, user_password) + end + end) + + console.listen(CONSOLE_SOCKET_PATH) + +end + +box.cfg = wrapper_cfg + +-- re-run the script passed as parameter with all arguments that follow +execute_script = arg[1] +if execute_script == nil then + box.cfg {} + + if term.isatty(io.stdout) then + console.start() + os.exit(0) + end +else + narg = 0 + while true do + arg[narg] = arg[narg + 1] + if arg[narg] == nil then + break + end + narg = narg + 1 + end + + dofile(execute_script) +end diff --git a/2.2/tarantool.default b/2.2/tarantool.default new file mode 100644 index 0000000..fffe3b0 --- /dev/null +++ b/2.2/tarantool.default @@ -0,0 +1,22 @@ +-- +-- System-wide settings for tarantoolctl and init scripts +-- +-- This file is meant to enable the usage of tarantoolctl inside +-- docker containers. Since there is no init system, most of its +-- functionality will not work, except 'tarantoolctl enter' or +-- 'tarantoolctl status'. +-- + +default_cfg = { + pid_file = "/var/run/tarantool", -- /var/run/tarantool/${INSTANCE}.pid + wal_dir = "/var/lib/tarantool", -- /var/lib/tarantool/${INSTANCE}/ + snap_dir = "/var/lib/tarantool", -- /var/lib/tarantool/${INSTANCE} + vinyl_dir = "/var/lib/tarantool", -- /var/lib/tarantool/${INSTANCE} + logger = "/var/log/tarantool", -- /var/log/tarantool/${INSTANCE}.log + username = "tarantool", +} + +-- instances.available - all available instances +-- instances.enabled - instances to autostart by sysvinit +instance_dir = "/usr/local/etc/tarantool/instances.enabled" +-- vim: set ft=lua : diff --git a/2.2/tarantool_is_up b/2.2/tarantool_is_up new file mode 100755 index 0000000..71148d5 --- /dev/null +++ b/2.2/tarantool_is_up @@ -0,0 +1,41 @@ +#!/bin/sh + +status=$( (tarantool <<-'EOF' +local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' +local console = require('console') +local os = require("os") +local yaml = require("yaml") + +console.on_start(function(self) + local status, reason + status, reason = pcall(function() require('console').connect(CONSOLE_SOCKET_PATH) end) + if not status then + self:print(reason) + os.exit(1) + end + + cmd = 'box.info.status' + local res = self:eval(cmd) + if res ~= nil then + res = yaml.decode(res) + print(res[1]) + end + + os.exit(0) +end) + +console.on_client_disconnect(function(self) self.running = false end) +console.start() + +os.exit(0) +EOF +) 2>/dev/null) + + +echo "$status" + +if [ "$status" = "running" ]; then + exit 0 +else + exit 1 +fi diff --git a/2.2/tarantool_set_config.lua b/2.2/tarantool_set_config.lua new file mode 100755 index 0000000..ddca36c --- /dev/null +++ b/2.2/tarantool_set_config.lua @@ -0,0 +1,130 @@ +#!/usr/bin/env tarantool + +local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' +local CFG_FILE_PATH = '/etc/tarantool/config.yml' + +local fio = require('fio') +local yaml = require('yaml') +local console = require('console') +local errno = require('errno') + +local function read_config() + local f = io.open(CFG_FILE_PATH, "rb") + if f == nil then + print("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) + os.exit(1) + end + local content = f:read("*all") + f:close() + return yaml.decode(content) +end + +local function write_config(cfg) + local f = io.open(CFG_FILE_PATH, "w+") + if f == nil then + print("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) + os.exit(1) + end + local content = yaml.encode(cfg) + f:write(content) + f:close() +end + +local function nop(console, cfg, value) +end + +local function update_replication_source(console, cfg, value) + local user_name = "nil" + if cfg['TARANTOOL_USER_NAME'] then + user_name = "'" .. cfg['TARANTOOL_USER_NAME'] .. "'" + end + + local user_password = "nil" + if cfg['TARANTOOL_USER_PASSWORD'] then + user_password = "'" .. cfg['TARANTOOL_USER_PASSWORD'] .. "'" + end + + local cmd = "set_replication_source('"..value.."', " .. user_name .. "," .. user_password .. ")" + print("cmd: ", cmd) + + local res = console:eval(cmd) + + if res ~= nil then + print(res) + end +end + +local function update_credentials(console, cfg, value) + local user_name = "nil" + if cfg['TARANTOOL_USER_NAME'] then + user_name = "'" .. cfg['TARANTOOL_USER_NAME'] .. "'" + end + + local user_password = "nil" + if cfg['TARANTOOL_USER_PASSWORD'] then + user_password = "'" .. cfg['TARANTOOL_USER_PASSWORD'] .. "'" + end + + local cmd = "set_credentials(" .. user_name .. "," .. user_password .. ")" + + local res = console:eval(cmd) + + if res ~= nil then + print(res) + end + + local replication_source = cfg['TARANTOOL_REPLICATION_SOURCE'] + + if replication_source ~= nil then + update_replication_source(console, cfg, replication_source) + end +end + + +local vars = { + TARANTOOL_SLAB_ALLOC_ARENA=nop, + TARANTOOL_SLAB_ALLOC_FACTOR=nop, + TARANTOOL_SLAB_ALLOC_MAXIMAL=nop, + TARANTOOL_SLAB_ALLOC_MINIMAL=nop, + TARANTOOL_PORT=nop, + TARANTOOL_WAL_MODE=nop, + TARANTOOL_USER_NAME=update_credentials, + TARANTOOL_USER_PASSWORD=update_credentials, + TARANTOOL_REPLICATION_SOURCE=update_replication_source, + TARANTOOL_REPLICATION=update_replication_source, +} + +console.on_start(function(self) + local status, reason + status, reason = pcall(function() require('console').connect(CONSOLE_SOCKET_PATH) end) + if not status then + self:print(reason) + os.exit(1) + end + + if arg[1] == nil or arg[2] == nil then + self:print("Usage: " .. arg[0] .. " ") + os.exit(1) + end + + if vars[arg[1]] == nil then + self:print("Unknown var: " .. arg[1]) + os.exit(1) + end + + local cfg = read_config() + cfg[arg[1]] = arg[2] + + local func = vars[arg[1]] + func(self, cfg, arg[2]) + + write_config(cfg) + + self.running = false + os.exit(0) +end) + +console.on_client_disconnect(function(self) self.running = false end) +console.start() + +os.exit(0) diff --git a/2.x-centos7/Dockerfile b/2.x-centos7/Dockerfile index f83424e..9d1dbd4 100644 --- a/2.x-centos7/Dockerfile +++ b/2.x-centos7/Dockerfile @@ -4,7 +4,7 @@ MAINTAINER mail@racktear.com RUN groupadd tarantool \ && adduser -g tarantool tarantool -ENV TARANTOOL_VERSION=2.1.2-119-gc118d5142 \ +ENV TARANTOOL_VERSION=2.2.1-3-g878e2a42c \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ CURL_REPO=https://github.com/curl/curl.git \ diff --git a/2.x/Dockerfile b/2.x/Dockerfile index 718252b..b952467 100644 --- a/2.x/Dockerfile +++ b/2.x/Dockerfile @@ -5,7 +5,7 @@ RUN addgroup -S tarantool \ && adduser -S -G tarantool tarantool \ && apk add --no-cache 'su-exec>=0.2' -ENV TARANTOOL_VERSION=2.2.0-482-g8c84932ad \ +ENV TARANTOOL_VERSION=2.3.0-1-g35ef33200 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ CURL_REPO=https://github.com/curl/curl.git \ diff --git a/README.md b/README.md index 5063f2d..fc3872b 100644 --- a/README.md +++ b/README.md @@ -325,6 +325,7 @@ Fixed versions: | 2.1.1 | 2.x/Dockerfile | 2.1.1 | | 2.1.2 | 2.x/Dockerfile | 2.1.2 | | 2.2.0 | 2.x/Dockerfile | 2.2.0 | +| 2.2.1 | 2.x/Dockerfile | 2.2.1 | Rolling versions: @@ -337,6 +338,7 @@ Rolling versions: | master | 1.x/Dockerfile | 1 | | master | 1.x/Dockerfile | latest | | master | 2.1/Dockerfile | 2.1 | +| master | 2.2/Dockerfile | 2.2 | | master | 2.x/Dockerfile | 2 | Special builds: From a794c03ba740617a570cbbfb2c865d21043dfec0 Mon Sep 17 00:00:00 2001 From: Oleg Babin Date: Fri, 30 Aug 2019 15:57:51 +0300 Subject: [PATCH 162/286] Bump tarantool *.x versions --- 1.x-centos7/Dockerfile | 19 ++++++------------- 1.x/Dockerfile | 17 +++++------------ 2.x-centos7/Dockerfile | 20 ++++++-------------- 2.x/Dockerfile | 17 +++++------------ 4 files changed, 22 insertions(+), 51 deletions(-) diff --git a/1.x-centos7/Dockerfile b/1.x-centos7/Dockerfile index 7cd140f..3df3ca2 100644 --- a/1.x-centos7/Dockerfile +++ b/1.x-centos7/Dockerfile @@ -4,11 +4,9 @@ MAINTAINER mail@racktear.com RUN groupadd tarantool \ && adduser -g tarantool tarantool -ENV TARANTOOL_VERSION=1.10.3-107-g17db27170 \ +ENV TARANTOOL_VERSION=1.10.3-136-gc3c087d5c \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ - CURL_REPO=https://github.com/curl/curl.git \ - CURL_TAG=curl-7_65_1 \ LUAROCKS_URL=https://github.com/tarantool/luarocks/archive/6e6fe62d9409fe2103c0fd091cccb3da0451faf5.tar.gz \ LUAROCK_SHARD_REPO=https://github.com/tarantool/shard.git \ LUAROCK_SHARD_TAG=8f8c5a7 \ @@ -43,16 +41,19 @@ RUN set -x \ lua \ tar \ zip \ + zlib \ unzip \ libunwind \ ca-certificates \ && yum -y install \ perl \ + file \ gcc-c++ \ cmake \ readline-devel \ openssl-devel \ libyaml-devel \ + zlib-devel \ lz4-devel \ binutils-devel \ ncurses-devel \ @@ -77,16 +78,6 @@ RUN set -x \ make install; \ echo '/usr/local/lib' > /etc/ld.so.conf.d/local.conf; \ ldconfig ) \ - && : "---------- curl ----------" \ - && mkdir -p /usr/src/curl \ - && git clone "$CURL_REPO" /usr/src/curl \ - && (cd /usr/src/curl; \ - git checkout "$CURL_TAG"; \ - ./buildconf; \ - ./configure --with-ssl --prefix "/usr/local"; \ - make -j; \ - make install; \ - ldconfig ) \ && : "---------- gperftools ----------" \ && yum install -y gperftools-libs \ && (GOPATH=/usr/src/go go get github.com/google/pprof; \ @@ -144,6 +135,7 @@ RUN set -x \ readline-devel \ openssl-devel \ libyaml-devel \ + zlib-devel \ lz4-devel \ binutils-devel \ ncurses-devel \ @@ -157,6 +149,7 @@ RUN set -x \ go \ wget \ perl \ + file \ kernel-headers \ golang-src \ && rpm -qa | grep devel | xargs yum -y remove \ diff --git a/1.x/Dockerfile b/1.x/Dockerfile index e0b5faa..d4a6495 100644 --- a/1.x/Dockerfile +++ b/1.x/Dockerfile @@ -5,11 +5,9 @@ RUN addgroup -S tarantool \ && adduser -S -G tarantool tarantool \ && apk add --no-cache 'su-exec>=0.2' -ENV TARANTOOL_VERSION=1.10.3-107-g17db27170 \ +ENV TARANTOOL_VERSION=1.10.3-136-gc3c087d5c \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ - CURL_REPO=https://github.com/curl/curl.git \ - CURL_TAG=curl-7_59_0 \ GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ GPERFTOOLS_TAG=gperftools-2.5 \ LUAROCKS_URL=https://github.com/tarantool/luarocks/archive/6e6fe62d9409fe2103c0fd091cccb3da0451faf5.tar.gz \ @@ -44,6 +42,7 @@ RUN set -x \ lua \ tar \ zip \ + zlib \ libunwind \ icu \ ca-certificates \ @@ -52,10 +51,12 @@ RUN set -x \ gcc \ g++ \ cmake \ + file \ readline-dev \ libressl-dev \ yaml-dev \ lz4-dev \ + zlib-dev \ binutils-dev \ ncurses-dev \ lua-dev \ @@ -70,15 +71,6 @@ RUN set -x \ go \ icu-dev \ wget \ - && : "---------- curl ----------" \ - && mkdir -p /usr/src/curl \ - && git clone "$CURL_REPO" /usr/src/curl \ - && git -C /usr/src/curl checkout "$CURL_TAG" \ - && (cd /usr/src/curl \ - && ./buildconf \ - && ./configure --prefix "/usr/local" \ - && make -j \ - && make install) \ && : "---------- gperftools ----------" \ && mkdir -p /usr/src/gperftools \ && git clone "$GPERFTOOLS_REPO" /usr/src/gperftools \ @@ -161,6 +153,7 @@ RUN set -x \ cyrus-sasl-dev \ mosquitto-dev \ libev-dev \ + wget \ && mkdir -p /rocks \ && : "---------- proj (for gis module) ----------" \ && wget -O proj.tar.gz http://download.osgeo.org/proj/proj-4.9.3.tar.gz \ diff --git a/2.x-centos7/Dockerfile b/2.x-centos7/Dockerfile index 9d1dbd4..dfe9d98 100644 --- a/2.x-centos7/Dockerfile +++ b/2.x-centos7/Dockerfile @@ -4,11 +4,9 @@ MAINTAINER mail@racktear.com RUN groupadd tarantool \ && adduser -g tarantool tarantool -ENV TARANTOOL_VERSION=2.2.1-3-g878e2a42c \ +ENV TARANTOOL_VERSION=2.3.0-90-g51d8e4c35 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ - CURL_REPO=https://github.com/curl/curl.git \ - CURL_TAG=curl-7_65_1 \ LUAROCKS_URL=https://github.com/tarantool/luarocks/archive/6e6fe62d9409fe2103c0fd091cccb3da0451faf5.tar.gz \ LUAROCK_VSHARD_VERSION=0.1.9 \ LUAROCK_CHECKS_VERSION=3.0.1 \ @@ -41,16 +39,19 @@ RUN set -x \ lua \ tar \ zip \ + zlib \ unzip \ libunwind \ ca-certificates \ && yum -y install \ perl \ + file \ gcc-c++ \ cmake \ readline-devel \ openssl-devel \ libyaml-devel \ + zlib-devel \ lz4-devel \ binutils-devel \ ncurses-devel \ @@ -75,16 +76,6 @@ RUN set -x \ make install; \ echo '/usr/local/lib' > /etc/ld.so.conf.d/local.conf; \ ldconfig ) \ - && : "---------- curl ----------" \ - && mkdir -p /usr/src/curl \ - && git clone "$CURL_REPO" /usr/src/curl \ - && (cd /usr/src/curl; \ - git checkout "$CURL_TAG"; \ - ./buildconf; \ - ./configure --with-ssl --prefix "/usr/local"; \ - make -j; \ - make install; \ - ldconfig ) \ && : "---------- gperftools ----------" \ && yum install -y gperftools-libs \ && (GOPATH=/usr/src/go go get github.com/google/pprof; \ @@ -133,16 +124,17 @@ RUN set -x \ && rm -rf /usr/src/tarantool \ && rm -rf /usr/src/go \ && rm -rf /usr/src/icu \ - && rm -rf /usr/src/curl \ && : "---------- remove build deps ----------" \ && yum -y remove \ perl \ + file \ gcc-c++ \ cmake \ readline-devel \ openssl-devel \ libyaml-devel \ lz4-devel \ + zlib-devel \ binutils-devel \ ncurses-devel \ lua-devel \ diff --git a/2.x/Dockerfile b/2.x/Dockerfile index b952467..18fdcc0 100644 --- a/2.x/Dockerfile +++ b/2.x/Dockerfile @@ -5,11 +5,9 @@ RUN addgroup -S tarantool \ && adduser -S -G tarantool tarantool \ && apk add --no-cache 'su-exec>=0.2' -ENV TARANTOOL_VERSION=2.3.0-1-g35ef33200 \ +ENV TARANTOOL_VERSION=2.3.0-90-g51d8e4c35 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ - CURL_REPO=https://github.com/curl/curl.git \ - CURL_TAG=curl-7_59_0 \ GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ GPERFTOOLS_TAG=gperftools-2.5 \ LUAROCKS_URL=https://github.com/tarantool/luarocks/archive/6e6fe62d9409fe2103c0fd091cccb3da0451faf5.tar.gz \ @@ -38,6 +36,7 @@ RUN set -x \ libressl \ yaml \ lz4 \ + zlib \ binutils \ ncurses \ libgomp \ @@ -51,11 +50,13 @@ RUN set -x \ perl \ gcc \ g++ \ + file \ cmake \ readline-dev \ libressl-dev \ yaml-dev \ lz4-dev \ + zlib-dev \ binutils-dev \ ncurses-dev \ lua-dev \ @@ -71,15 +72,6 @@ RUN set -x \ tcl \ icu-dev \ wget \ - && : "---------- curl ----------" \ - && mkdir -p /usr/src/curl \ - && git clone "$CURL_REPO" /usr/src/curl \ - && git -C /usr/src/curl checkout "$CURL_TAG" \ - && (cd /usr/src/curl \ - && ./buildconf \ - && ./configure --prefix "/usr/local" \ - && make -j \ - && make install) \ && : "---------- gperftools ----------" \ && mkdir -p /usr/src/gperftools \ && git clone "$GPERFTOOLS_REPO" /usr/src/gperftools \ @@ -163,6 +155,7 @@ RUN set -x \ mosquitto-dev \ libev-dev \ libressl-dev \ + wget \ && mkdir -p /rocks \ && : "---------- proj (for gis module) ----------" \ && wget -O proj.tar.gz http://download.osgeo.org/proj/proj-4.9.3.tar.gz \ From 9713fc621aab4b49a2eb715eb0035137f2b571dd Mon Sep 17 00:00:00 2001 From: Oleg Babin Date: Sat, 31 Aug 2019 11:46:49 +0300 Subject: [PATCH 163/286] Update luarocks for 2.x images to actual versions Use in 2.x docker images version that is in tarantool/src/third_party --- 2.x-centos7/Dockerfile | 2 +- 2.x/Dockerfile | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/2.x-centos7/Dockerfile b/2.x-centos7/Dockerfile index dfe9d98..a5e10d4 100644 --- a/2.x-centos7/Dockerfile +++ b/2.x-centos7/Dockerfile @@ -7,7 +7,7 @@ RUN groupadd tarantool \ ENV TARANTOOL_VERSION=2.3.0-90-g51d8e4c35 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ - LUAROCKS_URL=https://github.com/tarantool/luarocks/archive/6e6fe62d9409fe2103c0fd091cccb3da0451faf5.tar.gz \ + LUAROCKS_URL=https://github.com/tarantool/luarocks/archive/f5bd5dfdde954861476c2304f7eafb59b1888b0c.tar.gz \ LUAROCK_VSHARD_VERSION=0.1.9 \ LUAROCK_CHECKS_VERSION=3.0.1 \ LUAROCK_AVRO_SCHEMA_VERSION=3.0.3 \ diff --git a/2.x/Dockerfile b/2.x/Dockerfile index 18fdcc0..31ffb98 100644 --- a/2.x/Dockerfile +++ b/2.x/Dockerfile @@ -10,7 +10,7 @@ ENV TARANTOOL_VERSION=2.3.0-90-g51d8e4c35 \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ GPERFTOOLS_TAG=gperftools-2.5 \ - LUAROCKS_URL=https://github.com/tarantool/luarocks/archive/6e6fe62d9409fe2103c0fd091cccb3da0451faf5.tar.gz \ + LUAROCKS_URL=https://github.com/tarantool/luarocks/archive/f5bd5dfdde954861476c2304f7eafb59b1888b0c.tar.gz \ LUAROCK_SHARD_REPO=https://github.com/tarantool/shard.git \ LUAROCK_SHARD_TAG=8f8c5a7 \ LUAROCK_AVRO_SCHEMA_VERSION=2.0.1 \ @@ -155,7 +155,9 @@ RUN set -x \ mosquitto-dev \ libev-dev \ libressl-dev \ + curl-dev \ wget \ + unzip \ && mkdir -p /rocks \ && : "---------- proj (for gis module) ----------" \ && wget -O proj.tar.gz http://download.osgeo.org/proj/proj-4.9.3.tar.gz \ From 40d7c7bb63d91dc892733bac18b2a54550d4f21a Mon Sep 17 00:00:00 2001 From: Eugene Leonovich Date: Sun, 22 Sep 2019 12:18:18 +0200 Subject: [PATCH 164/286] Bump 2.x image * Bump 2.x version (alpine and centos) --- 2.x-centos7/Dockerfile | 2 +- 2.x/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/2.x-centos7/Dockerfile b/2.x-centos7/Dockerfile index a5e10d4..1e4cf55 100644 --- a/2.x-centos7/Dockerfile +++ b/2.x-centos7/Dockerfile @@ -4,7 +4,7 @@ MAINTAINER mail@racktear.com RUN groupadd tarantool \ && adduser -g tarantool tarantool -ENV TARANTOOL_VERSION=2.3.0-90-g51d8e4c35 \ +ENV TARANTOOL_VERSION=2.3.0-117-g4c2d1eff2 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ LUAROCKS_URL=https://github.com/tarantool/luarocks/archive/f5bd5dfdde954861476c2304f7eafb59b1888b0c.tar.gz \ diff --git a/2.x/Dockerfile b/2.x/Dockerfile index 31ffb98..b87c20e 100644 --- a/2.x/Dockerfile +++ b/2.x/Dockerfile @@ -5,7 +5,7 @@ RUN addgroup -S tarantool \ && adduser -S -G tarantool tarantool \ && apk add --no-cache 'su-exec>=0.2' -ENV TARANTOOL_VERSION=2.3.0-90-g51d8e4c35 \ +ENV TARANTOOL_VERSION=2.3.0-117-g4c2d1eff2 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ From 9aa08c57c41d6933f42e74a6bbf6d0bcc28f7aa0 Mon Sep 17 00:00:00 2001 From: Oleg Babin Date: Sun, 22 Sep 2019 18:32:40 +0300 Subject: [PATCH 165/286] Remove tarantool-curl module from *.x Dockerfiles tarantool-curl is old module, now we recommend to use on-board "http.client" module And now it causes some problems with statically bundled curl. As quick fix let's remove it. --- 1.7/Dockerfile | 3 --- 1.9/Dockerfile | 3 --- 1.x-centos7/Dockerfile | 3 --- 1.x/Dockerfile | 3 --- 2.1/Dockerfile | 3 --- 2.2/Dockerfile | 3 --- 2.x/Dockerfile | 3 --- 7 files changed, 21 deletions(-) diff --git a/1.7/Dockerfile b/1.7/Dockerfile index 30b15c1..ac8398f 100644 --- a/1.7/Dockerfile +++ b/1.7/Dockerfile @@ -23,7 +23,6 @@ ENV TARANTOOL_VERSION=1.7.6-27-g7ef5be2ee \ LUAROCK_MEMCACHED_VERSION=1.0.0 \ LUAROCK_TARANTOOL_PG_VERSION=2.0.1 \ LUAROCK_TARANTOOL_MYSQL_VERSION=2.0.1 \ - LUAROCK_TARANTOOL_CURL_VERSION=2.3.1 \ LUAROCK_TARANTOOL_MQTT_VERSION=1.2.1 \ LUAROCK_TARANTOOL_GIS_VERSION=1.0.0 \ LUAROCK_TARANTOOL_PROMETHEUS_VERSION=1.0.0 \ @@ -207,8 +206,6 @@ RUN set -x \ && luarocks install memcached $LUAROCK_MEMCACHED_VERSION \ && : "prometheus" \ && luarocks install prometheus $LUAROCK_TARANTOOL_PROMETHEUS_VERSION \ - && : "curl" \ - && luarocks install tarantool-curl $LUAROCK_TARANTOOL_CURL_VERSION \ && : "mqtt" \ && luarocks install mqtt $LUAROCK_TARANTOOL_MQTT_VERSION \ && : "gis" \ diff --git a/1.9/Dockerfile b/1.9/Dockerfile index 536a06b..35df221 100644 --- a/1.9/Dockerfile +++ b/1.9/Dockerfile @@ -23,7 +23,6 @@ ENV TARANTOOL_VERSION=1.9.2-13-gfa7c74b4d \ LUAROCK_MEMCACHED_VERSION=1.0.0 \ LUAROCK_TARANTOOL_PG_VERSION=2.0.1 \ LUAROCK_TARANTOOL_MYSQL_VERSION=2.0.1 \ - LUAROCK_TARANTOOL_CURL_VERSION=2.3.1 \ LUAROCK_TARANTOOL_MQTT_VERSION=1.2.1 \ LUAROCK_TARANTOOL_GIS_VERSION=1.0.0 \ LUAROCK_TARANTOOL_PROMETHEUS_VERSION=1.0.0 \ @@ -207,8 +206,6 @@ RUN set -x \ && luarocks install memcached $LUAROCK_MEMCACHED_VERSION \ && : "prometheus" \ && luarocks install prometheus $LUAROCK_TARANTOOL_PROMETHEUS_VERSION \ - && : "curl" \ - && luarocks install tarantool-curl $LUAROCK_TARANTOOL_CURL_VERSION \ && : "mqtt" \ && luarocks install mqtt $LUAROCK_TARANTOOL_MQTT_VERSION \ && : "gis" \ diff --git a/1.x-centos7/Dockerfile b/1.x-centos7/Dockerfile index 3df3ca2..c387b09 100644 --- a/1.x-centos7/Dockerfile +++ b/1.x-centos7/Dockerfile @@ -19,7 +19,6 @@ ENV TARANTOOL_VERSION=1.10.3-136-gc3c087d5c \ LUAROCK_MEMCACHED_VERSION=1.0.0 \ LUAROCK_TARANTOOL_PG_VERSION=2.0.1 \ LUAROCK_TARANTOOL_MYSQL_VERSION=2.0.1 \ - LUAROCK_TARANTOOL_CURL_VERSION=2.3.1 \ LUAROCK_TARANTOOL_GIS_VERSION=1.0.0 \ LUAROCK_TARANTOOL_PROMETHEUS_VERSION=1.0.0 \ LUAROCK_TARANTOOL_GPERFTOOLS_VERSION=1.0.1 @@ -210,8 +209,6 @@ RUN set -x \ && luarocks install memcached $LUAROCK_MEMCACHED_VERSION \ && : "prometheus" \ && luarocks install prometheus $LUAROCK_TARANTOOL_PROMETHEUS_VERSION \ - && : "curl" \ - && luarocks install tarantool-curl $LUAROCK_TARANTOOL_CURL_VERSION \ && : "gis" \ && luarocks install gis $LUAROCK_TARANTOOL_GIS_VERSION \ && : "gperftools" \ diff --git a/1.x/Dockerfile b/1.x/Dockerfile index d4a6495..7a3dee9 100644 --- a/1.x/Dockerfile +++ b/1.x/Dockerfile @@ -21,7 +21,6 @@ ENV TARANTOOL_VERSION=1.10.3-136-gc3c087d5c \ LUAROCK_MEMCACHED_VERSION=1.0.0 \ LUAROCK_TARANTOOL_PG_VERSION=2.0.1 \ LUAROCK_TARANTOOL_MYSQL_VERSION=2.0.1 \ - LUAROCK_TARANTOOL_CURL_VERSION=2.3.1 \ LUAROCK_TARANTOOL_MQTT_VERSION=1.2.1 \ LUAROCK_TARANTOOL_GIS_VERSION=1.0.0 \ LUAROCK_TARANTOOL_PROMETHEUS_VERSION=1.0.0 \ @@ -200,8 +199,6 @@ RUN set -x \ && luarocks install memcached $LUAROCK_MEMCACHED_VERSION \ && : "prometheus" \ && luarocks install prometheus $LUAROCK_TARANTOOL_PROMETHEUS_VERSION \ - && : "curl" \ - && luarocks install tarantool-curl $LUAROCK_TARANTOOL_CURL_VERSION \ && : "mqtt" \ && luarocks install mqtt $LUAROCK_TARANTOOL_MQTT_VERSION \ && : "gis" \ diff --git a/2.1/Dockerfile b/2.1/Dockerfile index 3d70b7c..d52cd9f 100644 --- a/2.1/Dockerfile +++ b/2.1/Dockerfile @@ -23,7 +23,6 @@ ENV TARANTOOL_VERSION=2.1.2-143-g3edaaed6c \ LUAROCK_MEMCACHED_VERSION=1.0.0 \ LUAROCK_TARANTOOL_PG_VERSION=2.0.1 \ LUAROCK_TARANTOOL_MYSQL_VERSION=2.0.1 \ - LUAROCK_TARANTOOL_CURL_VERSION=2.3.1 \ LUAROCK_TARANTOOL_MQTT_VERSION=1.2.1 \ LUAROCK_TARANTOOL_GIS_VERSION=1.0.0 \ LUAROCK_TARANTOOL_PROMETHEUS_VERSION=1.0.0 \ @@ -209,8 +208,6 @@ RUN set -x \ && luarocks install memcached $LUAROCK_MEMCACHED_VERSION \ && : "prometheus" \ && luarocks install prometheus $LUAROCK_TARANTOOL_PROMETHEUS_VERSION \ - && : "curl" \ - && luarocks install tarantool-curl $LUAROCK_TARANTOOL_CURL_VERSION \ && : "mqtt" \ && luarocks install mqtt $LUAROCK_TARANTOOL_MQTT_VERSION \ && : "gis" \ diff --git a/2.2/Dockerfile b/2.2/Dockerfile index 63abdce..50fac86 100644 --- a/2.2/Dockerfile +++ b/2.2/Dockerfile @@ -23,7 +23,6 @@ ENV TARANTOOL_VERSION=2.2.1-3-g878e2a42c \ LUAROCK_MEMCACHED_VERSION=1.0.0 \ LUAROCK_TARANTOOL_PG_VERSION=2.0.1 \ LUAROCK_TARANTOOL_MYSQL_VERSION=2.0.1 \ - LUAROCK_TARANTOOL_CURL_VERSION=2.3.1 \ LUAROCK_TARANTOOL_MQTT_VERSION=1.2.1 \ LUAROCK_TARANTOOL_GIS_VERSION=1.0.0 \ LUAROCK_TARANTOOL_PROMETHEUS_VERSION=1.0.0 \ @@ -209,8 +208,6 @@ RUN set -x \ && luarocks install memcached $LUAROCK_MEMCACHED_VERSION \ && : "prometheus" \ && luarocks install prometheus $LUAROCK_TARANTOOL_PROMETHEUS_VERSION \ - && : "curl" \ - && luarocks install tarantool-curl $LUAROCK_TARANTOOL_CURL_VERSION \ && : "mqtt" \ && luarocks install mqtt $LUAROCK_TARANTOOL_MQTT_VERSION \ && : "gis" \ diff --git a/2.x/Dockerfile b/2.x/Dockerfile index b87c20e..668c0db 100644 --- a/2.x/Dockerfile +++ b/2.x/Dockerfile @@ -21,7 +21,6 @@ ENV TARANTOOL_VERSION=2.3.0-117-g4c2d1eff2 \ LUAROCK_MEMCACHED_VERSION=1.0.0 \ LUAROCK_TARANTOOL_PG_VERSION=2.0.1 \ LUAROCK_TARANTOOL_MYSQL_VERSION=2.0.1 \ - LUAROCK_TARANTOOL_CURL_VERSION=2.3.1 \ LUAROCK_TARANTOOL_MQTT_VERSION=1.2.1 \ LUAROCK_TARANTOOL_GIS_VERSION=1.0.0 \ LUAROCK_TARANTOOL_PROMETHEUS_VERSION=1.0.0 \ @@ -204,8 +203,6 @@ RUN set -x \ && luarocks install memcached $LUAROCK_MEMCACHED_VERSION \ && : "prometheus" \ && luarocks install prometheus $LUAROCK_TARANTOOL_PROMETHEUS_VERSION \ - && : "curl" \ - && luarocks install tarantool-curl $LUAROCK_TARANTOOL_CURL_VERSION \ && : "mqtt" \ && luarocks install mqtt $LUAROCK_TARANTOOL_MQTT_VERSION \ && : "gis" \ From 412f45391d845fda362e9ea9fbe88da29ea53c66 Mon Sep 17 00:00:00 2001 From: Oleg Babin Date: Mon, 23 Sep 2019 07:12:30 +0300 Subject: [PATCH 166/286] Downgrade tarantool version for 2.x image 117-g4c2d1eff2 has building problems As quckfix let's temporary downgrade tarantool version that does not have this problem. Originally problem was discussed in #122 --- 2.x/Dockerfile | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/2.x/Dockerfile b/2.x/Dockerfile index 668c0db..9575f0e 100644 --- a/2.x/Dockerfile +++ b/2.x/Dockerfile @@ -5,7 +5,7 @@ RUN addgroup -S tarantool \ && adduser -S -G tarantool tarantool \ && apk add --no-cache 'su-exec>=0.2' -ENV TARANTOOL_VERSION=2.3.0-117-g4c2d1eff2 \ +ENV TARANTOOL_VERSION=2.3.0-115-g5ba5ed37e \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ @@ -35,13 +35,13 @@ RUN set -x \ libressl \ yaml \ lz4 \ - zlib \ binutils \ ncurses \ libgomp \ lua \ tar \ zip \ + zlib \ libunwind \ icu \ ca-certificates \ @@ -49,8 +49,8 @@ RUN set -x \ perl \ gcc \ g++ \ - file \ cmake \ + file \ readline-dev \ libressl-dev \ yaml-dev \ @@ -68,7 +68,6 @@ RUN set -x \ libtool \ linux-headers \ go \ - tcl \ icu-dev \ wget \ && : "---------- gperftools ----------" \ @@ -153,8 +152,6 @@ RUN set -x \ cyrus-sasl-dev \ mosquitto-dev \ libev-dev \ - libressl-dev \ - curl-dev \ wget \ unzip \ && mkdir -p /rocks \ From cc132bc9a86052637ad2ddcd5daa70a8cd18fc90 Mon Sep 17 00:00:00 2001 From: Babin Oleg Date: Fri, 20 Dec 2019 08:28:41 +0300 Subject: [PATCH 167/286] update 2.x image This patch remove some parts of outdated build process. The main changes: - Remove build of msgpuck - Remove build of small - Use bundled libyaml - Replace libressl with openssl - Use tarantoolctl rocks instead of luarocks - Replace shard with vshard - Get rid of redundant build-deps --- 2.x/Dockerfile | 87 +++++++++++------------------------- 2.x/luarocks-config.lua | 9 ---- 2.x/tarantool-entrypoint.lua | 1 - 3 files changed, 27 insertions(+), 70 deletions(-) delete mode 100644 2.x/luarocks-config.lua diff --git a/2.x/Dockerfile b/2.x/Dockerfile index 9575f0e..7f6c0cf 100644 --- a/2.x/Dockerfile +++ b/2.x/Dockerfile @@ -5,14 +5,11 @@ RUN addgroup -S tarantool \ && adduser -S -G tarantool tarantool \ && apk add --no-cache 'su-exec>=0.2' -ENV TARANTOOL_VERSION=2.3.0-115-g5ba5ed37e \ +ENV TARANTOOL_VERSION=2.3.0-275-g06aeb7687 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ - TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ GPERFTOOLS_TAG=gperftools-2.5 \ - LUAROCKS_URL=https://github.com/tarantool/luarocks/archive/f5bd5dfdde954861476c2304f7eafb59b1888b0c.tar.gz \ - LUAROCK_SHARD_REPO=https://github.com/tarantool/shard.git \ - LUAROCK_SHARD_TAG=8f8c5a7 \ + LUAROCK_VSHARD_VERSION=0.1.14 \ LUAROCK_AVRO_SCHEMA_VERSION=2.0.1 \ LUAROCK_EXPERATIOND_VERSION=1.0.1 \ LUAROCK_QUEUE_VERSION=1.0.2 \ @@ -32,7 +29,7 @@ RUN set -x \ && apk add --no-cache --virtual .run-deps \ libstdc++ \ readline \ - libressl \ + openssl \ yaml \ lz4 \ binutils \ @@ -46,19 +43,17 @@ RUN set -x \ icu \ ca-certificates \ && apk add --no-cache --virtual .build-deps \ - perl \ gcc \ g++ \ cmake \ file \ readline-dev \ - libressl-dev \ + openssl-dev \ yaml-dev \ lz4-dev \ zlib-dev \ binutils-dev \ ncurses-dev \ - lua-dev \ musl-dev \ make \ git \ @@ -90,48 +85,19 @@ RUN set -x \ && git -C /usr/src/tarantool submodule update --init --recursive \ && (cd /usr/src/tarantool; \ cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo\ - -DENABLE_BUNDLED_LIBYAML:BOOL=OFF\ + -DENABLE_BUNDLED_LIBYAML:BOOL=ON\ -DENABLE_BACKTRACE:BOOL=ON\ -DENABLE_DIST:BOOL=ON\ .) \ && make -C /usr/src/tarantool -j\ && make -C /usr/src/tarantool install \ && make -C /usr/src/tarantool clean \ - && : "---------- small ----------" \ - && (cd /usr/src/tarantool/src/lib/small; \ - cmake -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - .) \ - && make -C /usr/src/tarantool/src/lib/small \ - && make -C /usr/src/tarantool/src/lib/small install \ - && make -C /usr/src/tarantool/src/lib/small clean \ - && : "---------- msgpuck ----------" \ - && (cd /usr/src/tarantool/src/lib/msgpuck; \ - cmake -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - .) \ - && make -C /usr/src/tarantool/src/lib/msgpuck \ - && make -C /usr/src/tarantool/src/lib/msgpuck install \ - && make -C /usr/src/tarantool/src/lib/msgpuck clean \ - && : "---------- luarocks ----------" \ - && wget -O luarocks.tar.gz "$LUAROCKS_URL" \ - && mkdir -p /usr/src/luarocks \ - && tar -xzf luarocks.tar.gz -C /usr/src/luarocks --strip-components=1 \ - && (cd /usr/src/luarocks; \ - ./configure; \ - make build; \ - make install) \ - && rm -r /usr/src/luarocks \ && rm -rf /usr/src/tarantool \ && rm -rf /usr/src/gperftools \ && rm -rf /usr/src/go \ && : "---------- remove build deps ----------" \ && apk del .build-deps -COPY luarocks-config.lua /usr/local/etc/luarocks/config-5.1.lua - RUN set -x \ && apk add --no-cache --virtual .run-deps \ mariadb-client-libs \ @@ -147,7 +113,6 @@ RUN set -x \ gcc \ g++ \ postgresql-dev \ - lua-dev \ musl-dev \ cyrus-sasl-dev \ mosquitto-dev \ @@ -165,6 +130,7 @@ RUN set -x \ make install) \ && rm -r /usr/src/proj \ && rm -rf /usr/src/proj \ + && rm -rf /proj.tar.gz \ && : "---------- geos (for gis module) ----------" \ && wget -O geos.tar.bz2 http://download.osgeo.org/geos/geos-3.6.0.tar.bz2 \ && mkdir -p /usr/src/geos \ @@ -175,40 +141,41 @@ RUN set -x \ make install) \ && rm -r /usr/src/geos \ && rm -rf /usr/src/geos \ + && rm -rf /geos.tar.bz2 \ && : "---------- luarocks ----------" \ - && luarocks install lua-term \ - && luarocks install ldoc \ + && cd / \ + && : "ldoc" \ + && tarantoolctl rocks install ldoc --server=http://rocks.moonscript.org \ + && : "lua-term" \ + && tarantoolctl rocks install lua-term \ && : "avro" \ - && luarocks install avro-schema $LUAROCK_AVRO_SCHEMA_VERSION \ + && tarantoolctl rocks install avro-schema $LUAROCK_AVRO_SCHEMA_VERSION \ && : "expirationd" \ - && luarocks install expirationd $LUAROCK_EXPERATIOND_VERSION \ + && tarantoolctl rocks install expirationd $LUAROCK_EXPERATIOND_VERSION \ && : "queue" \ - && luarocks install queue $LUAROCK_QUEUE_VERSION \ + && tarantoolctl rocks install queue $LUAROCK_QUEUE_VERSION \ && : "connpool" \ - && luarocks install connpool $LUAROCK_CONNPOOL_VERSION \ - && : "shard" \ - && git clone $LUAROCK_SHARD_REPO /rocks/shard \ - && git -C /rocks/shard checkout $LUAROCK_SHARD_TAG \ - && (cd /rocks/shard && luarocks make *rockspec) \ + && tarantoolctl rocks install connpool $LUAROCK_CONNPOOL_VERSION \ + && : "vshard" \ + && tarantoolctl rocks install vshard $LUAROCK_VSHARD_VERSION \ && : "http" \ - && luarocks install http $LUAROCK_HTTP_VERSION \ + && tarantoolctl rocks install http $LUAROCK_HTTP_VERSION \ && : "pg" \ - && luarocks install pg $LUAROCK_TARANTOOL_PG_VERSION \ + && tarantoolctl rocks install pg $LUAROCK_TARANTOOL_PG_VERSION \ && : "mysql" \ - && luarocks install mysql $LUAROCK_TARANTOOL_MYSQL_VERSION \ + && tarantoolctl rocks install mysql $LUAROCK_TARANTOOL_MYSQL_VERSION \ && : "memcached" \ - && luarocks install memcached $LUAROCK_MEMCACHED_VERSION \ + && tarantoolctl rocks install memcached $LUAROCK_MEMCACHED_VERSION \ && : "prometheus" \ - && luarocks install prometheus $LUAROCK_TARANTOOL_PROMETHEUS_VERSION \ + && tarantoolctl rocks install prometheus $LUAROCK_TARANTOOL_PROMETHEUS_VERSION \ && : "mqtt" \ - && luarocks install mqtt $LUAROCK_TARANTOOL_MQTT_VERSION \ + && tarantoolctl rocks install mqtt $LUAROCK_TARANTOOL_MQTT_VERSION \ && : "gis" \ - && luarocks install gis $LUAROCK_TARANTOOL_GIS_VERSION \ + && tarantoolctl rocks install gis $LUAROCK_TARANTOOL_GIS_VERSION \ && : "gperftools" \ - && luarocks install gperftools $LUAROCK_TARANTOOL_GPERFTOOLS_VERSION \ + && tarantoolctl rocks install gperftools $LUAROCK_TARANTOOL_GPERFTOOLS_VERSION \ && : "---------- remove build deps ----------" \ - && apk del .build-deps \ - && rm -rf /rocks + && apk del .build-deps RUN mkdir -p /var/lib/tarantool \ && chown tarantool:tarantool /var/lib/tarantool \ diff --git a/2.x/luarocks-config.lua b/2.x/luarocks-config.lua deleted file mode 100644 index 111f955..0000000 --- a/2.x/luarocks-config.lua +++ /dev/null @@ -1,9 +0,0 @@ -rocks_trees = { - { name = [[user]], root = home..[[/.luarocks]] }, - { name = [[system]], root = [[/usr/local]] } -} - -rocks_servers = { - [[http://rocks.tarantool.org/]], - [[http://luarocks.org/repositories/rocks]] -} diff --git a/2.x/tarantool-entrypoint.lua b/2.x/tarantool-entrypoint.lua index ffbf2fc..512163a 100755 --- a/2.x/tarantool-entrypoint.lua +++ b/2.x/tarantool-entrypoint.lua @@ -2,7 +2,6 @@ local fio = require('fio') local errno = require('errno') -local fun = require('fun') local urilib = require('uri') local console = require('console') local term = require('term') From b9aca67c388d611ae1baa30ca0577e9966f29b4b Mon Sep 17 00:00:00 2001 From: Oleg Babin Date: Thu, 9 Jan 2020 11:31:47 +0300 Subject: [PATCH 168/286] update 2.2 image Update 2.2 alpine image to 2.2.2-4-g4f8ac5999 --- 2.2/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/2.2/Dockerfile b/2.2/Dockerfile index 50fac86..22102e6 100644 --- a/2.2/Dockerfile +++ b/2.2/Dockerfile @@ -5,7 +5,7 @@ RUN addgroup -S tarantool \ && adduser -S -G tarantool tarantool \ && apk add --no-cache 'su-exec>=0.2' -ENV TARANTOOL_VERSION=2.2.1-3-g878e2a42c \ +ENV TARANTOOL_VERSION=2.2.2-4-g4f8ac5999 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ CURL_REPO=https://github.com/curl/curl.git \ From 926ad2efe2a4705f66ab704b245fac430b3c625c Mon Sep 17 00:00:00 2001 From: Oleg Babin Date: Thu, 9 Jan 2020 12:00:16 +0300 Subject: [PATCH 169/286] Update 2.x image Update 2.x alpint image to 2.3.1-1-g4137134c0 --- 2.x/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/2.x/Dockerfile b/2.x/Dockerfile index 7f6c0cf..c877e7f 100644 --- a/2.x/Dockerfile +++ b/2.x/Dockerfile @@ -5,7 +5,7 @@ RUN addgroup -S tarantool \ && adduser -S -G tarantool tarantool \ && apk add --no-cache 'su-exec>=0.2' -ENV TARANTOOL_VERSION=2.3.0-275-g06aeb7687 \ +ENV TARANTOOL_VERSION=2.3.1-1-g4137134c0 \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ GPERFTOOLS_TAG=gperftools-2.5 \ From a1fd398781cdc7a5eee63b78175dadf7612192cc Mon Sep 17 00:00:00 2001 From: Oleg Babin Date: Thu, 26 Dec 2019 17:57:34 +0300 Subject: [PATCH 170/286] update 2.x-centos7 image This patch follows cc132bc9a86052637ad2ddcd5daa70a8cd18fc90 and contains following changes: - Remove build of msgpuck - Remove build of small - Use bundled libyaml - Use tarantoolctl rocks instead of luarocks - Get rid of redundant build-deps - Cleanup directory from redundant files - Update libicu to v65 - Update tarantool to 2.3.0-286-gfd271dc72 - Update vshard rock to 0.1.14 --- 2.x-centos7/Dockerfile | 85 ++++++++-------------------- 2.x-centos7/luarocks-config.lua | 11 ---- 2.x-centos7/tarantool-entrypoint.lua | 1 - 2.x-centos7/tarantool_set_config.lua | 1 - 4 files changed, 25 insertions(+), 73 deletions(-) delete mode 100644 2.x-centos7/luarocks-config.lua diff --git a/2.x-centos7/Dockerfile b/2.x-centos7/Dockerfile index 1e4cf55..7316a1b 100644 --- a/2.x-centos7/Dockerfile +++ b/2.x-centos7/Dockerfile @@ -4,11 +4,10 @@ MAINTAINER mail@racktear.com RUN groupadd tarantool \ && adduser -g tarantool tarantool -ENV TARANTOOL_VERSION=2.3.0-117-g4c2d1eff2 \ - TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ - TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ - LUAROCKS_URL=https://github.com/tarantool/luarocks/archive/f5bd5dfdde954861476c2304f7eafb59b1888b0c.tar.gz \ - LUAROCK_VSHARD_VERSION=0.1.9 \ +ARG TARANTOOL_VERSION=2.3.1-1-g4137134c0 + +ENV TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ + LUAROCK_VSHARD_VERSION=0.1.14 \ LUAROCK_CHECKS_VERSION=3.0.1 \ LUAROCK_AVRO_SCHEMA_VERSION=3.0.3 \ LUAROCK_EXPERATIOND_VERSION=1.0.1 \ @@ -31,7 +30,6 @@ RUN set -x \ libstdc++ \ readline \ openssl \ - yaml \ lz4 \ binutils \ ncurses \ @@ -50,12 +48,10 @@ RUN set -x \ cmake \ readline-devel \ openssl-devel \ - libyaml-devel \ zlib-devel \ lz4-devel \ binutils-devel \ ncurses-devel \ - lua-devel \ make \ git \ libunwind-devel \ @@ -65,10 +61,10 @@ RUN set -x \ go \ wget \ && : "---------- libicu ----------" \ - && wget http://download.icu-project.org/files/icu4c/64.2/icu4c-64_2-src.tgz \ + && wget https://github.com/unicode-org/icu/releases/download/release-65-1/icu4c-65_1-src.tgz \ && mkdir -p /usr/src/icu \ - && tar -xzf icu4c-64_2-src.tgz -C /usr/src/icu --strip-components=1 \ - && rm icu4c-64_2-src.tgz \ + && tar -xzf icu4c-65_1-src.tgz -C /usr/src/icu --strip-components=1 \ + && rm icu4c-65_1-src.tgz \ && (cd /usr/src/icu/source; \ chmod +x runConfigureICU configure install-sh; \ ./runConfigureICU Linux/gcc; \ @@ -87,40 +83,12 @@ RUN set -x \ && (cd /usr/src/tarantool; git submodule update --init --recursive;) \ && (cd /usr/src/tarantool; \ cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo\ - -DENABLE_BUNDLED_LIBYAML:BOOL=OFF\ + -DENABLE_BUNDLED_LIBYAML:BOOL=ON\ -DENABLE_BACKTRACE:BOOL=ON\ -DENABLE_DIST:BOOL=ON\ .) \ && make -C /usr/src/tarantool -j\ && make -C /usr/src/tarantool install \ - && make -C /usr/src/tarantool clean \ - && : "---------- small ----------" \ - && (cd /usr/src/tarantool/src/lib/small; \ - cmake -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - .) \ - && make -C /usr/src/tarantool/src/lib/small \ - && make -C /usr/src/tarantool/src/lib/small install \ - && make -C /usr/src/tarantool/src/lib/small clean \ - && : "---------- msgpuck ----------" \ - && (cd /usr/src/tarantool/src/lib/msgpuck; \ - cmake -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - .) \ - && make -C /usr/src/tarantool/src/lib/msgpuck \ - && make -C /usr/src/tarantool/src/lib/msgpuck install \ - && make -C /usr/src/tarantool/src/lib/msgpuck clean \ - && : "---------- luarocks ----------" \ - && wget -O luarocks.tar.gz "$LUAROCKS_URL" \ - && mkdir -p /usr/src/luarocks \ - && tar -xzf luarocks.tar.gz -C /usr/src/luarocks --strip-components=1 \ - && (cd /usr/src/luarocks; \ - ./configure; \ - make build; \ - make install) \ - && rm -r /usr/src/luarocks \ && rm -rf /usr/src/tarantool \ && rm -rf /usr/src/go \ && rm -rf /usr/src/icu \ @@ -132,12 +100,10 @@ RUN set -x \ cmake \ readline-devel \ openssl-devel \ - libyaml-devel \ lz4-devel \ zlib-devel \ binutils-devel \ ncurses-devel \ - lua-devel \ make \ git \ libunwind-devel \ @@ -153,8 +119,6 @@ RUN set -x \ && rm -rf /var/cache/yum -COPY luarocks-config.lua /usr/local/etc/luarocks/config-5.1.lua - RUN set -x \ && yum -y install https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-redhat96-9.6-3.noarch.rpm \ && yum -y install \ @@ -172,7 +136,6 @@ RUN set -x \ make \ gcc-c++ \ postgresql96-devel \ - lua-devel \ cyrus-sasl-devel \ libev-devel \ wget \ @@ -181,34 +144,36 @@ RUN set -x \ openssl-devel \ && mkdir -p /rocks \ && : "---------- luarocks ----------" \ - && luarocks install lua-term \ - && luarocks install ldoc \ + && : "lua-term" \ + && tarantoolctl rocks install lua-term \ + && : "ldoc" \ + && tarantoolctl rocks install ldoc --server=http://rocks.moonscript.org \ && : "vshard" \ - && luarocks install vshard $LUAROCK_VSHARD_VERSION \ + && tarantoolctl rocks install vshard $LUAROCK_VSHARD_VERSION \ && : "checks" \ - && luarocks install checks $LUAROCK_CHECKS_VERSION \ + && tarantoolctl rocks install checks $LUAROCK_CHECKS_VERSION \ && : "avro" \ - && luarocks install avro-schema $LUAROCK_AVRO_SCHEMA_VERSION \ + && tarantoolctl rocks install avro-schema $LUAROCK_AVRO_SCHEMA_VERSION \ && : "expirationd" \ - && luarocks install expirationd $LUAROCK_EXPERATIOND_VERSION \ + && tarantoolctl rocks install expirationd $LUAROCK_EXPERATIOND_VERSION \ && : "queue" \ - && luarocks install queue $LUAROCK_QUEUE_VERSION \ + && tarantoolctl rocks install queue $LUAROCK_QUEUE_VERSION \ && : "connpool" \ - && luarocks install connpool $LUAROCK_CONNPOOL_VERSION \ + && tarantoolctl rocks install connpool $LUAROCK_CONNPOOL_VERSION \ && : "http" \ - && luarocks install http $LUAROCK_HTTP_VERSION \ + && tarantoolctl rocks install http $LUAROCK_HTTP_VERSION \ && : "pg" \ - && luarocks install pg $LUAROCK_TARANTOOL_PG_VERSION \ + && tarantoolctl rocks install pg $LUAROCK_TARANTOOL_PG_VERSION \ && : "mysql" \ - && luarocks install mysql $LUAROCK_TARANTOOL_MYSQL_VERSION \ + && tarantoolctl rocks install mysql $LUAROCK_TARANTOOL_MYSQL_VERSION \ && : "memcached" \ - && luarocks install memcached $LUAROCK_MEMCACHED_VERSION \ + && tarantoolctl rocks install memcached $LUAROCK_MEMCACHED_VERSION \ && : "prometheus" \ - && luarocks install prometheus $LUAROCK_TARANTOOL_PROMETHEUS_VERSION \ + && tarantoolctl rocks install prometheus $LUAROCK_TARANTOOL_PROMETHEUS_VERSION \ && : "gis" \ - && luarocks install gis $LUAROCK_TARANTOOL_GIS_VERSION \ + && tarantoolctl rocks install gis $LUAROCK_TARANTOOL_GIS_VERSION \ && : "gperftools" \ - && luarocks install gperftools $LUAROCK_TARANTOOL_GPERFTOOLS_VERSION \ + && tarantoolctl rocks install gperftools $LUAROCK_TARANTOOL_GPERFTOOLS_VERSION \ && : "---------- remove build deps ----------" \ && rm -rf /rocks \ && yum -y remove \ diff --git a/2.x-centos7/luarocks-config.lua b/2.x-centos7/luarocks-config.lua deleted file mode 100644 index 4c48b74..0000000 --- a/2.x-centos7/luarocks-config.lua +++ /dev/null @@ -1,11 +0,0 @@ -rocks_trees = { - { name = [[user]], root = home..[[/.luarocks]] }, - { name = [[system]], root = [[/usr/local]] } -} - -lib_modules_path="/lib64/lua/"..lua_version - -rocks_servers = { - [[http://rocks.tarantool.org/]], - [[http://luarocks.org/repositories/rocks]] -} diff --git a/2.x-centos7/tarantool-entrypoint.lua b/2.x-centos7/tarantool-entrypoint.lua index ffbf2fc..512163a 100755 --- a/2.x-centos7/tarantool-entrypoint.lua +++ b/2.x-centos7/tarantool-entrypoint.lua @@ -2,7 +2,6 @@ local fio = require('fio') local errno = require('errno') -local fun = require('fun') local urilib = require('uri') local console = require('console') local term = require('term') diff --git a/2.x-centos7/tarantool_set_config.lua b/2.x-centos7/tarantool_set_config.lua index ddca36c..f638978 100755 --- a/2.x-centos7/tarantool_set_config.lua +++ b/2.x-centos7/tarantool_set_config.lua @@ -3,7 +3,6 @@ local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' local CFG_FILE_PATH = '/etc/tarantool/config.yml' -local fio = require('fio') local yaml = require('yaml') local console = require('console') local errno = require('errno') From ae0036d069d1bad745cc83325ecbdbd8ffb7b8ae Mon Sep 17 00:00:00 2001 From: "Alexander V. Tikhonov" Date: Fri, 27 Dec 2019 08:53:46 +0300 Subject: [PATCH 171/286] Add into Gitlab-CI testing Refactored the Gitlab-CI testing script. Made available images rebuild only for the changed appropriate directories/files. Reused the previously set images repository: registry.gitlab.com/tarantool/docker --- .gitlab-ci.yml | 60 ++++++++++++++++++++++++++++++-------------------- .gitlab.mk | 7 ++++++ 2 files changed, 43 insertions(+), 24 deletions(-) create mode 100644 .gitlab.mk diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e815c21..508e250 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,35 +1,47 @@ stages: - - build - - release + - build variables: REGISTRY: registry.gitlab.com IMAGE: ${REGISTRY}/${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME} before_script: - # Enable GitLab registry - - docker login -u gitlab-ci-token -p ${CI_BUILD_TOKEN} ${REGISTRY} + # Enable GitLab registry + - docker login -u gitlab-ci-token -p ${CI_BUILD_TOKEN} ${REGISTRY} -# -# Build Docker image and publish as IMAGE:BRANCH -# -docker-build: +.build_template: &build_definition stage: build - variables: - TAG: 1.7-centos7 script: - - docker build -t ${IMAGE}:${TAG}-${CI_COMMIT_REF_SLUG} ${TAG}/ - - docker push ${IMAGE}:${TAG}-${CI_COMMIT_REF_SLUG} - -# -# Tag IMAGE:BRANCH as image:latest for release branches (master) -# -docker-tag: - stage: release + - > + if git diff origin/master --name-only | grep "^${DIR}/" ; then + make -f .gitlab.mk build + fi; + +'1.x': + <<: *build_definition variables: - TAG: 1.7-centos7 - script: - - docker tag ${IMAGE}:${TAG}-${CI_COMMIT_REF_SLUG} ${IMAGE}:${TAG} - - docker push ${IMAGE}:${TAG} - only: - - master + TAG: '1' + DIR: '1.x' + PORT: 3301 + +'2.x': + <<: *build_definition + variables: + TAG: '2' + DIR: '2.x' + PORT: 3302 + +'2.1': + <<: *build_definition + variables: + TAG: '2.1' + DIR: '2.1' + PORT: 3321 + +'2.2': + <<: *build_definition + variables: + TAG: '2.2' + DIR: '2.2' + PORT: 3322 + diff --git a/.gitlab.mk b/.gitlab.mk new file mode 100644 index 0000000..5589177 --- /dev/null +++ b/.gitlab.mk @@ -0,0 +1,7 @@ +build: + docker build --network=host -t ${IMAGE}:${TAG} ${DIR}/ + docker run --rm --name tarantool_${TAG} -p ${PORT}:${PORT} -d ${IMAGE}:${TAG} + docker exec -t tarantool_${TAG} tarantool_is_up + docker stop tarantool_${TAG} + docker push ${IMAGE}:${TAG} + From 6a55f9a127b23fd9cb4df33b35e0ffd6e7d61b6f Mon Sep 17 00:00:00 2001 From: "Alexander V. Tikhonov" Date: Fri, 27 Dec 2019 14:53:00 +0300 Subject: [PATCH 172/286] Merge files in repository MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reorganized the repository files - removed duplicating. Changed file structure to: .gitlab-ci.yml .gitlab.mk ├── dockerfiles │ ├── _ │ ├── alpine_3.5_1.x │ ├── alpine_3.5_2.2 │ ├── alpine_3.5_2.x │ ├── centos_7_1.x │ └── centos_7_2.x ├── files │ ├── │ └── ... ├── README.md └── versions ├── ├── alpine_3.5_1.x ├── alpine_3.5_2.1 ├── alpine_3.5_2.2 ├── alpine_3.5_2.x ├── centos_7_1.x └── centos_7_2.x For now the 'versions/__' with use of common files: 'files/'. Gitlab-CI YML file has the environment variables setup for each build, which can be reproduced manually like: IMAGE=tarantool/tarantool TAG=2.1 OS=alpine_3.5 VER=2.1 DVER=2.2 \ PORT=3121 make -f .gitlab.mk build --- .gitlab-ci.yml | 56 +++- .gitlab.mk | 5 +- 1.5/Dockerfile | 105 ------- 1.5/docker-entrypoint.sh | 69 ----- 1.6/Dockerfile | 280 ----------------- 1.6/luarocks-config.lua | 9 - 1.6/tarantool-entrypoint.lua | 261 ---------------- 1.6/tarantool.default | 21 -- 1.6/tarantool_set_config.lua | 129 -------- 1.7/Dockerfile | 244 --------------- 1.7/console | 15 - 1.7/docker-entrypoint.sh | 22 -- 1.7/gperftools_alpine.diff | 110 ------- 1.7/luarocks-config.lua | 9 - 1.7/tarantool-entrypoint.lua | 292 ------------------ 1.7/tarantool_is_up | 41 --- 1.7/tarantool_set_config.lua | 130 -------- 1.9/Dockerfile | 244 --------------- 1.9/console | 15 - 1.9/docker-entrypoint.sh | 22 -- 1.9/gperftools_alpine.diff | 110 ------- 1.9/luarocks-config.lua | 9 - 1.9/tarantool-entrypoint.lua | 292 ------------------ 1.9/tarantool.default | 22 -- 1.9/tarantool_is_up | 41 --- 1.9/tarantool_set_config.lua | 130 -------- 1.x-centos7/.dockerignore | 0 1.x-centos7/console | 15 - 1.x-centos7/tarantool-entrypoint.lua | 292 ------------------ 1.x-centos7/tarantool.default | 22 -- 1.x-centos7/tarantool_is_up | 41 --- 1.x-centos7/tarantool_set_config.lua | 130 -------- 1.x/console | 15 - 1.x/docker-entrypoint.sh | 22 -- 1.x/gperftools_alpine.diff | 110 ------- 1.x/luarocks-config.lua | 9 - 1.x/tarantool-entrypoint.lua | 292 ------------------ 1.x/tarantool.default | 22 -- 1.x/tarantool_is_up | 41 --- 1.x/tarantool_set_config.lua | 130 -------- 2.1/console | 15 - 2.1/docker-entrypoint.sh | 22 -- 2.1/gperftools_alpine.diff | 110 ------- 2.1/luarocks-config.lua | 9 - 2.1/tarantool-entrypoint.lua | 292 ------------------ 2.1/tarantool.default | 22 -- 2.1/tarantool_is_up | 41 --- 2.1/tarantool_set_config.lua | 130 -------- 2.2/Dockerfile | 246 --------------- 2.2/console | 15 - 2.2/docker-entrypoint.sh | 22 -- 2.2/gperftools_alpine.diff | 110 ------- 2.2/luarocks-config.lua | 9 - 2.2/tarantool-entrypoint.lua | 292 ------------------ 2.2/tarantool.default | 22 -- 2.2/tarantool_is_up | 41 --- 2.2/tarantool_set_config.lua | 130 -------- 2.x-centos7/.dockerignore | 0 2.x-centos7/console | 15 - 2.x-centos7/docker-entrypoint.sh | 22 -- 2.x-centos7/mosquitto.repo | 7 - 2.x-centos7/tarantool.default | 22 -- 2.x-centos7/tarantool_is_up | 41 --- 2.x/console | 15 - 2.x/docker-entrypoint.sh | 22 -- 2.x/gperftools_alpine.diff | 110 ------- 2.x/tarantool-entrypoint.lua | 291 ----------------- 2.x/tarantool.default | 22 -- 2.x/tarantool_is_up | 41 --- 2.x/tarantool_set_config.lua | 130 -------- README.md | 48 ++- 1.x/Dockerfile => dockerfiles/alpine_3.5_1.x | 22 +- 2.1/Dockerfile => dockerfiles/alpine_3.5_2.2 | 22 +- 2.x/Dockerfile => dockerfiles/alpine_3.5_2.x | 20 +- .../Dockerfile => dockerfiles/centos_7_1.x | 18 +- .../Dockerfile => dockerfiles/centos_7_2.x | 20 +- {1.6 => files}/console | 0 {1.6 => files}/docker-entrypoint.sh | 0 .../docker-entrypoint_centos.sh | 0 {1.6 => files}/gperftools_alpine.diff | 0 {1.5 => files}/luarocks-config.lua | 0 .../luarocks-config_centos.lua | 0 {1.x-centos7 => files}/mosquitto.repo | 0 .../tarantool-entrypoint.lua | 0 {1.7 => files}/tarantool.default | 0 {1.6 => files}/tarantool_is_up | 0 .../tarantool_set_config.lua | 0 versions/alpine_3.5_1.x | 1 + versions/alpine_3.5_2.1 | 1 + versions/alpine_3.5_2.2 | 1 + versions/alpine_3.5_2.x | 1 + versions/centos_7_1.x | 1 + versions/centos_7_2.x | 1 + 93 files changed, 132 insertions(+), 6114 deletions(-) delete mode 100644 1.5/Dockerfile delete mode 100755 1.5/docker-entrypoint.sh delete mode 100644 1.6/Dockerfile delete mode 100644 1.6/luarocks-config.lua delete mode 100755 1.6/tarantool-entrypoint.lua delete mode 100644 1.6/tarantool.default delete mode 100755 1.6/tarantool_set_config.lua delete mode 100644 1.7/Dockerfile delete mode 100755 1.7/console delete mode 100755 1.7/docker-entrypoint.sh delete mode 100644 1.7/gperftools_alpine.diff delete mode 100644 1.7/luarocks-config.lua delete mode 100755 1.7/tarantool-entrypoint.lua delete mode 100755 1.7/tarantool_is_up delete mode 100755 1.7/tarantool_set_config.lua delete mode 100644 1.9/Dockerfile delete mode 100755 1.9/console delete mode 100755 1.9/docker-entrypoint.sh delete mode 100644 1.9/gperftools_alpine.diff delete mode 100644 1.9/luarocks-config.lua delete mode 100755 1.9/tarantool-entrypoint.lua delete mode 100644 1.9/tarantool.default delete mode 100755 1.9/tarantool_is_up delete mode 100755 1.9/tarantool_set_config.lua delete mode 100644 1.x-centos7/.dockerignore delete mode 100755 1.x-centos7/console delete mode 100755 1.x-centos7/tarantool-entrypoint.lua delete mode 100644 1.x-centos7/tarantool.default delete mode 100755 1.x-centos7/tarantool_is_up delete mode 100755 1.x-centos7/tarantool_set_config.lua delete mode 100755 1.x/console delete mode 100755 1.x/docker-entrypoint.sh delete mode 100644 1.x/gperftools_alpine.diff delete mode 100644 1.x/luarocks-config.lua delete mode 100755 1.x/tarantool-entrypoint.lua delete mode 100644 1.x/tarantool.default delete mode 100755 1.x/tarantool_is_up delete mode 100755 1.x/tarantool_set_config.lua delete mode 100755 2.1/console delete mode 100755 2.1/docker-entrypoint.sh delete mode 100644 2.1/gperftools_alpine.diff delete mode 100644 2.1/luarocks-config.lua delete mode 100755 2.1/tarantool-entrypoint.lua delete mode 100644 2.1/tarantool.default delete mode 100755 2.1/tarantool_is_up delete mode 100755 2.1/tarantool_set_config.lua delete mode 100644 2.2/Dockerfile delete mode 100755 2.2/console delete mode 100755 2.2/docker-entrypoint.sh delete mode 100644 2.2/gperftools_alpine.diff delete mode 100644 2.2/luarocks-config.lua delete mode 100755 2.2/tarantool-entrypoint.lua delete mode 100644 2.2/tarantool.default delete mode 100755 2.2/tarantool_is_up delete mode 100755 2.2/tarantool_set_config.lua delete mode 100644 2.x-centos7/.dockerignore delete mode 100755 2.x-centos7/console delete mode 100755 2.x-centos7/docker-entrypoint.sh delete mode 100644 2.x-centos7/mosquitto.repo delete mode 100644 2.x-centos7/tarantool.default delete mode 100755 2.x-centos7/tarantool_is_up delete mode 100755 2.x/console delete mode 100755 2.x/docker-entrypoint.sh delete mode 100644 2.x/gperftools_alpine.diff delete mode 100755 2.x/tarantool-entrypoint.lua delete mode 100644 2.x/tarantool.default delete mode 100755 2.x/tarantool_is_up delete mode 100755 2.x/tarantool_set_config.lua rename 1.x/Dockerfile => dockerfiles/alpine_3.5_1.x (92%) rename 2.1/Dockerfile => dockerfiles/alpine_3.5_2.2 (92%) rename 2.x/Dockerfile => dockerfiles/alpine_3.5_2.x (92%) rename 1.x-centos7/Dockerfile => dockerfiles/centos_7_1.x (95%) rename 2.x-centos7/Dockerfile => dockerfiles/centos_7_2.x (94%) rename {1.6 => files}/console (100%) rename {1.6 => files}/docker-entrypoint.sh (100%) rename 1.x-centos7/docker-entrypoint.sh => files/docker-entrypoint_centos.sh (100%) rename {1.6 => files}/gperftools_alpine.diff (100%) rename {1.5 => files}/luarocks-config.lua (100%) rename 1.x-centos7/luarocks-config.lua => files/luarocks-config_centos.lua (100%) rename {1.x-centos7 => files}/mosquitto.repo (100%) rename {2.x-centos7 => files}/tarantool-entrypoint.lua (100%) rename {1.7 => files}/tarantool.default (100%) rename {1.6 => files}/tarantool_is_up (100%) rename {2.x-centos7 => files}/tarantool_set_config.lua (100%) create mode 100644 versions/alpine_3.5_1.x create mode 100644 versions/alpine_3.5_2.1 create mode 100644 versions/alpine_3.5_2.2 create mode 100644 versions/alpine_3.5_2.x create mode 100644 versions/centos_7_1.x create mode 100644 versions/centos_7_2.x diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 508e250..d704f3e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,6 +4,7 @@ stages: variables: REGISTRY: registry.gitlab.com IMAGE: ${REGISTRY}/${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME} + CHECK_GIT: git diff origin/master --name-only before_script: # Enable GitLab registry @@ -13,35 +14,64 @@ before_script: stage: build script: - > - if git diff origin/master --name-only | grep "^${DIR}/" ; then + if ${CHECK_GIT} | grep "^versions/${OS}_${VER}$" || \ + ${CHECK_GIT} | grep "^dockerfiles/${OS}_${DVER}$" || \ + ${CHECK_GIT} | grep "^files/" + then make -f .gitlab.mk build fi; -'1.x': +'alpine 3.5 1.x': <<: *build_definition variables: + OS: 'alpine_3.5' TAG: '1' - DIR: '1.x' - PORT: 3301 + VER: '1.x' + DVER: '1.x' + PORT: 3110 -'2.x': +'alpine 3.5 2.x': <<: *build_definition variables: + OS: 'alpine_3.5' TAG: '2' - DIR: '2.x' - PORT: 3302 + VER: '2.x' + DVER: '2.x' + PORT: 3120 -'2.1': +'alpine 3.5 2.1': <<: *build_definition variables: + OS: 'alpine_3.5' TAG: '2.1' - DIR: '2.1' - PORT: 3321 + VER: '2.1' + DVER: '2.2' + PORT: 3121 -'2.2': +'alpine 3.5 2.2': <<: *build_definition variables: + OS: 'alpine_3.5' TAG: '2.2' - DIR: '2.2' - PORT: 3322 + VER: '2.2' + DVER: '2.2' + PORT: 3122 + +'centos 7 1.x': + <<: *build_definition + variables: + OS: 'centos_7' + TAG: '1.x-centos7' + VER: '1.x' + DVER: '1.x' + PORT: 3210 + +'centos 7 2.x': + <<: *build_definition + variables: + OS: 'centos_7' + TAG: '2.x-centos7' + VER: '2.x' + DVER: '2.x' + PORT: 3220 diff --git a/.gitlab.mk b/.gitlab.mk index 5589177..59f53c9 100644 --- a/.gitlab.mk +++ b/.gitlab.mk @@ -1,5 +1,8 @@ +TNT_VER=$(shell cat versions/${OS}_${VER}) + build: - docker build --network=host -t ${IMAGE}:${TAG} ${DIR}/ + docker build --network=host --build-arg TNT_VER=${TNT_VER} \ + -t ${IMAGE}:${TAG} -f dockerfiles/${OS}_${DVER} . docker run --rm --name tarantool_${TAG} -p ${PORT}:${PORT} -d ${IMAGE}:${TAG} docker exec -t tarantool_${TAG} tarantool_is_up docker stop tarantool_${TAG} diff --git a/1.5/Dockerfile b/1.5/Dockerfile deleted file mode 100644 index 753af94..0000000 --- a/1.5/Dockerfile +++ /dev/null @@ -1,105 +0,0 @@ -FROM alpine:3.4 -MAINTAINER mail@racktear.com - -RUN addgroup -S tarantool \ - && adduser -S -G tarantool tarantool \ - && apk add --no-cache 'su-exec>=0.2' - -ENV TARANTOOL_VERSION=1.5.5.27 \ - TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ - TARANTOOL_COMMIT=1687c022e7aa93e9c118e1b80e1eac6c429b1010 \ - TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ - LUAROCKS_URL=http://keplerproject.github.io/luarocks/releases/luarocks-2.3.0.tar.gz \ - TARANTOOL_SNAP_DIR=/var/lib/tarantool \ - TARANTOOL_WAL_DIR=/var/lib/tarantool \ - TARANTOOL_PORT=3301 \ - TARANTOOL_ADMIN_PORT=3302 - -RUN set -x \ - && apk add --no-cache --virtual .run-deps \ - libstdc++ \ - readline \ - openssl \ - yaml \ - lz4 \ - binutils \ - ncurses \ - libgomp \ - lua \ - curl \ - tar \ - zip \ - mariadb-client-libs \ - libpq \ - mariadb-libs \ - && apk add --no-cache --virtual .build-deps \ - perl \ - gcc \ - g++ \ - cmake \ - readline-dev \ - openssl-dev \ - yaml-dev \ - lz4-dev \ - binutils-dev \ - ncurses-dev \ - lua-dev \ - musl-dev \ - make \ - git \ - postgresql-dev \ - lua-dev \ - mariadb-dev \ - wget \ - && : "---------- tarantool ----------" \ - && mkdir -p /usr/src/tarantool \ - && git clone "$TARANTOOL_DOWNLOAD_URL" /usr/src/tarantool \ - && git -C /usr/src/tarantool checkout "$TARANTOOL_COMMIT" \ - && git -C /usr/src/tarantool submodule init \ - && git -C /usr/src/tarantool submodule update \ - && echo "$TARANTOOL_VERSION" > /usr/src/tarantool/VERSION \ - && (cd /usr/src/tarantool; \ - cmake -DENABLE_CLIENT:BOOL=ON \ - -DWITH_MYSQL:BOOL=ON \ - -DWITH_POSTGRESQL:BOOL=ON \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - -DENABLE_BUNDLED_LIBYAML:BOOL=OFF \ - -DENABLE_BACKTRACE:BOOL=ON \ - .) \ - && make -C /usr/src/tarantool -j \ - && make -C /usr/src/tarantool install \ - && make -C /usr/src/tarantool clean \ - && : "---------- luarocks ----------" \ - && wget -O luarocks.tar.gz "$LUAROCKS_URL" \ - && mkdir -p /usr/src/luarocks \ - && tar -xzf luarocks.tar.gz -C /usr/src/luarocks --strip-components=1 \ - && (cd /usr/src/luarocks; \ - ./configure; \ - make build; \ - make install) \ - && rm -r /usr/src/luarocks \ - && rm -rf /usr/src/tarantool \ - && : "---------- remove build deps ----------" \ - && apk del .build-deps - -COPY luarocks-config.lua /usr/local/etc/luarocks/config-5.1.lua - -RUN mkdir -p /var/lib/tarantool \ - && chown tarantool:tarantool /var/lib/tarantool \ - && mkdir -p /opt/tarantool \ - && chown tarantool:tarantool /opt/tarantool \ - && mkdir -p /var/run/tarantool \ - && chown tarantool:tarantool /var/run/tarantool \ - && mkdir /etc/tarantool \ - && chown tarantool:tarantool /etc/tarantool - -VOLUME /var/lib/tarantool -WORKDIR /opt/tarantool - -COPY docker-entrypoint.sh /usr/local/bin/ - -RUN ln -s /usr/local/bin/docker-entrypoint.sh /entrypoint.sh # backwards compat -ENTRYPOINT ["docker-entrypoint.sh"] - -EXPOSE 3301 -CMD [ "tarantool_box", "-c", "/etc/tarantool/tarantool.cfg" ] diff --git a/1.5/docker-entrypoint.sh b/1.5/docker-entrypoint.sh deleted file mode 100755 index bcc6819..0000000 --- a/1.5/docker-entrypoint.sh +++ /dev/null @@ -1,69 +0,0 @@ -#!/bin/sh - -update_cfg() -{ - variable=$1 - varname=$2 - value=$(printenv $varname) - CFG=/etc/tarantool/tarantool.cfg - - if printenv $varname > /dev/null - then - if grep "$variable=" $CFG - then - sed -i "s/$variable=.*/$variable=$value/g" $CFG - else - echo "$variable=$value" >> $CFG - fi - fi -} - -try_init_db() -{ - if [ "$(find /var/lib/tarantool -maxdepth 1 -name '*.snap' -print)" = "" ] - then - echo "Initializing config:" - - CFG=/etc/tarantool/tarantool.cfg - - if [ ! -f $CFG ] - then - echo "work_dir=/opt/tarantool" > $CFG - echo "memcached_port=11211" >> $CFG - echo "primary_port=3301" >> $CFG - echo "admin_port=3302" >> $CFG - echo "replication_port=3310" >> $CFG - echo "snap_dir=/var/lib/tarantool" >> $CFG - echo "wal_dir=/var/lib/tarantool" >> $CFG - fi - - update_cfg "replication_port" "TARANTOOL_REPLICATION_PORT" - update_cfg "replication_source" "TARANTOOL_REPLICATION_SOURCE" - update_cfg "slab_alloc_arena" "TARANTOOL_SLAB_ALLOC_ARENA" - update_cfg "slab_alloc_factor" "TARANTOOL_SLAB_ALLOC_FACTOR" - update_cfg "slab_alloc_minimal" "TARANTOOL_SLAB_ALLOC_MINIMAL" - update_cfg "primary_port" "TARANTOOL_PORT" - update_cfg "admin_port" "TARANTOOL_ADMIN_PORT" - update_cfg "wal_mode" "TARANTOOL_WAL_MODE" - update_cfg "snap_dir" "TARANTOOL_SNAP_DIR" - update_cfg "wal_dir" "TARANTOOL_WAL_DIR" - - cat $CFG - - echo - echo "Initializing database:" - - su-exec tarantool tarantool_box -c $CFG --init-storage - - echo - fi -} - -# entry point wraps the passed script to do basic setup -if [ "$1" = 'tarantool_box' ]; then - shift - try_init_db - exec su-exec tarantool tarantool_box "$@" -fi - -exec "$@" diff --git a/1.6/Dockerfile b/1.6/Dockerfile deleted file mode 100644 index ece5f04..0000000 --- a/1.6/Dockerfile +++ /dev/null @@ -1,280 +0,0 @@ -FROM alpine:3.5 -MAINTAINER mail@racktear.com - -RUN addgroup -S tarantool \ - && adduser -S -G tarantool tarantool \ - && apk add --no-cache 'su-exec>=0.2' - -ENV TARANTOOL_VERSION=1.6.9-11-gf4619d0 \ - TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ - TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ - CURL_REPO=https://github.com/curl/curl.git \ - CURL_TAG=curl-7_59_0 \ - GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ - GPERFTOOLS_TAG=gperftools-2.5 \ - LUAROCKS_URL=http://keplerproject.github.io/luarocks/releases/luarocks-2.3.0.tar.gz \ - LUAROCK_AVRO_SCHEMA_REPO=https://github.com/tarantool/avro-schema.git \ - LUAROCK_AVRO_SCHEMA_TAG=b49efa8 \ - LUAROCK_EXPIRATIOND_REPO=https://github.com/tarantool/expirationd.git \ - LUAROCK_EXPIRATIOND_TAG=9ec22b6 \ - LUAROCK_QUEUE_REPO=https://github.com/tarantool/queue.git \ - LUAROCK_QUEUE_TAG=24d730c \ - LUAROCK_CONNPOOL_REPO=https://github.com/tarantool/connpool.git \ - LUAROCK_CONNPOOL_TAG=685af44 \ - LUAROCK_SHARD_REPO=https://github.com/tarantool/shard.git \ - LUAROCK_SHARD_TAG=278b906 \ - LUAROCK_HTTP_REPO=https://github.com/tarantool/http.git \ - LUAROCK_HTTP_TAG=67d8a9b \ - LUAROCK_PG_REPO=https://github.com/tarantool/pg.git \ - LUAROCK_PG_TAG=43a7130 \ - LUAROCK_MYSQL_REPO=https://github.com/tarantool/mysql.git \ - LUAROCK_MYSQL_TAG=1c15d30 \ - LUAROCK_MEMCACHED_REPO=https://github.com/tarantool/memcached.git \ - LUAROCK_MEMCACHED_TAG=c927626 \ - LUAROCK_TARANTOOL_PROMETHEUS_REPO=https://github.com/tarantool/prometheus.git \ - LUAROCK_TARANTOOL_PROMETHEUS_TAG=0654304 \ - LUAROCK_TARANTOOL_CURL_REPO=https://github.com/tarantool/curl.git \ - LUAROCK_TARANTOOL_CURL_TAG=2.2.7 \ - LUAROCK_MQTT_REPO=https://github.com/tarantool/mqtt.git \ - LUAROCK_MQTT_TAG=238fd2e \ - LUAROCK_TARANTOOL_GIS_REPO=https://github.com/tarantool/gis.git \ - LUAROCK_TARANTOOL_GIS_TAG=25209fc \ - LUAROCK_GPERFTOOLS_REPO=https://github.com/tarantool/gperftools.git \ - LUAROCK_GPERFTOOLS_TAG=12a7ac2 - -COPY gperftools_alpine.diff / - -RUN set -x \ - && apk add --no-cache --virtual .run-deps \ - libstdc++ \ - readline \ - libressl \ - yaml \ - lz4 \ - binutils \ - ncurses \ - libgomp \ - lua \ - tar \ - zip \ - ca-certificates \ - && apk add --no-cache --virtual .build-deps \ - gcc \ - g++ \ - cmake \ - readline-dev \ - libressl-dev \ - yaml-dev \ - lz4-dev \ - binutils-dev \ - ncurses-dev \ - lua-dev \ - musl-dev \ - make \ - git \ - libunwind-dev \ - autoconf \ - automake \ - libtool \ - linux-headers \ - go \ - wget \ - && : "---------- curl ----------" \ - && mkdir -p /usr/src/curl \ - && git clone "$CURL_REPO" /usr/src/curl \ - && git -C /usr/src/curl checkout "$CURL_TAG" \ - && (cd /usr/src/curl \ - && ./buildconf \ - && ./configure --prefix "/usr/local" \ - && make -j \ - && make install) \ - && : "---------- gperftools ----------" \ - && mkdir -p /usr/src/gperftools \ - && git clone "$GPERFTOOLS_REPO" /usr/src/gperftools \ - && git -C /usr/src/gperftools checkout "$GPERFTOOLS_TAG" \ - && (cd /usr/src/gperftools; \ - patch -p1 < /gperftools_alpine.diff; \ - rm /gperftools_alpine.diff; \ - ./autogen.sh; \ - ./configure; \ - make; \ - cp .libs/libprofiler.so* /usr/local/lib;) \ - && (GOPATH=/usr/src/go go get github.com/google/pprof; \ - cp /usr/src/go/bin/pprof /usr/local/bin) \ - && : "---------- tarantool ----------" \ - && mkdir -p /usr/src/tarantool \ - && git clone "$TARANTOOL_DOWNLOAD_URL" /usr/src/tarantool \ - && git -C /usr/src/tarantool checkout "$TARANTOOL_VERSION" \ - && git -C /usr/src/tarantool submodule update --init --recursive \ - && (cd /usr/src/tarantool; \ - cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo\ - -DENABLE_BUNDLED_LIBYAML:BOOL=OFF\ - -DENABLE_BACKTRACE:BOOL=ON\ - -DENABLE_DIST:BOOL=ON\ - .) \ - && make -C /usr/src/tarantool -j \ - && make -C /usr/src/tarantool install \ - && make -C /usr/src/tarantool clean \ - && : "---------- small ----------" \ - && (cd /usr/src/tarantool/src/lib/small; \ - cmake -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - .) \ - && make -C /usr/src/tarantool/src/lib/small \ - && make -C /usr/src/tarantool/src/lib/small install \ - && make -C /usr/src/tarantool/src/lib/small clean \ - && : "---------- msgpuck ----------" \ - && (cd /usr/src/tarantool/src/lib/msgpuck; \ - cmake -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - .) \ - && make -C /usr/src/tarantool/src/lib/msgpuck \ - && make -C /usr/src/tarantool/src/lib/msgpuck install \ - && make -C /usr/src/tarantool/src/lib/msgpuck clean \ - && : "---------- luarocks ----------" \ - && wget -O luarocks.tar.gz "$LUAROCKS_URL" \ - && mkdir -p /usr/src/luarocks \ - && tar -xzf luarocks.tar.gz -C /usr/src/luarocks --strip-components=1 \ - && (cd /usr/src/luarocks; \ - ./configure; \ - make build; \ - make install) \ - && rm -r /usr/src/luarocks \ - && rm -rf /usr/src/tarantool \ - && rm -rf /usr/src/gperftools \ - && rm -rf /usr/src/go \ - && : "---------- remove build deps ----------" \ - && apk del .build-deps - -COPY luarocks-config.lua /usr/local/etc/luarocks/config-5.1.lua - -RUN set -x \ - && apk add --no-cache --virtual .run-deps \ - mariadb-client-libs \ - libpq \ - cyrus-sasl \ - mosquitto-libs \ - libev \ - && apk add --no-cache --virtual .build-deps \ - git \ - cmake \ - make \ - gcc \ - g++ \ - postgresql-dev \ - lua-dev \ - musl-dev \ - cyrus-sasl-dev \ - mosquitto-dev \ - libev-dev \ - && : "---------- proj (for gis module) ----------" \ - && wget -O proj.tar.gz http://download.osgeo.org/proj/proj-4.9.3.tar.gz \ - && mkdir -p /usr/src/proj \ - && tar -xzf proj.tar.gz -C /usr/src/proj --strip-components=1 \ - && (cd /usr/src/proj; \ - ./configure; \ - make; \ - make install) \ - && rm -r /usr/src/proj \ - && rm -rf /usr/src/proj \ - && : "---------- geos (for gis module) ----------" \ - && wget -O geos.tar.bz2 http://download.osgeo.org/geos/geos-3.6.0.tar.bz2 \ - && mkdir -p /usr/src/geos \ - && tar -xjf geos.tar.bz2 -C /usr/src/geos --strip-components=1 \ - && (cd /usr/src/geos; \ - ./configure; \ - make; \ - make install) \ - && rm -r /usr/src/geos \ - && rm -rf /usr/src/geos \ - && : "---------- luarocks ----------" \ - && luarocks install lua-term \ - && luarocks install ldoc \ - && : "avro" \ - && git clone $LUAROCK_AVRO_SCHEMA_REPO /rocks/avro \ - && git -C /rocks/avro checkout $LUAROCK_AVRO_SCHEMA_TAG \ - && (cd /rocks/avro && luarocks make *rockspec) \ - && : "expirationd" \ - && git clone $LUAROCK_EXPIRATIOND_REPO /rocks/expirationd \ - && git -C /rocks/expirationd checkout $LUAROCK_EXPIRATIOND_TAG \ - && (cd /rocks/expirationd && luarocks make *rockspec) \ - && : "queue" \ - && git clone $LUAROCK_QUEUE_REPO /rocks/queue \ - && git -C /rocks/queue checkout $LUAROCK_QUEUE_TAG \ - && (cd /rocks/queue && luarocks make *rockspec) \ - && : "connpool" \ - && git clone $LUAROCK_CONNPOOL_REPO /rocks/connpool \ - && git -C /rocks/connpool checkout $LUAROCK_CONNPOOL_TAG \ - && (cd /rocks/connpool && luarocks make *rockspec) \ - && : "shard" \ - && git clone $LUAROCK_SHARD_REPO /rocks/shard \ - && git -C /rocks/shard checkout $LUAROCK_SHARD_TAG \ - && (cd /rocks/shard && luarocks make *rockspec) \ - && : "http" \ - && git clone $LUAROCK_HTTP_REPO /rocks/http \ - && git -C /rocks/http checkout $LUAROCK_HTTP_TAG \ - && (cd /rocks/http && luarocks make *rockspec) \ - && : "pg" \ - && git clone $LUAROCK_PG_REPO /rocks/pg \ - && git -C /rocks/pg checkout $LUAROCK_PG_TAG \ - && (cd /rocks/pg && luarocks make *rockspec) \ - && : "mysql" \ - && git clone $LUAROCK_MYSQL_REPO /rocks/mysql \ - && git -C /rocks/mysql checkout $LUAROCK_MYSQL_TAG \ - && (cd /rocks/mysql && luarocks make *rockspec) \ - && : "memcached" \ - && git clone $LUAROCK_MEMCACHED_REPO /rocks/memcached \ - && git -C /rocks/memcached checkout $LUAROCK_MEMCACHED_TAG \ - && (cd /rocks/memcached && luarocks make *rockspec) \ - && : "prometheus" \ - && git clone $LUAROCK_TARANTOOL_PROMETHEUS_REPO /rocks/prometheus \ - && git -C /rocks/prometheus checkout $LUAROCK_TARANTOOL_PROMETHEUS_TAG \ - && (cd /rocks/prometheus && luarocks make *rockspec) \ - && : "curl" \ - && git clone $LUAROCK_TARANTOOL_CURL_REPO /rocks/curl \ - && git -C /rocks/curl checkout $LUAROCK_TARANTOOL_CURL_TAG \ - && (cd /rocks/curl && luarocks make *rockspec) \ - && : "mqtt" \ - && git clone $LUAROCK_MQTT_REPO /rocks/mqtt \ - && git -C /rocks/mqtt checkout $LUAROCK_MQTT_TAG \ - && (cd /rocks/mqtt && luarocks make *rockspec) \ - && : "gis" \ - && git clone $LUAROCK_TARANTOOL_GIS_REPO /rocks/gis \ - && git -C /rocks/gis checkout $LUAROCK_TARANTOOL_GIS_TAG \ - && (cd /rocks/gis && luarocks make *rockspec) \ - && : "gperftools" \ - && git clone $LUAROCK_GPERFTOOLS_REPO /rocks/gperftools \ - && git -C /rocks/gperftools checkout $LUAROCK_GPERFTOOLS_TAG \ - && (cd /rocks/gperftools && luarocks make *rockspec) \ - && : "---------- remove build deps ----------" \ - && apk del .build-deps - - -RUN mkdir -p /var/lib/tarantool \ - && chown tarantool:tarantool /var/lib/tarantool \ - && mkdir -p /opt/tarantool \ - && chown tarantool:tarantool /opt/tarantool \ - && mkdir -p /var/run/tarantool \ - && chown tarantool:tarantool /var/run/tarantool \ - && mkdir /etc/tarantool \ - && chown tarantool:tarantool /etc/tarantool - -VOLUME /var/lib/tarantool -WORKDIR /opt/tarantool - -COPY tarantool-entrypoint.lua /usr/local/bin/ -COPY tarantool_set_config.lua /usr/local/bin/ -COPY docker-entrypoint.sh /usr/local/bin/ -COPY console /usr/local/bin/ -COPY tarantool_is_up /usr/local/bin/ -COPY tarantool.default /usr/local/etc/default/tarantool - -RUN ln -s usr/local/bin/docker-entrypoint.sh /entrypoint.sh # backwards compat -ENTRYPOINT ["docker-entrypoint.sh"] - -HEALTHCHECK CMD tarantool_is_up - -EXPOSE 3301 -CMD [ "tarantool" ] diff --git a/1.6/luarocks-config.lua b/1.6/luarocks-config.lua deleted file mode 100644 index 111f955..0000000 --- a/1.6/luarocks-config.lua +++ /dev/null @@ -1,9 +0,0 @@ -rocks_trees = { - { name = [[user]], root = home..[[/.luarocks]] }, - { name = [[system]], root = [[/usr/local]] } -} - -rocks_servers = { - [[http://rocks.tarantool.org/]], - [[http://luarocks.org/repositories/rocks]] -} diff --git a/1.6/tarantool-entrypoint.lua b/1.6/tarantool-entrypoint.lua deleted file mode 100755 index a71ec17..0000000 --- a/1.6/tarantool-entrypoint.lua +++ /dev/null @@ -1,261 +0,0 @@ -#!/usr/bin/env tarantool - -local fio = require('fio') -local errno = require('errno') -local fun = require('fun') -local urilib = require('uri') -local console = require('console') -local term = require('term') -local log = require('log') -local yaml = require('yaml') - -local TARANTOOL_DEFAULT_PORT = 3301 -local TARANTOOL_DEFAULT_SNAPSHOT_PERIOD = 3600 -- seconds -local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' -local CFG_FILE_PATH = '/etc/tarantool/config.yml' - - -local orig_cfg = box.cfg - -local function read_config() - local f = io.open(CFG_FILE_PATH, "rb") - if f == nil then - log.error("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) - os.exit(1) - end - local content = f:read("*all") - f:close() - return yaml.decode(content) -end - -local function write_config(cfg) - local f = io.open(CFG_FILE_PATH, "w+") - if f == nil then - print("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) - os.exit(1) - end - local content = yaml.encode(cfg) - f:write(content) - f:close() -end - -local function parse_replication_source(replication_source, user_name, user_password) - if replication_source == nil then - return nil - end - - local replication_source_table = {} - for uri in string.gmatch(replication_source, "[^,]+") do - local parsed_uri = urilib.parse(uri) - if parsed_uri == nil then - error("Incorrect replication source URI format: '"..uri.."'") - end - local host = parsed_uri.host - local port = parsed_uri.service or TARANTOOL_DEFAULT_PORT - local user = parsed_uri.login or user_name - local password = parsed_uri.password or user_password - - if user == 'guest' or user == nil then - replication_source = string.format("%s:%s", host, port) - elseif password == nil then - replication_source = string.format("%s:@%s:%s", user, host, port) - else - replication_source = string.format("%s:%s@%s:%s", user, password, - host, port) - end - - table.insert(replication_source_table, replication_source) - end - - return replication_source_table -end - -function set_replication_source(replication_source, user_name, user_password) - local replication_source_table = - parse_replication_source(replication_source, user_name, user_password) - box.cfg{replication_source = replication_source_table} - - log.info("Updated box.cfg{replication_source} to "..replication_source) -end - -local function create_user(user_name, user_password) - if user_name ~= 'guest' and user_password == nil then - user_password = "" - - local warn_str = [[**************************************************** -WARNING: No password has been set for the database. - This will allow anyone with access to the - Tarantool port to access your database. In - Docker's default configuration, this is - effectively any other container on the same - system. - Use "-e TARANTOOL_USER_PASSWORD=password" - to set it in "docker run". -****************************************************]] - log.warn('\n'..warn_str) - end - - if user_name == 'guest' and user_password == nil then - local warn_str = [[**************************************************** -WARNING: 'guest' is chosen as primary user. - Since it is not allowed to set a password for - guest user, your instance will be accessible - by anyone having direct access to the Tarantool - port. - If you wanted to create an authenticated user, - specify "-e TARANTOOL_USER_NAME=username" and - pick a user name other than "guest". -****************************************************]] - log.warn('\n'..warn_str) - end - - if user_name == 'guest' and user_password ~= nil then - user_password = nil - - local warn_str = [[**************************************************** -WARNING: A password for guest user has been specified. - In Tarantool, guest user can't have a password - and is always allowed to login, if it has - enough privileges. - If you wanted to create an authenticated user, - specify "-e TARANTOOL_USER_NAME=username" and - pick a user name other than "guest". -****************************************************]] - log.warn('\n'..warn_str) - end - - if user_name ~= 'admin' and user_name ~= 'guest' then - if not box.schema.user.exists(user_name) then - log.info("Creating user '%s'", user_name) - box.schema.user.create(user_name) - end - end - - if user_name ~= 'admin' then - log.info("Granting admin privileges to user '%s'", user_name) - box.schema.user.grant(user_name, 'read,write,execute', - 'universe', nil, {if_not_exists = true}) - box.schema.user.grant(user_name, 'replication', - nil, nil, {if_not_exists = true}) - end - - if user_name ~= 'guest' then - log.info("Setting password for user '%s'", user_name) - box.schema.user.passwd(user_name, user_password) - end -end - -function set_credentials(user_name, user_password) - create_user(user_name, user_password) -end - -local function wrapper_cfg(override) - local work_dir = '/var/lib/tarantool' - local snap_filename = "*.snap" - local snap_path = work_dir..'/'..snap_filename - - local first_run = false - if next(fio.glob(snap_path)) == nil then - first_run = true - end - - - local file_cfg = {} - local config_file_exists = fio.stat(CFG_FILE_PATH) ~= nil - if not config_file_exists then - log.info("Creating configuration file: " .. CFG_FILE_PATH) - - file_cfg.TARANTOOL_USER_NAME = os.getenv('TARANTOOL_USER_NAME') - file_cfg.TARANTOOL_USER_PASSWORD = os.getenv('TARANTOOL_USER_PASSWORD') - file_cfg.TARANTOOL_SLAB_ALLOC_ARENA = os.getenv('TARANTOOL_SLAB_ALLOC_ARENA') - file_cfg.TARANTOOL_SLAB_ALLOC_FACTOR = os.getenv('TARANTOOL_SLAB_ALLOC_FACTOR') - file_cfg.TARANTOOL_SLAB_ALLOC_MINIMAL = os.getenv('TARANTOOL_SLAB_ALLOC_MINIMAL') - file_cfg.TARANTOOL_SLAB_ALLOC_MAXIMAL = os.getenv('TARANTOOL_SLAB_ALLOC_MAXIMAL') - file_cfg.TARANTOOL_PORT = os.getenv('TARANTOOL_PORT') - file_cfg.TARANTOOL_WAL_MODE = os.getenv('TARANTOOL_WAL_MODE') - file_cfg.TARANTOOL_REPLICATION_SOURCE = os.getenv('TARANTOOL_REPLICATION_SOURCE') - file_cfg.TARANTOOL_SNAPSHOT_PERIOD = os.getenv('TARANTOOL_SNAPSHOT_PERIOD') - - write_config(file_cfg) - else - log.info("Loading existing configuration file: " .. CFG_FILE_PATH) - - file_cfg = read_config() - end - - local user_name = file_cfg.TARANTOOL_USER_NAME or - os.getenv('TARANTOOL_USER_NAME') or 'guest' - local user_password = file_cfg.TARANTOOL_USER_PASSWORD or - os.getenv('TARANTOOL_USER_PASSWORD') - - - local cfg = override or {} - cfg.slab_alloc_arena = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_ARENA) or - override.slab_alloc_arena - cfg.slab_alloc_factor = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_FACTOR) or - override.slab_alloc_factor - cfg.slab_alloc_maximal = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_MAXIMAL) or - override.slab_alloc_maximal - cfg.slab_alloc_minimal = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_MINIMAL) or - override.slab_alloc_minimal - cfg.listen = tonumber(file_cfg.TARANTOOL_PORT) or - override.listen or TARANTOOL_DEFAULT_PORT - cfg.wal_mode = file_cfg.TARANTOOL_WAL_MODE or - override.wal_mode - cfg.snapshot_period = tonumber(file_cfg.TARANTOOL_SNAPSHOT_PERIOD) or - override.snapshot_period or TARANTOOL_DEFAULT_SNAPSHOT_PERIOD - - cfg.wal_dir = override.wal_dir or '/var/lib/tarantool' - cfg.snap_dir = override.snap_dir or '/var/lib/tarantool' - cfg.pid_file = override.pid_file or '/var/run/tarantool/tarantool.pid' - - local replication_source = file_cfg.TARANTOOL_REPLICATION_SOURCE - local replication_source_table = parse_replication_source(replication_source, - user_name, - user_password) - - if replication_source then - cfg.replication_source = replication_source_table - else - cfg.replication_source = override.replication_source - end - - log.info("Config:\n" .. yaml.encode(cfg)) - - orig_cfg(cfg) - - box.once('tarantool-entrypoint', function () - if first_run then - log.info("Initializing database") - - create_user(user_name, user_password) - end - end) - - console.listen(CONSOLE_SOCKET_PATH) - -end - -box.cfg = wrapper_cfg - --- re-run the script passed as parameter with all arguments that follow -execute_script = arg[1] -if execute_script == nil then - box.cfg {} - - if term.isatty(io.stdout) then - console.start() - os.exit(0) - end -else - narg = 0 - while true do - arg[narg] = arg[narg + 1] - if arg[narg] == nil then - break - end - narg = narg + 1 - end - - dofile(execute_script) -end diff --git a/1.6/tarantool.default b/1.6/tarantool.default deleted file mode 100644 index 372dc23..0000000 --- a/1.6/tarantool.default +++ /dev/null @@ -1,21 +0,0 @@ --- --- System-wide settings for tarantoolctl and init scripts --- --- This file is meant to enable the usage of tarantoolctl inside --- docker containers. Since there is no init system, most of its --- functionality will not work, except 'tarantoolctl enter' or --- 'tarantoolctl status'. --- - -default_cfg = { - pid_file = "/var/run/tarantool", -- /var/run/tarantool/${INSTANCE}.pid - wal_dir = "/var/lib/tarantool", -- /var/lib/tarantool/${INSTANCE}/ - snap_dir = "/var/lib/tarantool", -- /var/lib/tarantool/${INSTANCE} - logger = "/var/log/tarantool", -- /var/log/tarantool/${INSTANCE}.log - username = "tarantool", -} - --- instances.available - all available instances --- instances.enabled - instances to autostart by sysvinit -instance_dir = "/usr/local/etc/tarantool/instances.enabled" --- vim: set ft=lua : diff --git a/1.6/tarantool_set_config.lua b/1.6/tarantool_set_config.lua deleted file mode 100755 index f6b2a55..0000000 --- a/1.6/tarantool_set_config.lua +++ /dev/null @@ -1,129 +0,0 @@ -#!/usr/bin/env tarantool - -local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' -local CFG_FILE_PATH = '/etc/tarantool/config.yml' - -local fio = require('fio') -local yaml = require('yaml') -local console = require('console') -local errno = require('errno') - -local function read_config() - local f = io.open(CFG_FILE_PATH, "rb") - if f == nil then - print("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) - os.exit(1) - end - local content = f:read("*all") - f:close() - return yaml.decode(content) -end - -local function write_config(cfg) - local f = io.open(CFG_FILE_PATH, "w+") - if f == nil then - print("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) - os.exit(1) - end - local content = yaml.encode(cfg) - f:write(content) - f:close() -end - -local function nop(console, cfg, value) -end - -local function update_replication_source(console, cfg, value) - local user_name = "nil" - if cfg['TARANTOOL_USER_NAME'] then - user_name = "'" .. cfg['TARANTOOL_USER_NAME'] .. "'" - end - - local user_password = "nil" - if cfg['TARANTOOL_USER_PASSWORD'] then - user_password = "'" .. cfg['TARANTOOL_USER_PASSWORD'] .. "'" - end - - local cmd = "set_replication_source('"..value.."', " .. user_name .. "," .. user_password .. ")" - print("cmd: ", cmd) - - local res = console:eval(cmd) - - if res ~= nil then - print(res) - end -end - -local function update_credentials(console, cfg, value) - local user_name = "nil" - if cfg['TARANTOOL_USER_NAME'] then - user_name = "'" .. cfg['TARANTOOL_USER_NAME'] .. "'" - end - - local user_password = "nil" - if cfg['TARANTOOL_USER_PASSWORD'] then - user_password = "'" .. cfg['TARANTOOL_USER_PASSWORD'] .. "'" - end - - local cmd = "set_credentials(" .. user_name .. "," .. user_password .. ")" - - local res = console:eval(cmd) - - if res ~= nil then - print(res) - end - - local replication_source = cfg['TARANTOOL_REPLICATION_SOURCE'] - - if replication_source ~= nil then - update_replication_source(console, cfg, replication_source) - end -end - - -local vars = { - TARANTOOL_SLAB_ALLOC_ARENA=nop, - TARANTOOL_SLAB_ALLOC_FACTOR=nop, - TARANTOOL_SLAB_ALLOC_MAXIMAL=nop, - TARANTOOL_SLAB_ALLOC_MINIMAL=nop, - TARANTOOL_PORT=nop, - TARANTOOL_WAL_MODE=nop, - TARANTOOL_USER_NAME=update_credentials, - TARANTOOL_USER_PASSWORD=update_credentials, - TARANTOOL_REPLICATION_SOURCE=update_replication_source -} - -console.on_start(function(self) - local status, reason - status, reason = pcall(function() require('console').connect(CONSOLE_SOCKET_PATH) end) - if not status then - self:print(reason) - os.exit(1) - end - - if arg[1] == nil or arg[2] == nil then - self:print("Usage: " .. arg[0] .. " ") - os.exit(1) - end - - if vars[arg[1]] == nil then - self:print("Unknown var: " .. arg[1]) - os.exit(1) - end - - local cfg = read_config() - cfg[arg[1]] = arg[2] - - local func = vars[arg[1]] - func(self, cfg, arg[2]) - - write_config(cfg) - - self.running = false - os.exit(0) -end) - -console.on_client_disconnect(function(self) self.running = false end) -console.start() - -os.exit(0) diff --git a/1.7/Dockerfile b/1.7/Dockerfile deleted file mode 100644 index ac8398f..0000000 --- a/1.7/Dockerfile +++ /dev/null @@ -1,244 +0,0 @@ -FROM alpine:3.5 -MAINTAINER mail@racktear.com - -RUN addgroup -S tarantool \ - && adduser -S -G tarantool tarantool \ - && apk add --no-cache 'su-exec>=0.2' - -ENV TARANTOOL_VERSION=1.7.6-27-g7ef5be2ee \ - TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ - TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ - CURL_REPO=https://github.com/curl/curl.git \ - CURL_TAG=curl-7_59_0 \ - GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ - GPERFTOOLS_TAG=gperftools-2.5 \ - LUAROCKS_URL=https://github.com/tarantool/luarocks/archive/6e6fe62d9409fe2103c0fd091cccb3da0451faf5.tar.gz \ - LUAROCK_SHARD_REPO=https://github.com/tarantool/shard.git \ - LUAROCK_SHARD_TAG=8f8c5a7 \ - LUAROCK_AVRO_SCHEMA_VERSION=2.0.1 \ - LUAROCK_EXPERATIOND_VERSION=1.0.1 \ - LUAROCK_QUEUE_VERSION=1.0.2 \ - LUAROCK_CONNPOOL_VERSION=1.1.1 \ - LUAROCK_HTTP_VERSION=1.0.1 \ - LUAROCK_MEMCACHED_VERSION=1.0.0 \ - LUAROCK_TARANTOOL_PG_VERSION=2.0.1 \ - LUAROCK_TARANTOOL_MYSQL_VERSION=2.0.1 \ - LUAROCK_TARANTOOL_MQTT_VERSION=1.2.1 \ - LUAROCK_TARANTOOL_GIS_VERSION=1.0.0 \ - LUAROCK_TARANTOOL_PROMETHEUS_VERSION=1.0.0 \ - LUAROCK_TARANTOOL_GPERFTOOLS_VERSION=1.0.1 - -COPY gperftools_alpine.diff / - -RUN set -x \ - && apk add --no-cache --virtual .run-deps \ - libstdc++ \ - readline \ - libressl \ - yaml \ - lz4 \ - binutils \ - ncurses \ - libgomp \ - lua \ - tar \ - zip \ - libunwind \ - icu \ - ca-certificates \ - && apk add --no-cache --virtual .build-deps \ - perl \ - gcc \ - g++ \ - cmake \ - readline-dev \ - libressl-dev \ - yaml-dev \ - lz4-dev \ - binutils-dev \ - ncurses-dev \ - lua-dev \ - musl-dev \ - make \ - git \ - libunwind-dev \ - autoconf \ - automake \ - libtool \ - linux-headers \ - go \ - icu-dev \ - wget \ - && : "---------- curl ----------" \ - && mkdir -p /usr/src/curl \ - && git clone "$CURL_REPO" /usr/src/curl \ - && git -C /usr/src/curl checkout "$CURL_TAG" \ - && (cd /usr/src/curl \ - && ./buildconf \ - && ./configure --prefix "/usr/local" \ - && make -j \ - && make install) \ - && : "---------- gperftools ----------" \ - && mkdir -p /usr/src/gperftools \ - && git clone "$GPERFTOOLS_REPO" /usr/src/gperftools \ - && git -C /usr/src/gperftools checkout "$GPERFTOOLS_TAG" \ - && (cd /usr/src/gperftools; \ - patch -p1 < /gperftools_alpine.diff; \ - rm /gperftools_alpine.diff; \ - ./autogen.sh; \ - ./configure; \ - make; \ - cp .libs/libprofiler.so* /usr/local/lib;) \ - && (GOPATH=/usr/src/go go get github.com/google/pprof; \ - cp /usr/src/go/bin/pprof /usr/local/bin) \ - && : "---------- tarantool ----------" \ - && mkdir -p /usr/src/tarantool \ - && git clone "$TARANTOOL_DOWNLOAD_URL" /usr/src/tarantool \ - && git -C /usr/src/tarantool checkout "$TARANTOOL_VERSION" \ - && git -C /usr/src/tarantool submodule update --init --recursive \ - && (cd /usr/src/tarantool; \ - cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo\ - -DENABLE_BUNDLED_LIBYAML:BOOL=OFF\ - -DENABLE_BACKTRACE:BOOL=ON\ - -DENABLE_DIST:BOOL=ON\ - .) \ - && make -C /usr/src/tarantool -j\ - && make -C /usr/src/tarantool install \ - && make -C /usr/src/tarantool clean \ - && : "---------- small ----------" \ - && (cd /usr/src/tarantool/src/lib/small; \ - cmake -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - .) \ - && make -C /usr/src/tarantool/src/lib/small \ - && make -C /usr/src/tarantool/src/lib/small install \ - && make -C /usr/src/tarantool/src/lib/small clean \ - && : "---------- msgpuck ----------" \ - && (cd /usr/src/tarantool/src/lib/msgpuck; \ - cmake -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - .) \ - && make -C /usr/src/tarantool/src/lib/msgpuck \ - && make -C /usr/src/tarantool/src/lib/msgpuck install \ - && make -C /usr/src/tarantool/src/lib/msgpuck clean \ - && : "---------- luarocks ----------" \ - && wget -O luarocks.tar.gz "$LUAROCKS_URL" \ - && mkdir -p /usr/src/luarocks \ - && tar -xzf luarocks.tar.gz -C /usr/src/luarocks --strip-components=1 \ - && (cd /usr/src/luarocks; \ - ./configure; \ - make build; \ - make install) \ - && rm -r /usr/src/luarocks \ - && rm -rf /usr/src/tarantool \ - && rm -rf /usr/src/gperftools \ - && rm -rf /usr/src/go \ - && : "---------- remove build deps ----------" \ - && apk del .build-deps - -COPY luarocks-config.lua /usr/local/etc/luarocks/config-5.1.lua - -RUN set -x \ - && apk add --no-cache --virtual .run-deps \ - mariadb-client-libs \ - libpq \ - cyrus-sasl \ - mosquitto-libs \ - libev \ - && apk add --no-cache --virtual .build-deps \ - git \ - cmake \ - make \ - coreutils \ - gcc \ - g++ \ - postgresql-dev \ - lua-dev \ - musl-dev \ - cyrus-sasl-dev \ - mosquitto-dev \ - libev-dev \ - && mkdir -p /rocks \ - && : "---------- proj (for gis module) ----------" \ - && wget -O proj.tar.gz http://download.osgeo.org/proj/proj-4.9.3.tar.gz \ - && mkdir -p /usr/src/proj \ - && tar -xzf proj.tar.gz -C /usr/src/proj --strip-components=1 \ - && (cd /usr/src/proj; \ - ./configure; \ - make; \ - make install) \ - && rm -r /usr/src/proj \ - && rm -rf /usr/src/proj \ - && : "---------- geos (for gis module) ----------" \ - && wget -O geos.tar.bz2 http://download.osgeo.org/geos/geos-3.6.0.tar.bz2 \ - && mkdir -p /usr/src/geos \ - && tar -xjf geos.tar.bz2 -C /usr/src/geos --strip-components=1 \ - && (cd /usr/src/geos; \ - ./configure; \ - make; \ - make install) \ - && rm -r /usr/src/geos \ - && rm -rf /usr/src/geos \ - && : "---------- luarocks ----------" \ - && luarocks install lua-term \ - && luarocks install ldoc \ - && : "avro" \ - && luarocks install avro-schema $LUAROCK_AVRO_SCHEMA_VERSION \ - && : "expirationd" \ - && luarocks install expirationd $LUAROCK_EXPERATIOND_VERSION \ - && : "queue" \ - && luarocks install queue $LUAROCK_QUEUE_VERSION \ - && : "connpool" \ - && luarocks install connpool $LUAROCK_CONNPOOL_VERSION \ - && : "shard" \ - && git clone $LUAROCK_SHARD_REPO /rocks/shard \ - && git -C /rocks/shard checkout $LUAROCK_SHARD_TAG \ - && (cd /rocks/shard && luarocks make *rockspec) \ - && : "http" \ - && luarocks install http $LUAROCK_HTTP_VERSION \ - && : "pg" \ - && luarocks install pg $LUAROCK_TARANTOOL_PG_VERSION \ - && : "mysql" \ - && luarocks install mysql $LUAROCK_TARANTOOL_MYSQL_VERSION \ - && : "memcached" \ - && luarocks install memcached $LUAROCK_MEMCACHED_VERSION \ - && : "prometheus" \ - && luarocks install prometheus $LUAROCK_TARANTOOL_PROMETHEUS_VERSION \ - && : "mqtt" \ - && luarocks install mqtt $LUAROCK_TARANTOOL_MQTT_VERSION \ - && : "gis" \ - && luarocks install gis $LUAROCK_TARANTOOL_GIS_VERSION \ - && : "gperftools" \ - && luarocks install gperftools $LUAROCK_TARANTOOL_GPERFTOOLS_VERSION \ - && : "---------- remove build deps ----------" \ - && apk del .build-deps \ - && rm -rf /rocks - -RUN mkdir -p /var/lib/tarantool \ - && chown tarantool:tarantool /var/lib/tarantool \ - && mkdir -p /opt/tarantool \ - && chown tarantool:tarantool /opt/tarantool \ - && mkdir -p /var/run/tarantool \ - && chown tarantool:tarantool /var/run/tarantool \ - && mkdir /etc/tarantool \ - && chown tarantool:tarantool /etc/tarantool - -VOLUME /var/lib/tarantool -WORKDIR /opt/tarantool - -COPY tarantool-entrypoint.lua /usr/local/bin/ -COPY tarantool_set_config.lua /usr/local/bin/ -COPY docker-entrypoint.sh /usr/local/bin/ -COPY console /usr/local/bin/ -COPY tarantool_is_up /usr/local/bin/ -COPY tarantool.default /usr/local/etc/default/tarantool - -RUN ln -s usr/local/bin/docker-entrypoint.sh /entrypoint.sh # backwards compat -ENTRYPOINT ["docker-entrypoint.sh"] - -HEALTHCHECK CMD tarantool_is_up - -EXPOSE 3301 -CMD [ "tarantool" ] diff --git a/1.7/console b/1.7/console deleted file mode 100755 index d6fb192..0000000 --- a/1.7/console +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env tarantool - -local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' - -console = require('console') -console.on_start(function(self) - local status, reason - status, reason = pcall(function() require('console').connect(CONSOLE_SOCKET_PATH) end) - if not status then - self:print(reason) - self.running = false - end -end) -console.on_client_disconnect(function(self) self.running = false end) -console.start() diff --git a/1.7/docker-entrypoint.sh b/1.7/docker-entrypoint.sh deleted file mode 100755 index 3a9f5e4..0000000 --- a/1.7/docker-entrypoint.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh -set -e - -# first arg is `-f` or `--some-option` -# or first arg is `something.conf` -if [ "${1:0:1}" = '-' ]; then - set -- tarantool "$@" -fi - -# allow the container to be started with `--user` -if [ "$1" = 'tarantool' -a "$(id -u)" = '0' ]; then - chown -R tarantool /var/lib/tarantool - exec su-exec tarantool "$0" "$@" -fi - -# entry point wraps the passed script to do basic setup -if [ "$1" = 'tarantool' ]; then - shift - exec tarantool "/usr/local/bin/tarantool-entrypoint.lua" "$@" -fi - -exec "$@" diff --git a/1.7/gperftools_alpine.diff b/1.7/gperftools_alpine.diff deleted file mode 100644 index e768381..0000000 --- a/1.7/gperftools_alpine.diff +++ /dev/null @@ -1,110 +0,0 @@ -diff --git a/src/base/linux_syscall_support.h b/src/base/linux_syscall_support.h -index 5d578cd..fceebe2 100644 ---- a/src/base/linux_syscall_support.h -+++ b/src/base/linux_syscall_support.h -@@ -2432,9 +2432,9 @@ struct kernel_stat { - #if defined(__s390x__) - LSS_INLINE _syscall1(void*, mmap, void*, a) - #else -- /* Need to make sure __off64_t isn't truncated to 32-bits under x32. */ -+ /* Need to make sure off64_t isn't truncated to 32-bits under x32. */ - LSS_INLINE void* LSS_NAME(mmap)(void *s, size_t l, int p, int f, int d, -- __off64_t o) { -+ off64_t o) { - LSS_BODY(6, void*, mmap, LSS_SYSCALL_ARG(s), LSS_SYSCALL_ARG(l), - LSS_SYSCALL_ARG(p), LSS_SYSCALL_ARG(f), - LSS_SYSCALL_ARG(d), (uint64_t)(o)); -@@ -2475,7 +2475,7 @@ struct kernel_stat { - LSS_INLINE _syscall6(void*, mmap, void*, s, - size_t, l, int, p, - int, f, int, d, -- __off64_t, o) -+ off64_t, o) - LSS_INLINE int LSS_NAME(sigaction)(int signum, - const struct kernel_sigaction *act, - struct kernel_sigaction *oldact) { -diff --git a/src/malloc_hook_mmap_linux.h b/src/malloc_hook_mmap_linux.h -index 1c4c766..b2aa8ed 100755 ---- a/src/malloc_hook_mmap_linux.h -+++ b/src/malloc_hook_mmap_linux.h -@@ -56,7 +56,7 @@ - - static inline void* do_mmap64(void *start, size_t length, - int prot, int flags, -- int fd, __off64_t offset) __THROW { -+ int fd, off64_t offset) __THROW { - return sys_mmap(start, length, prot, flags, fd, offset); - } - -@@ -67,7 +67,7 @@ static inline void* do_mmap64(void *start, size_t length, - - static inline void* do_mmap64(void *start, size_t length, - int prot, int flags, -- int fd, __off64_t offset) __THROW { -+ int fd, off64_t offset) __THROW { - void *result; - - // Try mmap2() unless it's not supported -@@ -151,9 +151,11 @@ static inline void* do_mmap64(void *start, size_t length, - # undef mmap - - extern "C" { -+ #ifndef mmap64 - void* mmap64(void *start, size_t length, int prot, int flags, -- int fd, __off64_t offset ) __THROW -+ int fd, off64_t offset ) __THROW - ATTRIBUTE_SECTION(malloc_hook); -+ #endif - void* mmap(void *start, size_t length,int prot, int flags, - int fd, off_t offset) __THROW - ATTRIBUTE_SECTION(malloc_hook); -@@ -166,8 +168,9 @@ extern "C" { - ATTRIBUTE_SECTION(malloc_hook); - } - -+#ifndef mmap64 - extern "C" void* mmap64(void *start, size_t length, int prot, int flags, -- int fd, __off64_t offset) __THROW { -+ int fd, off64_t offset) __THROW { - MallocHook::InvokePreMmapHook(start, length, prot, flags, fd, offset); - void *result; - if (!MallocHook::InvokeMmapReplacement( -@@ -177,6 +180,7 @@ extern "C" void* mmap64(void *start, size_t length, int prot, int flags, - MallocHook::InvokeMmapHook(result, start, length, prot, flags, fd, offset); - return result; - } -+#endif - - # if !defined(__USE_FILE_OFFSET64) || !defined(__REDIRECT_NTH) - -@@ -216,7 +220,7 @@ extern "C" void* mremap(void* old_addr, size_t old_size, size_t new_size, - return result; - } - --#ifndef __UCLIBC__ -+#if defined(__GLIBC__) && ! defined(__UCLIBC__) - // libc's version: - extern "C" void* __sbrk(ptrdiff_t increment); - -diff --git a/src/tests/stacktrace_unittest.cc b/src/tests/stacktrace_unittest.cc -index 3c9f735..2d39ad9 100644 ---- a/src/tests/stacktrace_unittest.cc -+++ b/src/tests/stacktrace_unittest.cc -@@ -120,17 +120,6 @@ void ATTRIBUTE_NOINLINE CheckStackTraceLeaf(void) { - CHECK_GE(size, 1); - CHECK_LE(size, STACK_LEN); - --#ifdef HAVE_EXECINFO_H -- { -- char **strings = backtrace_symbols(stack, size); -- printf("Obtained %d stack frames.\n", size); -- for (int i = 0; i < size; i++) -- printf("%s %p\n", strings[i], stack[i]); -- printf("CheckStackTrace() addr: %p\n", &CheckStackTrace); -- free(strings); -- } --#endif -- - for (int i = 0; i < BACKTRACE_STEPS; i++) { - printf("Backtrace %d: expected: %p..%p actual: %p ... ", - i, expected_range[i].start, expected_range[i].end, stack[i]); diff --git a/1.7/luarocks-config.lua b/1.7/luarocks-config.lua deleted file mode 100644 index 111f955..0000000 --- a/1.7/luarocks-config.lua +++ /dev/null @@ -1,9 +0,0 @@ -rocks_trees = { - { name = [[user]], root = home..[[/.luarocks]] }, - { name = [[system]], root = [[/usr/local]] } -} - -rocks_servers = { - [[http://rocks.tarantool.org/]], - [[http://luarocks.org/repositories/rocks]] -} diff --git a/1.7/tarantool-entrypoint.lua b/1.7/tarantool-entrypoint.lua deleted file mode 100755 index 11cd89d..0000000 --- a/1.7/tarantool-entrypoint.lua +++ /dev/null @@ -1,292 +0,0 @@ -#!/usr/bin/env tarantool - -local fio = require('fio') -local errno = require('errno') -local fun = require('fun') -local urilib = require('uri') -local console = require('console') -local term = require('term') -local log = require('log') -local yaml = require('yaml') - -local TARANTOOL_DEFAULT_PORT = 3301 -local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' -local CFG_FILE_PATH = '/etc/tarantool/config.yml' - - -local orig_cfg = box.cfg - -local function read_config() - local f = io.open(CFG_FILE_PATH, "rb") - if f == nil then - log.error("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) - os.exit(1) - end - local content = f:read("*all") - f:close() - return yaml.decode(content) -end - -local function write_config(cfg) - local f = io.open(CFG_FILE_PATH, "w+") - if f == nil then - print("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) - os.exit(1) - end - local content = yaml.encode(cfg) - f:write(content) - f:close() -end - -local function parse_replication_source(replication_source, user_name, user_password) - if replication_source == nil then - return nil - end - - local replication_source_table = {} - for uri in string.gmatch(replication_source, "[^,]+") do - local parsed_uri = urilib.parse(uri) - if parsed_uri == nil then - error("Incorrect replication source URI format: '"..uri.."'") - end - local host = parsed_uri.host - local port = parsed_uri.service or TARANTOOL_DEFAULT_PORT - local user = parsed_uri.login or user_name - local password = parsed_uri.password or user_password - - if user == 'guest' or user == nil then - replication_source = string.format("%s:%s", host, port) - elseif password == nil then - replication_source = string.format("%s:@%s:%s", user, host, port) - else - replication_source = string.format("%s:%s@%s:%s", user, password, - host, port) - end - - table.insert(replication_source_table, replication_source) - end - - return replication_source_table -end - -local function choose_option(main, substitute, cfg) - if cfg[main] then - return main - end - if cfg[substitute] then - return substitute - end - return main -end - -function set_replication_source(replication_source, user_name, user_password) - local replication_source_table = parse_replication_source( - replication_source, user_name, user_password - ) - local choice = choose_option('replication', 'replication_source', box.cfg) - box.cfg{[choice] = replication_source_table} - log.info("Updated box.cfg.%s to %s", choice, replication_source) -end - -local function create_user(user_name, user_password) - if user_name ~= 'guest' and user_password == nil then - user_password = "" - - local warn_str = [[**************************************************** -WARNING: No password has been set for the database. - This will allow anyone with access to the - Tarantool port to access your database. In - Docker's default configuration, this is - effectively any other container on the same - system. - Use "-e TARANTOOL_USER_PASSWORD=password" - to set it in "docker run". -****************************************************]] - log.warn('\n'..warn_str) - end - - if user_name == 'guest' and user_password == nil then - local warn_str = [[**************************************************** -WARNING: 'guest' is chosen as primary user. - Since it is not allowed to set a password for - guest user, your instance will be accessible - by anyone having direct access to the Tarantool - port. - If you wanted to create an authenticated user, - specify "-e TARANTOOL_USER_NAME=username" and - pick a user name other than "guest". -****************************************************]] - log.warn('\n'..warn_str) - end - - if user_name == 'guest' and user_password ~= nil then - user_password = nil - - local warn_str = [[**************************************************** -WARNING: A password for guest user has been specified. - In Tarantool, guest user can't have a password - and is always allowed to login, if it has - enough privileges. - If you wanted to create an authenticated user, - specify "-e TARANTOOL_USER_NAME=username" and - pick a user name other than "guest". -****************************************************]] - log.warn('\n'..warn_str) - end - - if user_name ~= 'admin' and user_name ~= 'guest' then - if not box.schema.user.exists(user_name) then - log.info("Creating user '%s'", user_name) - box.schema.user.create(user_name) - end - end - - if user_name ~= 'admin' then - log.info("Granting admin privileges to user '%s'", user_name) - box.schema.user.grant(user_name, 'read,write,execute', - 'universe', nil, {if_not_exists = true}) - box.schema.user.grant(user_name, 'replication', - nil, nil, {if_not_exists = true}) - end - - if user_name ~= 'guest' then - log.info("Setting password for user '%s'", user_name) - box.schema.user.passwd(user_name, user_password) - end -end - -function set_credentials(user_name, user_password) - create_user(user_name, user_password) -end - -local function wrapper_cfg(override) - local work_dir = '/var/lib/tarantool' - local snap_filename = "*.snap" - local snap_path = work_dir..'/'..snap_filename - - local first_run = false - if next(fio.glob(snap_path)) == nil then - first_run = true - end - - - local file_cfg = {} - local config_file_exists = fio.stat(CFG_FILE_PATH) ~= nil - if not config_file_exists then - log.info("Creating configuration file: " .. CFG_FILE_PATH) - - file_cfg.TARANTOOL_USER_NAME = os.getenv('TARANTOOL_USER_NAME') - file_cfg.TARANTOOL_USER_PASSWORD = os.getenv('TARANTOOL_USER_PASSWORD') - file_cfg.TARANTOOL_SLAB_ALLOC_ARENA = os.getenv('TARANTOOL_SLAB_ALLOC_ARENA') - file_cfg.TARANTOOL_SLAB_ALLOC_FACTOR = os.getenv('TARANTOOL_SLAB_ALLOC_FACTOR') - file_cfg.TARANTOOL_SLAB_ALLOC_MINIMAL = os.getenv('TARANTOOL_SLAB_ALLOC_MINIMAL') - file_cfg.TARANTOOL_SLAB_ALLOC_MAXIMAL = os.getenv('TARANTOOL_SLAB_ALLOC_MAXIMAL') - file_cfg.TARANTOOL_PORT = os.getenv('TARANTOOL_PORT') - file_cfg.TARANTOOL_WAL_MODE = os.getenv('TARANTOOL_WAL_MODE') - file_cfg.TARANTOOL_REPLICATION_SOURCE = os.getenv('TARANTOOL_REPLICATION_SOURCE') - file_cfg.TARANTOOL_REPLICATION = os.getenv('TARANTOOL_REPLICATION') - file_cfg.TARANTOOL_SNAPSHOT_PERIOD = os.getenv('TARANTOOL_SNAPSHOT_PERIOD') - file_cfg.TARANTOOL_MEMTX_MEMORY = os.getenv('TARANTOOL_MEMTX_MEMORY') - file_cfg.TARANTOOL_CHECKPOINT_INTERVAL = os.getenv('TARANTOOL_CHECKPOINT_INTERVAL') - file_cfg.TARANTOOL_MEMTX_MIN_TUPLE_SIZE = os.getenv('TARANTOOL_MEMTX_MIN_TUPLE_SIZE') - file_cfg.TARANTOOL_MEMTX_MAX_TUPLE_SIZE = os.getenv('TARANTOOL_MEMTX_MAX_TUPLE_SIZE') - - write_config(file_cfg) - else - log.info("Loading existing configuration file: " .. CFG_FILE_PATH) - - file_cfg = read_config() - end - - local user_name = file_cfg.TARANTOOL_USER_NAME or - os.getenv('TARANTOOL_USER_NAME') or 'guest' - local user_password = file_cfg.TARANTOOL_USER_PASSWORD or - os.getenv('TARANTOOL_USER_PASSWORD') - - - local cfg = override or {} - -- Placeholders for deprecated options - cfg.slab_alloc_arena = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_ARENA) or - override.slab_alloc_arena - cfg.slab_alloc_maximal = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_MAXIMAL) or - override.slab_alloc_maximal - cfg.slab_alloc_minimal = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_MINIMAL) or - override.slab_alloc_minimal - cfg.snapshot_period = tonumber(file_cfg.TARANTOOL_SNAPSHOT_PERIOD) or - override.snapshot_period - -- Replacements for deprecated options - cfg.memtx_memory = tonumber(file_cfg.TARANTOOL_MEMTX_MEMORY) or - override.memtx_memory - cfg.memtx_min_tuple_size = tonumber(file_cfg.TARANTOOL_MEMTX_MIN_TUPLE_SIZE) or - override.memtx_min_tuple_size - cfg.memtx_max_tuple_size = tonumber(file_cfg.TARANTOOL_MEMTX_MAX_TUPLE_SIZE) or - override.memtx_max_tuple_size - cfg.checkpoint_interval = tonumber(file_cfg.TARANTOOL_CHECKPOINT_INTERVAL) or - override.checkpoint_interval - -- Deprecated options with default values - local choice = choose_option('memtx_dir', 'snap_dir', override) - cfg[choice] = override[choice] or '/var/lib/tarantool' - - -- Remaining configuration - cfg.slab_alloc_factor = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_FACTOR) or - override.slab_alloc_factor - cfg.listen = tonumber(file_cfg.TARANTOOL_PORT) or - override.listen or TARANTOOL_DEFAULT_PORT - cfg.wal_mode = file_cfg.TARANTOOL_WAL_MODE or - override.wal_mode - - cfg.wal_dir = override.wal_dir or '/var/lib/tarantool' - cfg.vinyl_dir = override.vinyl_dir or '/var/lib/tarantool' - cfg.pid_file = override.pid_file or '/var/run/tarantool/tarantool.pid' - - local choice = choose_option('TARANTOOL_REPLICATION', 'TARANTOOL_REPLICATION_SOURCE', file_cfg) - local replication_source_table = parse_replication_source(file_cfg[choice], - user_name, - user_password) - - if replication_source_table then - cfg.replication = replication_source_table - else - local choice = choose_option('replication', 'replication_source', override) - cfg[choice] = override[choice] - end - - log.info("Config:\n" .. yaml.encode(cfg)) - - orig_cfg(cfg) - - box.once('tarantool-entrypoint', function () - if first_run then - log.info("Initializing database") - - create_user(user_name, user_password) - end - end) - - console.listen(CONSOLE_SOCKET_PATH) - -end - -box.cfg = wrapper_cfg - --- re-run the script passed as parameter with all arguments that follow -execute_script = arg[1] -if execute_script == nil then - box.cfg {} - - if term.isatty(io.stdout) then - console.start() - os.exit(0) - end -else - narg = 0 - while true do - arg[narg] = arg[narg + 1] - if arg[narg] == nil then - break - end - narg = narg + 1 - end - - dofile(execute_script) -end diff --git a/1.7/tarantool_is_up b/1.7/tarantool_is_up deleted file mode 100755 index 71148d5..0000000 --- a/1.7/tarantool_is_up +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh - -status=$( (tarantool <<-'EOF' -local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' -local console = require('console') -local os = require("os") -local yaml = require("yaml") - -console.on_start(function(self) - local status, reason - status, reason = pcall(function() require('console').connect(CONSOLE_SOCKET_PATH) end) - if not status then - self:print(reason) - os.exit(1) - end - - cmd = 'box.info.status' - local res = self:eval(cmd) - if res ~= nil then - res = yaml.decode(res) - print(res[1]) - end - - os.exit(0) -end) - -console.on_client_disconnect(function(self) self.running = false end) -console.start() - -os.exit(0) -EOF -) 2>/dev/null) - - -echo "$status" - -if [ "$status" = "running" ]; then - exit 0 -else - exit 1 -fi diff --git a/1.7/tarantool_set_config.lua b/1.7/tarantool_set_config.lua deleted file mode 100755 index ddca36c..0000000 --- a/1.7/tarantool_set_config.lua +++ /dev/null @@ -1,130 +0,0 @@ -#!/usr/bin/env tarantool - -local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' -local CFG_FILE_PATH = '/etc/tarantool/config.yml' - -local fio = require('fio') -local yaml = require('yaml') -local console = require('console') -local errno = require('errno') - -local function read_config() - local f = io.open(CFG_FILE_PATH, "rb") - if f == nil then - print("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) - os.exit(1) - end - local content = f:read("*all") - f:close() - return yaml.decode(content) -end - -local function write_config(cfg) - local f = io.open(CFG_FILE_PATH, "w+") - if f == nil then - print("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) - os.exit(1) - end - local content = yaml.encode(cfg) - f:write(content) - f:close() -end - -local function nop(console, cfg, value) -end - -local function update_replication_source(console, cfg, value) - local user_name = "nil" - if cfg['TARANTOOL_USER_NAME'] then - user_name = "'" .. cfg['TARANTOOL_USER_NAME'] .. "'" - end - - local user_password = "nil" - if cfg['TARANTOOL_USER_PASSWORD'] then - user_password = "'" .. cfg['TARANTOOL_USER_PASSWORD'] .. "'" - end - - local cmd = "set_replication_source('"..value.."', " .. user_name .. "," .. user_password .. ")" - print("cmd: ", cmd) - - local res = console:eval(cmd) - - if res ~= nil then - print(res) - end -end - -local function update_credentials(console, cfg, value) - local user_name = "nil" - if cfg['TARANTOOL_USER_NAME'] then - user_name = "'" .. cfg['TARANTOOL_USER_NAME'] .. "'" - end - - local user_password = "nil" - if cfg['TARANTOOL_USER_PASSWORD'] then - user_password = "'" .. cfg['TARANTOOL_USER_PASSWORD'] .. "'" - end - - local cmd = "set_credentials(" .. user_name .. "," .. user_password .. ")" - - local res = console:eval(cmd) - - if res ~= nil then - print(res) - end - - local replication_source = cfg['TARANTOOL_REPLICATION_SOURCE'] - - if replication_source ~= nil then - update_replication_source(console, cfg, replication_source) - end -end - - -local vars = { - TARANTOOL_SLAB_ALLOC_ARENA=nop, - TARANTOOL_SLAB_ALLOC_FACTOR=nop, - TARANTOOL_SLAB_ALLOC_MAXIMAL=nop, - TARANTOOL_SLAB_ALLOC_MINIMAL=nop, - TARANTOOL_PORT=nop, - TARANTOOL_WAL_MODE=nop, - TARANTOOL_USER_NAME=update_credentials, - TARANTOOL_USER_PASSWORD=update_credentials, - TARANTOOL_REPLICATION_SOURCE=update_replication_source, - TARANTOOL_REPLICATION=update_replication_source, -} - -console.on_start(function(self) - local status, reason - status, reason = pcall(function() require('console').connect(CONSOLE_SOCKET_PATH) end) - if not status then - self:print(reason) - os.exit(1) - end - - if arg[1] == nil or arg[2] == nil then - self:print("Usage: " .. arg[0] .. " ") - os.exit(1) - end - - if vars[arg[1]] == nil then - self:print("Unknown var: " .. arg[1]) - os.exit(1) - end - - local cfg = read_config() - cfg[arg[1]] = arg[2] - - local func = vars[arg[1]] - func(self, cfg, arg[2]) - - write_config(cfg) - - self.running = false - os.exit(0) -end) - -console.on_client_disconnect(function(self) self.running = false end) -console.start() - -os.exit(0) diff --git a/1.9/Dockerfile b/1.9/Dockerfile deleted file mode 100644 index 35df221..0000000 --- a/1.9/Dockerfile +++ /dev/null @@ -1,244 +0,0 @@ -FROM alpine:3.5 -MAINTAINER mail@racktear.com - -RUN addgroup -S tarantool \ - && adduser -S -G tarantool tarantool \ - && apk add --no-cache 'su-exec>=0.2' - -ENV TARANTOOL_VERSION=1.9.2-13-gfa7c74b4d \ - TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ - TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ - CURL_REPO=https://github.com/curl/curl.git \ - CURL_TAG=curl-7_59_0 \ - GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ - GPERFTOOLS_TAG=gperftools-2.5 \ - LUAROCKS_URL=https://github.com/tarantool/luarocks/archive/6e6fe62d9409fe2103c0fd091cccb3da0451faf5.tar.gz \ - LUAROCK_SHARD_REPO=https://github.com/tarantool/shard.git \ - LUAROCK_SHARD_TAG=8f8c5a7 \ - LUAROCK_AVRO_SCHEMA_VERSION=2.0.1 \ - LUAROCK_EXPERATIOND_VERSION=1.0.1 \ - LUAROCK_QUEUE_VERSION=1.0.2 \ - LUAROCK_CONNPOOL_VERSION=1.1.1 \ - LUAROCK_HTTP_VERSION=1.0.1 \ - LUAROCK_MEMCACHED_VERSION=1.0.0 \ - LUAROCK_TARANTOOL_PG_VERSION=2.0.1 \ - LUAROCK_TARANTOOL_MYSQL_VERSION=2.0.1 \ - LUAROCK_TARANTOOL_MQTT_VERSION=1.2.1 \ - LUAROCK_TARANTOOL_GIS_VERSION=1.0.0 \ - LUAROCK_TARANTOOL_PROMETHEUS_VERSION=1.0.0 \ - LUAROCK_TARANTOOL_GPERFTOOLS_VERSION=1.0.1 - -COPY gperftools_alpine.diff / - -RUN set -x \ - && apk add --no-cache --virtual .run-deps \ - libstdc++ \ - readline \ - libressl \ - yaml \ - lz4 \ - binutils \ - ncurses \ - libgomp \ - lua \ - tar \ - zip \ - libunwind \ - icu \ - ca-certificates \ - && apk add --no-cache --virtual .build-deps \ - perl \ - gcc \ - g++ \ - cmake \ - readline-dev \ - libressl-dev \ - yaml-dev \ - lz4-dev \ - binutils-dev \ - ncurses-dev \ - lua-dev \ - musl-dev \ - make \ - git \ - libunwind-dev \ - autoconf \ - automake \ - libtool \ - linux-headers \ - go \ - icu-dev \ - wget \ - && : "---------- curl ----------" \ - && mkdir -p /usr/src/curl \ - && git clone "$CURL_REPO" /usr/src/curl \ - && git -C /usr/src/curl checkout "$CURL_TAG" \ - && (cd /usr/src/curl \ - && ./buildconf \ - && ./configure --prefix "/usr/local" \ - && make -j \ - && make install) \ - && : "---------- gperftools ----------" \ - && mkdir -p /usr/src/gperftools \ - && git clone "$GPERFTOOLS_REPO" /usr/src/gperftools \ - && git -C /usr/src/gperftools checkout "$GPERFTOOLS_TAG" \ - && (cd /usr/src/gperftools; \ - patch -p1 < /gperftools_alpine.diff; \ - rm /gperftools_alpine.diff; \ - ./autogen.sh; \ - ./configure; \ - make; \ - cp .libs/libprofiler.so* /usr/local/lib;) \ - && (GOPATH=/usr/src/go go get github.com/google/pprof; \ - cp /usr/src/go/bin/pprof /usr/local/bin) \ - && : "---------- tarantool ----------" \ - && mkdir -p /usr/src/tarantool \ - && git clone "$TARANTOOL_DOWNLOAD_URL" /usr/src/tarantool \ - && git -C /usr/src/tarantool checkout "$TARANTOOL_VERSION" \ - && git -C /usr/src/tarantool submodule update --init --recursive \ - && (cd /usr/src/tarantool; \ - cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo\ - -DENABLE_BUNDLED_LIBYAML:BOOL=OFF\ - -DENABLE_BACKTRACE:BOOL=ON\ - -DENABLE_DIST:BOOL=ON\ - .) \ - && make -C /usr/src/tarantool -j\ - && make -C /usr/src/tarantool install \ - && make -C /usr/src/tarantool clean \ - && : "---------- small ----------" \ - && (cd /usr/src/tarantool/src/lib/small; \ - cmake -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - .) \ - && make -C /usr/src/tarantool/src/lib/small \ - && make -C /usr/src/tarantool/src/lib/small install \ - && make -C /usr/src/tarantool/src/lib/small clean \ - && : "---------- msgpuck ----------" \ - && (cd /usr/src/tarantool/src/lib/msgpuck; \ - cmake -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - .) \ - && make -C /usr/src/tarantool/src/lib/msgpuck \ - && make -C /usr/src/tarantool/src/lib/msgpuck install \ - && make -C /usr/src/tarantool/src/lib/msgpuck clean \ - && : "---------- luarocks ----------" \ - && wget -O luarocks.tar.gz "$LUAROCKS_URL" \ - && mkdir -p /usr/src/luarocks \ - && tar -xzf luarocks.tar.gz -C /usr/src/luarocks --strip-components=1 \ - && (cd /usr/src/luarocks; \ - ./configure; \ - make build; \ - make install) \ - && rm -r /usr/src/luarocks \ - && rm -rf /usr/src/tarantool \ - && rm -rf /usr/src/gperftools \ - && rm -rf /usr/src/go \ - && : "---------- remove build deps ----------" \ - && apk del .build-deps - -COPY luarocks-config.lua /usr/local/etc/luarocks/config-5.1.lua - -RUN set -x \ - && apk add --no-cache --virtual .run-deps \ - mariadb-client-libs \ - libpq \ - cyrus-sasl \ - mosquitto-libs \ - libev \ - && apk add --no-cache --virtual .build-deps \ - git \ - cmake \ - make \ - coreutils \ - gcc \ - g++ \ - postgresql-dev \ - lua-dev \ - musl-dev \ - cyrus-sasl-dev \ - mosquitto-dev \ - libev-dev \ - && mkdir -p /rocks \ - && : "---------- proj (for gis module) ----------" \ - && wget -O proj.tar.gz http://download.osgeo.org/proj/proj-4.9.3.tar.gz \ - && mkdir -p /usr/src/proj \ - && tar -xzf proj.tar.gz -C /usr/src/proj --strip-components=1 \ - && (cd /usr/src/proj; \ - ./configure; \ - make; \ - make install) \ - && rm -r /usr/src/proj \ - && rm -rf /usr/src/proj \ - && : "---------- geos (for gis module) ----------" \ - && wget -O geos.tar.bz2 http://download.osgeo.org/geos/geos-3.6.0.tar.bz2 \ - && mkdir -p /usr/src/geos \ - && tar -xjf geos.tar.bz2 -C /usr/src/geos --strip-components=1 \ - && (cd /usr/src/geos; \ - ./configure; \ - make; \ - make install) \ - && rm -r /usr/src/geos \ - && rm -rf /usr/src/geos \ - && : "---------- luarocks ----------" \ - && luarocks install lua-term \ - && luarocks install ldoc \ - && : "avro" \ - && luarocks install avro-schema $LUAROCK_AVRO_SCHEMA_VERSION \ - && : "expirationd" \ - && luarocks install expirationd $LUAROCK_EXPERATIOND_VERSION \ - && : "queue" \ - && luarocks install queue $LUAROCK_QUEUE_VERSION \ - && : "connpool" \ - && luarocks install connpool $LUAROCK_CONNPOOL_VERSION \ - && : "shard" \ - && git clone $LUAROCK_SHARD_REPO /rocks/shard \ - && git -C /rocks/shard checkout $LUAROCK_SHARD_TAG \ - && (cd /rocks/shard && luarocks make *rockspec) \ - && : "http" \ - && luarocks install http $LUAROCK_HTTP_VERSION \ - && : "pg" \ - && luarocks install pg $LUAROCK_TARANTOOL_PG_VERSION \ - && : "mysql" \ - && luarocks install mysql $LUAROCK_TARANTOOL_MYSQL_VERSION \ - && : "memcached" \ - && luarocks install memcached $LUAROCK_MEMCACHED_VERSION \ - && : "prometheus" \ - && luarocks install prometheus $LUAROCK_TARANTOOL_PROMETHEUS_VERSION \ - && : "mqtt" \ - && luarocks install mqtt $LUAROCK_TARANTOOL_MQTT_VERSION \ - && : "gis" \ - && luarocks install gis $LUAROCK_TARANTOOL_GIS_VERSION \ - && : "gperftools" \ - && luarocks install gperftools $LUAROCK_TARANTOOL_GPERFTOOLS_VERSION \ - && : "---------- remove build deps ----------" \ - && apk del .build-deps \ - && rm -rf /rocks - -RUN mkdir -p /var/lib/tarantool \ - && chown tarantool:tarantool /var/lib/tarantool \ - && mkdir -p /opt/tarantool \ - && chown tarantool:tarantool /opt/tarantool \ - && mkdir -p /var/run/tarantool \ - && chown tarantool:tarantool /var/run/tarantool \ - && mkdir /etc/tarantool \ - && chown tarantool:tarantool /etc/tarantool - -VOLUME /var/lib/tarantool -WORKDIR /opt/tarantool - -COPY tarantool-entrypoint.lua /usr/local/bin/ -COPY tarantool_set_config.lua /usr/local/bin/ -COPY docker-entrypoint.sh /usr/local/bin/ -COPY console /usr/local/bin/ -COPY tarantool_is_up /usr/local/bin/ -COPY tarantool.default /usr/local/etc/default/tarantool - -RUN ln -s usr/local/bin/docker-entrypoint.sh /entrypoint.sh # backwards compat -ENTRYPOINT ["docker-entrypoint.sh"] - -HEALTHCHECK CMD tarantool_is_up - -EXPOSE 3301 -CMD [ "tarantool" ] diff --git a/1.9/console b/1.9/console deleted file mode 100755 index d6fb192..0000000 --- a/1.9/console +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env tarantool - -local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' - -console = require('console') -console.on_start(function(self) - local status, reason - status, reason = pcall(function() require('console').connect(CONSOLE_SOCKET_PATH) end) - if not status then - self:print(reason) - self.running = false - end -end) -console.on_client_disconnect(function(self) self.running = false end) -console.start() diff --git a/1.9/docker-entrypoint.sh b/1.9/docker-entrypoint.sh deleted file mode 100755 index 3a9f5e4..0000000 --- a/1.9/docker-entrypoint.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh -set -e - -# first arg is `-f` or `--some-option` -# or first arg is `something.conf` -if [ "${1:0:1}" = '-' ]; then - set -- tarantool "$@" -fi - -# allow the container to be started with `--user` -if [ "$1" = 'tarantool' -a "$(id -u)" = '0' ]; then - chown -R tarantool /var/lib/tarantool - exec su-exec tarantool "$0" "$@" -fi - -# entry point wraps the passed script to do basic setup -if [ "$1" = 'tarantool' ]; then - shift - exec tarantool "/usr/local/bin/tarantool-entrypoint.lua" "$@" -fi - -exec "$@" diff --git a/1.9/gperftools_alpine.diff b/1.9/gperftools_alpine.diff deleted file mode 100644 index e768381..0000000 --- a/1.9/gperftools_alpine.diff +++ /dev/null @@ -1,110 +0,0 @@ -diff --git a/src/base/linux_syscall_support.h b/src/base/linux_syscall_support.h -index 5d578cd..fceebe2 100644 ---- a/src/base/linux_syscall_support.h -+++ b/src/base/linux_syscall_support.h -@@ -2432,9 +2432,9 @@ struct kernel_stat { - #if defined(__s390x__) - LSS_INLINE _syscall1(void*, mmap, void*, a) - #else -- /* Need to make sure __off64_t isn't truncated to 32-bits under x32. */ -+ /* Need to make sure off64_t isn't truncated to 32-bits under x32. */ - LSS_INLINE void* LSS_NAME(mmap)(void *s, size_t l, int p, int f, int d, -- __off64_t o) { -+ off64_t o) { - LSS_BODY(6, void*, mmap, LSS_SYSCALL_ARG(s), LSS_SYSCALL_ARG(l), - LSS_SYSCALL_ARG(p), LSS_SYSCALL_ARG(f), - LSS_SYSCALL_ARG(d), (uint64_t)(o)); -@@ -2475,7 +2475,7 @@ struct kernel_stat { - LSS_INLINE _syscall6(void*, mmap, void*, s, - size_t, l, int, p, - int, f, int, d, -- __off64_t, o) -+ off64_t, o) - LSS_INLINE int LSS_NAME(sigaction)(int signum, - const struct kernel_sigaction *act, - struct kernel_sigaction *oldact) { -diff --git a/src/malloc_hook_mmap_linux.h b/src/malloc_hook_mmap_linux.h -index 1c4c766..b2aa8ed 100755 ---- a/src/malloc_hook_mmap_linux.h -+++ b/src/malloc_hook_mmap_linux.h -@@ -56,7 +56,7 @@ - - static inline void* do_mmap64(void *start, size_t length, - int prot, int flags, -- int fd, __off64_t offset) __THROW { -+ int fd, off64_t offset) __THROW { - return sys_mmap(start, length, prot, flags, fd, offset); - } - -@@ -67,7 +67,7 @@ static inline void* do_mmap64(void *start, size_t length, - - static inline void* do_mmap64(void *start, size_t length, - int prot, int flags, -- int fd, __off64_t offset) __THROW { -+ int fd, off64_t offset) __THROW { - void *result; - - // Try mmap2() unless it's not supported -@@ -151,9 +151,11 @@ static inline void* do_mmap64(void *start, size_t length, - # undef mmap - - extern "C" { -+ #ifndef mmap64 - void* mmap64(void *start, size_t length, int prot, int flags, -- int fd, __off64_t offset ) __THROW -+ int fd, off64_t offset ) __THROW - ATTRIBUTE_SECTION(malloc_hook); -+ #endif - void* mmap(void *start, size_t length,int prot, int flags, - int fd, off_t offset) __THROW - ATTRIBUTE_SECTION(malloc_hook); -@@ -166,8 +168,9 @@ extern "C" { - ATTRIBUTE_SECTION(malloc_hook); - } - -+#ifndef mmap64 - extern "C" void* mmap64(void *start, size_t length, int prot, int flags, -- int fd, __off64_t offset) __THROW { -+ int fd, off64_t offset) __THROW { - MallocHook::InvokePreMmapHook(start, length, prot, flags, fd, offset); - void *result; - if (!MallocHook::InvokeMmapReplacement( -@@ -177,6 +180,7 @@ extern "C" void* mmap64(void *start, size_t length, int prot, int flags, - MallocHook::InvokeMmapHook(result, start, length, prot, flags, fd, offset); - return result; - } -+#endif - - # if !defined(__USE_FILE_OFFSET64) || !defined(__REDIRECT_NTH) - -@@ -216,7 +220,7 @@ extern "C" void* mremap(void* old_addr, size_t old_size, size_t new_size, - return result; - } - --#ifndef __UCLIBC__ -+#if defined(__GLIBC__) && ! defined(__UCLIBC__) - // libc's version: - extern "C" void* __sbrk(ptrdiff_t increment); - -diff --git a/src/tests/stacktrace_unittest.cc b/src/tests/stacktrace_unittest.cc -index 3c9f735..2d39ad9 100644 ---- a/src/tests/stacktrace_unittest.cc -+++ b/src/tests/stacktrace_unittest.cc -@@ -120,17 +120,6 @@ void ATTRIBUTE_NOINLINE CheckStackTraceLeaf(void) { - CHECK_GE(size, 1); - CHECK_LE(size, STACK_LEN); - --#ifdef HAVE_EXECINFO_H -- { -- char **strings = backtrace_symbols(stack, size); -- printf("Obtained %d stack frames.\n", size); -- for (int i = 0; i < size; i++) -- printf("%s %p\n", strings[i], stack[i]); -- printf("CheckStackTrace() addr: %p\n", &CheckStackTrace); -- free(strings); -- } --#endif -- - for (int i = 0; i < BACKTRACE_STEPS; i++) { - printf("Backtrace %d: expected: %p..%p actual: %p ... ", - i, expected_range[i].start, expected_range[i].end, stack[i]); diff --git a/1.9/luarocks-config.lua b/1.9/luarocks-config.lua deleted file mode 100644 index 111f955..0000000 --- a/1.9/luarocks-config.lua +++ /dev/null @@ -1,9 +0,0 @@ -rocks_trees = { - { name = [[user]], root = home..[[/.luarocks]] }, - { name = [[system]], root = [[/usr/local]] } -} - -rocks_servers = { - [[http://rocks.tarantool.org/]], - [[http://luarocks.org/repositories/rocks]] -} diff --git a/1.9/tarantool-entrypoint.lua b/1.9/tarantool-entrypoint.lua deleted file mode 100755 index 11cd89d..0000000 --- a/1.9/tarantool-entrypoint.lua +++ /dev/null @@ -1,292 +0,0 @@ -#!/usr/bin/env tarantool - -local fio = require('fio') -local errno = require('errno') -local fun = require('fun') -local urilib = require('uri') -local console = require('console') -local term = require('term') -local log = require('log') -local yaml = require('yaml') - -local TARANTOOL_DEFAULT_PORT = 3301 -local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' -local CFG_FILE_PATH = '/etc/tarantool/config.yml' - - -local orig_cfg = box.cfg - -local function read_config() - local f = io.open(CFG_FILE_PATH, "rb") - if f == nil then - log.error("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) - os.exit(1) - end - local content = f:read("*all") - f:close() - return yaml.decode(content) -end - -local function write_config(cfg) - local f = io.open(CFG_FILE_PATH, "w+") - if f == nil then - print("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) - os.exit(1) - end - local content = yaml.encode(cfg) - f:write(content) - f:close() -end - -local function parse_replication_source(replication_source, user_name, user_password) - if replication_source == nil then - return nil - end - - local replication_source_table = {} - for uri in string.gmatch(replication_source, "[^,]+") do - local parsed_uri = urilib.parse(uri) - if parsed_uri == nil then - error("Incorrect replication source URI format: '"..uri.."'") - end - local host = parsed_uri.host - local port = parsed_uri.service or TARANTOOL_DEFAULT_PORT - local user = parsed_uri.login or user_name - local password = parsed_uri.password or user_password - - if user == 'guest' or user == nil then - replication_source = string.format("%s:%s", host, port) - elseif password == nil then - replication_source = string.format("%s:@%s:%s", user, host, port) - else - replication_source = string.format("%s:%s@%s:%s", user, password, - host, port) - end - - table.insert(replication_source_table, replication_source) - end - - return replication_source_table -end - -local function choose_option(main, substitute, cfg) - if cfg[main] then - return main - end - if cfg[substitute] then - return substitute - end - return main -end - -function set_replication_source(replication_source, user_name, user_password) - local replication_source_table = parse_replication_source( - replication_source, user_name, user_password - ) - local choice = choose_option('replication', 'replication_source', box.cfg) - box.cfg{[choice] = replication_source_table} - log.info("Updated box.cfg.%s to %s", choice, replication_source) -end - -local function create_user(user_name, user_password) - if user_name ~= 'guest' and user_password == nil then - user_password = "" - - local warn_str = [[**************************************************** -WARNING: No password has been set for the database. - This will allow anyone with access to the - Tarantool port to access your database. In - Docker's default configuration, this is - effectively any other container on the same - system. - Use "-e TARANTOOL_USER_PASSWORD=password" - to set it in "docker run". -****************************************************]] - log.warn('\n'..warn_str) - end - - if user_name == 'guest' and user_password == nil then - local warn_str = [[**************************************************** -WARNING: 'guest' is chosen as primary user. - Since it is not allowed to set a password for - guest user, your instance will be accessible - by anyone having direct access to the Tarantool - port. - If you wanted to create an authenticated user, - specify "-e TARANTOOL_USER_NAME=username" and - pick a user name other than "guest". -****************************************************]] - log.warn('\n'..warn_str) - end - - if user_name == 'guest' and user_password ~= nil then - user_password = nil - - local warn_str = [[**************************************************** -WARNING: A password for guest user has been specified. - In Tarantool, guest user can't have a password - and is always allowed to login, if it has - enough privileges. - If you wanted to create an authenticated user, - specify "-e TARANTOOL_USER_NAME=username" and - pick a user name other than "guest". -****************************************************]] - log.warn('\n'..warn_str) - end - - if user_name ~= 'admin' and user_name ~= 'guest' then - if not box.schema.user.exists(user_name) then - log.info("Creating user '%s'", user_name) - box.schema.user.create(user_name) - end - end - - if user_name ~= 'admin' then - log.info("Granting admin privileges to user '%s'", user_name) - box.schema.user.grant(user_name, 'read,write,execute', - 'universe', nil, {if_not_exists = true}) - box.schema.user.grant(user_name, 'replication', - nil, nil, {if_not_exists = true}) - end - - if user_name ~= 'guest' then - log.info("Setting password for user '%s'", user_name) - box.schema.user.passwd(user_name, user_password) - end -end - -function set_credentials(user_name, user_password) - create_user(user_name, user_password) -end - -local function wrapper_cfg(override) - local work_dir = '/var/lib/tarantool' - local snap_filename = "*.snap" - local snap_path = work_dir..'/'..snap_filename - - local first_run = false - if next(fio.glob(snap_path)) == nil then - first_run = true - end - - - local file_cfg = {} - local config_file_exists = fio.stat(CFG_FILE_PATH) ~= nil - if not config_file_exists then - log.info("Creating configuration file: " .. CFG_FILE_PATH) - - file_cfg.TARANTOOL_USER_NAME = os.getenv('TARANTOOL_USER_NAME') - file_cfg.TARANTOOL_USER_PASSWORD = os.getenv('TARANTOOL_USER_PASSWORD') - file_cfg.TARANTOOL_SLAB_ALLOC_ARENA = os.getenv('TARANTOOL_SLAB_ALLOC_ARENA') - file_cfg.TARANTOOL_SLAB_ALLOC_FACTOR = os.getenv('TARANTOOL_SLAB_ALLOC_FACTOR') - file_cfg.TARANTOOL_SLAB_ALLOC_MINIMAL = os.getenv('TARANTOOL_SLAB_ALLOC_MINIMAL') - file_cfg.TARANTOOL_SLAB_ALLOC_MAXIMAL = os.getenv('TARANTOOL_SLAB_ALLOC_MAXIMAL') - file_cfg.TARANTOOL_PORT = os.getenv('TARANTOOL_PORT') - file_cfg.TARANTOOL_WAL_MODE = os.getenv('TARANTOOL_WAL_MODE') - file_cfg.TARANTOOL_REPLICATION_SOURCE = os.getenv('TARANTOOL_REPLICATION_SOURCE') - file_cfg.TARANTOOL_REPLICATION = os.getenv('TARANTOOL_REPLICATION') - file_cfg.TARANTOOL_SNAPSHOT_PERIOD = os.getenv('TARANTOOL_SNAPSHOT_PERIOD') - file_cfg.TARANTOOL_MEMTX_MEMORY = os.getenv('TARANTOOL_MEMTX_MEMORY') - file_cfg.TARANTOOL_CHECKPOINT_INTERVAL = os.getenv('TARANTOOL_CHECKPOINT_INTERVAL') - file_cfg.TARANTOOL_MEMTX_MIN_TUPLE_SIZE = os.getenv('TARANTOOL_MEMTX_MIN_TUPLE_SIZE') - file_cfg.TARANTOOL_MEMTX_MAX_TUPLE_SIZE = os.getenv('TARANTOOL_MEMTX_MAX_TUPLE_SIZE') - - write_config(file_cfg) - else - log.info("Loading existing configuration file: " .. CFG_FILE_PATH) - - file_cfg = read_config() - end - - local user_name = file_cfg.TARANTOOL_USER_NAME or - os.getenv('TARANTOOL_USER_NAME') or 'guest' - local user_password = file_cfg.TARANTOOL_USER_PASSWORD or - os.getenv('TARANTOOL_USER_PASSWORD') - - - local cfg = override or {} - -- Placeholders for deprecated options - cfg.slab_alloc_arena = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_ARENA) or - override.slab_alloc_arena - cfg.slab_alloc_maximal = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_MAXIMAL) or - override.slab_alloc_maximal - cfg.slab_alloc_minimal = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_MINIMAL) or - override.slab_alloc_minimal - cfg.snapshot_period = tonumber(file_cfg.TARANTOOL_SNAPSHOT_PERIOD) or - override.snapshot_period - -- Replacements for deprecated options - cfg.memtx_memory = tonumber(file_cfg.TARANTOOL_MEMTX_MEMORY) or - override.memtx_memory - cfg.memtx_min_tuple_size = tonumber(file_cfg.TARANTOOL_MEMTX_MIN_TUPLE_SIZE) or - override.memtx_min_tuple_size - cfg.memtx_max_tuple_size = tonumber(file_cfg.TARANTOOL_MEMTX_MAX_TUPLE_SIZE) or - override.memtx_max_tuple_size - cfg.checkpoint_interval = tonumber(file_cfg.TARANTOOL_CHECKPOINT_INTERVAL) or - override.checkpoint_interval - -- Deprecated options with default values - local choice = choose_option('memtx_dir', 'snap_dir', override) - cfg[choice] = override[choice] or '/var/lib/tarantool' - - -- Remaining configuration - cfg.slab_alloc_factor = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_FACTOR) or - override.slab_alloc_factor - cfg.listen = tonumber(file_cfg.TARANTOOL_PORT) or - override.listen or TARANTOOL_DEFAULT_PORT - cfg.wal_mode = file_cfg.TARANTOOL_WAL_MODE or - override.wal_mode - - cfg.wal_dir = override.wal_dir or '/var/lib/tarantool' - cfg.vinyl_dir = override.vinyl_dir or '/var/lib/tarantool' - cfg.pid_file = override.pid_file or '/var/run/tarantool/tarantool.pid' - - local choice = choose_option('TARANTOOL_REPLICATION', 'TARANTOOL_REPLICATION_SOURCE', file_cfg) - local replication_source_table = parse_replication_source(file_cfg[choice], - user_name, - user_password) - - if replication_source_table then - cfg.replication = replication_source_table - else - local choice = choose_option('replication', 'replication_source', override) - cfg[choice] = override[choice] - end - - log.info("Config:\n" .. yaml.encode(cfg)) - - orig_cfg(cfg) - - box.once('tarantool-entrypoint', function () - if first_run then - log.info("Initializing database") - - create_user(user_name, user_password) - end - end) - - console.listen(CONSOLE_SOCKET_PATH) - -end - -box.cfg = wrapper_cfg - --- re-run the script passed as parameter with all arguments that follow -execute_script = arg[1] -if execute_script == nil then - box.cfg {} - - if term.isatty(io.stdout) then - console.start() - os.exit(0) - end -else - narg = 0 - while true do - arg[narg] = arg[narg + 1] - if arg[narg] == nil then - break - end - narg = narg + 1 - end - - dofile(execute_script) -end diff --git a/1.9/tarantool.default b/1.9/tarantool.default deleted file mode 100644 index fffe3b0..0000000 --- a/1.9/tarantool.default +++ /dev/null @@ -1,22 +0,0 @@ --- --- System-wide settings for tarantoolctl and init scripts --- --- This file is meant to enable the usage of tarantoolctl inside --- docker containers. Since there is no init system, most of its --- functionality will not work, except 'tarantoolctl enter' or --- 'tarantoolctl status'. --- - -default_cfg = { - pid_file = "/var/run/tarantool", -- /var/run/tarantool/${INSTANCE}.pid - wal_dir = "/var/lib/tarantool", -- /var/lib/tarantool/${INSTANCE}/ - snap_dir = "/var/lib/tarantool", -- /var/lib/tarantool/${INSTANCE} - vinyl_dir = "/var/lib/tarantool", -- /var/lib/tarantool/${INSTANCE} - logger = "/var/log/tarantool", -- /var/log/tarantool/${INSTANCE}.log - username = "tarantool", -} - --- instances.available - all available instances --- instances.enabled - instances to autostart by sysvinit -instance_dir = "/usr/local/etc/tarantool/instances.enabled" --- vim: set ft=lua : diff --git a/1.9/tarantool_is_up b/1.9/tarantool_is_up deleted file mode 100755 index 71148d5..0000000 --- a/1.9/tarantool_is_up +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh - -status=$( (tarantool <<-'EOF' -local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' -local console = require('console') -local os = require("os") -local yaml = require("yaml") - -console.on_start(function(self) - local status, reason - status, reason = pcall(function() require('console').connect(CONSOLE_SOCKET_PATH) end) - if not status then - self:print(reason) - os.exit(1) - end - - cmd = 'box.info.status' - local res = self:eval(cmd) - if res ~= nil then - res = yaml.decode(res) - print(res[1]) - end - - os.exit(0) -end) - -console.on_client_disconnect(function(self) self.running = false end) -console.start() - -os.exit(0) -EOF -) 2>/dev/null) - - -echo "$status" - -if [ "$status" = "running" ]; then - exit 0 -else - exit 1 -fi diff --git a/1.9/tarantool_set_config.lua b/1.9/tarantool_set_config.lua deleted file mode 100755 index ddca36c..0000000 --- a/1.9/tarantool_set_config.lua +++ /dev/null @@ -1,130 +0,0 @@ -#!/usr/bin/env tarantool - -local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' -local CFG_FILE_PATH = '/etc/tarantool/config.yml' - -local fio = require('fio') -local yaml = require('yaml') -local console = require('console') -local errno = require('errno') - -local function read_config() - local f = io.open(CFG_FILE_PATH, "rb") - if f == nil then - print("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) - os.exit(1) - end - local content = f:read("*all") - f:close() - return yaml.decode(content) -end - -local function write_config(cfg) - local f = io.open(CFG_FILE_PATH, "w+") - if f == nil then - print("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) - os.exit(1) - end - local content = yaml.encode(cfg) - f:write(content) - f:close() -end - -local function nop(console, cfg, value) -end - -local function update_replication_source(console, cfg, value) - local user_name = "nil" - if cfg['TARANTOOL_USER_NAME'] then - user_name = "'" .. cfg['TARANTOOL_USER_NAME'] .. "'" - end - - local user_password = "nil" - if cfg['TARANTOOL_USER_PASSWORD'] then - user_password = "'" .. cfg['TARANTOOL_USER_PASSWORD'] .. "'" - end - - local cmd = "set_replication_source('"..value.."', " .. user_name .. "," .. user_password .. ")" - print("cmd: ", cmd) - - local res = console:eval(cmd) - - if res ~= nil then - print(res) - end -end - -local function update_credentials(console, cfg, value) - local user_name = "nil" - if cfg['TARANTOOL_USER_NAME'] then - user_name = "'" .. cfg['TARANTOOL_USER_NAME'] .. "'" - end - - local user_password = "nil" - if cfg['TARANTOOL_USER_PASSWORD'] then - user_password = "'" .. cfg['TARANTOOL_USER_PASSWORD'] .. "'" - end - - local cmd = "set_credentials(" .. user_name .. "," .. user_password .. ")" - - local res = console:eval(cmd) - - if res ~= nil then - print(res) - end - - local replication_source = cfg['TARANTOOL_REPLICATION_SOURCE'] - - if replication_source ~= nil then - update_replication_source(console, cfg, replication_source) - end -end - - -local vars = { - TARANTOOL_SLAB_ALLOC_ARENA=nop, - TARANTOOL_SLAB_ALLOC_FACTOR=nop, - TARANTOOL_SLAB_ALLOC_MAXIMAL=nop, - TARANTOOL_SLAB_ALLOC_MINIMAL=nop, - TARANTOOL_PORT=nop, - TARANTOOL_WAL_MODE=nop, - TARANTOOL_USER_NAME=update_credentials, - TARANTOOL_USER_PASSWORD=update_credentials, - TARANTOOL_REPLICATION_SOURCE=update_replication_source, - TARANTOOL_REPLICATION=update_replication_source, -} - -console.on_start(function(self) - local status, reason - status, reason = pcall(function() require('console').connect(CONSOLE_SOCKET_PATH) end) - if not status then - self:print(reason) - os.exit(1) - end - - if arg[1] == nil or arg[2] == nil then - self:print("Usage: " .. arg[0] .. " ") - os.exit(1) - end - - if vars[arg[1]] == nil then - self:print("Unknown var: " .. arg[1]) - os.exit(1) - end - - local cfg = read_config() - cfg[arg[1]] = arg[2] - - local func = vars[arg[1]] - func(self, cfg, arg[2]) - - write_config(cfg) - - self.running = false - os.exit(0) -end) - -console.on_client_disconnect(function(self) self.running = false end) -console.start() - -os.exit(0) diff --git a/1.x-centos7/.dockerignore b/1.x-centos7/.dockerignore deleted file mode 100644 index e69de29..0000000 diff --git a/1.x-centos7/console b/1.x-centos7/console deleted file mode 100755 index d6fb192..0000000 --- a/1.x-centos7/console +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env tarantool - -local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' - -console = require('console') -console.on_start(function(self) - local status, reason - status, reason = pcall(function() require('console').connect(CONSOLE_SOCKET_PATH) end) - if not status then - self:print(reason) - self.running = false - end -end) -console.on_client_disconnect(function(self) self.running = false end) -console.start() diff --git a/1.x-centos7/tarantool-entrypoint.lua b/1.x-centos7/tarantool-entrypoint.lua deleted file mode 100755 index ffbf2fc..0000000 --- a/1.x-centos7/tarantool-entrypoint.lua +++ /dev/null @@ -1,292 +0,0 @@ -#!/usr/bin/env tarantool - -local fio = require('fio') -local errno = require('errno') -local fun = require('fun') -local urilib = require('uri') -local console = require('console') -local term = require('term') -local log = require('log') -local yaml = require('yaml') - -local TARANTOOL_DEFAULT_PORT = 3301 -local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' -local CFG_FILE_PATH = '/etc/tarantool/config.yml' - - -local orig_cfg = box.cfg - -local function read_config() - local f = io.open(CFG_FILE_PATH, "rb") - if f == nil then - log.error("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) - os.exit(1) - end - local content = f:read("*all") - f:close() - return yaml.decode(content) -end - -local function write_config(cfg) - local f = io.open(CFG_FILE_PATH, "w+") - if f == nil then - print("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) - os.exit(1) - end - local content = yaml.encode(cfg) - f:write(content) - f:close() -end - -local function parse_replication_source(replication_source, user_name, user_password) - if replication_source == nil then - return nil - end - - local replication_source_table = {} - for uri in string.gmatch(replication_source, "[^,]+") do - local parsed_uri = urilib.parse(uri) - if parsed_uri == nil then - error("Incorrect replication source URI format: '"..uri.."'") - end - local host = parsed_uri.host - local port = parsed_uri.service or TARANTOOL_DEFAULT_PORT - local user = parsed_uri.login or user_name - local password = parsed_uri.password or user_password - - if user == 'guest' or user == nil then - replication_source = string.format("%s:%s", host, port) - elseif password == nil then - replication_source = string.format("%s:@%s:%s", user, host, port) - else - replication_source = string.format("%s:%s@%s:%s", user, password, - host, port) - end - - table.insert(replication_source_table, replication_source) - end - - return replication_source_table -end - -local function choose_option(main, substitute, cfg) - if cfg[main] then - return main - end - if cfg[substitute] then - return substitute - end - return main -end - -function set_replication_source(replication_source, user_name, user_password) - local replication_source_table = parse_replication_source( - replication_source, user_name, user_password - ) - local choice = choose_option('replication', 'replication_source', box.cfg) - box.cfg{[choice] = replication_source_table} - log.info("Updated box.cfg.%s to %s", choice, replication_source) -end - -local function create_user(user_name, user_password) - if user_name ~= 'guest' and user_password == nil then - user_password = "" - - local warn_str = [[**************************************************** -WARNING: No password has been set for the database. - This will allow anyone with access to the - Tarantool port to access your database. In - Docker's default configuration, this is - effectively any other container on the same - system. - Use "-e TARANTOOL_USER_PASSWORD=password" - to set it in "docker run". -****************************************************]] - log.warn('\n'..warn_str) - end - - if user_name == 'guest' and user_password == nil then - local warn_str = [[**************************************************** -WARNING: 'guest' is chosen as primary user. - Since it is not allowed to set a password for - guest user, your instance will be accessible - by anyone having direct access to the Tarantool - port. - If you wanted to create an authenticated user, - specify "-e TARANTOOL_USER_NAME=username" and - pick a user name other than "guest". -****************************************************]] - log.warn('\n'..warn_str) - end - - if user_name == 'guest' and user_password ~= nil then - user_password = nil - - local warn_str = [[**************************************************** -WARNING: A password for guest user has been specified. - In Tarantool, guest user can't have a password - and is always allowed to login, if it has - enough privileges. - If you wanted to create an authenticated user, - specify "-e TARANTOOL_USER_NAME=username" and - pick a user name other than "guest". -****************************************************]] - log.warn('\n'..warn_str) - end - - if user_name ~= 'admin' and user_name ~= 'guest' then - if not box.schema.user.exists(user_name) then - log.info("Creating user '%s'", user_name) - box.schema.user.create(user_name) - end - end - - if user_name ~= 'admin' then - log.info("Granting admin privileges to user '%s'", user_name) - box.schema.user.grant(user_name, 'read,write,execute,create,drop', - 'universe', nil, {if_not_exists = true}) - box.schema.user.grant(user_name, 'replication', - nil, nil, {if_not_exists = true}) - end - - if user_name ~= 'guest' then - log.info("Setting password for user '%s'", user_name) - box.schema.user.passwd(user_name, user_password) - end -end - -function set_credentials(user_name, user_password) - create_user(user_name, user_password) -end - -local function wrapper_cfg(override) - local work_dir = '/var/lib/tarantool' - local snap_filename = "*.snap" - local snap_path = work_dir..'/'..snap_filename - - local first_run = false - if next(fio.glob(snap_path)) == nil then - first_run = true - end - - - local file_cfg = {} - local config_file_exists = fio.stat(CFG_FILE_PATH) ~= nil - if not config_file_exists then - log.info("Creating configuration file: " .. CFG_FILE_PATH) - - file_cfg.TARANTOOL_USER_NAME = os.getenv('TARANTOOL_USER_NAME') - file_cfg.TARANTOOL_USER_PASSWORD = os.getenv('TARANTOOL_USER_PASSWORD') - file_cfg.TARANTOOL_SLAB_ALLOC_ARENA = os.getenv('TARANTOOL_SLAB_ALLOC_ARENA') - file_cfg.TARANTOOL_SLAB_ALLOC_FACTOR = os.getenv('TARANTOOL_SLAB_ALLOC_FACTOR') - file_cfg.TARANTOOL_SLAB_ALLOC_MINIMAL = os.getenv('TARANTOOL_SLAB_ALLOC_MINIMAL') - file_cfg.TARANTOOL_SLAB_ALLOC_MAXIMAL = os.getenv('TARANTOOL_SLAB_ALLOC_MAXIMAL') - file_cfg.TARANTOOL_PORT = os.getenv('TARANTOOL_PORT') - file_cfg.TARANTOOL_WAL_MODE = os.getenv('TARANTOOL_WAL_MODE') - file_cfg.TARANTOOL_REPLICATION_SOURCE = os.getenv('TARANTOOL_REPLICATION_SOURCE') - file_cfg.TARANTOOL_REPLICATION = os.getenv('TARANTOOL_REPLICATION') - file_cfg.TARANTOOL_SNAPSHOT_PERIOD = os.getenv('TARANTOOL_SNAPSHOT_PERIOD') - file_cfg.TARANTOOL_MEMTX_MEMORY = os.getenv('TARANTOOL_MEMTX_MEMORY') - file_cfg.TARANTOOL_CHECKPOINT_INTERVAL = os.getenv('TARANTOOL_CHECKPOINT_INTERVAL') - file_cfg.TARANTOOL_MEMTX_MIN_TUPLE_SIZE = os.getenv('TARANTOOL_MEMTX_MIN_TUPLE_SIZE') - file_cfg.TARANTOOL_MEMTX_MAX_TUPLE_SIZE = os.getenv('TARANTOOL_MEMTX_MAX_TUPLE_SIZE') - - write_config(file_cfg) - else - log.info("Loading existing configuration file: " .. CFG_FILE_PATH) - - file_cfg = read_config() - end - - local user_name = file_cfg.TARANTOOL_USER_NAME or - os.getenv('TARANTOOL_USER_NAME') or 'guest' - local user_password = file_cfg.TARANTOOL_USER_PASSWORD or - os.getenv('TARANTOOL_USER_PASSWORD') - - - local cfg = override or {} - -- Placeholders for deprecated options - cfg.slab_alloc_arena = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_ARENA) or - override.slab_alloc_arena - cfg.slab_alloc_maximal = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_MAXIMAL) or - override.slab_alloc_maximal - cfg.slab_alloc_minimal = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_MINIMAL) or - override.slab_alloc_minimal - cfg.snapshot_period = tonumber(file_cfg.TARANTOOL_SNAPSHOT_PERIOD) or - override.snapshot_period - -- Replacements for deprecated options - cfg.memtx_memory = tonumber(file_cfg.TARANTOOL_MEMTX_MEMORY) or - override.memtx_memory - cfg.memtx_min_tuple_size = tonumber(file_cfg.TARANTOOL_MEMTX_MIN_TUPLE_SIZE) or - override.memtx_min_tuple_size - cfg.memtx_max_tuple_size = tonumber(file_cfg.TARANTOOL_MEMTX_MAX_TUPLE_SIZE) or - override.memtx_max_tuple_size - cfg.checkpoint_interval = tonumber(file_cfg.TARANTOOL_CHECKPOINT_INTERVAL) or - override.checkpoint_interval - -- Deprecated options with default values - local choice = choose_option('memtx_dir', 'snap_dir', override) - cfg[choice] = override[choice] or '/var/lib/tarantool' - - -- Remaining configuration - cfg.slab_alloc_factor = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_FACTOR) or - override.slab_alloc_factor - cfg.listen = tonumber(file_cfg.TARANTOOL_PORT) or - override.listen or TARANTOOL_DEFAULT_PORT - cfg.wal_mode = file_cfg.TARANTOOL_WAL_MODE or - override.wal_mode - - cfg.wal_dir = override.wal_dir or '/var/lib/tarantool' - cfg.vinyl_dir = override.vinyl_dir or '/var/lib/tarantool' - cfg.pid_file = override.pid_file or '/var/run/tarantool/tarantool.pid' - - local choice = choose_option('TARANTOOL_REPLICATION', 'TARANTOOL_REPLICATION_SOURCE', file_cfg) - local replication_source_table = parse_replication_source(file_cfg[choice], - user_name, - user_password) - - if replication_source_table then - cfg.replication = replication_source_table - else - local choice = choose_option('replication', 'replication_source', override) - cfg[choice] = override[choice] - end - - log.info("Config:\n" .. yaml.encode(cfg)) - - orig_cfg(cfg) - - box.once('tarantool-entrypoint', function () - if first_run then - log.info("Initializing database") - - create_user(user_name, user_password) - end - end) - - console.listen(CONSOLE_SOCKET_PATH) - -end - -box.cfg = wrapper_cfg - --- re-run the script passed as parameter with all arguments that follow -execute_script = arg[1] -if execute_script == nil then - box.cfg {} - - if term.isatty(io.stdout) then - console.start() - os.exit(0) - end -else - narg = 0 - while true do - arg[narg] = arg[narg + 1] - if arg[narg] == nil then - break - end - narg = narg + 1 - end - - dofile(execute_script) -end diff --git a/1.x-centos7/tarantool.default b/1.x-centos7/tarantool.default deleted file mode 100644 index fffe3b0..0000000 --- a/1.x-centos7/tarantool.default +++ /dev/null @@ -1,22 +0,0 @@ --- --- System-wide settings for tarantoolctl and init scripts --- --- This file is meant to enable the usage of tarantoolctl inside --- docker containers. Since there is no init system, most of its --- functionality will not work, except 'tarantoolctl enter' or --- 'tarantoolctl status'. --- - -default_cfg = { - pid_file = "/var/run/tarantool", -- /var/run/tarantool/${INSTANCE}.pid - wal_dir = "/var/lib/tarantool", -- /var/lib/tarantool/${INSTANCE}/ - snap_dir = "/var/lib/tarantool", -- /var/lib/tarantool/${INSTANCE} - vinyl_dir = "/var/lib/tarantool", -- /var/lib/tarantool/${INSTANCE} - logger = "/var/log/tarantool", -- /var/log/tarantool/${INSTANCE}.log - username = "tarantool", -} - --- instances.available - all available instances --- instances.enabled - instances to autostart by sysvinit -instance_dir = "/usr/local/etc/tarantool/instances.enabled" --- vim: set ft=lua : diff --git a/1.x-centos7/tarantool_is_up b/1.x-centos7/tarantool_is_up deleted file mode 100755 index 71148d5..0000000 --- a/1.x-centos7/tarantool_is_up +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh - -status=$( (tarantool <<-'EOF' -local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' -local console = require('console') -local os = require("os") -local yaml = require("yaml") - -console.on_start(function(self) - local status, reason - status, reason = pcall(function() require('console').connect(CONSOLE_SOCKET_PATH) end) - if not status then - self:print(reason) - os.exit(1) - end - - cmd = 'box.info.status' - local res = self:eval(cmd) - if res ~= nil then - res = yaml.decode(res) - print(res[1]) - end - - os.exit(0) -end) - -console.on_client_disconnect(function(self) self.running = false end) -console.start() - -os.exit(0) -EOF -) 2>/dev/null) - - -echo "$status" - -if [ "$status" = "running" ]; then - exit 0 -else - exit 1 -fi diff --git a/1.x-centos7/tarantool_set_config.lua b/1.x-centos7/tarantool_set_config.lua deleted file mode 100755 index ddca36c..0000000 --- a/1.x-centos7/tarantool_set_config.lua +++ /dev/null @@ -1,130 +0,0 @@ -#!/usr/bin/env tarantool - -local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' -local CFG_FILE_PATH = '/etc/tarantool/config.yml' - -local fio = require('fio') -local yaml = require('yaml') -local console = require('console') -local errno = require('errno') - -local function read_config() - local f = io.open(CFG_FILE_PATH, "rb") - if f == nil then - print("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) - os.exit(1) - end - local content = f:read("*all") - f:close() - return yaml.decode(content) -end - -local function write_config(cfg) - local f = io.open(CFG_FILE_PATH, "w+") - if f == nil then - print("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) - os.exit(1) - end - local content = yaml.encode(cfg) - f:write(content) - f:close() -end - -local function nop(console, cfg, value) -end - -local function update_replication_source(console, cfg, value) - local user_name = "nil" - if cfg['TARANTOOL_USER_NAME'] then - user_name = "'" .. cfg['TARANTOOL_USER_NAME'] .. "'" - end - - local user_password = "nil" - if cfg['TARANTOOL_USER_PASSWORD'] then - user_password = "'" .. cfg['TARANTOOL_USER_PASSWORD'] .. "'" - end - - local cmd = "set_replication_source('"..value.."', " .. user_name .. "," .. user_password .. ")" - print("cmd: ", cmd) - - local res = console:eval(cmd) - - if res ~= nil then - print(res) - end -end - -local function update_credentials(console, cfg, value) - local user_name = "nil" - if cfg['TARANTOOL_USER_NAME'] then - user_name = "'" .. cfg['TARANTOOL_USER_NAME'] .. "'" - end - - local user_password = "nil" - if cfg['TARANTOOL_USER_PASSWORD'] then - user_password = "'" .. cfg['TARANTOOL_USER_PASSWORD'] .. "'" - end - - local cmd = "set_credentials(" .. user_name .. "," .. user_password .. ")" - - local res = console:eval(cmd) - - if res ~= nil then - print(res) - end - - local replication_source = cfg['TARANTOOL_REPLICATION_SOURCE'] - - if replication_source ~= nil then - update_replication_source(console, cfg, replication_source) - end -end - - -local vars = { - TARANTOOL_SLAB_ALLOC_ARENA=nop, - TARANTOOL_SLAB_ALLOC_FACTOR=nop, - TARANTOOL_SLAB_ALLOC_MAXIMAL=nop, - TARANTOOL_SLAB_ALLOC_MINIMAL=nop, - TARANTOOL_PORT=nop, - TARANTOOL_WAL_MODE=nop, - TARANTOOL_USER_NAME=update_credentials, - TARANTOOL_USER_PASSWORD=update_credentials, - TARANTOOL_REPLICATION_SOURCE=update_replication_source, - TARANTOOL_REPLICATION=update_replication_source, -} - -console.on_start(function(self) - local status, reason - status, reason = pcall(function() require('console').connect(CONSOLE_SOCKET_PATH) end) - if not status then - self:print(reason) - os.exit(1) - end - - if arg[1] == nil or arg[2] == nil then - self:print("Usage: " .. arg[0] .. " ") - os.exit(1) - end - - if vars[arg[1]] == nil then - self:print("Unknown var: " .. arg[1]) - os.exit(1) - end - - local cfg = read_config() - cfg[arg[1]] = arg[2] - - local func = vars[arg[1]] - func(self, cfg, arg[2]) - - write_config(cfg) - - self.running = false - os.exit(0) -end) - -console.on_client_disconnect(function(self) self.running = false end) -console.start() - -os.exit(0) diff --git a/1.x/console b/1.x/console deleted file mode 100755 index d6fb192..0000000 --- a/1.x/console +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env tarantool - -local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' - -console = require('console') -console.on_start(function(self) - local status, reason - status, reason = pcall(function() require('console').connect(CONSOLE_SOCKET_PATH) end) - if not status then - self:print(reason) - self.running = false - end -end) -console.on_client_disconnect(function(self) self.running = false end) -console.start() diff --git a/1.x/docker-entrypoint.sh b/1.x/docker-entrypoint.sh deleted file mode 100755 index 3a9f5e4..0000000 --- a/1.x/docker-entrypoint.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh -set -e - -# first arg is `-f` or `--some-option` -# or first arg is `something.conf` -if [ "${1:0:1}" = '-' ]; then - set -- tarantool "$@" -fi - -# allow the container to be started with `--user` -if [ "$1" = 'tarantool' -a "$(id -u)" = '0' ]; then - chown -R tarantool /var/lib/tarantool - exec su-exec tarantool "$0" "$@" -fi - -# entry point wraps the passed script to do basic setup -if [ "$1" = 'tarantool' ]; then - shift - exec tarantool "/usr/local/bin/tarantool-entrypoint.lua" "$@" -fi - -exec "$@" diff --git a/1.x/gperftools_alpine.diff b/1.x/gperftools_alpine.diff deleted file mode 100644 index e768381..0000000 --- a/1.x/gperftools_alpine.diff +++ /dev/null @@ -1,110 +0,0 @@ -diff --git a/src/base/linux_syscall_support.h b/src/base/linux_syscall_support.h -index 5d578cd..fceebe2 100644 ---- a/src/base/linux_syscall_support.h -+++ b/src/base/linux_syscall_support.h -@@ -2432,9 +2432,9 @@ struct kernel_stat { - #if defined(__s390x__) - LSS_INLINE _syscall1(void*, mmap, void*, a) - #else -- /* Need to make sure __off64_t isn't truncated to 32-bits under x32. */ -+ /* Need to make sure off64_t isn't truncated to 32-bits under x32. */ - LSS_INLINE void* LSS_NAME(mmap)(void *s, size_t l, int p, int f, int d, -- __off64_t o) { -+ off64_t o) { - LSS_BODY(6, void*, mmap, LSS_SYSCALL_ARG(s), LSS_SYSCALL_ARG(l), - LSS_SYSCALL_ARG(p), LSS_SYSCALL_ARG(f), - LSS_SYSCALL_ARG(d), (uint64_t)(o)); -@@ -2475,7 +2475,7 @@ struct kernel_stat { - LSS_INLINE _syscall6(void*, mmap, void*, s, - size_t, l, int, p, - int, f, int, d, -- __off64_t, o) -+ off64_t, o) - LSS_INLINE int LSS_NAME(sigaction)(int signum, - const struct kernel_sigaction *act, - struct kernel_sigaction *oldact) { -diff --git a/src/malloc_hook_mmap_linux.h b/src/malloc_hook_mmap_linux.h -index 1c4c766..b2aa8ed 100755 ---- a/src/malloc_hook_mmap_linux.h -+++ b/src/malloc_hook_mmap_linux.h -@@ -56,7 +56,7 @@ - - static inline void* do_mmap64(void *start, size_t length, - int prot, int flags, -- int fd, __off64_t offset) __THROW { -+ int fd, off64_t offset) __THROW { - return sys_mmap(start, length, prot, flags, fd, offset); - } - -@@ -67,7 +67,7 @@ static inline void* do_mmap64(void *start, size_t length, - - static inline void* do_mmap64(void *start, size_t length, - int prot, int flags, -- int fd, __off64_t offset) __THROW { -+ int fd, off64_t offset) __THROW { - void *result; - - // Try mmap2() unless it's not supported -@@ -151,9 +151,11 @@ static inline void* do_mmap64(void *start, size_t length, - # undef mmap - - extern "C" { -+ #ifndef mmap64 - void* mmap64(void *start, size_t length, int prot, int flags, -- int fd, __off64_t offset ) __THROW -+ int fd, off64_t offset ) __THROW - ATTRIBUTE_SECTION(malloc_hook); -+ #endif - void* mmap(void *start, size_t length,int prot, int flags, - int fd, off_t offset) __THROW - ATTRIBUTE_SECTION(malloc_hook); -@@ -166,8 +168,9 @@ extern "C" { - ATTRIBUTE_SECTION(malloc_hook); - } - -+#ifndef mmap64 - extern "C" void* mmap64(void *start, size_t length, int prot, int flags, -- int fd, __off64_t offset) __THROW { -+ int fd, off64_t offset) __THROW { - MallocHook::InvokePreMmapHook(start, length, prot, flags, fd, offset); - void *result; - if (!MallocHook::InvokeMmapReplacement( -@@ -177,6 +180,7 @@ extern "C" void* mmap64(void *start, size_t length, int prot, int flags, - MallocHook::InvokeMmapHook(result, start, length, prot, flags, fd, offset); - return result; - } -+#endif - - # if !defined(__USE_FILE_OFFSET64) || !defined(__REDIRECT_NTH) - -@@ -216,7 +220,7 @@ extern "C" void* mremap(void* old_addr, size_t old_size, size_t new_size, - return result; - } - --#ifndef __UCLIBC__ -+#if defined(__GLIBC__) && ! defined(__UCLIBC__) - // libc's version: - extern "C" void* __sbrk(ptrdiff_t increment); - -diff --git a/src/tests/stacktrace_unittest.cc b/src/tests/stacktrace_unittest.cc -index 3c9f735..2d39ad9 100644 ---- a/src/tests/stacktrace_unittest.cc -+++ b/src/tests/stacktrace_unittest.cc -@@ -120,17 +120,6 @@ void ATTRIBUTE_NOINLINE CheckStackTraceLeaf(void) { - CHECK_GE(size, 1); - CHECK_LE(size, STACK_LEN); - --#ifdef HAVE_EXECINFO_H -- { -- char **strings = backtrace_symbols(stack, size); -- printf("Obtained %d stack frames.\n", size); -- for (int i = 0; i < size; i++) -- printf("%s %p\n", strings[i], stack[i]); -- printf("CheckStackTrace() addr: %p\n", &CheckStackTrace); -- free(strings); -- } --#endif -- - for (int i = 0; i < BACKTRACE_STEPS; i++) { - printf("Backtrace %d: expected: %p..%p actual: %p ... ", - i, expected_range[i].start, expected_range[i].end, stack[i]); diff --git a/1.x/luarocks-config.lua b/1.x/luarocks-config.lua deleted file mode 100644 index 111f955..0000000 --- a/1.x/luarocks-config.lua +++ /dev/null @@ -1,9 +0,0 @@ -rocks_trees = { - { name = [[user]], root = home..[[/.luarocks]] }, - { name = [[system]], root = [[/usr/local]] } -} - -rocks_servers = { - [[http://rocks.tarantool.org/]], - [[http://luarocks.org/repositories/rocks]] -} diff --git a/1.x/tarantool-entrypoint.lua b/1.x/tarantool-entrypoint.lua deleted file mode 100755 index ffbf2fc..0000000 --- a/1.x/tarantool-entrypoint.lua +++ /dev/null @@ -1,292 +0,0 @@ -#!/usr/bin/env tarantool - -local fio = require('fio') -local errno = require('errno') -local fun = require('fun') -local urilib = require('uri') -local console = require('console') -local term = require('term') -local log = require('log') -local yaml = require('yaml') - -local TARANTOOL_DEFAULT_PORT = 3301 -local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' -local CFG_FILE_PATH = '/etc/tarantool/config.yml' - - -local orig_cfg = box.cfg - -local function read_config() - local f = io.open(CFG_FILE_PATH, "rb") - if f == nil then - log.error("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) - os.exit(1) - end - local content = f:read("*all") - f:close() - return yaml.decode(content) -end - -local function write_config(cfg) - local f = io.open(CFG_FILE_PATH, "w+") - if f == nil then - print("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) - os.exit(1) - end - local content = yaml.encode(cfg) - f:write(content) - f:close() -end - -local function parse_replication_source(replication_source, user_name, user_password) - if replication_source == nil then - return nil - end - - local replication_source_table = {} - for uri in string.gmatch(replication_source, "[^,]+") do - local parsed_uri = urilib.parse(uri) - if parsed_uri == nil then - error("Incorrect replication source URI format: '"..uri.."'") - end - local host = parsed_uri.host - local port = parsed_uri.service or TARANTOOL_DEFAULT_PORT - local user = parsed_uri.login or user_name - local password = parsed_uri.password or user_password - - if user == 'guest' or user == nil then - replication_source = string.format("%s:%s", host, port) - elseif password == nil then - replication_source = string.format("%s:@%s:%s", user, host, port) - else - replication_source = string.format("%s:%s@%s:%s", user, password, - host, port) - end - - table.insert(replication_source_table, replication_source) - end - - return replication_source_table -end - -local function choose_option(main, substitute, cfg) - if cfg[main] then - return main - end - if cfg[substitute] then - return substitute - end - return main -end - -function set_replication_source(replication_source, user_name, user_password) - local replication_source_table = parse_replication_source( - replication_source, user_name, user_password - ) - local choice = choose_option('replication', 'replication_source', box.cfg) - box.cfg{[choice] = replication_source_table} - log.info("Updated box.cfg.%s to %s", choice, replication_source) -end - -local function create_user(user_name, user_password) - if user_name ~= 'guest' and user_password == nil then - user_password = "" - - local warn_str = [[**************************************************** -WARNING: No password has been set for the database. - This will allow anyone with access to the - Tarantool port to access your database. In - Docker's default configuration, this is - effectively any other container on the same - system. - Use "-e TARANTOOL_USER_PASSWORD=password" - to set it in "docker run". -****************************************************]] - log.warn('\n'..warn_str) - end - - if user_name == 'guest' and user_password == nil then - local warn_str = [[**************************************************** -WARNING: 'guest' is chosen as primary user. - Since it is not allowed to set a password for - guest user, your instance will be accessible - by anyone having direct access to the Tarantool - port. - If you wanted to create an authenticated user, - specify "-e TARANTOOL_USER_NAME=username" and - pick a user name other than "guest". -****************************************************]] - log.warn('\n'..warn_str) - end - - if user_name == 'guest' and user_password ~= nil then - user_password = nil - - local warn_str = [[**************************************************** -WARNING: A password for guest user has been specified. - In Tarantool, guest user can't have a password - and is always allowed to login, if it has - enough privileges. - If you wanted to create an authenticated user, - specify "-e TARANTOOL_USER_NAME=username" and - pick a user name other than "guest". -****************************************************]] - log.warn('\n'..warn_str) - end - - if user_name ~= 'admin' and user_name ~= 'guest' then - if not box.schema.user.exists(user_name) then - log.info("Creating user '%s'", user_name) - box.schema.user.create(user_name) - end - end - - if user_name ~= 'admin' then - log.info("Granting admin privileges to user '%s'", user_name) - box.schema.user.grant(user_name, 'read,write,execute,create,drop', - 'universe', nil, {if_not_exists = true}) - box.schema.user.grant(user_name, 'replication', - nil, nil, {if_not_exists = true}) - end - - if user_name ~= 'guest' then - log.info("Setting password for user '%s'", user_name) - box.schema.user.passwd(user_name, user_password) - end -end - -function set_credentials(user_name, user_password) - create_user(user_name, user_password) -end - -local function wrapper_cfg(override) - local work_dir = '/var/lib/tarantool' - local snap_filename = "*.snap" - local snap_path = work_dir..'/'..snap_filename - - local first_run = false - if next(fio.glob(snap_path)) == nil then - first_run = true - end - - - local file_cfg = {} - local config_file_exists = fio.stat(CFG_FILE_PATH) ~= nil - if not config_file_exists then - log.info("Creating configuration file: " .. CFG_FILE_PATH) - - file_cfg.TARANTOOL_USER_NAME = os.getenv('TARANTOOL_USER_NAME') - file_cfg.TARANTOOL_USER_PASSWORD = os.getenv('TARANTOOL_USER_PASSWORD') - file_cfg.TARANTOOL_SLAB_ALLOC_ARENA = os.getenv('TARANTOOL_SLAB_ALLOC_ARENA') - file_cfg.TARANTOOL_SLAB_ALLOC_FACTOR = os.getenv('TARANTOOL_SLAB_ALLOC_FACTOR') - file_cfg.TARANTOOL_SLAB_ALLOC_MINIMAL = os.getenv('TARANTOOL_SLAB_ALLOC_MINIMAL') - file_cfg.TARANTOOL_SLAB_ALLOC_MAXIMAL = os.getenv('TARANTOOL_SLAB_ALLOC_MAXIMAL') - file_cfg.TARANTOOL_PORT = os.getenv('TARANTOOL_PORT') - file_cfg.TARANTOOL_WAL_MODE = os.getenv('TARANTOOL_WAL_MODE') - file_cfg.TARANTOOL_REPLICATION_SOURCE = os.getenv('TARANTOOL_REPLICATION_SOURCE') - file_cfg.TARANTOOL_REPLICATION = os.getenv('TARANTOOL_REPLICATION') - file_cfg.TARANTOOL_SNAPSHOT_PERIOD = os.getenv('TARANTOOL_SNAPSHOT_PERIOD') - file_cfg.TARANTOOL_MEMTX_MEMORY = os.getenv('TARANTOOL_MEMTX_MEMORY') - file_cfg.TARANTOOL_CHECKPOINT_INTERVAL = os.getenv('TARANTOOL_CHECKPOINT_INTERVAL') - file_cfg.TARANTOOL_MEMTX_MIN_TUPLE_SIZE = os.getenv('TARANTOOL_MEMTX_MIN_TUPLE_SIZE') - file_cfg.TARANTOOL_MEMTX_MAX_TUPLE_SIZE = os.getenv('TARANTOOL_MEMTX_MAX_TUPLE_SIZE') - - write_config(file_cfg) - else - log.info("Loading existing configuration file: " .. CFG_FILE_PATH) - - file_cfg = read_config() - end - - local user_name = file_cfg.TARANTOOL_USER_NAME or - os.getenv('TARANTOOL_USER_NAME') or 'guest' - local user_password = file_cfg.TARANTOOL_USER_PASSWORD or - os.getenv('TARANTOOL_USER_PASSWORD') - - - local cfg = override or {} - -- Placeholders for deprecated options - cfg.slab_alloc_arena = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_ARENA) or - override.slab_alloc_arena - cfg.slab_alloc_maximal = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_MAXIMAL) or - override.slab_alloc_maximal - cfg.slab_alloc_minimal = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_MINIMAL) or - override.slab_alloc_minimal - cfg.snapshot_period = tonumber(file_cfg.TARANTOOL_SNAPSHOT_PERIOD) or - override.snapshot_period - -- Replacements for deprecated options - cfg.memtx_memory = tonumber(file_cfg.TARANTOOL_MEMTX_MEMORY) or - override.memtx_memory - cfg.memtx_min_tuple_size = tonumber(file_cfg.TARANTOOL_MEMTX_MIN_TUPLE_SIZE) or - override.memtx_min_tuple_size - cfg.memtx_max_tuple_size = tonumber(file_cfg.TARANTOOL_MEMTX_MAX_TUPLE_SIZE) or - override.memtx_max_tuple_size - cfg.checkpoint_interval = tonumber(file_cfg.TARANTOOL_CHECKPOINT_INTERVAL) or - override.checkpoint_interval - -- Deprecated options with default values - local choice = choose_option('memtx_dir', 'snap_dir', override) - cfg[choice] = override[choice] or '/var/lib/tarantool' - - -- Remaining configuration - cfg.slab_alloc_factor = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_FACTOR) or - override.slab_alloc_factor - cfg.listen = tonumber(file_cfg.TARANTOOL_PORT) or - override.listen or TARANTOOL_DEFAULT_PORT - cfg.wal_mode = file_cfg.TARANTOOL_WAL_MODE or - override.wal_mode - - cfg.wal_dir = override.wal_dir or '/var/lib/tarantool' - cfg.vinyl_dir = override.vinyl_dir or '/var/lib/tarantool' - cfg.pid_file = override.pid_file or '/var/run/tarantool/tarantool.pid' - - local choice = choose_option('TARANTOOL_REPLICATION', 'TARANTOOL_REPLICATION_SOURCE', file_cfg) - local replication_source_table = parse_replication_source(file_cfg[choice], - user_name, - user_password) - - if replication_source_table then - cfg.replication = replication_source_table - else - local choice = choose_option('replication', 'replication_source', override) - cfg[choice] = override[choice] - end - - log.info("Config:\n" .. yaml.encode(cfg)) - - orig_cfg(cfg) - - box.once('tarantool-entrypoint', function () - if first_run then - log.info("Initializing database") - - create_user(user_name, user_password) - end - end) - - console.listen(CONSOLE_SOCKET_PATH) - -end - -box.cfg = wrapper_cfg - --- re-run the script passed as parameter with all arguments that follow -execute_script = arg[1] -if execute_script == nil then - box.cfg {} - - if term.isatty(io.stdout) then - console.start() - os.exit(0) - end -else - narg = 0 - while true do - arg[narg] = arg[narg + 1] - if arg[narg] == nil then - break - end - narg = narg + 1 - end - - dofile(execute_script) -end diff --git a/1.x/tarantool.default b/1.x/tarantool.default deleted file mode 100644 index fffe3b0..0000000 --- a/1.x/tarantool.default +++ /dev/null @@ -1,22 +0,0 @@ --- --- System-wide settings for tarantoolctl and init scripts --- --- This file is meant to enable the usage of tarantoolctl inside --- docker containers. Since there is no init system, most of its --- functionality will not work, except 'tarantoolctl enter' or --- 'tarantoolctl status'. --- - -default_cfg = { - pid_file = "/var/run/tarantool", -- /var/run/tarantool/${INSTANCE}.pid - wal_dir = "/var/lib/tarantool", -- /var/lib/tarantool/${INSTANCE}/ - snap_dir = "/var/lib/tarantool", -- /var/lib/tarantool/${INSTANCE} - vinyl_dir = "/var/lib/tarantool", -- /var/lib/tarantool/${INSTANCE} - logger = "/var/log/tarantool", -- /var/log/tarantool/${INSTANCE}.log - username = "tarantool", -} - --- instances.available - all available instances --- instances.enabled - instances to autostart by sysvinit -instance_dir = "/usr/local/etc/tarantool/instances.enabled" --- vim: set ft=lua : diff --git a/1.x/tarantool_is_up b/1.x/tarantool_is_up deleted file mode 100755 index 71148d5..0000000 --- a/1.x/tarantool_is_up +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh - -status=$( (tarantool <<-'EOF' -local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' -local console = require('console') -local os = require("os") -local yaml = require("yaml") - -console.on_start(function(self) - local status, reason - status, reason = pcall(function() require('console').connect(CONSOLE_SOCKET_PATH) end) - if not status then - self:print(reason) - os.exit(1) - end - - cmd = 'box.info.status' - local res = self:eval(cmd) - if res ~= nil then - res = yaml.decode(res) - print(res[1]) - end - - os.exit(0) -end) - -console.on_client_disconnect(function(self) self.running = false end) -console.start() - -os.exit(0) -EOF -) 2>/dev/null) - - -echo "$status" - -if [ "$status" = "running" ]; then - exit 0 -else - exit 1 -fi diff --git a/1.x/tarantool_set_config.lua b/1.x/tarantool_set_config.lua deleted file mode 100755 index ddca36c..0000000 --- a/1.x/tarantool_set_config.lua +++ /dev/null @@ -1,130 +0,0 @@ -#!/usr/bin/env tarantool - -local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' -local CFG_FILE_PATH = '/etc/tarantool/config.yml' - -local fio = require('fio') -local yaml = require('yaml') -local console = require('console') -local errno = require('errno') - -local function read_config() - local f = io.open(CFG_FILE_PATH, "rb") - if f == nil then - print("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) - os.exit(1) - end - local content = f:read("*all") - f:close() - return yaml.decode(content) -end - -local function write_config(cfg) - local f = io.open(CFG_FILE_PATH, "w+") - if f == nil then - print("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) - os.exit(1) - end - local content = yaml.encode(cfg) - f:write(content) - f:close() -end - -local function nop(console, cfg, value) -end - -local function update_replication_source(console, cfg, value) - local user_name = "nil" - if cfg['TARANTOOL_USER_NAME'] then - user_name = "'" .. cfg['TARANTOOL_USER_NAME'] .. "'" - end - - local user_password = "nil" - if cfg['TARANTOOL_USER_PASSWORD'] then - user_password = "'" .. cfg['TARANTOOL_USER_PASSWORD'] .. "'" - end - - local cmd = "set_replication_source('"..value.."', " .. user_name .. "," .. user_password .. ")" - print("cmd: ", cmd) - - local res = console:eval(cmd) - - if res ~= nil then - print(res) - end -end - -local function update_credentials(console, cfg, value) - local user_name = "nil" - if cfg['TARANTOOL_USER_NAME'] then - user_name = "'" .. cfg['TARANTOOL_USER_NAME'] .. "'" - end - - local user_password = "nil" - if cfg['TARANTOOL_USER_PASSWORD'] then - user_password = "'" .. cfg['TARANTOOL_USER_PASSWORD'] .. "'" - end - - local cmd = "set_credentials(" .. user_name .. "," .. user_password .. ")" - - local res = console:eval(cmd) - - if res ~= nil then - print(res) - end - - local replication_source = cfg['TARANTOOL_REPLICATION_SOURCE'] - - if replication_source ~= nil then - update_replication_source(console, cfg, replication_source) - end -end - - -local vars = { - TARANTOOL_SLAB_ALLOC_ARENA=nop, - TARANTOOL_SLAB_ALLOC_FACTOR=nop, - TARANTOOL_SLAB_ALLOC_MAXIMAL=nop, - TARANTOOL_SLAB_ALLOC_MINIMAL=nop, - TARANTOOL_PORT=nop, - TARANTOOL_WAL_MODE=nop, - TARANTOOL_USER_NAME=update_credentials, - TARANTOOL_USER_PASSWORD=update_credentials, - TARANTOOL_REPLICATION_SOURCE=update_replication_source, - TARANTOOL_REPLICATION=update_replication_source, -} - -console.on_start(function(self) - local status, reason - status, reason = pcall(function() require('console').connect(CONSOLE_SOCKET_PATH) end) - if not status then - self:print(reason) - os.exit(1) - end - - if arg[1] == nil or arg[2] == nil then - self:print("Usage: " .. arg[0] .. " ") - os.exit(1) - end - - if vars[arg[1]] == nil then - self:print("Unknown var: " .. arg[1]) - os.exit(1) - end - - local cfg = read_config() - cfg[arg[1]] = arg[2] - - local func = vars[arg[1]] - func(self, cfg, arg[2]) - - write_config(cfg) - - self.running = false - os.exit(0) -end) - -console.on_client_disconnect(function(self) self.running = false end) -console.start() - -os.exit(0) diff --git a/2.1/console b/2.1/console deleted file mode 100755 index d6fb192..0000000 --- a/2.1/console +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env tarantool - -local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' - -console = require('console') -console.on_start(function(self) - local status, reason - status, reason = pcall(function() require('console').connect(CONSOLE_SOCKET_PATH) end) - if not status then - self:print(reason) - self.running = false - end -end) -console.on_client_disconnect(function(self) self.running = false end) -console.start() diff --git a/2.1/docker-entrypoint.sh b/2.1/docker-entrypoint.sh deleted file mode 100755 index 3a9f5e4..0000000 --- a/2.1/docker-entrypoint.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh -set -e - -# first arg is `-f` or `--some-option` -# or first arg is `something.conf` -if [ "${1:0:1}" = '-' ]; then - set -- tarantool "$@" -fi - -# allow the container to be started with `--user` -if [ "$1" = 'tarantool' -a "$(id -u)" = '0' ]; then - chown -R tarantool /var/lib/tarantool - exec su-exec tarantool "$0" "$@" -fi - -# entry point wraps the passed script to do basic setup -if [ "$1" = 'tarantool' ]; then - shift - exec tarantool "/usr/local/bin/tarantool-entrypoint.lua" "$@" -fi - -exec "$@" diff --git a/2.1/gperftools_alpine.diff b/2.1/gperftools_alpine.diff deleted file mode 100644 index e768381..0000000 --- a/2.1/gperftools_alpine.diff +++ /dev/null @@ -1,110 +0,0 @@ -diff --git a/src/base/linux_syscall_support.h b/src/base/linux_syscall_support.h -index 5d578cd..fceebe2 100644 ---- a/src/base/linux_syscall_support.h -+++ b/src/base/linux_syscall_support.h -@@ -2432,9 +2432,9 @@ struct kernel_stat { - #if defined(__s390x__) - LSS_INLINE _syscall1(void*, mmap, void*, a) - #else -- /* Need to make sure __off64_t isn't truncated to 32-bits under x32. */ -+ /* Need to make sure off64_t isn't truncated to 32-bits under x32. */ - LSS_INLINE void* LSS_NAME(mmap)(void *s, size_t l, int p, int f, int d, -- __off64_t o) { -+ off64_t o) { - LSS_BODY(6, void*, mmap, LSS_SYSCALL_ARG(s), LSS_SYSCALL_ARG(l), - LSS_SYSCALL_ARG(p), LSS_SYSCALL_ARG(f), - LSS_SYSCALL_ARG(d), (uint64_t)(o)); -@@ -2475,7 +2475,7 @@ struct kernel_stat { - LSS_INLINE _syscall6(void*, mmap, void*, s, - size_t, l, int, p, - int, f, int, d, -- __off64_t, o) -+ off64_t, o) - LSS_INLINE int LSS_NAME(sigaction)(int signum, - const struct kernel_sigaction *act, - struct kernel_sigaction *oldact) { -diff --git a/src/malloc_hook_mmap_linux.h b/src/malloc_hook_mmap_linux.h -index 1c4c766..b2aa8ed 100755 ---- a/src/malloc_hook_mmap_linux.h -+++ b/src/malloc_hook_mmap_linux.h -@@ -56,7 +56,7 @@ - - static inline void* do_mmap64(void *start, size_t length, - int prot, int flags, -- int fd, __off64_t offset) __THROW { -+ int fd, off64_t offset) __THROW { - return sys_mmap(start, length, prot, flags, fd, offset); - } - -@@ -67,7 +67,7 @@ static inline void* do_mmap64(void *start, size_t length, - - static inline void* do_mmap64(void *start, size_t length, - int prot, int flags, -- int fd, __off64_t offset) __THROW { -+ int fd, off64_t offset) __THROW { - void *result; - - // Try mmap2() unless it's not supported -@@ -151,9 +151,11 @@ static inline void* do_mmap64(void *start, size_t length, - # undef mmap - - extern "C" { -+ #ifndef mmap64 - void* mmap64(void *start, size_t length, int prot, int flags, -- int fd, __off64_t offset ) __THROW -+ int fd, off64_t offset ) __THROW - ATTRIBUTE_SECTION(malloc_hook); -+ #endif - void* mmap(void *start, size_t length,int prot, int flags, - int fd, off_t offset) __THROW - ATTRIBUTE_SECTION(malloc_hook); -@@ -166,8 +168,9 @@ extern "C" { - ATTRIBUTE_SECTION(malloc_hook); - } - -+#ifndef mmap64 - extern "C" void* mmap64(void *start, size_t length, int prot, int flags, -- int fd, __off64_t offset) __THROW { -+ int fd, off64_t offset) __THROW { - MallocHook::InvokePreMmapHook(start, length, prot, flags, fd, offset); - void *result; - if (!MallocHook::InvokeMmapReplacement( -@@ -177,6 +180,7 @@ extern "C" void* mmap64(void *start, size_t length, int prot, int flags, - MallocHook::InvokeMmapHook(result, start, length, prot, flags, fd, offset); - return result; - } -+#endif - - # if !defined(__USE_FILE_OFFSET64) || !defined(__REDIRECT_NTH) - -@@ -216,7 +220,7 @@ extern "C" void* mremap(void* old_addr, size_t old_size, size_t new_size, - return result; - } - --#ifndef __UCLIBC__ -+#if defined(__GLIBC__) && ! defined(__UCLIBC__) - // libc's version: - extern "C" void* __sbrk(ptrdiff_t increment); - -diff --git a/src/tests/stacktrace_unittest.cc b/src/tests/stacktrace_unittest.cc -index 3c9f735..2d39ad9 100644 ---- a/src/tests/stacktrace_unittest.cc -+++ b/src/tests/stacktrace_unittest.cc -@@ -120,17 +120,6 @@ void ATTRIBUTE_NOINLINE CheckStackTraceLeaf(void) { - CHECK_GE(size, 1); - CHECK_LE(size, STACK_LEN); - --#ifdef HAVE_EXECINFO_H -- { -- char **strings = backtrace_symbols(stack, size); -- printf("Obtained %d stack frames.\n", size); -- for (int i = 0; i < size; i++) -- printf("%s %p\n", strings[i], stack[i]); -- printf("CheckStackTrace() addr: %p\n", &CheckStackTrace); -- free(strings); -- } --#endif -- - for (int i = 0; i < BACKTRACE_STEPS; i++) { - printf("Backtrace %d: expected: %p..%p actual: %p ... ", - i, expected_range[i].start, expected_range[i].end, stack[i]); diff --git a/2.1/luarocks-config.lua b/2.1/luarocks-config.lua deleted file mode 100644 index 111f955..0000000 --- a/2.1/luarocks-config.lua +++ /dev/null @@ -1,9 +0,0 @@ -rocks_trees = { - { name = [[user]], root = home..[[/.luarocks]] }, - { name = [[system]], root = [[/usr/local]] } -} - -rocks_servers = { - [[http://rocks.tarantool.org/]], - [[http://luarocks.org/repositories/rocks]] -} diff --git a/2.1/tarantool-entrypoint.lua b/2.1/tarantool-entrypoint.lua deleted file mode 100755 index ffbf2fc..0000000 --- a/2.1/tarantool-entrypoint.lua +++ /dev/null @@ -1,292 +0,0 @@ -#!/usr/bin/env tarantool - -local fio = require('fio') -local errno = require('errno') -local fun = require('fun') -local urilib = require('uri') -local console = require('console') -local term = require('term') -local log = require('log') -local yaml = require('yaml') - -local TARANTOOL_DEFAULT_PORT = 3301 -local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' -local CFG_FILE_PATH = '/etc/tarantool/config.yml' - - -local orig_cfg = box.cfg - -local function read_config() - local f = io.open(CFG_FILE_PATH, "rb") - if f == nil then - log.error("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) - os.exit(1) - end - local content = f:read("*all") - f:close() - return yaml.decode(content) -end - -local function write_config(cfg) - local f = io.open(CFG_FILE_PATH, "w+") - if f == nil then - print("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) - os.exit(1) - end - local content = yaml.encode(cfg) - f:write(content) - f:close() -end - -local function parse_replication_source(replication_source, user_name, user_password) - if replication_source == nil then - return nil - end - - local replication_source_table = {} - for uri in string.gmatch(replication_source, "[^,]+") do - local parsed_uri = urilib.parse(uri) - if parsed_uri == nil then - error("Incorrect replication source URI format: '"..uri.."'") - end - local host = parsed_uri.host - local port = parsed_uri.service or TARANTOOL_DEFAULT_PORT - local user = parsed_uri.login or user_name - local password = parsed_uri.password or user_password - - if user == 'guest' or user == nil then - replication_source = string.format("%s:%s", host, port) - elseif password == nil then - replication_source = string.format("%s:@%s:%s", user, host, port) - else - replication_source = string.format("%s:%s@%s:%s", user, password, - host, port) - end - - table.insert(replication_source_table, replication_source) - end - - return replication_source_table -end - -local function choose_option(main, substitute, cfg) - if cfg[main] then - return main - end - if cfg[substitute] then - return substitute - end - return main -end - -function set_replication_source(replication_source, user_name, user_password) - local replication_source_table = parse_replication_source( - replication_source, user_name, user_password - ) - local choice = choose_option('replication', 'replication_source', box.cfg) - box.cfg{[choice] = replication_source_table} - log.info("Updated box.cfg.%s to %s", choice, replication_source) -end - -local function create_user(user_name, user_password) - if user_name ~= 'guest' and user_password == nil then - user_password = "" - - local warn_str = [[**************************************************** -WARNING: No password has been set for the database. - This will allow anyone with access to the - Tarantool port to access your database. In - Docker's default configuration, this is - effectively any other container on the same - system. - Use "-e TARANTOOL_USER_PASSWORD=password" - to set it in "docker run". -****************************************************]] - log.warn('\n'..warn_str) - end - - if user_name == 'guest' and user_password == nil then - local warn_str = [[**************************************************** -WARNING: 'guest' is chosen as primary user. - Since it is not allowed to set a password for - guest user, your instance will be accessible - by anyone having direct access to the Tarantool - port. - If you wanted to create an authenticated user, - specify "-e TARANTOOL_USER_NAME=username" and - pick a user name other than "guest". -****************************************************]] - log.warn('\n'..warn_str) - end - - if user_name == 'guest' and user_password ~= nil then - user_password = nil - - local warn_str = [[**************************************************** -WARNING: A password for guest user has been specified. - In Tarantool, guest user can't have a password - and is always allowed to login, if it has - enough privileges. - If you wanted to create an authenticated user, - specify "-e TARANTOOL_USER_NAME=username" and - pick a user name other than "guest". -****************************************************]] - log.warn('\n'..warn_str) - end - - if user_name ~= 'admin' and user_name ~= 'guest' then - if not box.schema.user.exists(user_name) then - log.info("Creating user '%s'", user_name) - box.schema.user.create(user_name) - end - end - - if user_name ~= 'admin' then - log.info("Granting admin privileges to user '%s'", user_name) - box.schema.user.grant(user_name, 'read,write,execute,create,drop', - 'universe', nil, {if_not_exists = true}) - box.schema.user.grant(user_name, 'replication', - nil, nil, {if_not_exists = true}) - end - - if user_name ~= 'guest' then - log.info("Setting password for user '%s'", user_name) - box.schema.user.passwd(user_name, user_password) - end -end - -function set_credentials(user_name, user_password) - create_user(user_name, user_password) -end - -local function wrapper_cfg(override) - local work_dir = '/var/lib/tarantool' - local snap_filename = "*.snap" - local snap_path = work_dir..'/'..snap_filename - - local first_run = false - if next(fio.glob(snap_path)) == nil then - first_run = true - end - - - local file_cfg = {} - local config_file_exists = fio.stat(CFG_FILE_PATH) ~= nil - if not config_file_exists then - log.info("Creating configuration file: " .. CFG_FILE_PATH) - - file_cfg.TARANTOOL_USER_NAME = os.getenv('TARANTOOL_USER_NAME') - file_cfg.TARANTOOL_USER_PASSWORD = os.getenv('TARANTOOL_USER_PASSWORD') - file_cfg.TARANTOOL_SLAB_ALLOC_ARENA = os.getenv('TARANTOOL_SLAB_ALLOC_ARENA') - file_cfg.TARANTOOL_SLAB_ALLOC_FACTOR = os.getenv('TARANTOOL_SLAB_ALLOC_FACTOR') - file_cfg.TARANTOOL_SLAB_ALLOC_MINIMAL = os.getenv('TARANTOOL_SLAB_ALLOC_MINIMAL') - file_cfg.TARANTOOL_SLAB_ALLOC_MAXIMAL = os.getenv('TARANTOOL_SLAB_ALLOC_MAXIMAL') - file_cfg.TARANTOOL_PORT = os.getenv('TARANTOOL_PORT') - file_cfg.TARANTOOL_WAL_MODE = os.getenv('TARANTOOL_WAL_MODE') - file_cfg.TARANTOOL_REPLICATION_SOURCE = os.getenv('TARANTOOL_REPLICATION_SOURCE') - file_cfg.TARANTOOL_REPLICATION = os.getenv('TARANTOOL_REPLICATION') - file_cfg.TARANTOOL_SNAPSHOT_PERIOD = os.getenv('TARANTOOL_SNAPSHOT_PERIOD') - file_cfg.TARANTOOL_MEMTX_MEMORY = os.getenv('TARANTOOL_MEMTX_MEMORY') - file_cfg.TARANTOOL_CHECKPOINT_INTERVAL = os.getenv('TARANTOOL_CHECKPOINT_INTERVAL') - file_cfg.TARANTOOL_MEMTX_MIN_TUPLE_SIZE = os.getenv('TARANTOOL_MEMTX_MIN_TUPLE_SIZE') - file_cfg.TARANTOOL_MEMTX_MAX_TUPLE_SIZE = os.getenv('TARANTOOL_MEMTX_MAX_TUPLE_SIZE') - - write_config(file_cfg) - else - log.info("Loading existing configuration file: " .. CFG_FILE_PATH) - - file_cfg = read_config() - end - - local user_name = file_cfg.TARANTOOL_USER_NAME or - os.getenv('TARANTOOL_USER_NAME') or 'guest' - local user_password = file_cfg.TARANTOOL_USER_PASSWORD or - os.getenv('TARANTOOL_USER_PASSWORD') - - - local cfg = override or {} - -- Placeholders for deprecated options - cfg.slab_alloc_arena = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_ARENA) or - override.slab_alloc_arena - cfg.slab_alloc_maximal = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_MAXIMAL) or - override.slab_alloc_maximal - cfg.slab_alloc_minimal = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_MINIMAL) or - override.slab_alloc_minimal - cfg.snapshot_period = tonumber(file_cfg.TARANTOOL_SNAPSHOT_PERIOD) or - override.snapshot_period - -- Replacements for deprecated options - cfg.memtx_memory = tonumber(file_cfg.TARANTOOL_MEMTX_MEMORY) or - override.memtx_memory - cfg.memtx_min_tuple_size = tonumber(file_cfg.TARANTOOL_MEMTX_MIN_TUPLE_SIZE) or - override.memtx_min_tuple_size - cfg.memtx_max_tuple_size = tonumber(file_cfg.TARANTOOL_MEMTX_MAX_TUPLE_SIZE) or - override.memtx_max_tuple_size - cfg.checkpoint_interval = tonumber(file_cfg.TARANTOOL_CHECKPOINT_INTERVAL) or - override.checkpoint_interval - -- Deprecated options with default values - local choice = choose_option('memtx_dir', 'snap_dir', override) - cfg[choice] = override[choice] or '/var/lib/tarantool' - - -- Remaining configuration - cfg.slab_alloc_factor = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_FACTOR) or - override.slab_alloc_factor - cfg.listen = tonumber(file_cfg.TARANTOOL_PORT) or - override.listen or TARANTOOL_DEFAULT_PORT - cfg.wal_mode = file_cfg.TARANTOOL_WAL_MODE or - override.wal_mode - - cfg.wal_dir = override.wal_dir or '/var/lib/tarantool' - cfg.vinyl_dir = override.vinyl_dir or '/var/lib/tarantool' - cfg.pid_file = override.pid_file or '/var/run/tarantool/tarantool.pid' - - local choice = choose_option('TARANTOOL_REPLICATION', 'TARANTOOL_REPLICATION_SOURCE', file_cfg) - local replication_source_table = parse_replication_source(file_cfg[choice], - user_name, - user_password) - - if replication_source_table then - cfg.replication = replication_source_table - else - local choice = choose_option('replication', 'replication_source', override) - cfg[choice] = override[choice] - end - - log.info("Config:\n" .. yaml.encode(cfg)) - - orig_cfg(cfg) - - box.once('tarantool-entrypoint', function () - if first_run then - log.info("Initializing database") - - create_user(user_name, user_password) - end - end) - - console.listen(CONSOLE_SOCKET_PATH) - -end - -box.cfg = wrapper_cfg - --- re-run the script passed as parameter with all arguments that follow -execute_script = arg[1] -if execute_script == nil then - box.cfg {} - - if term.isatty(io.stdout) then - console.start() - os.exit(0) - end -else - narg = 0 - while true do - arg[narg] = arg[narg + 1] - if arg[narg] == nil then - break - end - narg = narg + 1 - end - - dofile(execute_script) -end diff --git a/2.1/tarantool.default b/2.1/tarantool.default deleted file mode 100644 index fffe3b0..0000000 --- a/2.1/tarantool.default +++ /dev/null @@ -1,22 +0,0 @@ --- --- System-wide settings for tarantoolctl and init scripts --- --- This file is meant to enable the usage of tarantoolctl inside --- docker containers. Since there is no init system, most of its --- functionality will not work, except 'tarantoolctl enter' or --- 'tarantoolctl status'. --- - -default_cfg = { - pid_file = "/var/run/tarantool", -- /var/run/tarantool/${INSTANCE}.pid - wal_dir = "/var/lib/tarantool", -- /var/lib/tarantool/${INSTANCE}/ - snap_dir = "/var/lib/tarantool", -- /var/lib/tarantool/${INSTANCE} - vinyl_dir = "/var/lib/tarantool", -- /var/lib/tarantool/${INSTANCE} - logger = "/var/log/tarantool", -- /var/log/tarantool/${INSTANCE}.log - username = "tarantool", -} - --- instances.available - all available instances --- instances.enabled - instances to autostart by sysvinit -instance_dir = "/usr/local/etc/tarantool/instances.enabled" --- vim: set ft=lua : diff --git a/2.1/tarantool_is_up b/2.1/tarantool_is_up deleted file mode 100755 index 71148d5..0000000 --- a/2.1/tarantool_is_up +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh - -status=$( (tarantool <<-'EOF' -local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' -local console = require('console') -local os = require("os") -local yaml = require("yaml") - -console.on_start(function(self) - local status, reason - status, reason = pcall(function() require('console').connect(CONSOLE_SOCKET_PATH) end) - if not status then - self:print(reason) - os.exit(1) - end - - cmd = 'box.info.status' - local res = self:eval(cmd) - if res ~= nil then - res = yaml.decode(res) - print(res[1]) - end - - os.exit(0) -end) - -console.on_client_disconnect(function(self) self.running = false end) -console.start() - -os.exit(0) -EOF -) 2>/dev/null) - - -echo "$status" - -if [ "$status" = "running" ]; then - exit 0 -else - exit 1 -fi diff --git a/2.1/tarantool_set_config.lua b/2.1/tarantool_set_config.lua deleted file mode 100755 index ddca36c..0000000 --- a/2.1/tarantool_set_config.lua +++ /dev/null @@ -1,130 +0,0 @@ -#!/usr/bin/env tarantool - -local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' -local CFG_FILE_PATH = '/etc/tarantool/config.yml' - -local fio = require('fio') -local yaml = require('yaml') -local console = require('console') -local errno = require('errno') - -local function read_config() - local f = io.open(CFG_FILE_PATH, "rb") - if f == nil then - print("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) - os.exit(1) - end - local content = f:read("*all") - f:close() - return yaml.decode(content) -end - -local function write_config(cfg) - local f = io.open(CFG_FILE_PATH, "w+") - if f == nil then - print("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) - os.exit(1) - end - local content = yaml.encode(cfg) - f:write(content) - f:close() -end - -local function nop(console, cfg, value) -end - -local function update_replication_source(console, cfg, value) - local user_name = "nil" - if cfg['TARANTOOL_USER_NAME'] then - user_name = "'" .. cfg['TARANTOOL_USER_NAME'] .. "'" - end - - local user_password = "nil" - if cfg['TARANTOOL_USER_PASSWORD'] then - user_password = "'" .. cfg['TARANTOOL_USER_PASSWORD'] .. "'" - end - - local cmd = "set_replication_source('"..value.."', " .. user_name .. "," .. user_password .. ")" - print("cmd: ", cmd) - - local res = console:eval(cmd) - - if res ~= nil then - print(res) - end -end - -local function update_credentials(console, cfg, value) - local user_name = "nil" - if cfg['TARANTOOL_USER_NAME'] then - user_name = "'" .. cfg['TARANTOOL_USER_NAME'] .. "'" - end - - local user_password = "nil" - if cfg['TARANTOOL_USER_PASSWORD'] then - user_password = "'" .. cfg['TARANTOOL_USER_PASSWORD'] .. "'" - end - - local cmd = "set_credentials(" .. user_name .. "," .. user_password .. ")" - - local res = console:eval(cmd) - - if res ~= nil then - print(res) - end - - local replication_source = cfg['TARANTOOL_REPLICATION_SOURCE'] - - if replication_source ~= nil then - update_replication_source(console, cfg, replication_source) - end -end - - -local vars = { - TARANTOOL_SLAB_ALLOC_ARENA=nop, - TARANTOOL_SLAB_ALLOC_FACTOR=nop, - TARANTOOL_SLAB_ALLOC_MAXIMAL=nop, - TARANTOOL_SLAB_ALLOC_MINIMAL=nop, - TARANTOOL_PORT=nop, - TARANTOOL_WAL_MODE=nop, - TARANTOOL_USER_NAME=update_credentials, - TARANTOOL_USER_PASSWORD=update_credentials, - TARANTOOL_REPLICATION_SOURCE=update_replication_source, - TARANTOOL_REPLICATION=update_replication_source, -} - -console.on_start(function(self) - local status, reason - status, reason = pcall(function() require('console').connect(CONSOLE_SOCKET_PATH) end) - if not status then - self:print(reason) - os.exit(1) - end - - if arg[1] == nil or arg[2] == nil then - self:print("Usage: " .. arg[0] .. " ") - os.exit(1) - end - - if vars[arg[1]] == nil then - self:print("Unknown var: " .. arg[1]) - os.exit(1) - end - - local cfg = read_config() - cfg[arg[1]] = arg[2] - - local func = vars[arg[1]] - func(self, cfg, arg[2]) - - write_config(cfg) - - self.running = false - os.exit(0) -end) - -console.on_client_disconnect(function(self) self.running = false end) -console.start() - -os.exit(0) diff --git a/2.2/Dockerfile b/2.2/Dockerfile deleted file mode 100644 index 22102e6..0000000 --- a/2.2/Dockerfile +++ /dev/null @@ -1,246 +0,0 @@ -FROM alpine:3.5 -MAINTAINER mail@racktear.com - -RUN addgroup -S tarantool \ - && adduser -S -G tarantool tarantool \ - && apk add --no-cache 'su-exec>=0.2' - -ENV TARANTOOL_VERSION=2.2.2-4-g4f8ac5999 \ - TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ - TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ - CURL_REPO=https://github.com/curl/curl.git \ - CURL_TAG=curl-7_59_0 \ - GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ - GPERFTOOLS_TAG=gperftools-2.5 \ - LUAROCKS_URL=https://github.com/tarantool/luarocks/archive/6e6fe62d9409fe2103c0fd091cccb3da0451faf5.tar.gz \ - LUAROCK_SHARD_REPO=https://github.com/tarantool/shard.git \ - LUAROCK_SHARD_TAG=8f8c5a7 \ - LUAROCK_AVRO_SCHEMA_VERSION=2.0.1 \ - LUAROCK_EXPERATIOND_VERSION=1.0.1 \ - LUAROCK_QUEUE_VERSION=1.0.2 \ - LUAROCK_CONNPOOL_VERSION=1.1.1 \ - LUAROCK_HTTP_VERSION=1.0.1 \ - LUAROCK_MEMCACHED_VERSION=1.0.0 \ - LUAROCK_TARANTOOL_PG_VERSION=2.0.1 \ - LUAROCK_TARANTOOL_MYSQL_VERSION=2.0.1 \ - LUAROCK_TARANTOOL_MQTT_VERSION=1.2.1 \ - LUAROCK_TARANTOOL_GIS_VERSION=1.0.0 \ - LUAROCK_TARANTOOL_PROMETHEUS_VERSION=1.0.0 \ - LUAROCK_TARANTOOL_GPERFTOOLS_VERSION=1.0.1 - -COPY gperftools_alpine.diff / - -RUN set -x \ - && apk add --no-cache --virtual .run-deps \ - libstdc++ \ - readline \ - libressl \ - yaml \ - lz4 \ - binutils \ - ncurses \ - libgomp \ - lua \ - tar \ - zip \ - libunwind \ - icu \ - ca-certificates \ - && apk add --no-cache --virtual .build-deps \ - perl \ - gcc \ - g++ \ - cmake \ - readline-dev \ - libressl-dev \ - yaml-dev \ - lz4-dev \ - binutils-dev \ - ncurses-dev \ - lua-dev \ - musl-dev \ - make \ - git \ - libunwind-dev \ - autoconf \ - automake \ - libtool \ - linux-headers \ - go \ - tcl \ - icu-dev \ - wget \ - && : "---------- curl ----------" \ - && mkdir -p /usr/src/curl \ - && git clone "$CURL_REPO" /usr/src/curl \ - && git -C /usr/src/curl checkout "$CURL_TAG" \ - && (cd /usr/src/curl \ - && ./buildconf \ - && ./configure --prefix "/usr/local" \ - && make -j \ - && make install) \ - && : "---------- gperftools ----------" \ - && mkdir -p /usr/src/gperftools \ - && git clone "$GPERFTOOLS_REPO" /usr/src/gperftools \ - && git -C /usr/src/gperftools checkout "$GPERFTOOLS_TAG" \ - && (cd /usr/src/gperftools; \ - patch -p1 < /gperftools_alpine.diff; \ - rm /gperftools_alpine.diff; \ - ./autogen.sh; \ - ./configure; \ - make; \ - cp .libs/libprofiler.so* /usr/local/lib;) \ - && (GOPATH=/usr/src/go go get github.com/google/pprof; \ - cp /usr/src/go/bin/pprof /usr/local/bin) \ - && : "---------- tarantool ----------" \ - && mkdir -p /usr/src/tarantool \ - && git clone "$TARANTOOL_DOWNLOAD_URL" /usr/src/tarantool \ - && git -C /usr/src/tarantool checkout "$TARANTOOL_VERSION" \ - && git -C /usr/src/tarantool submodule update --init --recursive \ - && (cd /usr/src/tarantool; \ - cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo\ - -DENABLE_BUNDLED_LIBYAML:BOOL=OFF\ - -DENABLE_BACKTRACE:BOOL=ON\ - -DENABLE_DIST:BOOL=ON\ - .) \ - && make -C /usr/src/tarantool -j\ - && make -C /usr/src/tarantool install \ - && make -C /usr/src/tarantool clean \ - && : "---------- small ----------" \ - && (cd /usr/src/tarantool/src/lib/small; \ - cmake -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - .) \ - && make -C /usr/src/tarantool/src/lib/small \ - && make -C /usr/src/tarantool/src/lib/small install \ - && make -C /usr/src/tarantool/src/lib/small clean \ - && : "---------- msgpuck ----------" \ - && (cd /usr/src/tarantool/src/lib/msgpuck; \ - cmake -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - .) \ - && make -C /usr/src/tarantool/src/lib/msgpuck \ - && make -C /usr/src/tarantool/src/lib/msgpuck install \ - && make -C /usr/src/tarantool/src/lib/msgpuck clean \ - && : "---------- luarocks ----------" \ - && wget -O luarocks.tar.gz "$LUAROCKS_URL" \ - && mkdir -p /usr/src/luarocks \ - && tar -xzf luarocks.tar.gz -C /usr/src/luarocks --strip-components=1 \ - && (cd /usr/src/luarocks; \ - ./configure; \ - make build; \ - make install) \ - && rm -r /usr/src/luarocks \ - && rm -rf /usr/src/tarantool \ - && rm -rf /usr/src/gperftools \ - && rm -rf /usr/src/go \ - && : "---------- remove build deps ----------" \ - && apk del .build-deps - -COPY luarocks-config.lua /usr/local/etc/luarocks/config-5.1.lua - -RUN set -x \ - && apk add --no-cache --virtual .run-deps \ - mariadb-client-libs \ - libpq \ - cyrus-sasl \ - mosquitto-libs \ - libev \ - && apk add --no-cache --virtual .build-deps \ - git \ - cmake \ - make \ - coreutils \ - gcc \ - g++ \ - postgresql-dev \ - lua-dev \ - musl-dev \ - cyrus-sasl-dev \ - mosquitto-dev \ - libev-dev \ - libressl-dev \ - && mkdir -p /rocks \ - && : "---------- proj (for gis module) ----------" \ - && wget -O proj.tar.gz http://download.osgeo.org/proj/proj-4.9.3.tar.gz \ - && mkdir -p /usr/src/proj \ - && tar -xzf proj.tar.gz -C /usr/src/proj --strip-components=1 \ - && (cd /usr/src/proj; \ - ./configure; \ - make; \ - make install) \ - && rm -r /usr/src/proj \ - && rm -rf /usr/src/proj \ - && : "---------- geos (for gis module) ----------" \ - && wget -O geos.tar.bz2 http://download.osgeo.org/geos/geos-3.6.0.tar.bz2 \ - && mkdir -p /usr/src/geos \ - && tar -xjf geos.tar.bz2 -C /usr/src/geos --strip-components=1 \ - && (cd /usr/src/geos; \ - ./configure; \ - make; \ - make install) \ - && rm -r /usr/src/geos \ - && rm -rf /usr/src/geos \ - && : "---------- luarocks ----------" \ - && luarocks install lua-term \ - && luarocks install ldoc \ - && : "avro" \ - && luarocks install avro-schema $LUAROCK_AVRO_SCHEMA_VERSION \ - && : "expirationd" \ - && luarocks install expirationd $LUAROCK_EXPERATIOND_VERSION \ - && : "queue" \ - && luarocks install queue $LUAROCK_QUEUE_VERSION \ - && : "connpool" \ - && luarocks install connpool $LUAROCK_CONNPOOL_VERSION \ - && : "shard" \ - && git clone $LUAROCK_SHARD_REPO /rocks/shard \ - && git -C /rocks/shard checkout $LUAROCK_SHARD_TAG \ - && (cd /rocks/shard && luarocks make *rockspec) \ - && : "http" \ - && luarocks install http $LUAROCK_HTTP_VERSION \ - && : "pg" \ - && luarocks install pg $LUAROCK_TARANTOOL_PG_VERSION \ - && : "mysql" \ - && luarocks install mysql $LUAROCK_TARANTOOL_MYSQL_VERSION \ - && : "memcached" \ - && luarocks install memcached $LUAROCK_MEMCACHED_VERSION \ - && : "prometheus" \ - && luarocks install prometheus $LUAROCK_TARANTOOL_PROMETHEUS_VERSION \ - && : "mqtt" \ - && luarocks install mqtt $LUAROCK_TARANTOOL_MQTT_VERSION \ - && : "gis" \ - && luarocks install gis $LUAROCK_TARANTOOL_GIS_VERSION \ - && : "gperftools" \ - && luarocks install gperftools $LUAROCK_TARANTOOL_GPERFTOOLS_VERSION \ - && : "---------- remove build deps ----------" \ - && apk del .build-deps \ - && rm -rf /rocks - -RUN mkdir -p /var/lib/tarantool \ - && chown tarantool:tarantool /var/lib/tarantool \ - && mkdir -p /opt/tarantool \ - && chown tarantool:tarantool /opt/tarantool \ - && mkdir -p /var/run/tarantool \ - && chown tarantool:tarantool /var/run/tarantool \ - && mkdir /etc/tarantool \ - && chown tarantool:tarantool /etc/tarantool - -VOLUME /var/lib/tarantool -WORKDIR /opt/tarantool - -COPY tarantool-entrypoint.lua /usr/local/bin/ -COPY tarantool_set_config.lua /usr/local/bin/ -COPY docker-entrypoint.sh /usr/local/bin/ -COPY console /usr/local/bin/ -COPY tarantool_is_up /usr/local/bin/ -COPY tarantool.default /usr/local/etc/default/tarantool - -RUN ln -s usr/local/bin/docker-entrypoint.sh /entrypoint.sh # backwards compat -ENTRYPOINT ["docker-entrypoint.sh"] - -HEALTHCHECK CMD tarantool_is_up - -EXPOSE 3301 -CMD [ "tarantool" ] diff --git a/2.2/console b/2.2/console deleted file mode 100755 index d6fb192..0000000 --- a/2.2/console +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env tarantool - -local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' - -console = require('console') -console.on_start(function(self) - local status, reason - status, reason = pcall(function() require('console').connect(CONSOLE_SOCKET_PATH) end) - if not status then - self:print(reason) - self.running = false - end -end) -console.on_client_disconnect(function(self) self.running = false end) -console.start() diff --git a/2.2/docker-entrypoint.sh b/2.2/docker-entrypoint.sh deleted file mode 100755 index 3a9f5e4..0000000 --- a/2.2/docker-entrypoint.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh -set -e - -# first arg is `-f` or `--some-option` -# or first arg is `something.conf` -if [ "${1:0:1}" = '-' ]; then - set -- tarantool "$@" -fi - -# allow the container to be started with `--user` -if [ "$1" = 'tarantool' -a "$(id -u)" = '0' ]; then - chown -R tarantool /var/lib/tarantool - exec su-exec tarantool "$0" "$@" -fi - -# entry point wraps the passed script to do basic setup -if [ "$1" = 'tarantool' ]; then - shift - exec tarantool "/usr/local/bin/tarantool-entrypoint.lua" "$@" -fi - -exec "$@" diff --git a/2.2/gperftools_alpine.diff b/2.2/gperftools_alpine.diff deleted file mode 100644 index e768381..0000000 --- a/2.2/gperftools_alpine.diff +++ /dev/null @@ -1,110 +0,0 @@ -diff --git a/src/base/linux_syscall_support.h b/src/base/linux_syscall_support.h -index 5d578cd..fceebe2 100644 ---- a/src/base/linux_syscall_support.h -+++ b/src/base/linux_syscall_support.h -@@ -2432,9 +2432,9 @@ struct kernel_stat { - #if defined(__s390x__) - LSS_INLINE _syscall1(void*, mmap, void*, a) - #else -- /* Need to make sure __off64_t isn't truncated to 32-bits under x32. */ -+ /* Need to make sure off64_t isn't truncated to 32-bits under x32. */ - LSS_INLINE void* LSS_NAME(mmap)(void *s, size_t l, int p, int f, int d, -- __off64_t o) { -+ off64_t o) { - LSS_BODY(6, void*, mmap, LSS_SYSCALL_ARG(s), LSS_SYSCALL_ARG(l), - LSS_SYSCALL_ARG(p), LSS_SYSCALL_ARG(f), - LSS_SYSCALL_ARG(d), (uint64_t)(o)); -@@ -2475,7 +2475,7 @@ struct kernel_stat { - LSS_INLINE _syscall6(void*, mmap, void*, s, - size_t, l, int, p, - int, f, int, d, -- __off64_t, o) -+ off64_t, o) - LSS_INLINE int LSS_NAME(sigaction)(int signum, - const struct kernel_sigaction *act, - struct kernel_sigaction *oldact) { -diff --git a/src/malloc_hook_mmap_linux.h b/src/malloc_hook_mmap_linux.h -index 1c4c766..b2aa8ed 100755 ---- a/src/malloc_hook_mmap_linux.h -+++ b/src/malloc_hook_mmap_linux.h -@@ -56,7 +56,7 @@ - - static inline void* do_mmap64(void *start, size_t length, - int prot, int flags, -- int fd, __off64_t offset) __THROW { -+ int fd, off64_t offset) __THROW { - return sys_mmap(start, length, prot, flags, fd, offset); - } - -@@ -67,7 +67,7 @@ static inline void* do_mmap64(void *start, size_t length, - - static inline void* do_mmap64(void *start, size_t length, - int prot, int flags, -- int fd, __off64_t offset) __THROW { -+ int fd, off64_t offset) __THROW { - void *result; - - // Try mmap2() unless it's not supported -@@ -151,9 +151,11 @@ static inline void* do_mmap64(void *start, size_t length, - # undef mmap - - extern "C" { -+ #ifndef mmap64 - void* mmap64(void *start, size_t length, int prot, int flags, -- int fd, __off64_t offset ) __THROW -+ int fd, off64_t offset ) __THROW - ATTRIBUTE_SECTION(malloc_hook); -+ #endif - void* mmap(void *start, size_t length,int prot, int flags, - int fd, off_t offset) __THROW - ATTRIBUTE_SECTION(malloc_hook); -@@ -166,8 +168,9 @@ extern "C" { - ATTRIBUTE_SECTION(malloc_hook); - } - -+#ifndef mmap64 - extern "C" void* mmap64(void *start, size_t length, int prot, int flags, -- int fd, __off64_t offset) __THROW { -+ int fd, off64_t offset) __THROW { - MallocHook::InvokePreMmapHook(start, length, prot, flags, fd, offset); - void *result; - if (!MallocHook::InvokeMmapReplacement( -@@ -177,6 +180,7 @@ extern "C" void* mmap64(void *start, size_t length, int prot, int flags, - MallocHook::InvokeMmapHook(result, start, length, prot, flags, fd, offset); - return result; - } -+#endif - - # if !defined(__USE_FILE_OFFSET64) || !defined(__REDIRECT_NTH) - -@@ -216,7 +220,7 @@ extern "C" void* mremap(void* old_addr, size_t old_size, size_t new_size, - return result; - } - --#ifndef __UCLIBC__ -+#if defined(__GLIBC__) && ! defined(__UCLIBC__) - // libc's version: - extern "C" void* __sbrk(ptrdiff_t increment); - -diff --git a/src/tests/stacktrace_unittest.cc b/src/tests/stacktrace_unittest.cc -index 3c9f735..2d39ad9 100644 ---- a/src/tests/stacktrace_unittest.cc -+++ b/src/tests/stacktrace_unittest.cc -@@ -120,17 +120,6 @@ void ATTRIBUTE_NOINLINE CheckStackTraceLeaf(void) { - CHECK_GE(size, 1); - CHECK_LE(size, STACK_LEN); - --#ifdef HAVE_EXECINFO_H -- { -- char **strings = backtrace_symbols(stack, size); -- printf("Obtained %d stack frames.\n", size); -- for (int i = 0; i < size; i++) -- printf("%s %p\n", strings[i], stack[i]); -- printf("CheckStackTrace() addr: %p\n", &CheckStackTrace); -- free(strings); -- } --#endif -- - for (int i = 0; i < BACKTRACE_STEPS; i++) { - printf("Backtrace %d: expected: %p..%p actual: %p ... ", - i, expected_range[i].start, expected_range[i].end, stack[i]); diff --git a/2.2/luarocks-config.lua b/2.2/luarocks-config.lua deleted file mode 100644 index 111f955..0000000 --- a/2.2/luarocks-config.lua +++ /dev/null @@ -1,9 +0,0 @@ -rocks_trees = { - { name = [[user]], root = home..[[/.luarocks]] }, - { name = [[system]], root = [[/usr/local]] } -} - -rocks_servers = { - [[http://rocks.tarantool.org/]], - [[http://luarocks.org/repositories/rocks]] -} diff --git a/2.2/tarantool-entrypoint.lua b/2.2/tarantool-entrypoint.lua deleted file mode 100755 index ffbf2fc..0000000 --- a/2.2/tarantool-entrypoint.lua +++ /dev/null @@ -1,292 +0,0 @@ -#!/usr/bin/env tarantool - -local fio = require('fio') -local errno = require('errno') -local fun = require('fun') -local urilib = require('uri') -local console = require('console') -local term = require('term') -local log = require('log') -local yaml = require('yaml') - -local TARANTOOL_DEFAULT_PORT = 3301 -local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' -local CFG_FILE_PATH = '/etc/tarantool/config.yml' - - -local orig_cfg = box.cfg - -local function read_config() - local f = io.open(CFG_FILE_PATH, "rb") - if f == nil then - log.error("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) - os.exit(1) - end - local content = f:read("*all") - f:close() - return yaml.decode(content) -end - -local function write_config(cfg) - local f = io.open(CFG_FILE_PATH, "w+") - if f == nil then - print("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) - os.exit(1) - end - local content = yaml.encode(cfg) - f:write(content) - f:close() -end - -local function parse_replication_source(replication_source, user_name, user_password) - if replication_source == nil then - return nil - end - - local replication_source_table = {} - for uri in string.gmatch(replication_source, "[^,]+") do - local parsed_uri = urilib.parse(uri) - if parsed_uri == nil then - error("Incorrect replication source URI format: '"..uri.."'") - end - local host = parsed_uri.host - local port = parsed_uri.service or TARANTOOL_DEFAULT_PORT - local user = parsed_uri.login or user_name - local password = parsed_uri.password or user_password - - if user == 'guest' or user == nil then - replication_source = string.format("%s:%s", host, port) - elseif password == nil then - replication_source = string.format("%s:@%s:%s", user, host, port) - else - replication_source = string.format("%s:%s@%s:%s", user, password, - host, port) - end - - table.insert(replication_source_table, replication_source) - end - - return replication_source_table -end - -local function choose_option(main, substitute, cfg) - if cfg[main] then - return main - end - if cfg[substitute] then - return substitute - end - return main -end - -function set_replication_source(replication_source, user_name, user_password) - local replication_source_table = parse_replication_source( - replication_source, user_name, user_password - ) - local choice = choose_option('replication', 'replication_source', box.cfg) - box.cfg{[choice] = replication_source_table} - log.info("Updated box.cfg.%s to %s", choice, replication_source) -end - -local function create_user(user_name, user_password) - if user_name ~= 'guest' and user_password == nil then - user_password = "" - - local warn_str = [[**************************************************** -WARNING: No password has been set for the database. - This will allow anyone with access to the - Tarantool port to access your database. In - Docker's default configuration, this is - effectively any other container on the same - system. - Use "-e TARANTOOL_USER_PASSWORD=password" - to set it in "docker run". -****************************************************]] - log.warn('\n'..warn_str) - end - - if user_name == 'guest' and user_password == nil then - local warn_str = [[**************************************************** -WARNING: 'guest' is chosen as primary user. - Since it is not allowed to set a password for - guest user, your instance will be accessible - by anyone having direct access to the Tarantool - port. - If you wanted to create an authenticated user, - specify "-e TARANTOOL_USER_NAME=username" and - pick a user name other than "guest". -****************************************************]] - log.warn('\n'..warn_str) - end - - if user_name == 'guest' and user_password ~= nil then - user_password = nil - - local warn_str = [[**************************************************** -WARNING: A password for guest user has been specified. - In Tarantool, guest user can't have a password - and is always allowed to login, if it has - enough privileges. - If you wanted to create an authenticated user, - specify "-e TARANTOOL_USER_NAME=username" and - pick a user name other than "guest". -****************************************************]] - log.warn('\n'..warn_str) - end - - if user_name ~= 'admin' and user_name ~= 'guest' then - if not box.schema.user.exists(user_name) then - log.info("Creating user '%s'", user_name) - box.schema.user.create(user_name) - end - end - - if user_name ~= 'admin' then - log.info("Granting admin privileges to user '%s'", user_name) - box.schema.user.grant(user_name, 'read,write,execute,create,drop', - 'universe', nil, {if_not_exists = true}) - box.schema.user.grant(user_name, 'replication', - nil, nil, {if_not_exists = true}) - end - - if user_name ~= 'guest' then - log.info("Setting password for user '%s'", user_name) - box.schema.user.passwd(user_name, user_password) - end -end - -function set_credentials(user_name, user_password) - create_user(user_name, user_password) -end - -local function wrapper_cfg(override) - local work_dir = '/var/lib/tarantool' - local snap_filename = "*.snap" - local snap_path = work_dir..'/'..snap_filename - - local first_run = false - if next(fio.glob(snap_path)) == nil then - first_run = true - end - - - local file_cfg = {} - local config_file_exists = fio.stat(CFG_FILE_PATH) ~= nil - if not config_file_exists then - log.info("Creating configuration file: " .. CFG_FILE_PATH) - - file_cfg.TARANTOOL_USER_NAME = os.getenv('TARANTOOL_USER_NAME') - file_cfg.TARANTOOL_USER_PASSWORD = os.getenv('TARANTOOL_USER_PASSWORD') - file_cfg.TARANTOOL_SLAB_ALLOC_ARENA = os.getenv('TARANTOOL_SLAB_ALLOC_ARENA') - file_cfg.TARANTOOL_SLAB_ALLOC_FACTOR = os.getenv('TARANTOOL_SLAB_ALLOC_FACTOR') - file_cfg.TARANTOOL_SLAB_ALLOC_MINIMAL = os.getenv('TARANTOOL_SLAB_ALLOC_MINIMAL') - file_cfg.TARANTOOL_SLAB_ALLOC_MAXIMAL = os.getenv('TARANTOOL_SLAB_ALLOC_MAXIMAL') - file_cfg.TARANTOOL_PORT = os.getenv('TARANTOOL_PORT') - file_cfg.TARANTOOL_WAL_MODE = os.getenv('TARANTOOL_WAL_MODE') - file_cfg.TARANTOOL_REPLICATION_SOURCE = os.getenv('TARANTOOL_REPLICATION_SOURCE') - file_cfg.TARANTOOL_REPLICATION = os.getenv('TARANTOOL_REPLICATION') - file_cfg.TARANTOOL_SNAPSHOT_PERIOD = os.getenv('TARANTOOL_SNAPSHOT_PERIOD') - file_cfg.TARANTOOL_MEMTX_MEMORY = os.getenv('TARANTOOL_MEMTX_MEMORY') - file_cfg.TARANTOOL_CHECKPOINT_INTERVAL = os.getenv('TARANTOOL_CHECKPOINT_INTERVAL') - file_cfg.TARANTOOL_MEMTX_MIN_TUPLE_SIZE = os.getenv('TARANTOOL_MEMTX_MIN_TUPLE_SIZE') - file_cfg.TARANTOOL_MEMTX_MAX_TUPLE_SIZE = os.getenv('TARANTOOL_MEMTX_MAX_TUPLE_SIZE') - - write_config(file_cfg) - else - log.info("Loading existing configuration file: " .. CFG_FILE_PATH) - - file_cfg = read_config() - end - - local user_name = file_cfg.TARANTOOL_USER_NAME or - os.getenv('TARANTOOL_USER_NAME') or 'guest' - local user_password = file_cfg.TARANTOOL_USER_PASSWORD or - os.getenv('TARANTOOL_USER_PASSWORD') - - - local cfg = override or {} - -- Placeholders for deprecated options - cfg.slab_alloc_arena = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_ARENA) or - override.slab_alloc_arena - cfg.slab_alloc_maximal = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_MAXIMAL) or - override.slab_alloc_maximal - cfg.slab_alloc_minimal = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_MINIMAL) or - override.slab_alloc_minimal - cfg.snapshot_period = tonumber(file_cfg.TARANTOOL_SNAPSHOT_PERIOD) or - override.snapshot_period - -- Replacements for deprecated options - cfg.memtx_memory = tonumber(file_cfg.TARANTOOL_MEMTX_MEMORY) or - override.memtx_memory - cfg.memtx_min_tuple_size = tonumber(file_cfg.TARANTOOL_MEMTX_MIN_TUPLE_SIZE) or - override.memtx_min_tuple_size - cfg.memtx_max_tuple_size = tonumber(file_cfg.TARANTOOL_MEMTX_MAX_TUPLE_SIZE) or - override.memtx_max_tuple_size - cfg.checkpoint_interval = tonumber(file_cfg.TARANTOOL_CHECKPOINT_INTERVAL) or - override.checkpoint_interval - -- Deprecated options with default values - local choice = choose_option('memtx_dir', 'snap_dir', override) - cfg[choice] = override[choice] or '/var/lib/tarantool' - - -- Remaining configuration - cfg.slab_alloc_factor = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_FACTOR) or - override.slab_alloc_factor - cfg.listen = tonumber(file_cfg.TARANTOOL_PORT) or - override.listen or TARANTOOL_DEFAULT_PORT - cfg.wal_mode = file_cfg.TARANTOOL_WAL_MODE or - override.wal_mode - - cfg.wal_dir = override.wal_dir or '/var/lib/tarantool' - cfg.vinyl_dir = override.vinyl_dir or '/var/lib/tarantool' - cfg.pid_file = override.pid_file or '/var/run/tarantool/tarantool.pid' - - local choice = choose_option('TARANTOOL_REPLICATION', 'TARANTOOL_REPLICATION_SOURCE', file_cfg) - local replication_source_table = parse_replication_source(file_cfg[choice], - user_name, - user_password) - - if replication_source_table then - cfg.replication = replication_source_table - else - local choice = choose_option('replication', 'replication_source', override) - cfg[choice] = override[choice] - end - - log.info("Config:\n" .. yaml.encode(cfg)) - - orig_cfg(cfg) - - box.once('tarantool-entrypoint', function () - if first_run then - log.info("Initializing database") - - create_user(user_name, user_password) - end - end) - - console.listen(CONSOLE_SOCKET_PATH) - -end - -box.cfg = wrapper_cfg - --- re-run the script passed as parameter with all arguments that follow -execute_script = arg[1] -if execute_script == nil then - box.cfg {} - - if term.isatty(io.stdout) then - console.start() - os.exit(0) - end -else - narg = 0 - while true do - arg[narg] = arg[narg + 1] - if arg[narg] == nil then - break - end - narg = narg + 1 - end - - dofile(execute_script) -end diff --git a/2.2/tarantool.default b/2.2/tarantool.default deleted file mode 100644 index fffe3b0..0000000 --- a/2.2/tarantool.default +++ /dev/null @@ -1,22 +0,0 @@ --- --- System-wide settings for tarantoolctl and init scripts --- --- This file is meant to enable the usage of tarantoolctl inside --- docker containers. Since there is no init system, most of its --- functionality will not work, except 'tarantoolctl enter' or --- 'tarantoolctl status'. --- - -default_cfg = { - pid_file = "/var/run/tarantool", -- /var/run/tarantool/${INSTANCE}.pid - wal_dir = "/var/lib/tarantool", -- /var/lib/tarantool/${INSTANCE}/ - snap_dir = "/var/lib/tarantool", -- /var/lib/tarantool/${INSTANCE} - vinyl_dir = "/var/lib/tarantool", -- /var/lib/tarantool/${INSTANCE} - logger = "/var/log/tarantool", -- /var/log/tarantool/${INSTANCE}.log - username = "tarantool", -} - --- instances.available - all available instances --- instances.enabled - instances to autostart by sysvinit -instance_dir = "/usr/local/etc/tarantool/instances.enabled" --- vim: set ft=lua : diff --git a/2.2/tarantool_is_up b/2.2/tarantool_is_up deleted file mode 100755 index 71148d5..0000000 --- a/2.2/tarantool_is_up +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh - -status=$( (tarantool <<-'EOF' -local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' -local console = require('console') -local os = require("os") -local yaml = require("yaml") - -console.on_start(function(self) - local status, reason - status, reason = pcall(function() require('console').connect(CONSOLE_SOCKET_PATH) end) - if not status then - self:print(reason) - os.exit(1) - end - - cmd = 'box.info.status' - local res = self:eval(cmd) - if res ~= nil then - res = yaml.decode(res) - print(res[1]) - end - - os.exit(0) -end) - -console.on_client_disconnect(function(self) self.running = false end) -console.start() - -os.exit(0) -EOF -) 2>/dev/null) - - -echo "$status" - -if [ "$status" = "running" ]; then - exit 0 -else - exit 1 -fi diff --git a/2.2/tarantool_set_config.lua b/2.2/tarantool_set_config.lua deleted file mode 100755 index ddca36c..0000000 --- a/2.2/tarantool_set_config.lua +++ /dev/null @@ -1,130 +0,0 @@ -#!/usr/bin/env tarantool - -local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' -local CFG_FILE_PATH = '/etc/tarantool/config.yml' - -local fio = require('fio') -local yaml = require('yaml') -local console = require('console') -local errno = require('errno') - -local function read_config() - local f = io.open(CFG_FILE_PATH, "rb") - if f == nil then - print("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) - os.exit(1) - end - local content = f:read("*all") - f:close() - return yaml.decode(content) -end - -local function write_config(cfg) - local f = io.open(CFG_FILE_PATH, "w+") - if f == nil then - print("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) - os.exit(1) - end - local content = yaml.encode(cfg) - f:write(content) - f:close() -end - -local function nop(console, cfg, value) -end - -local function update_replication_source(console, cfg, value) - local user_name = "nil" - if cfg['TARANTOOL_USER_NAME'] then - user_name = "'" .. cfg['TARANTOOL_USER_NAME'] .. "'" - end - - local user_password = "nil" - if cfg['TARANTOOL_USER_PASSWORD'] then - user_password = "'" .. cfg['TARANTOOL_USER_PASSWORD'] .. "'" - end - - local cmd = "set_replication_source('"..value.."', " .. user_name .. "," .. user_password .. ")" - print("cmd: ", cmd) - - local res = console:eval(cmd) - - if res ~= nil then - print(res) - end -end - -local function update_credentials(console, cfg, value) - local user_name = "nil" - if cfg['TARANTOOL_USER_NAME'] then - user_name = "'" .. cfg['TARANTOOL_USER_NAME'] .. "'" - end - - local user_password = "nil" - if cfg['TARANTOOL_USER_PASSWORD'] then - user_password = "'" .. cfg['TARANTOOL_USER_PASSWORD'] .. "'" - end - - local cmd = "set_credentials(" .. user_name .. "," .. user_password .. ")" - - local res = console:eval(cmd) - - if res ~= nil then - print(res) - end - - local replication_source = cfg['TARANTOOL_REPLICATION_SOURCE'] - - if replication_source ~= nil then - update_replication_source(console, cfg, replication_source) - end -end - - -local vars = { - TARANTOOL_SLAB_ALLOC_ARENA=nop, - TARANTOOL_SLAB_ALLOC_FACTOR=nop, - TARANTOOL_SLAB_ALLOC_MAXIMAL=nop, - TARANTOOL_SLAB_ALLOC_MINIMAL=nop, - TARANTOOL_PORT=nop, - TARANTOOL_WAL_MODE=nop, - TARANTOOL_USER_NAME=update_credentials, - TARANTOOL_USER_PASSWORD=update_credentials, - TARANTOOL_REPLICATION_SOURCE=update_replication_source, - TARANTOOL_REPLICATION=update_replication_source, -} - -console.on_start(function(self) - local status, reason - status, reason = pcall(function() require('console').connect(CONSOLE_SOCKET_PATH) end) - if not status then - self:print(reason) - os.exit(1) - end - - if arg[1] == nil or arg[2] == nil then - self:print("Usage: " .. arg[0] .. " ") - os.exit(1) - end - - if vars[arg[1]] == nil then - self:print("Unknown var: " .. arg[1]) - os.exit(1) - end - - local cfg = read_config() - cfg[arg[1]] = arg[2] - - local func = vars[arg[1]] - func(self, cfg, arg[2]) - - write_config(cfg) - - self.running = false - os.exit(0) -end) - -console.on_client_disconnect(function(self) self.running = false end) -console.start() - -os.exit(0) diff --git a/2.x-centos7/.dockerignore b/2.x-centos7/.dockerignore deleted file mode 100644 index e69de29..0000000 diff --git a/2.x-centos7/console b/2.x-centos7/console deleted file mode 100755 index d6fb192..0000000 --- a/2.x-centos7/console +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env tarantool - -local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' - -console = require('console') -console.on_start(function(self) - local status, reason - status, reason = pcall(function() require('console').connect(CONSOLE_SOCKET_PATH) end) - if not status then - self:print(reason) - self.running = false - end -end) -console.on_client_disconnect(function(self) self.running = false end) -console.start() diff --git a/2.x-centos7/docker-entrypoint.sh b/2.x-centos7/docker-entrypoint.sh deleted file mode 100755 index 6d48fdd..0000000 --- a/2.x-centos7/docker-entrypoint.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh -set -e - -# first arg is `-f` or `--some-option` -# or first arg is `something.conf` -if [ "${1:0:1}" = '-' ]; then - set -- tarantool "$@" -fi - -# allow the container to be started with `--user` -if [ "$1" = 'tarantool' -a "$(id -u)" = '0' ]; then - chown -R tarantool /var/lib/tarantool - exec gosu tarantool "$0" "$@" -fi - -# entry point wraps the passed script to do basic setup -if [ "$1" = 'tarantool' ]; then - shift - exec tarantool "/usr/local/bin/tarantool-entrypoint.lua" "$@" -fi - -exec "$@" diff --git a/2.x-centos7/mosquitto.repo b/2.x-centos7/mosquitto.repo deleted file mode 100644 index 4df10dc..0000000 --- a/2.x-centos7/mosquitto.repo +++ /dev/null @@ -1,7 +0,0 @@ -[home_oojah_mqtt] -name=mqtt (CentOS_CentOS-7) -type=rpm-md -baseurl=http://download.opensuse.org/repositories/home:/oojah:/mqtt/CentOS_CentOS-7/ -gpgcheck=1 -gpgkey=http://download.opensuse.org/repositories/home:/oojah:/mqtt/CentOS_CentOS-7//repodata/repomd.xml.key -enabled=1 \ No newline at end of file diff --git a/2.x-centos7/tarantool.default b/2.x-centos7/tarantool.default deleted file mode 100644 index fffe3b0..0000000 --- a/2.x-centos7/tarantool.default +++ /dev/null @@ -1,22 +0,0 @@ --- --- System-wide settings for tarantoolctl and init scripts --- --- This file is meant to enable the usage of tarantoolctl inside --- docker containers. Since there is no init system, most of its --- functionality will not work, except 'tarantoolctl enter' or --- 'tarantoolctl status'. --- - -default_cfg = { - pid_file = "/var/run/tarantool", -- /var/run/tarantool/${INSTANCE}.pid - wal_dir = "/var/lib/tarantool", -- /var/lib/tarantool/${INSTANCE}/ - snap_dir = "/var/lib/tarantool", -- /var/lib/tarantool/${INSTANCE} - vinyl_dir = "/var/lib/tarantool", -- /var/lib/tarantool/${INSTANCE} - logger = "/var/log/tarantool", -- /var/log/tarantool/${INSTANCE}.log - username = "tarantool", -} - --- instances.available - all available instances --- instances.enabled - instances to autostart by sysvinit -instance_dir = "/usr/local/etc/tarantool/instances.enabled" --- vim: set ft=lua : diff --git a/2.x-centos7/tarantool_is_up b/2.x-centos7/tarantool_is_up deleted file mode 100755 index 71148d5..0000000 --- a/2.x-centos7/tarantool_is_up +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh - -status=$( (tarantool <<-'EOF' -local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' -local console = require('console') -local os = require("os") -local yaml = require("yaml") - -console.on_start(function(self) - local status, reason - status, reason = pcall(function() require('console').connect(CONSOLE_SOCKET_PATH) end) - if not status then - self:print(reason) - os.exit(1) - end - - cmd = 'box.info.status' - local res = self:eval(cmd) - if res ~= nil then - res = yaml.decode(res) - print(res[1]) - end - - os.exit(0) -end) - -console.on_client_disconnect(function(self) self.running = false end) -console.start() - -os.exit(0) -EOF -) 2>/dev/null) - - -echo "$status" - -if [ "$status" = "running" ]; then - exit 0 -else - exit 1 -fi diff --git a/2.x/console b/2.x/console deleted file mode 100755 index d6fb192..0000000 --- a/2.x/console +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env tarantool - -local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' - -console = require('console') -console.on_start(function(self) - local status, reason - status, reason = pcall(function() require('console').connect(CONSOLE_SOCKET_PATH) end) - if not status then - self:print(reason) - self.running = false - end -end) -console.on_client_disconnect(function(self) self.running = false end) -console.start() diff --git a/2.x/docker-entrypoint.sh b/2.x/docker-entrypoint.sh deleted file mode 100755 index 3a9f5e4..0000000 --- a/2.x/docker-entrypoint.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh -set -e - -# first arg is `-f` or `--some-option` -# or first arg is `something.conf` -if [ "${1:0:1}" = '-' ]; then - set -- tarantool "$@" -fi - -# allow the container to be started with `--user` -if [ "$1" = 'tarantool' -a "$(id -u)" = '0' ]; then - chown -R tarantool /var/lib/tarantool - exec su-exec tarantool "$0" "$@" -fi - -# entry point wraps the passed script to do basic setup -if [ "$1" = 'tarantool' ]; then - shift - exec tarantool "/usr/local/bin/tarantool-entrypoint.lua" "$@" -fi - -exec "$@" diff --git a/2.x/gperftools_alpine.diff b/2.x/gperftools_alpine.diff deleted file mode 100644 index e768381..0000000 --- a/2.x/gperftools_alpine.diff +++ /dev/null @@ -1,110 +0,0 @@ -diff --git a/src/base/linux_syscall_support.h b/src/base/linux_syscall_support.h -index 5d578cd..fceebe2 100644 ---- a/src/base/linux_syscall_support.h -+++ b/src/base/linux_syscall_support.h -@@ -2432,9 +2432,9 @@ struct kernel_stat { - #if defined(__s390x__) - LSS_INLINE _syscall1(void*, mmap, void*, a) - #else -- /* Need to make sure __off64_t isn't truncated to 32-bits under x32. */ -+ /* Need to make sure off64_t isn't truncated to 32-bits under x32. */ - LSS_INLINE void* LSS_NAME(mmap)(void *s, size_t l, int p, int f, int d, -- __off64_t o) { -+ off64_t o) { - LSS_BODY(6, void*, mmap, LSS_SYSCALL_ARG(s), LSS_SYSCALL_ARG(l), - LSS_SYSCALL_ARG(p), LSS_SYSCALL_ARG(f), - LSS_SYSCALL_ARG(d), (uint64_t)(o)); -@@ -2475,7 +2475,7 @@ struct kernel_stat { - LSS_INLINE _syscall6(void*, mmap, void*, s, - size_t, l, int, p, - int, f, int, d, -- __off64_t, o) -+ off64_t, o) - LSS_INLINE int LSS_NAME(sigaction)(int signum, - const struct kernel_sigaction *act, - struct kernel_sigaction *oldact) { -diff --git a/src/malloc_hook_mmap_linux.h b/src/malloc_hook_mmap_linux.h -index 1c4c766..b2aa8ed 100755 ---- a/src/malloc_hook_mmap_linux.h -+++ b/src/malloc_hook_mmap_linux.h -@@ -56,7 +56,7 @@ - - static inline void* do_mmap64(void *start, size_t length, - int prot, int flags, -- int fd, __off64_t offset) __THROW { -+ int fd, off64_t offset) __THROW { - return sys_mmap(start, length, prot, flags, fd, offset); - } - -@@ -67,7 +67,7 @@ static inline void* do_mmap64(void *start, size_t length, - - static inline void* do_mmap64(void *start, size_t length, - int prot, int flags, -- int fd, __off64_t offset) __THROW { -+ int fd, off64_t offset) __THROW { - void *result; - - // Try mmap2() unless it's not supported -@@ -151,9 +151,11 @@ static inline void* do_mmap64(void *start, size_t length, - # undef mmap - - extern "C" { -+ #ifndef mmap64 - void* mmap64(void *start, size_t length, int prot, int flags, -- int fd, __off64_t offset ) __THROW -+ int fd, off64_t offset ) __THROW - ATTRIBUTE_SECTION(malloc_hook); -+ #endif - void* mmap(void *start, size_t length,int prot, int flags, - int fd, off_t offset) __THROW - ATTRIBUTE_SECTION(malloc_hook); -@@ -166,8 +168,9 @@ extern "C" { - ATTRIBUTE_SECTION(malloc_hook); - } - -+#ifndef mmap64 - extern "C" void* mmap64(void *start, size_t length, int prot, int flags, -- int fd, __off64_t offset) __THROW { -+ int fd, off64_t offset) __THROW { - MallocHook::InvokePreMmapHook(start, length, prot, flags, fd, offset); - void *result; - if (!MallocHook::InvokeMmapReplacement( -@@ -177,6 +180,7 @@ extern "C" void* mmap64(void *start, size_t length, int prot, int flags, - MallocHook::InvokeMmapHook(result, start, length, prot, flags, fd, offset); - return result; - } -+#endif - - # if !defined(__USE_FILE_OFFSET64) || !defined(__REDIRECT_NTH) - -@@ -216,7 +220,7 @@ extern "C" void* mremap(void* old_addr, size_t old_size, size_t new_size, - return result; - } - --#ifndef __UCLIBC__ -+#if defined(__GLIBC__) && ! defined(__UCLIBC__) - // libc's version: - extern "C" void* __sbrk(ptrdiff_t increment); - -diff --git a/src/tests/stacktrace_unittest.cc b/src/tests/stacktrace_unittest.cc -index 3c9f735..2d39ad9 100644 ---- a/src/tests/stacktrace_unittest.cc -+++ b/src/tests/stacktrace_unittest.cc -@@ -120,17 +120,6 @@ void ATTRIBUTE_NOINLINE CheckStackTraceLeaf(void) { - CHECK_GE(size, 1); - CHECK_LE(size, STACK_LEN); - --#ifdef HAVE_EXECINFO_H -- { -- char **strings = backtrace_symbols(stack, size); -- printf("Obtained %d stack frames.\n", size); -- for (int i = 0; i < size; i++) -- printf("%s %p\n", strings[i], stack[i]); -- printf("CheckStackTrace() addr: %p\n", &CheckStackTrace); -- free(strings); -- } --#endif -- - for (int i = 0; i < BACKTRACE_STEPS; i++) { - printf("Backtrace %d: expected: %p..%p actual: %p ... ", - i, expected_range[i].start, expected_range[i].end, stack[i]); diff --git a/2.x/tarantool-entrypoint.lua b/2.x/tarantool-entrypoint.lua deleted file mode 100755 index 512163a..0000000 --- a/2.x/tarantool-entrypoint.lua +++ /dev/null @@ -1,291 +0,0 @@ -#!/usr/bin/env tarantool - -local fio = require('fio') -local errno = require('errno') -local urilib = require('uri') -local console = require('console') -local term = require('term') -local log = require('log') -local yaml = require('yaml') - -local TARANTOOL_DEFAULT_PORT = 3301 -local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' -local CFG_FILE_PATH = '/etc/tarantool/config.yml' - - -local orig_cfg = box.cfg - -local function read_config() - local f = io.open(CFG_FILE_PATH, "rb") - if f == nil then - log.error("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) - os.exit(1) - end - local content = f:read("*all") - f:close() - return yaml.decode(content) -end - -local function write_config(cfg) - local f = io.open(CFG_FILE_PATH, "w+") - if f == nil then - print("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) - os.exit(1) - end - local content = yaml.encode(cfg) - f:write(content) - f:close() -end - -local function parse_replication_source(replication_source, user_name, user_password) - if replication_source == nil then - return nil - end - - local replication_source_table = {} - for uri in string.gmatch(replication_source, "[^,]+") do - local parsed_uri = urilib.parse(uri) - if parsed_uri == nil then - error("Incorrect replication source URI format: '"..uri.."'") - end - local host = parsed_uri.host - local port = parsed_uri.service or TARANTOOL_DEFAULT_PORT - local user = parsed_uri.login or user_name - local password = parsed_uri.password or user_password - - if user == 'guest' or user == nil then - replication_source = string.format("%s:%s", host, port) - elseif password == nil then - replication_source = string.format("%s:@%s:%s", user, host, port) - else - replication_source = string.format("%s:%s@%s:%s", user, password, - host, port) - end - - table.insert(replication_source_table, replication_source) - end - - return replication_source_table -end - -local function choose_option(main, substitute, cfg) - if cfg[main] then - return main - end - if cfg[substitute] then - return substitute - end - return main -end - -function set_replication_source(replication_source, user_name, user_password) - local replication_source_table = parse_replication_source( - replication_source, user_name, user_password - ) - local choice = choose_option('replication', 'replication_source', box.cfg) - box.cfg{[choice] = replication_source_table} - log.info("Updated box.cfg.%s to %s", choice, replication_source) -end - -local function create_user(user_name, user_password) - if user_name ~= 'guest' and user_password == nil then - user_password = "" - - local warn_str = [[**************************************************** -WARNING: No password has been set for the database. - This will allow anyone with access to the - Tarantool port to access your database. In - Docker's default configuration, this is - effectively any other container on the same - system. - Use "-e TARANTOOL_USER_PASSWORD=password" - to set it in "docker run". -****************************************************]] - log.warn('\n'..warn_str) - end - - if user_name == 'guest' and user_password == nil then - local warn_str = [[**************************************************** -WARNING: 'guest' is chosen as primary user. - Since it is not allowed to set a password for - guest user, your instance will be accessible - by anyone having direct access to the Tarantool - port. - If you wanted to create an authenticated user, - specify "-e TARANTOOL_USER_NAME=username" and - pick a user name other than "guest". -****************************************************]] - log.warn('\n'..warn_str) - end - - if user_name == 'guest' and user_password ~= nil then - user_password = nil - - local warn_str = [[**************************************************** -WARNING: A password for guest user has been specified. - In Tarantool, guest user can't have a password - and is always allowed to login, if it has - enough privileges. - If you wanted to create an authenticated user, - specify "-e TARANTOOL_USER_NAME=username" and - pick a user name other than "guest". -****************************************************]] - log.warn('\n'..warn_str) - end - - if user_name ~= 'admin' and user_name ~= 'guest' then - if not box.schema.user.exists(user_name) then - log.info("Creating user '%s'", user_name) - box.schema.user.create(user_name) - end - end - - if user_name ~= 'admin' then - log.info("Granting admin privileges to user '%s'", user_name) - box.schema.user.grant(user_name, 'read,write,execute,create,drop', - 'universe', nil, {if_not_exists = true}) - box.schema.user.grant(user_name, 'replication', - nil, nil, {if_not_exists = true}) - end - - if user_name ~= 'guest' then - log.info("Setting password for user '%s'", user_name) - box.schema.user.passwd(user_name, user_password) - end -end - -function set_credentials(user_name, user_password) - create_user(user_name, user_password) -end - -local function wrapper_cfg(override) - local work_dir = '/var/lib/tarantool' - local snap_filename = "*.snap" - local snap_path = work_dir..'/'..snap_filename - - local first_run = false - if next(fio.glob(snap_path)) == nil then - first_run = true - end - - - local file_cfg = {} - local config_file_exists = fio.stat(CFG_FILE_PATH) ~= nil - if not config_file_exists then - log.info("Creating configuration file: " .. CFG_FILE_PATH) - - file_cfg.TARANTOOL_USER_NAME = os.getenv('TARANTOOL_USER_NAME') - file_cfg.TARANTOOL_USER_PASSWORD = os.getenv('TARANTOOL_USER_PASSWORD') - file_cfg.TARANTOOL_SLAB_ALLOC_ARENA = os.getenv('TARANTOOL_SLAB_ALLOC_ARENA') - file_cfg.TARANTOOL_SLAB_ALLOC_FACTOR = os.getenv('TARANTOOL_SLAB_ALLOC_FACTOR') - file_cfg.TARANTOOL_SLAB_ALLOC_MINIMAL = os.getenv('TARANTOOL_SLAB_ALLOC_MINIMAL') - file_cfg.TARANTOOL_SLAB_ALLOC_MAXIMAL = os.getenv('TARANTOOL_SLAB_ALLOC_MAXIMAL') - file_cfg.TARANTOOL_PORT = os.getenv('TARANTOOL_PORT') - file_cfg.TARANTOOL_WAL_MODE = os.getenv('TARANTOOL_WAL_MODE') - file_cfg.TARANTOOL_REPLICATION_SOURCE = os.getenv('TARANTOOL_REPLICATION_SOURCE') - file_cfg.TARANTOOL_REPLICATION = os.getenv('TARANTOOL_REPLICATION') - file_cfg.TARANTOOL_SNAPSHOT_PERIOD = os.getenv('TARANTOOL_SNAPSHOT_PERIOD') - file_cfg.TARANTOOL_MEMTX_MEMORY = os.getenv('TARANTOOL_MEMTX_MEMORY') - file_cfg.TARANTOOL_CHECKPOINT_INTERVAL = os.getenv('TARANTOOL_CHECKPOINT_INTERVAL') - file_cfg.TARANTOOL_MEMTX_MIN_TUPLE_SIZE = os.getenv('TARANTOOL_MEMTX_MIN_TUPLE_SIZE') - file_cfg.TARANTOOL_MEMTX_MAX_TUPLE_SIZE = os.getenv('TARANTOOL_MEMTX_MAX_TUPLE_SIZE') - - write_config(file_cfg) - else - log.info("Loading existing configuration file: " .. CFG_FILE_PATH) - - file_cfg = read_config() - end - - local user_name = file_cfg.TARANTOOL_USER_NAME or - os.getenv('TARANTOOL_USER_NAME') or 'guest' - local user_password = file_cfg.TARANTOOL_USER_PASSWORD or - os.getenv('TARANTOOL_USER_PASSWORD') - - - local cfg = override or {} - -- Placeholders for deprecated options - cfg.slab_alloc_arena = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_ARENA) or - override.slab_alloc_arena - cfg.slab_alloc_maximal = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_MAXIMAL) or - override.slab_alloc_maximal - cfg.slab_alloc_minimal = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_MINIMAL) or - override.slab_alloc_minimal - cfg.snapshot_period = tonumber(file_cfg.TARANTOOL_SNAPSHOT_PERIOD) or - override.snapshot_period - -- Replacements for deprecated options - cfg.memtx_memory = tonumber(file_cfg.TARANTOOL_MEMTX_MEMORY) or - override.memtx_memory - cfg.memtx_min_tuple_size = tonumber(file_cfg.TARANTOOL_MEMTX_MIN_TUPLE_SIZE) or - override.memtx_min_tuple_size - cfg.memtx_max_tuple_size = tonumber(file_cfg.TARANTOOL_MEMTX_MAX_TUPLE_SIZE) or - override.memtx_max_tuple_size - cfg.checkpoint_interval = tonumber(file_cfg.TARANTOOL_CHECKPOINT_INTERVAL) or - override.checkpoint_interval - -- Deprecated options with default values - local choice = choose_option('memtx_dir', 'snap_dir', override) - cfg[choice] = override[choice] or '/var/lib/tarantool' - - -- Remaining configuration - cfg.slab_alloc_factor = tonumber(file_cfg.TARANTOOL_SLAB_ALLOC_FACTOR) or - override.slab_alloc_factor - cfg.listen = tonumber(file_cfg.TARANTOOL_PORT) or - override.listen or TARANTOOL_DEFAULT_PORT - cfg.wal_mode = file_cfg.TARANTOOL_WAL_MODE or - override.wal_mode - - cfg.wal_dir = override.wal_dir or '/var/lib/tarantool' - cfg.vinyl_dir = override.vinyl_dir or '/var/lib/tarantool' - cfg.pid_file = override.pid_file or '/var/run/tarantool/tarantool.pid' - - local choice = choose_option('TARANTOOL_REPLICATION', 'TARANTOOL_REPLICATION_SOURCE', file_cfg) - local replication_source_table = parse_replication_source(file_cfg[choice], - user_name, - user_password) - - if replication_source_table then - cfg.replication = replication_source_table - else - local choice = choose_option('replication', 'replication_source', override) - cfg[choice] = override[choice] - end - - log.info("Config:\n" .. yaml.encode(cfg)) - - orig_cfg(cfg) - - box.once('tarantool-entrypoint', function () - if first_run then - log.info("Initializing database") - - create_user(user_name, user_password) - end - end) - - console.listen(CONSOLE_SOCKET_PATH) - -end - -box.cfg = wrapper_cfg - --- re-run the script passed as parameter with all arguments that follow -execute_script = arg[1] -if execute_script == nil then - box.cfg {} - - if term.isatty(io.stdout) then - console.start() - os.exit(0) - end -else - narg = 0 - while true do - arg[narg] = arg[narg + 1] - if arg[narg] == nil then - break - end - narg = narg + 1 - end - - dofile(execute_script) -end diff --git a/2.x/tarantool.default b/2.x/tarantool.default deleted file mode 100644 index fffe3b0..0000000 --- a/2.x/tarantool.default +++ /dev/null @@ -1,22 +0,0 @@ --- --- System-wide settings for tarantoolctl and init scripts --- --- This file is meant to enable the usage of tarantoolctl inside --- docker containers. Since there is no init system, most of its --- functionality will not work, except 'tarantoolctl enter' or --- 'tarantoolctl status'. --- - -default_cfg = { - pid_file = "/var/run/tarantool", -- /var/run/tarantool/${INSTANCE}.pid - wal_dir = "/var/lib/tarantool", -- /var/lib/tarantool/${INSTANCE}/ - snap_dir = "/var/lib/tarantool", -- /var/lib/tarantool/${INSTANCE} - vinyl_dir = "/var/lib/tarantool", -- /var/lib/tarantool/${INSTANCE} - logger = "/var/log/tarantool", -- /var/log/tarantool/${INSTANCE}.log - username = "tarantool", -} - --- instances.available - all available instances --- instances.enabled - instances to autostart by sysvinit -instance_dir = "/usr/local/etc/tarantool/instances.enabled" --- vim: set ft=lua : diff --git a/2.x/tarantool_is_up b/2.x/tarantool_is_up deleted file mode 100755 index 71148d5..0000000 --- a/2.x/tarantool_is_up +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh - -status=$( (tarantool <<-'EOF' -local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' -local console = require('console') -local os = require("os") -local yaml = require("yaml") - -console.on_start(function(self) - local status, reason - status, reason = pcall(function() require('console').connect(CONSOLE_SOCKET_PATH) end) - if not status then - self:print(reason) - os.exit(1) - end - - cmd = 'box.info.status' - local res = self:eval(cmd) - if res ~= nil then - res = yaml.decode(res) - print(res[1]) - end - - os.exit(0) -end) - -console.on_client_disconnect(function(self) self.running = false end) -console.start() - -os.exit(0) -EOF -) 2>/dev/null) - - -echo "$status" - -if [ "$status" = "running" ]; then - exit 0 -else - exit 1 -fi diff --git a/2.x/tarantool_set_config.lua b/2.x/tarantool_set_config.lua deleted file mode 100755 index ddca36c..0000000 --- a/2.x/tarantool_set_config.lua +++ /dev/null @@ -1,130 +0,0 @@ -#!/usr/bin/env tarantool - -local CONSOLE_SOCKET_PATH = 'unix/:/var/run/tarantool/tarantool.sock' -local CFG_FILE_PATH = '/etc/tarantool/config.yml' - -local fio = require('fio') -local yaml = require('yaml') -local console = require('console') -local errno = require('errno') - -local function read_config() - local f = io.open(CFG_FILE_PATH, "rb") - if f == nil then - print("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) - os.exit(1) - end - local content = f:read("*all") - f:close() - return yaml.decode(content) -end - -local function write_config(cfg) - local f = io.open(CFG_FILE_PATH, "w+") - if f == nil then - print("Can't open " .. CFG_FILE_PATH ..": ", errno.strerror()) - os.exit(1) - end - local content = yaml.encode(cfg) - f:write(content) - f:close() -end - -local function nop(console, cfg, value) -end - -local function update_replication_source(console, cfg, value) - local user_name = "nil" - if cfg['TARANTOOL_USER_NAME'] then - user_name = "'" .. cfg['TARANTOOL_USER_NAME'] .. "'" - end - - local user_password = "nil" - if cfg['TARANTOOL_USER_PASSWORD'] then - user_password = "'" .. cfg['TARANTOOL_USER_PASSWORD'] .. "'" - end - - local cmd = "set_replication_source('"..value.."', " .. user_name .. "," .. user_password .. ")" - print("cmd: ", cmd) - - local res = console:eval(cmd) - - if res ~= nil then - print(res) - end -end - -local function update_credentials(console, cfg, value) - local user_name = "nil" - if cfg['TARANTOOL_USER_NAME'] then - user_name = "'" .. cfg['TARANTOOL_USER_NAME'] .. "'" - end - - local user_password = "nil" - if cfg['TARANTOOL_USER_PASSWORD'] then - user_password = "'" .. cfg['TARANTOOL_USER_PASSWORD'] .. "'" - end - - local cmd = "set_credentials(" .. user_name .. "," .. user_password .. ")" - - local res = console:eval(cmd) - - if res ~= nil then - print(res) - end - - local replication_source = cfg['TARANTOOL_REPLICATION_SOURCE'] - - if replication_source ~= nil then - update_replication_source(console, cfg, replication_source) - end -end - - -local vars = { - TARANTOOL_SLAB_ALLOC_ARENA=nop, - TARANTOOL_SLAB_ALLOC_FACTOR=nop, - TARANTOOL_SLAB_ALLOC_MAXIMAL=nop, - TARANTOOL_SLAB_ALLOC_MINIMAL=nop, - TARANTOOL_PORT=nop, - TARANTOOL_WAL_MODE=nop, - TARANTOOL_USER_NAME=update_credentials, - TARANTOOL_USER_PASSWORD=update_credentials, - TARANTOOL_REPLICATION_SOURCE=update_replication_source, - TARANTOOL_REPLICATION=update_replication_source, -} - -console.on_start(function(self) - local status, reason - status, reason = pcall(function() require('console').connect(CONSOLE_SOCKET_PATH) end) - if not status then - self:print(reason) - os.exit(1) - end - - if arg[1] == nil or arg[2] == nil then - self:print("Usage: " .. arg[0] .. " ") - os.exit(1) - end - - if vars[arg[1]] == nil then - self:print("Unknown var: " .. arg[1]) - os.exit(1) - end - - local cfg = read_config() - cfg[arg[1]] = arg[2] - - local func = vars[arg[1]] - func(self, cfg, arg[2]) - - write_config(cfg) - - self.running = false - os.exit(0) -end) - -console.on_client_disconnect(function(self) self.running = false end) -console.start() - -os.exit(0) diff --git a/README.md b/README.md index fc3872b..7b74007 100644 --- a/README.md +++ b/README.md @@ -293,16 +293,17 @@ Alternatively you may get help on our [Telegram channel](https://t.me/tarantool) ## How to contribute -Open a pull request to the master branch. A maintaner is responsible for -updating all relevant branches when merging the PR. +Open a pull request to the master branch. +A maintaner is responsible for merging the PR. ## How to check -Say, we have updated 1.x/Dockerfile and want to check it: +Say, we have updated dockerfiles/alpine_3.5_2.x and want to check it: ```sh -$ docker build 1.x/ -t t1.x -$ docker run -it t1.x +$ IMAGE=tarantool/tarantool TAG=2 OS=alpine_3.5 VER=2.x DVER=2.x \ + PORT=5200 make -f .gitlab.mk build +$ docker run -it tarantool/tarantool:2 ...perform a test... ``` @@ -329,37 +330,30 @@ Fixed versions: Rolling versions: -| Branch | Dockerfile | Docker tag | -| ------ | ---------- | ---------- | -| master | 1.5/Dockerfile | 1.5 | -| master | 1.6/Dockerfile | 1.6 | -| master | 1.7/Dockerfile | 1.7 | -| master | 1.9/Dockerfile | 1.9 | -| master | 1.x/Dockerfile | 1 | -| master | 1.x/Dockerfile | latest | -| master | 2.1/Dockerfile | 2.1 | -| master | 2.2/Dockerfile | 2.2 | -| master | 2.x/Dockerfile | 2 | +| Branch | Dockerfile | Docker tags | +| ------ | ---------- | ----------- | +| master | dockerfile/alpine_3.5_1.x | 1 | +| master | dockerfile/alpine_3.5_2.2 | 2.1/2.2 | +| master | dockerfile/alpine_3.5_2.x | 2 | Special builds: -| Branch | Dockerfile | Docker tag | -| ------ | ---------- | ---------- | -| master | 1.x-centos7/Dockerfile | 1.x-centos7 | -| master | 2.x-centos7/Dockerfile | 2.x-centos7 | +| Branch | Dockerfile | Docker tag | +| ------ | ---------- | ---------- | +| master | dockerfile/centos_7_1.x | 1.x-centos7 | +| master | dockerfile/centos_7_2.x | 2.x-centos7 | ## How to push changes (for maintainers) -When the change is about specific tarantool version or versions range, update -all relevant fixed versions & rolling versions in all relevant branches +When the change is about specific tarantool version or versions +range, update all relevant fixed versions & rolling versions according to the pipelines listed above. -When the change is about the environment at all, all versions need to be -updated in all relevent branches. +When the change is about the environment at all, all versions +need to be updated. -Add a new release (say, `x.y.z`). Create / update rolling versions `x` and -`x.y` in master, create fixed version `x.y.z` on the corresponding branch, add -corresponding build pipeline on Docker Hub. ([Related][1].) +Add a new release (say, x.y.z). Create / update rolling +versions x and x.y in master, create fixed version x.y.z. A maintainer is responsible to check updated images. diff --git a/1.x/Dockerfile b/dockerfiles/alpine_3.5_1.x similarity index 92% rename from 1.x/Dockerfile rename to dockerfiles/alpine_3.5_1.x index 7a3dee9..9ccab7f 100644 --- a/1.x/Dockerfile +++ b/dockerfiles/alpine_3.5_1.x @@ -5,7 +5,11 @@ RUN addgroup -S tarantool \ && adduser -S -G tarantool tarantool \ && apk add --no-cache 'su-exec>=0.2' -ENV TARANTOOL_VERSION=1.10.3-136-gc3c087d5c \ +# An ARG instruction goes out of scope at the end of the build +# stage where it was defined. To use an arg in multiple stages, +# each stage must include the ARG instruction +ARG TNT_VER +ENV TARANTOOL_VERSION=${TNT_VER} \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ @@ -26,7 +30,7 @@ ENV TARANTOOL_VERSION=1.10.3-136-gc3c087d5c \ LUAROCK_TARANTOOL_PROMETHEUS_VERSION=1.0.0 \ LUAROCK_TARANTOOL_GPERFTOOLS_VERSION=1.0.1 -COPY gperftools_alpine.diff / +COPY files/gperftools_alpine.diff / RUN set -x \ && apk add --no-cache --virtual .run-deps \ @@ -130,7 +134,7 @@ RUN set -x \ && : "---------- remove build deps ----------" \ && apk del .build-deps -COPY luarocks-config.lua /usr/local/etc/luarocks/config-5.1.lua +COPY files/luarocks-config.lua /usr/local/etc/luarocks/config-5.1.lua RUN set -x \ && apk add --no-cache --virtual .run-deps \ @@ -221,12 +225,12 @@ RUN mkdir -p /var/lib/tarantool \ VOLUME /var/lib/tarantool WORKDIR /opt/tarantool -COPY tarantool-entrypoint.lua /usr/local/bin/ -COPY tarantool_set_config.lua /usr/local/bin/ -COPY docker-entrypoint.sh /usr/local/bin/ -COPY console /usr/local/bin/ -COPY tarantool_is_up /usr/local/bin/ -COPY tarantool.default /usr/local/etc/default/tarantool +COPY files/tarantool-entrypoint.lua /usr/local/bin/ +COPY files/tarantool_set_config.lua /usr/local/bin/ +COPY files/docker-entrypoint.sh /usr/local/bin/ +COPY files/console /usr/local/bin/ +COPY files/tarantool_is_up /usr/local/bin/ +COPY files/tarantool.default /usr/local/etc/default/tarantool RUN ln -s usr/local/bin/docker-entrypoint.sh /entrypoint.sh # backwards compat ENTRYPOINT ["docker-entrypoint.sh"] diff --git a/2.1/Dockerfile b/dockerfiles/alpine_3.5_2.2 similarity index 92% rename from 2.1/Dockerfile rename to dockerfiles/alpine_3.5_2.2 index d52cd9f..8b2517b 100644 --- a/2.1/Dockerfile +++ b/dockerfiles/alpine_3.5_2.2 @@ -5,7 +5,11 @@ RUN addgroup -S tarantool \ && adduser -S -G tarantool tarantool \ && apk add --no-cache 'su-exec>=0.2' -ENV TARANTOOL_VERSION=2.1.2-143-g3edaaed6c \ +# An ARG instruction goes out of scope at the end of the build +# stage where it was defined. To use an arg in multiple stages, +# each stage must include the ARG instruction +ARG TNT_VER +ENV TARANTOOL_VERSION=${TNT_VER} \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ CURL_REPO=https://github.com/curl/curl.git \ @@ -28,7 +32,7 @@ ENV TARANTOOL_VERSION=2.1.2-143-g3edaaed6c \ LUAROCK_TARANTOOL_PROMETHEUS_VERSION=1.0.0 \ LUAROCK_TARANTOOL_GPERFTOOLS_VERSION=1.0.1 -COPY gperftools_alpine.diff / +COPY files/gperftools_alpine.diff / RUN set -x \ && apk add --no-cache --virtual .run-deps \ @@ -139,7 +143,7 @@ RUN set -x \ && : "---------- remove build deps ----------" \ && apk del .build-deps -COPY luarocks-config.lua /usr/local/etc/luarocks/config-5.1.lua +COPY files/luarocks-config.lua /usr/local/etc/luarocks/config-5.1.lua RUN set -x \ && apk add --no-cache --virtual .run-deps \ @@ -230,12 +234,12 @@ RUN mkdir -p /var/lib/tarantool \ VOLUME /var/lib/tarantool WORKDIR /opt/tarantool -COPY tarantool-entrypoint.lua /usr/local/bin/ -COPY tarantool_set_config.lua /usr/local/bin/ -COPY docker-entrypoint.sh /usr/local/bin/ -COPY console /usr/local/bin/ -COPY tarantool_is_up /usr/local/bin/ -COPY tarantool.default /usr/local/etc/default/tarantool +COPY files/tarantool-entrypoint.lua /usr/local/bin/ +COPY files/tarantool_set_config.lua /usr/local/bin/ +COPY files/docker-entrypoint.sh /usr/local/bin/ +COPY files/console /usr/local/bin/ +COPY files/tarantool_is_up /usr/local/bin/ +COPY files/tarantool.default /usr/local/etc/default/tarantool RUN ln -s usr/local/bin/docker-entrypoint.sh /entrypoint.sh # backwards compat ENTRYPOINT ["docker-entrypoint.sh"] diff --git a/2.x/Dockerfile b/dockerfiles/alpine_3.5_2.x similarity index 92% rename from 2.x/Dockerfile rename to dockerfiles/alpine_3.5_2.x index c877e7f..d1d331e 100644 --- a/2.x/Dockerfile +++ b/dockerfiles/alpine_3.5_2.x @@ -5,7 +5,11 @@ RUN addgroup -S tarantool \ && adduser -S -G tarantool tarantool \ && apk add --no-cache 'su-exec>=0.2' -ENV TARANTOOL_VERSION=2.3.1-1-g4137134c0 \ +# An ARG instruction goes out of scope at the end of the build +# stage where it was defined. To use an arg in multiple stages, +# each stage must include the ARG instruction +ARG TNT_VER +ENV TARANTOOL_VERSION=${TNT_VER} \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ GPERFTOOLS_TAG=gperftools-2.5 \ @@ -23,7 +27,7 @@ ENV TARANTOOL_VERSION=2.3.1-1-g4137134c0 \ LUAROCK_TARANTOOL_PROMETHEUS_VERSION=1.0.0 \ LUAROCK_TARANTOOL_GPERFTOOLS_VERSION=1.0.1 -COPY gperftools_alpine.diff / +COPY files/gperftools_alpine.diff / RUN set -x \ && apk add --no-cache --virtual .run-deps \ @@ -189,12 +193,12 @@ RUN mkdir -p /var/lib/tarantool \ VOLUME /var/lib/tarantool WORKDIR /opt/tarantool -COPY tarantool-entrypoint.lua /usr/local/bin/ -COPY tarantool_set_config.lua /usr/local/bin/ -COPY docker-entrypoint.sh /usr/local/bin/ -COPY console /usr/local/bin/ -COPY tarantool_is_up /usr/local/bin/ -COPY tarantool.default /usr/local/etc/default/tarantool +COPY files/tarantool-entrypoint.lua /usr/local/bin/ +COPY files/tarantool_set_config.lua /usr/local/bin/ +COPY files/docker-entrypoint.sh /usr/local/bin/ +COPY files/console /usr/local/bin/ +COPY files/tarantool_is_up /usr/local/bin/ +COPY files/tarantool.default /usr/local/etc/default/tarantool RUN ln -s usr/local/bin/docker-entrypoint.sh /entrypoint.sh # backwards compat ENTRYPOINT ["docker-entrypoint.sh"] diff --git a/1.x-centos7/Dockerfile b/dockerfiles/centos_7_1.x similarity index 95% rename from 1.x-centos7/Dockerfile rename to dockerfiles/centos_7_1.x index c387b09..7405c79 100644 --- a/1.x-centos7/Dockerfile +++ b/dockerfiles/centos_7_1.x @@ -1,10 +1,12 @@ +ARG TNT_VER + FROM centos:7 MAINTAINER mail@racktear.com RUN groupadd tarantool \ && adduser -g tarantool tarantool -ENV TARANTOOL_VERSION=1.10.3-136-gc3c087d5c \ +ENV TARANTOOL_VERSION=${TNT_VER} \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ LUAROCKS_URL=https://github.com/tarantool/luarocks/archive/6e6fe62d9409fe2103c0fd091cccb3da0451faf5.tar.gz \ @@ -155,7 +157,7 @@ RUN set -x \ && rm -rf /var/cache/yum -COPY luarocks-config.lua /usr/local/etc/luarocks/config-5.1.lua +COPY files/luarocks-config_centos.lua /usr/local/etc/luarocks/config-5.1.lua RUN set -x \ && yum -y install https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-redhat96-9.6-3.noarch.rpm \ @@ -261,12 +263,12 @@ RUN mkdir -p /var/lib/tarantool \ VOLUME /var/lib/tarantool WORKDIR /opt/tarantool -COPY tarantool-entrypoint.lua /usr/local/bin/ -COPY tarantool_set_config.lua /usr/local/bin/ -COPY docker-entrypoint.sh /usr/local/bin/ -COPY console /usr/local/bin/ -COPY tarantool_is_up /usr/local/bin/ -COPY tarantool.default /usr/local/etc/default/tarantool +COPY files/tarantool-entrypoint.lua /usr/local/bin/ +COPY files/tarantool_set_config.lua /usr/local/bin/ +COPY files/docker-entrypoint_centos.sh /usr/local/bin/docker-entrypoint.sh +COPY files/console /usr/local/bin/ +COPY files/tarantool_is_up /usr/local/bin/ +COPY files/tarantool.default /usr/local/etc/default/tarantool RUN ln -s usr/local/bin/docker-entrypoint.sh /entrypoint.sh # backwards compat ENTRYPOINT ["docker-entrypoint.sh"] diff --git a/2.x-centos7/Dockerfile b/dockerfiles/centos_7_2.x similarity index 94% rename from 2.x-centos7/Dockerfile rename to dockerfiles/centos_7_2.x index 7316a1b..8871562 100644 --- a/2.x-centos7/Dockerfile +++ b/dockerfiles/centos_7_2.x @@ -1,12 +1,13 @@ +ARG TNT_VER + FROM centos:7 MAINTAINER mail@racktear.com RUN groupadd tarantool \ && adduser -g tarantool tarantool -ARG TARANTOOL_VERSION=2.3.1-1-g4137134c0 - -ENV TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ +ENV TARANTOOL_VERSION=${TNT_VER} \ + TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ LUAROCK_VSHARD_VERSION=0.1.14 \ LUAROCK_CHECKS_VERSION=3.0.1 \ LUAROCK_AVRO_SCHEMA_VERSION=3.0.3 \ @@ -118,7 +119,6 @@ RUN set -x \ && rpm -qa | grep devel | xargs yum -y remove \ && rm -rf /var/cache/yum - RUN set -x \ && yum -y install https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-redhat96-9.6-3.noarch.rpm \ && yum -y install \ @@ -222,12 +222,12 @@ RUN mkdir -p /var/lib/tarantool \ VOLUME /var/lib/tarantool WORKDIR /opt/tarantool -COPY tarantool-entrypoint.lua /usr/local/bin/ -COPY tarantool_set_config.lua /usr/local/bin/ -COPY docker-entrypoint.sh /usr/local/bin/ -COPY console /usr/local/bin/ -COPY tarantool_is_up /usr/local/bin/ -COPY tarantool.default /usr/local/etc/default/tarantool +COPY files/tarantool-entrypoint.lua /usr/local/bin/ +COPY files/tarantool_set_config.lua /usr/local/bin/ +COPY files/docker-entrypoint_centos.sh /usr/local/bin/docker-entrypoint.sh +COPY files/console /usr/local/bin/ +COPY files/tarantool_is_up /usr/local/bin/ +COPY files/tarantool.default /usr/local/etc/default/tarantool RUN ln -s usr/local/bin/docker-entrypoint.sh /entrypoint.sh # backwards compat ENTRYPOINT ["docker-entrypoint.sh"] diff --git a/1.6/console b/files/console similarity index 100% rename from 1.6/console rename to files/console diff --git a/1.6/docker-entrypoint.sh b/files/docker-entrypoint.sh similarity index 100% rename from 1.6/docker-entrypoint.sh rename to files/docker-entrypoint.sh diff --git a/1.x-centos7/docker-entrypoint.sh b/files/docker-entrypoint_centos.sh similarity index 100% rename from 1.x-centos7/docker-entrypoint.sh rename to files/docker-entrypoint_centos.sh diff --git a/1.6/gperftools_alpine.diff b/files/gperftools_alpine.diff similarity index 100% rename from 1.6/gperftools_alpine.diff rename to files/gperftools_alpine.diff diff --git a/1.5/luarocks-config.lua b/files/luarocks-config.lua similarity index 100% rename from 1.5/luarocks-config.lua rename to files/luarocks-config.lua diff --git a/1.x-centos7/luarocks-config.lua b/files/luarocks-config_centos.lua similarity index 100% rename from 1.x-centos7/luarocks-config.lua rename to files/luarocks-config_centos.lua diff --git a/1.x-centos7/mosquitto.repo b/files/mosquitto.repo similarity index 100% rename from 1.x-centos7/mosquitto.repo rename to files/mosquitto.repo diff --git a/2.x-centos7/tarantool-entrypoint.lua b/files/tarantool-entrypoint.lua similarity index 100% rename from 2.x-centos7/tarantool-entrypoint.lua rename to files/tarantool-entrypoint.lua diff --git a/1.7/tarantool.default b/files/tarantool.default similarity index 100% rename from 1.7/tarantool.default rename to files/tarantool.default diff --git a/1.6/tarantool_is_up b/files/tarantool_is_up similarity index 100% rename from 1.6/tarantool_is_up rename to files/tarantool_is_up diff --git a/2.x-centos7/tarantool_set_config.lua b/files/tarantool_set_config.lua similarity index 100% rename from 2.x-centos7/tarantool_set_config.lua rename to files/tarantool_set_config.lua diff --git a/versions/alpine_3.5_1.x b/versions/alpine_3.5_1.x new file mode 100644 index 0000000..e57a593 --- /dev/null +++ b/versions/alpine_3.5_1.x @@ -0,0 +1 @@ +1.10.3-136-gc3c087d5c diff --git a/versions/alpine_3.5_2.1 b/versions/alpine_3.5_2.1 new file mode 100644 index 0000000..d97a56a --- /dev/null +++ b/versions/alpine_3.5_2.1 @@ -0,0 +1 @@ +2.1.2-143-g3edaaed6c diff --git a/versions/alpine_3.5_2.2 b/versions/alpine_3.5_2.2 new file mode 100644 index 0000000..243a7ec --- /dev/null +++ b/versions/alpine_3.5_2.2 @@ -0,0 +1 @@ +2.2.2-4-g4f8ac5999 diff --git a/versions/alpine_3.5_2.x b/versions/alpine_3.5_2.x new file mode 100644 index 0000000..7158865 --- /dev/null +++ b/versions/alpine_3.5_2.x @@ -0,0 +1 @@ +2.3.1-1-g4137134c0 diff --git a/versions/centos_7_1.x b/versions/centos_7_1.x new file mode 100644 index 0000000..e57a593 --- /dev/null +++ b/versions/centos_7_1.x @@ -0,0 +1 @@ +1.10.3-136-gc3c087d5c diff --git a/versions/centos_7_2.x b/versions/centos_7_2.x new file mode 100644 index 0000000..4b74589 --- /dev/null +++ b/versions/centos_7_2.x @@ -0,0 +1 @@ +2.3.0-117-g4c2d1eff2 From 66b5ed34adadbc0338d3c1fcab1b696ff5528758 Mon Sep 17 00:00:00 2001 From: "Alexander V. Tikhonov" Date: Fri, 10 Jan 2020 11:49:15 +0300 Subject: [PATCH 173/286] Move tagged versions into master Merged all standalone branches with tarantool tags into master branch to be able to build the tarantool tagged versions in master and remove branches copies. Found that 2.2 build failed on SSL, to fix it the dockerfile changed from 2.2 to 2.x to use openssl as described in #122. Also removed curl in 2.2.1 tagged dockerfile as suggested in #122, after which it became common to 2.2 dockerfile, so the file was removed as duplicating and all jobs builds moved from 2.2.1 to 2.2 dockerfile. --- .gitlab-ci.yml | 154 +++++++++++++++++++-- .gitlab.mk | 5 +- README.md | 49 ++++--- dockerfiles/alpine_3.5_1.10.3 | 251 ++++++++++++++++++++++++++++++++++ versions/alpine_3.5_1.10.0 | 1 + versions/alpine_3.5_1.10.2 | 1 + versions/alpine_3.5_1.10.3 | 1 + versions/alpine_3.5_1.10.4 | 1 + versions/alpine_3.5_2.1.1 | 1 + versions/alpine_3.5_2.1.2 | 1 + versions/alpine_3.5_2.1.3 | 1 + versions/alpine_3.5_2.2.0 | 1 + versions/alpine_3.5_2.2.1 | 1 + versions/alpine_3.5_2.2.2 | 1 + versions/alpine_3.5_2.3 | 1 + versions/alpine_3.5_2.3.1 | 1 + 16 files changed, 433 insertions(+), 38 deletions(-) create mode 100644 dockerfiles/alpine_3.5_1.10.3 create mode 100644 versions/alpine_3.5_1.10.0 create mode 100644 versions/alpine_3.5_1.10.2 create mode 100644 versions/alpine_3.5_1.10.3 create mode 100644 versions/alpine_3.5_1.10.4 create mode 100644 versions/alpine_3.5_2.1.1 create mode 100644 versions/alpine_3.5_2.1.2 create mode 100644 versions/alpine_3.5_2.1.3 create mode 100644 versions/alpine_3.5_2.2.0 create mode 100644 versions/alpine_3.5_2.2.1 create mode 100644 versions/alpine_3.5_2.2.2 create mode 100644 versions/alpine_3.5_2.3 create mode 100644 versions/alpine_3.5_2.3.1 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d704f3e..b68c12a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,6 +21,48 @@ before_script: make -f .gitlab.mk build fi; +# ########## +# ALPINE 3.5 +# ########## + +# Tarantool branch 1.10 + +'alpine 3.5 1.10.0': + <<: *build_definition + variables: + OS: 'alpine_3.5' + TAG: '1.10.0' + VER: '1.10.0' + DVER: '1.10.3' + PORT: 5101 + +'alpine 3.5 1.10.2': + <<: *build_definition + variables: + OS: 'alpine_3.5' + TAG: '1.10.2' + VER: '1.10.2' + DVER: '1.10.3' + PORT: 5102 + +'alpine 3.5 1.10.3': + <<: *build_definition + variables: + OS: 'alpine_3.5' + TAG: '1.10.3' + VER: '1.10.3' + DVER: '1.10.3' + PORT: 5103 + +'alpine 3.5 1.10.4': + <<: *build_definition + variables: + OS: 'alpine_3.5' + TAG: '1.10.4' + VER: '1.10.4' + DVER: '1.x' + PORT: 5104 + 'alpine 3.5 1.x': <<: *build_definition variables: @@ -28,16 +70,36 @@ before_script: TAG: '1' VER: '1.x' DVER: '1.x' - PORT: 3110 + PORT: 5100 -'alpine 3.5 2.x': +# Tarantool branch 2.1 + +'alpine 3.5 2.1.1': <<: *build_definition variables: OS: 'alpine_3.5' - TAG: '2' - VER: '2.x' - DVER: '2.x' - PORT: 3120 + TAG: '2.1.1' + VER: '2.1.1' + DVER: '2.2' + PORT: 5211 + +'alpine 3.5 2.1.2': + <<: *build_definition + variables: + OS: 'alpine_3.5' + TAG: '2.1.2' + VER: '2.1.2' + DVER: '2.2' + PORT: 5212 + +'alpine 3.5 2.1.3': + <<: *build_definition + variables: + OS: 'alpine_3.5' + TAG: '2.1.3' + VER: '2.1.3' + DVER: '1.x' + PORT: 5213 'alpine 3.5 2.1': <<: *build_definition @@ -46,7 +108,36 @@ before_script: TAG: '2.1' VER: '2.1' DVER: '2.2' - PORT: 3121 + PORT: 5210 + +# Tarantool branch 2.2 + +'alpine 3.5 2.2.0': + <<: *build_definition + variables: + OS: 'alpine_3.5' + TAG: '2.2.0' + VER: '2.2.0' + DVER: '2.2' + PORT: 5220 + +'alpine 3.5 2.2.1': + <<: *build_definition + variables: + OS: 'alpine_3.5' + TAG: '2.2.1' + VER: '2.2.1' + DVER: '2.2' + PORT: 5221 + +'alpine 3.5 2.2.2': + <<: *build_definition + variables: + OS: 'alpine_3.5' + TAG: '2.2.2' + VER: '2.2.2' + DVER: '2.x' + PORT: 5222 'alpine 3.5 2.2': <<: *build_definition @@ -54,8 +145,46 @@ before_script: OS: 'alpine_3.5' TAG: '2.2' VER: '2.2' - DVER: '2.2' - PORT: 3122 + DVER: '2.x' + PORT: 5220 + +# Tarantool branch 2.3 + +'alpine 3.5 2.3.1': + <<: *build_definition + variables: + OS: 'alpine_3.5' + TAG: '2.3.1' + VER: '2.3.1' + DVER: '2.x' + PORT: 5231 + +'alpine 3.5 2.3': + <<: *build_definition + variables: + OS: 'alpine_3.5' + TAG: '2.3' + VER: '2.3' + DVER: '2.x' + PORT: 5230 + +# Tarantool branch master + +'alpine 3.5 2.x': + <<: *build_definition + variables: + OS: 'alpine_3.5' + TAG: '2' + VER: '2.x' + DVER: '2.x' + PORT: 5200 + TAG_LATEST: 'latest' + +# ######## +# CentOS 7 +# ######## + +# Tarantool branch 1.10 'centos 7 1.x': <<: *build_definition @@ -64,7 +193,9 @@ before_script: TAG: '1.x-centos7' VER: '1.x' DVER: '1.x' - PORT: 3210 + PORT: 7100 + +# Tarantool branch master 'centos 7 2.x': <<: *build_definition @@ -73,5 +204,4 @@ before_script: TAG: '2.x-centos7' VER: '2.x' DVER: '2.x' - PORT: 3220 - + PORT: 7200 diff --git a/.gitlab.mk b/.gitlab.mk index 59f53c9..bd97046 100644 --- a/.gitlab.mk +++ b/.gitlab.mk @@ -7,4 +7,7 @@ build: docker exec -t tarantool_${TAG} tarantool_is_up docker stop tarantool_${TAG} docker push ${IMAGE}:${TAG} - + if [ -n "${TAG_LATEST}" ] ; then \ + docker tag ${IMAGE}:${TAG} ${IMAGE}:${TAG_LATEST} ; \ + docker push ${IMAGE}:${TAG_LATEST} ; \ + fi diff --git a/README.md b/README.md index 7b74007..d2837e9 100644 --- a/README.md +++ b/README.md @@ -311,37 +311,36 @@ $ docker run -it tarantool/tarantool:2 Fixed versions: -| Branch | Dockerfile | Docker tag | -| ------ | ---------- | ---------- | -| 1.7.3 | 1.7/Dockerfile | 1.7.3 | -| 1.7.4 | 1.7/Dockerfile | 1.7.4 | -| 1.7.5 | 1.7/Dockerfile | 1.7.5 | -| 1.7.6 | 1.7/Dockerfile | 1.7.6 | -| 1.8.1 | 1.8/Dockerfile | 1.8.1 | -| 1.9.1 | 1.x/Dockerfile | 1.9.1 | -| 1.9.2 | 1.x/Dockerfile | 1.9.2 | -| 1.10.0 | 1.x/Dockerfile | 1.10.0 | -| 1.10.2 | 1.x/Dockerfile | 1.10.2 | -| 1.10.3 | 1.x/Dockerfile | 1.10.3 | -| 2.1.1 | 2.x/Dockerfile | 2.1.1 | -| 2.1.2 | 2.x/Dockerfile | 2.1.2 | -| 2.2.0 | 2.x/Dockerfile | 2.2.0 | -| 2.2.1 | 2.x/Dockerfile | 2.2.1 | +| Docker tag | Dockerfile | +| ---------- | ---------------------------- | +| 1.10.0 | dockerfile/alpine_3.5_1.10.3 | +| 1.10.2 | dockerfile/alpine_3.5_1.10.3 | +| 1.10.3 | dockerfile/alpine_3.5_1.10.3 | +| 1.10.4 | dockerfile/alpine_3.5_1.10.4 | +| 2.1.1 | dockerfile/alpine_3.5_2.2.1 | +| 2.1.2 | dockerfile/alpine_3.5_2.2.1 | +| 2.1.3 | dockerfile/alpine_3.5_1.x | +| 2.2.0 | dockerfile/alpine_3.5_2.2.1 | +| 2.2.1 | dockerfile/alpine_3.5_2.2.1 | +| 2.2.2 | dockerfile/alpine_3.5_2.x | +| 2.3.1 | dockerfile/alpine_3.5_2.x | Rolling versions: -| Branch | Dockerfile | Docker tags | -| ------ | ---------- | ----------- | -| master | dockerfile/alpine_3.5_1.x | 1 | -| master | dockerfile/alpine_3.5_2.2 | 2.1/2.2 | -| master | dockerfile/alpine_3.5_2.x | 2 | +| Docker tag | Dockerfile | +| ---------- | ------------------------- | +| 1 | dockerfile/alpine_3.5_1.x | +| 2.1 | dockerfile/alpine_3.5_2.2 | +| 2.2 | dockerfile/alpine_3.5_2.2 | +| 2.3 | dockerfile/alpine_3.5_2.x | +| 2/latest | dockerfile/alpine_3.5_2.x | Special builds: -| Branch | Dockerfile | Docker tag | -| ------ | ---------- | ---------- | -| master | dockerfile/centos_7_1.x | 1.x-centos7 | -| master | dockerfile/centos_7_2.x | 2.x-centos7 | +| Docker tag | Dockerfile | +| ----------- | ---------- | +| 1.x-centos7 | dockerfile/centos_7_1.x | +| 2.x-centos7 | dockerfile/centos_7_2.x | ## How to push changes (for maintainers) diff --git a/dockerfiles/alpine_3.5_1.10.3 b/dockerfiles/alpine_3.5_1.10.3 new file mode 100644 index 0000000..a80ba61 --- /dev/null +++ b/dockerfiles/alpine_3.5_1.10.3 @@ -0,0 +1,251 @@ +FROM alpine:3.5 +MAINTAINER mail@racktear.com + +RUN addgroup -S tarantool \ + && adduser -S -G tarantool tarantool \ + && apk add --no-cache 'su-exec>=0.2' + +# An ARG instruction goes out of scope at the end of the build +# stage where it was defined. To use an arg in multiple stages, +# each stage must include the ARG instruction +ARG TNT_VER +ENV TARANTOOL_VERSION=${TNT_VER} \ + TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ + TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ + CURL_REPO=https://github.com/curl/curl.git \ + CURL_TAG=curl-7_59_0 \ + GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ + GPERFTOOLS_TAG=gperftools-2.5 \ + LUAROCKS_URL=https://github.com/tarantool/luarocks/archive/6e6fe62d9409fe2103c0fd091cccb3da0451faf5.tar.gz \ + LUAROCK_SHARD_REPO=https://github.com/tarantool/shard.git \ + LUAROCK_SHARD_TAG=8f8c5a7 \ + LUAROCK_AVRO_SCHEMA_VERSION=2.0.1 \ + LUAROCK_EXPERATIOND_VERSION=1.0.1 \ + LUAROCK_QUEUE_VERSION=1.0.2 \ + LUAROCK_CONNPOOL_VERSION=1.1.1 \ + LUAROCK_HTTP_VERSION=1.0.1 \ + LUAROCK_MEMCACHED_VERSION=1.0.0 \ + LUAROCK_TARANTOOL_PG_VERSION=2.0.1 \ + LUAROCK_TARANTOOL_MYSQL_VERSION=2.0.1 \ + LUAROCK_TARANTOOL_CURL_VERSION=2.3.1 \ + LUAROCK_TARANTOOL_MQTT_VERSION=1.2.1 \ + LUAROCK_TARANTOOL_GIS_VERSION=1.0.0 \ + LUAROCK_TARANTOOL_PROMETHEUS_VERSION=1.0.0 \ + LUAROCK_TARANTOOL_GPERFTOOLS_VERSION=1.0.1 + +COPY files/gperftools_alpine.diff / + +RUN set -x \ + && apk add --no-cache --virtual .run-deps \ + libstdc++ \ + readline \ + libressl \ + yaml \ + lz4 \ + binutils \ + ncurses \ + libgomp \ + lua \ + tar \ + zip \ + libunwind \ + icu \ + ca-certificates \ + && apk add --no-cache --virtual .build-deps \ + perl \ + gcc \ + g++ \ + cmake \ + readline-dev \ + libressl-dev \ + yaml-dev \ + lz4-dev \ + binutils-dev \ + ncurses-dev \ + lua-dev \ + musl-dev \ + make \ + git \ + libunwind-dev \ + autoconf \ + automake \ + libtool \ + linux-headers \ + go \ + icu-dev \ + wget \ + && : "---------- curl ----------" \ + && mkdir -p /usr/src/curl \ + && git clone "$CURL_REPO" /usr/src/curl \ + && git -C /usr/src/curl checkout "$CURL_TAG" \ + && (cd /usr/src/curl \ + && ./buildconf \ + && ./configure --prefix "/usr/local" \ + && make -j \ + && make install) \ + && : "---------- gperftools ----------" \ + && mkdir -p /usr/src/gperftools \ + && git clone "$GPERFTOOLS_REPO" /usr/src/gperftools \ + && git -C /usr/src/gperftools checkout "$GPERFTOOLS_TAG" \ + && (cd /usr/src/gperftools; \ + patch -p1 < /gperftools_alpine.diff; \ + rm /gperftools_alpine.diff; \ + ./autogen.sh; \ + ./configure; \ + make; \ + cp .libs/libprofiler.so* /usr/local/lib;) \ + && (GOPATH=/usr/src/go go get github.com/google/pprof; \ + cp /usr/src/go/bin/pprof /usr/local/bin) \ + && : "---------- tarantool ----------" \ + && mkdir -p /usr/src/tarantool \ + && git clone "$TARANTOOL_DOWNLOAD_URL" /usr/src/tarantool \ + && git -C /usr/src/tarantool checkout "$TARANTOOL_VERSION" \ + && git -C /usr/src/tarantool submodule update --init --recursive \ + && (cd /usr/src/tarantool; \ + cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo\ + -DENABLE_BUNDLED_LIBYAML:BOOL=OFF\ + -DENABLE_BACKTRACE:BOOL=ON\ + -DENABLE_DIST:BOOL=ON\ + .) \ + && make -C /usr/src/tarantool -j\ + && make -C /usr/src/tarantool install \ + && make -C /usr/src/tarantool clean \ + && : "---------- small ----------" \ + && (cd /usr/src/tarantool/src/lib/small; \ + cmake -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + .) \ + && make -C /usr/src/tarantool/src/lib/small \ + && make -C /usr/src/tarantool/src/lib/small install \ + && make -C /usr/src/tarantool/src/lib/small clean \ + && : "---------- msgpuck ----------" \ + && (cd /usr/src/tarantool/src/lib/msgpuck; \ + cmake -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + .) \ + && make -C /usr/src/tarantool/src/lib/msgpuck \ + && make -C /usr/src/tarantool/src/lib/msgpuck install \ + && make -C /usr/src/tarantool/src/lib/msgpuck clean \ + && : "---------- luarocks ----------" \ + && wget -O luarocks.tar.gz "$LUAROCKS_URL" \ + && mkdir -p /usr/src/luarocks \ + && tar -xzf luarocks.tar.gz -C /usr/src/luarocks --strip-components=1 \ + && (cd /usr/src/luarocks; \ + ./configure; \ + make build; \ + make install) \ + && rm -r /usr/src/luarocks \ + && rm -rf /usr/src/tarantool \ + && rm -rf /usr/src/gperftools \ + && rm -rf /usr/src/go \ + && : "---------- remove build deps ----------" \ + && apk del .build-deps + +COPY files/luarocks-config.lua /usr/local/etc/luarocks/config-5.1.lua + +RUN set -x \ + && apk add --no-cache --virtual .run-deps \ + mariadb-client-libs \ + libpq \ + cyrus-sasl \ + mosquitto-libs \ + libev \ + && apk add --no-cache --virtual .build-deps \ + git \ + cmake \ + make \ + coreutils \ + gcc \ + g++ \ + postgresql-dev \ + lua-dev \ + musl-dev \ + cyrus-sasl-dev \ + mosquitto-dev \ + libev-dev \ + && mkdir -p /rocks \ + && : "---------- proj (for gis module) ----------" \ + && wget -O proj.tar.gz http://download.osgeo.org/proj/proj-4.9.3.tar.gz \ + && mkdir -p /usr/src/proj \ + && tar -xzf proj.tar.gz -C /usr/src/proj --strip-components=1 \ + && (cd /usr/src/proj; \ + ./configure; \ + make; \ + make install) \ + && rm -r /usr/src/proj \ + && rm -rf /usr/src/proj \ + && : "---------- geos (for gis module) ----------" \ + && wget -O geos.tar.bz2 http://download.osgeo.org/geos/geos-3.6.0.tar.bz2 \ + && mkdir -p /usr/src/geos \ + && tar -xjf geos.tar.bz2 -C /usr/src/geos --strip-components=1 \ + && (cd /usr/src/geos; \ + ./configure; \ + make; \ + make install) \ + && rm -r /usr/src/geos \ + && rm -rf /usr/src/geos \ + && : "---------- luarocks ----------" \ + && luarocks install lua-term \ + && luarocks install ldoc \ + && : "avro" \ + && luarocks install avro-schema $LUAROCK_AVRO_SCHEMA_VERSION \ + && : "expirationd" \ + && luarocks install expirationd $LUAROCK_EXPERATIOND_VERSION \ + && : "queue" \ + && luarocks install queue $LUAROCK_QUEUE_VERSION \ + && : "connpool" \ + && luarocks install connpool $LUAROCK_CONNPOOL_VERSION \ + && : "shard" \ + && git clone $LUAROCK_SHARD_REPO /rocks/shard \ + && git -C /rocks/shard checkout $LUAROCK_SHARD_TAG \ + && (cd /rocks/shard && luarocks make *rockspec) \ + && : "http" \ + && luarocks install http $LUAROCK_HTTP_VERSION \ + && : "pg" \ + && luarocks install pg $LUAROCK_TARANTOOL_PG_VERSION \ + && : "mysql" \ + && luarocks install mysql $LUAROCK_TARANTOOL_MYSQL_VERSION \ + && : "memcached" \ + && luarocks install memcached $LUAROCK_MEMCACHED_VERSION \ + && : "prometheus" \ + && luarocks install prometheus $LUAROCK_TARANTOOL_PROMETHEUS_VERSION \ + && : "curl" \ + && luarocks install tarantool-curl $LUAROCK_TARANTOOL_CURL_VERSION \ + && : "mqtt" \ + && luarocks install mqtt $LUAROCK_TARANTOOL_MQTT_VERSION \ + && : "gis" \ + && luarocks install gis $LUAROCK_TARANTOOL_GIS_VERSION \ + && : "gperftools" \ + && luarocks install gperftools $LUAROCK_TARANTOOL_GPERFTOOLS_VERSION \ + && : "---------- remove build deps ----------" \ + && apk del .build-deps \ + && rm -rf /rocks + +RUN mkdir -p /var/lib/tarantool \ + && chown tarantool:tarantool /var/lib/tarantool \ + && mkdir -p /opt/tarantool \ + && chown tarantool:tarantool /opt/tarantool \ + && mkdir -p /var/run/tarantool \ + && chown tarantool:tarantool /var/run/tarantool \ + && mkdir /etc/tarantool \ + && chown tarantool:tarantool /etc/tarantool + +VOLUME /var/lib/tarantool +WORKDIR /opt/tarantool + +COPY files/tarantool-entrypoint.lua /usr/local/bin/ +COPY files/tarantool_set_config.lua /usr/local/bin/ +COPY files/docker-entrypoint.sh /usr/local/bin/ +COPY files/console /usr/local/bin/ +COPY files/tarantool_is_up /usr/local/bin/ +COPY files/tarantool.default /usr/local/etc/default/tarantool + +RUN ln -s usr/local/bin/docker-entrypoint.sh /entrypoint.sh # backwards compat +ENTRYPOINT ["docker-entrypoint.sh"] + +HEALTHCHECK CMD tarantool_is_up + +EXPOSE 3301 +CMD [ "tarantool" ] diff --git a/versions/alpine_3.5_1.10.0 b/versions/alpine_3.5_1.10.0 new file mode 100644 index 0000000..818e3ac --- /dev/null +++ b/versions/alpine_3.5_1.10.0 @@ -0,0 +1 @@ +1.10.0-0-g42612ec04 diff --git a/versions/alpine_3.5_1.10.2 b/versions/alpine_3.5_1.10.2 new file mode 100644 index 0000000..5c1acd3 --- /dev/null +++ b/versions/alpine_3.5_1.10.2 @@ -0,0 +1 @@ +1.10.2-0-gc0d8063b6 diff --git a/versions/alpine_3.5_1.10.3 b/versions/alpine_3.5_1.10.3 new file mode 100644 index 0000000..515f8f7 --- /dev/null +++ b/versions/alpine_3.5_1.10.3 @@ -0,0 +1 @@ +1.10.3-0-g0b7078a93 diff --git a/versions/alpine_3.5_1.10.4 b/versions/alpine_3.5_1.10.4 new file mode 100644 index 0000000..19bee8b --- /dev/null +++ b/versions/alpine_3.5_1.10.4 @@ -0,0 +1 @@ +1.10.4-0-g9dbcdba14 diff --git a/versions/alpine_3.5_2.1.1 b/versions/alpine_3.5_2.1.1 new file mode 100644 index 0000000..0c1c7e7 --- /dev/null +++ b/versions/alpine_3.5_2.1.1 @@ -0,0 +1 @@ +2.1.1-0-g8a09adb46 diff --git a/versions/alpine_3.5_2.1.2 b/versions/alpine_3.5_2.1.2 new file mode 100644 index 0000000..707313e --- /dev/null +++ b/versions/alpine_3.5_2.1.2 @@ -0,0 +1 @@ +2.1.2-2-gd06f95fc1 diff --git a/versions/alpine_3.5_2.1.3 b/versions/alpine_3.5_2.1.3 new file mode 100644 index 0000000..b242e69 --- /dev/null +++ b/versions/alpine_3.5_2.1.3 @@ -0,0 +1 @@ +2.1.3-1-g62c1bcdaf diff --git a/versions/alpine_3.5_2.2.0 b/versions/alpine_3.5_2.2.0 new file mode 100644 index 0000000..c8920cc --- /dev/null +++ b/versions/alpine_3.5_2.2.0 @@ -0,0 +1 @@ +2.2.0-0-gb58001013 diff --git a/versions/alpine_3.5_2.2.1 b/versions/alpine_3.5_2.2.1 new file mode 100644 index 0000000..10db341 --- /dev/null +++ b/versions/alpine_3.5_2.2.1 @@ -0,0 +1 @@ +2.2.1-3-g878e2a42c diff --git a/versions/alpine_3.5_2.2.2 b/versions/alpine_3.5_2.2.2 new file mode 100644 index 0000000..243a7ec --- /dev/null +++ b/versions/alpine_3.5_2.2.2 @@ -0,0 +1 @@ +2.2.2-4-g4f8ac5999 diff --git a/versions/alpine_3.5_2.3 b/versions/alpine_3.5_2.3 new file mode 100644 index 0000000..0d9a82f --- /dev/null +++ b/versions/alpine_3.5_2.3 @@ -0,0 +1 @@ +2.3.1-2-g92750c828 diff --git a/versions/alpine_3.5_2.3.1 b/versions/alpine_3.5_2.3.1 new file mode 100644 index 0000000..0d9a82f --- /dev/null +++ b/versions/alpine_3.5_2.3.1 @@ -0,0 +1 @@ +2.3.1-2-g92750c828 From 012a1ae2e59e9c32f257ae86f139acace9fa3371 Mon Sep 17 00:00:00 2001 From: "Alexander V. Tikhonov" Date: Mon, 30 Dec 2019 22:43:43 +0300 Subject: [PATCH 174/286] Change keyserver to be easy accessed Found that the previously used keysever link is not full time available, also it's better to use opened port 80 which is regulary opened istead of some other. --- dockerfiles/centos_7_1.x | 2 +- dockerfiles/centos_7_2.x | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dockerfiles/centos_7_1.x b/dockerfiles/centos_7_1.x index 7405c79..0332fdd 100644 --- a/dockerfiles/centos_7_1.x +++ b/dockerfiles/centos_7_1.x @@ -239,7 +239,7 @@ RUN set -x \ RUN set -x \ && : "---------- gosu ----------" \ - && gpg --keyserver pool.sks-keyservers.net --recv-keys \ + && gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys \ B42F6819007F00F88E364FD4036A9C25BF357DD4 \ && curl -o /usr/local/bin/gosu -SL \ "https://github.com/tianon/gosu/releases/download/1.2/gosu-amd64" \ diff --git a/dockerfiles/centos_7_2.x b/dockerfiles/centos_7_2.x index 8871562..6d15579 100644 --- a/dockerfiles/centos_7_2.x +++ b/dockerfiles/centos_7_2.x @@ -198,7 +198,7 @@ RUN set -x \ RUN set -x \ && : "---------- gosu ----------" \ - && gpg --keyserver pool.sks-keyservers.net --recv-keys \ + && gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys \ B42F6819007F00F88E364FD4036A9C25BF357DD4 \ && curl -o /usr/local/bin/gosu -SL \ "https://github.com/tianon/gosu/releases/download/1.2/gosu-amd64" \ From 1611858e5f42c56e468ad4718a19a6a365283cda Mon Sep 17 00:00:00 2001 From: "Alexander V. Tikhonov" Date: Tue, 3 Mar 2020 07:04:11 +0300 Subject: [PATCH 175/286] Update queue version to 1.0.6 Updated LUAROCK_QUEUE_VERSION to the all dockerfiles from 1.0.[23] versions to 1.0.6. --- dockerfiles/alpine_3.5_1.10.3 | 2 +- dockerfiles/alpine_3.5_1.x | 2 +- dockerfiles/alpine_3.5_2.2 | 2 +- dockerfiles/alpine_3.5_2.x | 2 +- dockerfiles/centos_7_1.x | 2 +- dockerfiles/centos_7_2.x | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dockerfiles/alpine_3.5_1.10.3 b/dockerfiles/alpine_3.5_1.10.3 index a80ba61..3e655d2 100644 --- a/dockerfiles/alpine_3.5_1.10.3 +++ b/dockerfiles/alpine_3.5_1.10.3 @@ -21,7 +21,7 @@ ENV TARANTOOL_VERSION=${TNT_VER} \ LUAROCK_SHARD_TAG=8f8c5a7 \ LUAROCK_AVRO_SCHEMA_VERSION=2.0.1 \ LUAROCK_EXPERATIOND_VERSION=1.0.1 \ - LUAROCK_QUEUE_VERSION=1.0.2 \ + LUAROCK_QUEUE_VERSION=1.0.6 \ LUAROCK_CONNPOOL_VERSION=1.1.1 \ LUAROCK_HTTP_VERSION=1.0.1 \ LUAROCK_MEMCACHED_VERSION=1.0.0 \ diff --git a/dockerfiles/alpine_3.5_1.x b/dockerfiles/alpine_3.5_1.x index 9ccab7f..d9d093b 100644 --- a/dockerfiles/alpine_3.5_1.x +++ b/dockerfiles/alpine_3.5_1.x @@ -19,7 +19,7 @@ ENV TARANTOOL_VERSION=${TNT_VER} \ LUAROCK_SHARD_TAG=8f8c5a7 \ LUAROCK_AVRO_SCHEMA_VERSION=2.0.1 \ LUAROCK_EXPERATIOND_VERSION=1.0.1 \ - LUAROCK_QUEUE_VERSION=1.0.2 \ + LUAROCK_QUEUE_VERSION=1.0.6 \ LUAROCK_CONNPOOL_VERSION=1.1.1 \ LUAROCK_HTTP_VERSION=1.0.1 \ LUAROCK_MEMCACHED_VERSION=1.0.0 \ diff --git a/dockerfiles/alpine_3.5_2.2 b/dockerfiles/alpine_3.5_2.2 index 8b2517b..2481623 100644 --- a/dockerfiles/alpine_3.5_2.2 +++ b/dockerfiles/alpine_3.5_2.2 @@ -21,7 +21,7 @@ ENV TARANTOOL_VERSION=${TNT_VER} \ LUAROCK_SHARD_TAG=8f8c5a7 \ LUAROCK_AVRO_SCHEMA_VERSION=2.0.1 \ LUAROCK_EXPERATIOND_VERSION=1.0.1 \ - LUAROCK_QUEUE_VERSION=1.0.2 \ + LUAROCK_QUEUE_VERSION=1.0.6 \ LUAROCK_CONNPOOL_VERSION=1.1.1 \ LUAROCK_HTTP_VERSION=1.0.1 \ LUAROCK_MEMCACHED_VERSION=1.0.0 \ diff --git a/dockerfiles/alpine_3.5_2.x b/dockerfiles/alpine_3.5_2.x index d1d331e..3d3733e 100644 --- a/dockerfiles/alpine_3.5_2.x +++ b/dockerfiles/alpine_3.5_2.x @@ -16,7 +16,7 @@ ENV TARANTOOL_VERSION=${TNT_VER} \ LUAROCK_VSHARD_VERSION=0.1.14 \ LUAROCK_AVRO_SCHEMA_VERSION=2.0.1 \ LUAROCK_EXPERATIOND_VERSION=1.0.1 \ - LUAROCK_QUEUE_VERSION=1.0.2 \ + LUAROCK_QUEUE_VERSION=1.0.6 \ LUAROCK_CONNPOOL_VERSION=1.1.1 \ LUAROCK_HTTP_VERSION=1.0.1 \ LUAROCK_MEMCACHED_VERSION=1.0.0 \ diff --git a/dockerfiles/centos_7_1.x b/dockerfiles/centos_7_1.x index 0332fdd..610a939 100644 --- a/dockerfiles/centos_7_1.x +++ b/dockerfiles/centos_7_1.x @@ -15,7 +15,7 @@ ENV TARANTOOL_VERSION=${TNT_VER} \ LUAROCK_CHECKS_VERSION=1.0.0 \ LUAROCK_AVRO_SCHEMA_VERSION=2.0.1 \ LUAROCK_EXPERATIOND_VERSION=1.0.1 \ - LUAROCK_QUEUE_VERSION=1.0.2 \ + LUAROCK_QUEUE_VERSION=1.0.6 \ LUAROCK_CONNPOOL_VERSION=1.1.1 \ LUAROCK_HTTP_VERSION=1.1.0 \ LUAROCK_MEMCACHED_VERSION=1.0.0 \ diff --git a/dockerfiles/centos_7_2.x b/dockerfiles/centos_7_2.x index 6d15579..6ac8df7 100644 --- a/dockerfiles/centos_7_2.x +++ b/dockerfiles/centos_7_2.x @@ -12,7 +12,7 @@ ENV TARANTOOL_VERSION=${TNT_VER} \ LUAROCK_CHECKS_VERSION=3.0.1 \ LUAROCK_AVRO_SCHEMA_VERSION=3.0.3 \ LUAROCK_EXPERATIOND_VERSION=1.0.1 \ - LUAROCK_QUEUE_VERSION=1.0.3 \ + LUAROCK_QUEUE_VERSION=1.0.6 \ LUAROCK_CONNPOOL_VERSION=1.1.1 \ LUAROCK_HTTP_VERSION=1.1.0 \ LUAROCK_MEMCACHED_VERSION=1.0.0 \ From c35d1d88e9730c1b4c4ee62093c50b76d9af944d Mon Sep 17 00:00:00 2001 From: "Alexander V. Tikhonov" Date: Wed, 11 Mar 2020 14:52:19 +0300 Subject: [PATCH 176/286] Fix Centos builds Found that some of the changes made for alpine* dockerfiles missed for centos*. Took it from commit 6a55f9a1 for TNT_ARG environment value. --- dockerfiles/centos_7_1.x | 6 ++++-- dockerfiles/centos_7_2.x | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/dockerfiles/centos_7_1.x b/dockerfiles/centos_7_1.x index 610a939..5d99122 100644 --- a/dockerfiles/centos_7_1.x +++ b/dockerfiles/centos_7_1.x @@ -1,11 +1,13 @@ -ARG TNT_VER - FROM centos:7 MAINTAINER mail@racktear.com RUN groupadd tarantool \ && adduser -g tarantool tarantool +# An ARG instruction goes out of scope at the end of the build +# stage where it was defined. To use an arg in multiple stages, +# each stage must include the ARG instruction +ARG TNT_VER ENV TARANTOOL_VERSION=${TNT_VER} \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ diff --git a/dockerfiles/centos_7_2.x b/dockerfiles/centos_7_2.x index 6ac8df7..c4d9c2c 100644 --- a/dockerfiles/centos_7_2.x +++ b/dockerfiles/centos_7_2.x @@ -1,11 +1,13 @@ -ARG TNT_VER - FROM centos:7 MAINTAINER mail@racktear.com RUN groupadd tarantool \ && adduser -g tarantool tarantool +# An ARG instruction goes out of scope at the end of the build +# stage where it was defined. To use an arg in multiple stages, +# each stage must include the ARG instruction +ARG TNT_VER ENV TARANTOOL_VERSION=${TNT_VER} \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ LUAROCK_VSHARD_VERSION=0.1.14 \ From 6f860e6e2b027c56de092dd958490598f927eede Mon Sep 17 00:00:00 2001 From: "Alexander V. Tikhonov" Date: Fri, 17 Apr 2020 12:04:22 +0300 Subject: [PATCH 177/286] Disabled docker cache for images build Found that some docker layers must be rebuilt, to make it able the docker caching disabled. --- .gitlab.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab.mk b/.gitlab.mk index bd97046..a215f53 100644 --- a/.gitlab.mk +++ b/.gitlab.mk @@ -1,7 +1,7 @@ TNT_VER=$(shell cat versions/${OS}_${VER}) build: - docker build --network=host --build-arg TNT_VER=${TNT_VER} \ + docker build --no-cache --network=host --build-arg TNT_VER=${TNT_VER} \ -t ${IMAGE}:${TAG} -f dockerfiles/${OS}_${DVER} . docker run --rm --name tarantool_${TAG} -p ${PORT}:${PORT} -d ${IMAGE}:${TAG} docker exec -t tarantool_${TAG} tarantool_is_up From 986e01498f25b3eefc9dbfe3d7e6444899f9c046 Mon Sep 17 00:00:00 2001 From: "Alexander V. Tikhonov" Date: Fri, 17 Apr 2020 12:18:40 +0300 Subject: [PATCH 178/286] Add force build flag to gitlab-ci Added ability to force rebuild for all images for the branches with names like "*-force-build". --- .gitlab-ci.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b68c12a..c180174 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -10,6 +10,10 @@ before_script: # Enable GitLab registry - docker login -u gitlab-ci-token -p ${CI_BUILD_TOKEN} ${REGISTRY} +.force_build_template: &force_build_definition + only: + - /^.*-force-build$/ + .build_template: &build_definition stage: build script: @@ -29,6 +33,7 @@ before_script: 'alpine 3.5 1.10.0': <<: *build_definition + <<: *force_build_definition variables: OS: 'alpine_3.5' TAG: '1.10.0' @@ -38,6 +43,7 @@ before_script: 'alpine 3.5 1.10.2': <<: *build_definition + <<: *force_build_definition variables: OS: 'alpine_3.5' TAG: '1.10.2' @@ -47,6 +53,7 @@ before_script: 'alpine 3.5 1.10.3': <<: *build_definition + <<: *force_build_definition variables: OS: 'alpine_3.5' TAG: '1.10.3' @@ -56,6 +63,7 @@ before_script: 'alpine 3.5 1.10.4': <<: *build_definition + <<: *force_build_definition variables: OS: 'alpine_3.5' TAG: '1.10.4' @@ -65,6 +73,7 @@ before_script: 'alpine 3.5 1.x': <<: *build_definition + <<: *force_build_definition variables: OS: 'alpine_3.5' TAG: '1' @@ -76,6 +85,7 @@ before_script: 'alpine 3.5 2.1.1': <<: *build_definition + <<: *force_build_definition variables: OS: 'alpine_3.5' TAG: '2.1.1' @@ -85,6 +95,7 @@ before_script: 'alpine 3.5 2.1.2': <<: *build_definition + <<: *force_build_definition variables: OS: 'alpine_3.5' TAG: '2.1.2' @@ -94,6 +105,7 @@ before_script: 'alpine 3.5 2.1.3': <<: *build_definition + <<: *force_build_definition variables: OS: 'alpine_3.5' TAG: '2.1.3' @@ -103,6 +115,7 @@ before_script: 'alpine 3.5 2.1': <<: *build_definition + <<: *force_build_definition variables: OS: 'alpine_3.5' TAG: '2.1' @@ -114,6 +127,7 @@ before_script: 'alpine 3.5 2.2.0': <<: *build_definition + <<: *force_build_definition variables: OS: 'alpine_3.5' TAG: '2.2.0' @@ -123,6 +137,7 @@ before_script: 'alpine 3.5 2.2.1': <<: *build_definition + <<: *force_build_definition variables: OS: 'alpine_3.5' TAG: '2.2.1' @@ -132,6 +147,7 @@ before_script: 'alpine 3.5 2.2.2': <<: *build_definition + <<: *force_build_definition variables: OS: 'alpine_3.5' TAG: '2.2.2' @@ -141,6 +157,7 @@ before_script: 'alpine 3.5 2.2': <<: *build_definition + <<: *force_build_definition variables: OS: 'alpine_3.5' TAG: '2.2' @@ -152,6 +169,7 @@ before_script: 'alpine 3.5 2.3.1': <<: *build_definition + <<: *force_build_definition variables: OS: 'alpine_3.5' TAG: '2.3.1' @@ -161,6 +179,7 @@ before_script: 'alpine 3.5 2.3': <<: *build_definition + <<: *force_build_definition variables: OS: 'alpine_3.5' TAG: '2.3' @@ -172,6 +191,7 @@ before_script: 'alpine 3.5 2.x': <<: *build_definition + <<: *force_build_definition variables: OS: 'alpine_3.5' TAG: '2' @@ -188,6 +208,7 @@ before_script: 'centos 7 1.x': <<: *build_definition + <<: *force_build_definition variables: OS: 'centos_7' TAG: '1.x-centos7' @@ -199,6 +220,7 @@ before_script: 'centos 7 2.x': <<: *build_definition + <<: *force_build_definition variables: OS: 'centos_7' TAG: '2.x-centos7' From 1969ee270b2a956693d87b25bdb0090b7a82590c Mon Sep 17 00:00:00 2001 From: "Alexander V. Tikhonov" Date: Thu, 16 Apr 2020 11:09:28 +0300 Subject: [PATCH 179/286] icu sources download path changed Close #138 --- dockerfiles/centos_7_1.x | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dockerfiles/centos_7_1.x b/dockerfiles/centos_7_1.x index 5d99122..9aa7146 100644 --- a/dockerfiles/centos_7_1.x +++ b/dockerfiles/centos_7_1.x @@ -70,7 +70,7 @@ RUN set -x \ go \ wget \ && : "---------- libicu ----------" \ - && wget http://download.icu-project.org/files/icu4c/64.2/icu4c-64_2-src.tgz \ + && wget https://github.com/unicode-org/icu/releases/download/release-64-2/icu4c-64_2-src.tgz \ && mkdir -p /usr/src/icu \ && tar -xzf icu4c-64_2-src.tgz -C /usr/src/icu --strip-components=1 \ && rm icu4c-64_2-src.tgz \ From 2c4664dec0de62e77b93635d0a2f3ba7b00c7370 Mon Sep 17 00:00:00 2001 From: "Alexander V. Tikhonov" Date: Thu, 16 Apr 2020 11:15:59 +0300 Subject: [PATCH 180/286] pgdg-redhat latest sources package changed Close #139 --- dockerfiles/centos_7_1.x | 2 +- dockerfiles/centos_7_2.x | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dockerfiles/centos_7_1.x b/dockerfiles/centos_7_1.x index 9aa7146..8e89d5f 100644 --- a/dockerfiles/centos_7_1.x +++ b/dockerfiles/centos_7_1.x @@ -162,7 +162,7 @@ RUN set -x \ COPY files/luarocks-config_centos.lua /usr/local/etc/luarocks/config-5.1.lua RUN set -x \ - && yum -y install https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-redhat96-9.6-3.noarch.rpm \ + && yum -y install https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm \ && yum -y install \ mariadb-libs \ postgresql96-libs \ diff --git a/dockerfiles/centos_7_2.x b/dockerfiles/centos_7_2.x index c4d9c2c..025c099 100644 --- a/dockerfiles/centos_7_2.x +++ b/dockerfiles/centos_7_2.x @@ -122,7 +122,7 @@ RUN set -x \ && rm -rf /var/cache/yum RUN set -x \ - && yum -y install https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-redhat96-9.6-3.noarch.rpm \ + && yum -y install https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm \ && yum -y install \ mariadb-libs \ postgresql96-libs \ From d68c646cc437e2bf4a861285dded166f33f3cb2a Mon Sep 17 00:00:00 2001 From: "Alexander V. Tikhonov" Date: Thu, 16 Apr 2020 17:44:31 +0300 Subject: [PATCH 181/286] penlight package dependencies broken Found that dependency of penlight 1.7.0-1 on luafilesystem sources package is broken, which was already described at: https://github.com/luarocks/luarocks/issues/1120 To avoid of it the luarocks installer was changed to tarantoolctl. Also removed luarocks source build and its depends library lua-devel. Also found that unzip tool was needed for tarantoolctl installation. Close #140 --- dockerfiles/alpine_3.5_1.10.3 | 46 ++++++++++++------------------- dockerfiles/alpine_3.5_2.2 | 47 +++++++++++++------------------- dockerfiles/centos_7_1.x | 47 ++++++++++++-------------------- files/luarocks-config_centos.lua | 11 -------- 4 files changed, 53 insertions(+), 98 deletions(-) delete mode 100644 files/luarocks-config_centos.lua diff --git a/dockerfiles/alpine_3.5_1.10.3 b/dockerfiles/alpine_3.5_1.10.3 index 3e655d2..c5a36b4 100644 --- a/dockerfiles/alpine_3.5_1.10.3 +++ b/dockerfiles/alpine_3.5_1.10.3 @@ -11,12 +11,10 @@ RUN addgroup -S tarantool \ ARG TNT_VER ENV TARANTOOL_VERSION=${TNT_VER} \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ - TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ CURL_REPO=https://github.com/curl/curl.git \ CURL_TAG=curl-7_59_0 \ GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ GPERFTOOLS_TAG=gperftools-2.5 \ - LUAROCKS_URL=https://github.com/tarantool/luarocks/archive/6e6fe62d9409fe2103c0fd091cccb3da0451faf5.tar.gz \ LUAROCK_SHARD_REPO=https://github.com/tarantool/shard.git \ LUAROCK_SHARD_TAG=8f8c5a7 \ LUAROCK_AVRO_SCHEMA_VERSION=2.0.1 \ @@ -128,23 +126,12 @@ RUN set -x \ && make -C /usr/src/tarantool/src/lib/msgpuck \ && make -C /usr/src/tarantool/src/lib/msgpuck install \ && make -C /usr/src/tarantool/src/lib/msgpuck clean \ - && : "---------- luarocks ----------" \ - && wget -O luarocks.tar.gz "$LUAROCKS_URL" \ - && mkdir -p /usr/src/luarocks \ - && tar -xzf luarocks.tar.gz -C /usr/src/luarocks --strip-components=1 \ - && (cd /usr/src/luarocks; \ - ./configure; \ - make build; \ - make install) \ - && rm -r /usr/src/luarocks \ && rm -rf /usr/src/tarantool \ && rm -rf /usr/src/gperftools \ && rm -rf /usr/src/go \ && : "---------- remove build deps ----------" \ && apk del .build-deps -COPY files/luarocks-config.lua /usr/local/etc/luarocks/config-5.1.lua - RUN set -x \ && apk add --no-cache --virtual .run-deps \ mariadb-client-libs \ @@ -187,38 +174,39 @@ RUN set -x \ && rm -r /usr/src/geos \ && rm -rf /usr/src/geos \ && : "---------- luarocks ----------" \ - && luarocks install lua-term \ - && luarocks install ldoc \ + && cd / \ + && : "lua-term" \ + && tarantoolctl rocks install lua-term \ && : "avro" \ - && luarocks install avro-schema $LUAROCK_AVRO_SCHEMA_VERSION \ + && tarantoolctl rocks install avro-schema $LUAROCK_AVRO_SCHEMA_VERSION \ && : "expirationd" \ - && luarocks install expirationd $LUAROCK_EXPERATIOND_VERSION \ + && tarantoolctl rocks install expirationd $LUAROCK_EXPERATIOND_VERSION \ && : "queue" \ - && luarocks install queue $LUAROCK_QUEUE_VERSION \ + && tarantoolctl rocks install queue $LUAROCK_QUEUE_VERSION \ && : "connpool" \ - && luarocks install connpool $LUAROCK_CONNPOOL_VERSION \ + && tarantoolctl rocks install connpool $LUAROCK_CONNPOOL_VERSION \ && : "shard" \ && git clone $LUAROCK_SHARD_REPO /rocks/shard \ && git -C /rocks/shard checkout $LUAROCK_SHARD_TAG \ - && (cd /rocks/shard && luarocks make *rockspec) \ + && (cd /rocks/shard && tarantoolctl rocks make *rockspec) \ && : "http" \ - && luarocks install http $LUAROCK_HTTP_VERSION \ + && tarantoolctl rocks install http $LUAROCK_HTTP_VERSION \ && : "pg" \ - && luarocks install pg $LUAROCK_TARANTOOL_PG_VERSION \ + && tarantoolctl rocks install pg $LUAROCK_TARANTOOL_PG_VERSION \ && : "mysql" \ - && luarocks install mysql $LUAROCK_TARANTOOL_MYSQL_VERSION \ + && tarantoolctl rocks install mysql $LUAROCK_TARANTOOL_MYSQL_VERSION \ && : "memcached" \ - && luarocks install memcached $LUAROCK_MEMCACHED_VERSION \ + && tarantoolctl rocks install memcached $LUAROCK_MEMCACHED_VERSION \ && : "prometheus" \ - && luarocks install prometheus $LUAROCK_TARANTOOL_PROMETHEUS_VERSION \ + && tarantoolctl rocks install prometheus $LUAROCK_TARANTOOL_PROMETHEUS_VERSION \ && : "curl" \ - && luarocks install tarantool-curl $LUAROCK_TARANTOOL_CURL_VERSION \ + && tarantoolctl rocks install tarantool-curl $LUAROCK_TARANTOOL_CURL_VERSION \ && : "mqtt" \ - && luarocks install mqtt $LUAROCK_TARANTOOL_MQTT_VERSION \ + && tarantoolctl rocks install mqtt $LUAROCK_TARANTOOL_MQTT_VERSION \ && : "gis" \ - && luarocks install gis $LUAROCK_TARANTOOL_GIS_VERSION \ + && tarantoolctl rocks install gis $LUAROCK_TARANTOOL_GIS_VERSION \ && : "gperftools" \ - && luarocks install gperftools $LUAROCK_TARANTOOL_GPERFTOOLS_VERSION \ + && tarantoolctl rocks install gperftools $LUAROCK_TARANTOOL_GPERFTOOLS_VERSION \ && : "---------- remove build deps ----------" \ && apk del .build-deps \ && rm -rf /rocks diff --git a/dockerfiles/alpine_3.5_2.2 b/dockerfiles/alpine_3.5_2.2 index 2481623..27f9a26 100644 --- a/dockerfiles/alpine_3.5_2.2 +++ b/dockerfiles/alpine_3.5_2.2 @@ -11,12 +11,10 @@ RUN addgroup -S tarantool \ ARG TNT_VER ENV TARANTOOL_VERSION=${TNT_VER} \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ - TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ CURL_REPO=https://github.com/curl/curl.git \ CURL_TAG=curl-7_59_0 \ GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ GPERFTOOLS_TAG=gperftools-2.5 \ - LUAROCKS_URL=https://github.com/tarantool/luarocks/archive/6e6fe62d9409fe2103c0fd091cccb3da0451faf5.tar.gz \ LUAROCK_SHARD_REPO=https://github.com/tarantool/shard.git \ LUAROCK_SHARD_TAG=8f8c5a7 \ LUAROCK_AVRO_SCHEMA_VERSION=2.0.1 \ @@ -128,23 +126,12 @@ RUN set -x \ && make -C /usr/src/tarantool/src/lib/msgpuck \ && make -C /usr/src/tarantool/src/lib/msgpuck install \ && make -C /usr/src/tarantool/src/lib/msgpuck clean \ - && : "---------- luarocks ----------" \ - && wget -O luarocks.tar.gz "$LUAROCKS_URL" \ - && mkdir -p /usr/src/luarocks \ - && tar -xzf luarocks.tar.gz -C /usr/src/luarocks --strip-components=1 \ - && (cd /usr/src/luarocks; \ - ./configure; \ - make build; \ - make install) \ - && rm -r /usr/src/luarocks \ && rm -rf /usr/src/tarantool \ && rm -rf /usr/src/gperftools \ && rm -rf /usr/src/go \ && : "---------- remove build deps ----------" \ && apk del .build-deps -COPY files/luarocks-config.lua /usr/local/etc/luarocks/config-5.1.lua - RUN set -x \ && apk add --no-cache --virtual .run-deps \ mariadb-client-libs \ @@ -166,6 +153,7 @@ RUN set -x \ mosquitto-dev \ libev-dev \ libressl-dev \ + unzip \ && mkdir -p /rocks \ && : "---------- proj (for gis module) ----------" \ && wget -O proj.tar.gz http://download.osgeo.org/proj/proj-4.9.3.tar.gz \ @@ -188,36 +176,39 @@ RUN set -x \ && rm -r /usr/src/geos \ && rm -rf /usr/src/geos \ && : "---------- luarocks ----------" \ - && luarocks install lua-term \ - && luarocks install ldoc \ + && cd / \ + && : "ldoc" \ + && tarantoolctl rocks install ldoc --server=http://rocks.moonscript.org \ + && : "lua-term" \ + && tarantoolctl rocks install lua-term \ && : "avro" \ - && luarocks install avro-schema $LUAROCK_AVRO_SCHEMA_VERSION \ + && tarantoolctl rocks install avro-schema $LUAROCK_AVRO_SCHEMA_VERSION \ && : "expirationd" \ - && luarocks install expirationd $LUAROCK_EXPERATIOND_VERSION \ + && tarantoolctl rocks install expirationd $LUAROCK_EXPERATIOND_VERSION \ && : "queue" \ - && luarocks install queue $LUAROCK_QUEUE_VERSION \ + && tarantoolctl rocks install queue $LUAROCK_QUEUE_VERSION \ && : "connpool" \ - && luarocks install connpool $LUAROCK_CONNPOOL_VERSION \ + && tarantoolctl rocks install connpool $LUAROCK_CONNPOOL_VERSION \ && : "shard" \ && git clone $LUAROCK_SHARD_REPO /rocks/shard \ && git -C /rocks/shard checkout $LUAROCK_SHARD_TAG \ - && (cd /rocks/shard && luarocks make *rockspec) \ + && (cd /rocks/shard && tarantoolctl rocks make *rockspec) \ && : "http" \ - && luarocks install http $LUAROCK_HTTP_VERSION \ + && tarantoolctl rocks install http $LUAROCK_HTTP_VERSION \ && : "pg" \ - && luarocks install pg $LUAROCK_TARANTOOL_PG_VERSION \ + && tarantoolctl rocks install pg $LUAROCK_TARANTOOL_PG_VERSION \ && : "mysql" \ - && luarocks install mysql $LUAROCK_TARANTOOL_MYSQL_VERSION \ + && tarantoolctl rocks install mysql $LUAROCK_TARANTOOL_MYSQL_VERSION \ && : "memcached" \ - && luarocks install memcached $LUAROCK_MEMCACHED_VERSION \ + && tarantoolctl rocks install memcached $LUAROCK_MEMCACHED_VERSION \ && : "prometheus" \ - && luarocks install prometheus $LUAROCK_TARANTOOL_PROMETHEUS_VERSION \ + && tarantoolctl rocks install prometheus $LUAROCK_TARANTOOL_PROMETHEUS_VERSION \ && : "mqtt" \ - && luarocks install mqtt $LUAROCK_TARANTOOL_MQTT_VERSION \ + && tarantoolctl rocks install mqtt $LUAROCK_TARANTOOL_MQTT_VERSION \ && : "gis" \ - && luarocks install gis $LUAROCK_TARANTOOL_GIS_VERSION \ + && tarantoolctl rocks install gis $LUAROCK_TARANTOOL_GIS_VERSION \ && : "gperftools" \ - && luarocks install gperftools $LUAROCK_TARANTOOL_GPERFTOOLS_VERSION \ + && tarantoolctl rocks install gperftools $LUAROCK_TARANTOOL_GPERFTOOLS_VERSION \ && : "---------- remove build deps ----------" \ && apk del .build-deps \ && rm -rf /rocks diff --git a/dockerfiles/centos_7_1.x b/dockerfiles/centos_7_1.x index 8e89d5f..a1b0801 100644 --- a/dockerfiles/centos_7_1.x +++ b/dockerfiles/centos_7_1.x @@ -10,8 +10,6 @@ RUN groupadd tarantool \ ARG TNT_VER ENV TARANTOOL_VERSION=${TNT_VER} \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ - TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ - LUAROCKS_URL=https://github.com/tarantool/luarocks/archive/6e6fe62d9409fe2103c0fd091cccb3da0451faf5.tar.gz \ LUAROCK_SHARD_REPO=https://github.com/tarantool/shard.git \ LUAROCK_SHARD_TAG=8f8c5a7 \ LUAROCK_CHECKS_VERSION=1.0.0 \ @@ -60,7 +58,6 @@ RUN set -x \ lz4-devel \ binutils-devel \ ncurses-devel \ - lua-devel \ make \ git \ libunwind-devel \ @@ -117,15 +114,6 @@ RUN set -x \ && make -C /usr/src/tarantool/src/lib/msgpuck \ && make -C /usr/src/tarantool/src/lib/msgpuck install \ && make -C /usr/src/tarantool/src/lib/msgpuck clean \ - && : "---------- luarocks ----------" \ - && wget -O luarocks.tar.gz "$LUAROCKS_URL" \ - && mkdir -p /usr/src/luarocks \ - && tar -xzf luarocks.tar.gz -C /usr/src/luarocks --strip-components=1 \ - && (cd /usr/src/luarocks; \ - ./configure; \ - make build; \ - make install) \ - && rm -r /usr/src/luarocks \ && rm -rf /usr/src/tarantool \ && rm -rf /usr/src/go \ && rm -rf /usr/src/icu \ @@ -158,9 +146,6 @@ RUN set -x \ && rpm -qa | grep devel | xargs yum -y remove \ && rm -rf /var/cache/yum - -COPY files/luarocks-config_centos.lua /usr/local/etc/luarocks/config-5.1.lua - RUN set -x \ && yum -y install https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm \ && yum -y install \ @@ -187,36 +172,38 @@ RUN set -x \ openssl-devel \ && mkdir -p /rocks \ && : "---------- luarocks ----------" \ - && luarocks install lua-term \ - && luarocks install ldoc \ + && : "lua-term" \ + && tarantoolctl rocks install lua-term \ + && : "ldoc" \ + && tarantoolctl rocks install ldoc --server=http://rocks.moonscript.org \ && : "checks" \ - && luarocks install checks $LUAROCK_CHECKS_VERSION \ + && tarantoolctl rocks install checks $LUAROCK_CHECKS_VERSION \ && : "avro" \ - && luarocks install avro-schema $LUAROCK_AVRO_SCHEMA_VERSION \ + && tarantoolctl rocks install avro-schema $LUAROCK_AVRO_SCHEMA_VERSION \ && : "expirationd" \ - && luarocks install expirationd $LUAROCK_EXPERATIOND_VERSION \ + && tarantoolctl rocks install expirationd $LUAROCK_EXPERATIOND_VERSION \ && : "queue" \ - && luarocks install queue $LUAROCK_QUEUE_VERSION \ + && tarantoolctl rocks install queue $LUAROCK_QUEUE_VERSION \ && : "connpool" \ - && luarocks install connpool $LUAROCK_CONNPOOL_VERSION \ + && tarantoolctl rocks install connpool $LUAROCK_CONNPOOL_VERSION \ && : "shard" \ && git clone $LUAROCK_SHARD_REPO /rocks/shard \ && (cd /rocks/shard; git checkout $LUAROCK_SHARD_TAG) \ - && (cd /rocks/shard && luarocks make *rockspec) \ + && (cd /rocks/shard && tarantoolctl rocks make *rockspec) \ && : "http" \ - && luarocks install http $LUAROCK_HTTP_VERSION \ + && tarantoolctl rocks install http $LUAROCK_HTTP_VERSION \ && : "pg" \ - && luarocks install pg $LUAROCK_TARANTOOL_PG_VERSION \ + && tarantoolctl rocks install pg $LUAROCK_TARANTOOL_PG_VERSION \ && : "mysql" \ - && luarocks install mysql $LUAROCK_TARANTOOL_MYSQL_VERSION \ + && tarantoolctl rocks install mysql $LUAROCK_TARANTOOL_MYSQL_VERSION \ && : "memcached" \ - && luarocks install memcached $LUAROCK_MEMCACHED_VERSION \ + && tarantoolctl rocks install memcached $LUAROCK_MEMCACHED_VERSION \ && : "prometheus" \ - && luarocks install prometheus $LUAROCK_TARANTOOL_PROMETHEUS_VERSION \ + && tarantoolctl rocks install prometheus $LUAROCK_TARANTOOL_PROMETHEUS_VERSION \ && : "gis" \ - && luarocks install gis $LUAROCK_TARANTOOL_GIS_VERSION \ + && tarantoolctl rocks install gis $LUAROCK_TARANTOOL_GIS_VERSION \ && : "gperftools" \ - && luarocks install gperftools $LUAROCK_TARANTOOL_GPERFTOOLS_VERSION \ + && tarantoolctl rocks install gperftools $LUAROCK_TARANTOOL_GPERFTOOLS_VERSION \ && : "---------- remove build deps ----------" \ && rm -rf /rocks \ && yum -y remove \ diff --git a/files/luarocks-config_centos.lua b/files/luarocks-config_centos.lua deleted file mode 100644 index 4c48b74..0000000 --- a/files/luarocks-config_centos.lua +++ /dev/null @@ -1,11 +0,0 @@ -rocks_trees = { - { name = [[user]], root = home..[[/.luarocks]] }, - { name = [[system]], root = [[/usr/local]] } -} - -lib_modules_path="/lib64/lua/"..lua_version - -rocks_servers = { - [[http://rocks.tarantool.org/]], - [[http://luarocks.org/repositories/rocks]] -} From aa52a12795a169af824d7268bcf41dea28ffe312 Mon Sep 17 00:00:00 2001 From: "Alexander V. Tikhonov" Date: Thu, 16 Apr 2020 19:33:56 +0300 Subject: [PATCH 182/286] Postpone versions of libraries Libraries versions updated to: LUAROCK_CHECKS_VERSION=3.0.1 LUAROCK_AVRO_SCHEMA_VERSION=3.0.3 LUAROCK_HTTP_VERSION=1.1.0 LUAROCK_TARANTOOL_PG_VERSION=2.0.2 LUAROCK_TARANTOOL_PROMETHEUS_VERSION=1.0.4 --- dockerfiles/alpine_3.5_1.10.3 | 8 ++++---- dockerfiles/alpine_3.5_1.x | 8 ++++---- dockerfiles/alpine_3.5_2.2 | 8 ++++---- dockerfiles/alpine_3.5_2.x | 8 ++++---- dockerfiles/centos_7_1.x | 8 ++++---- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/dockerfiles/alpine_3.5_1.10.3 b/dockerfiles/alpine_3.5_1.10.3 index c5a36b4..87b2d2f 100644 --- a/dockerfiles/alpine_3.5_1.10.3 +++ b/dockerfiles/alpine_3.5_1.10.3 @@ -17,18 +17,18 @@ ENV TARANTOOL_VERSION=${TNT_VER} \ GPERFTOOLS_TAG=gperftools-2.5 \ LUAROCK_SHARD_REPO=https://github.com/tarantool/shard.git \ LUAROCK_SHARD_TAG=8f8c5a7 \ - LUAROCK_AVRO_SCHEMA_VERSION=2.0.1 \ + LUAROCK_AVRO_SCHEMA_VERSION=3.0.3 \ LUAROCK_EXPERATIOND_VERSION=1.0.1 \ LUAROCK_QUEUE_VERSION=1.0.6 \ LUAROCK_CONNPOOL_VERSION=1.1.1 \ - LUAROCK_HTTP_VERSION=1.0.1 \ + LUAROCK_HTTP_VERSION=1.1.0 \ LUAROCK_MEMCACHED_VERSION=1.0.0 \ - LUAROCK_TARANTOOL_PG_VERSION=2.0.1 \ + LUAROCK_TARANTOOL_PG_VERSION=2.0.2 \ LUAROCK_TARANTOOL_MYSQL_VERSION=2.0.1 \ LUAROCK_TARANTOOL_CURL_VERSION=2.3.1 \ LUAROCK_TARANTOOL_MQTT_VERSION=1.2.1 \ LUAROCK_TARANTOOL_GIS_VERSION=1.0.0 \ - LUAROCK_TARANTOOL_PROMETHEUS_VERSION=1.0.0 \ + LUAROCK_TARANTOOL_PROMETHEUS_VERSION=1.0.4 \ LUAROCK_TARANTOOL_GPERFTOOLS_VERSION=1.0.1 COPY files/gperftools_alpine.diff / diff --git a/dockerfiles/alpine_3.5_1.x b/dockerfiles/alpine_3.5_1.x index d9d093b..a46dd47 100644 --- a/dockerfiles/alpine_3.5_1.x +++ b/dockerfiles/alpine_3.5_1.x @@ -17,17 +17,17 @@ ENV TARANTOOL_VERSION=${TNT_VER} \ LUAROCKS_URL=https://github.com/tarantool/luarocks/archive/6e6fe62d9409fe2103c0fd091cccb3da0451faf5.tar.gz \ LUAROCK_SHARD_REPO=https://github.com/tarantool/shard.git \ LUAROCK_SHARD_TAG=8f8c5a7 \ - LUAROCK_AVRO_SCHEMA_VERSION=2.0.1 \ + LUAROCK_AVRO_SCHEMA_VERSION=3.0.3 \ LUAROCK_EXPERATIOND_VERSION=1.0.1 \ LUAROCK_QUEUE_VERSION=1.0.6 \ LUAROCK_CONNPOOL_VERSION=1.1.1 \ - LUAROCK_HTTP_VERSION=1.0.1 \ + LUAROCK_HTTP_VERSION=1.1.0 \ LUAROCK_MEMCACHED_VERSION=1.0.0 \ - LUAROCK_TARANTOOL_PG_VERSION=2.0.1 \ + LUAROCK_TARANTOOL_PG_VERSION=2.0.2 \ LUAROCK_TARANTOOL_MYSQL_VERSION=2.0.1 \ LUAROCK_TARANTOOL_MQTT_VERSION=1.2.1 \ LUAROCK_TARANTOOL_GIS_VERSION=1.0.0 \ - LUAROCK_TARANTOOL_PROMETHEUS_VERSION=1.0.0 \ + LUAROCK_TARANTOOL_PROMETHEUS_VERSION=1.0.4 \ LUAROCK_TARANTOOL_GPERFTOOLS_VERSION=1.0.1 COPY files/gperftools_alpine.diff / diff --git a/dockerfiles/alpine_3.5_2.2 b/dockerfiles/alpine_3.5_2.2 index 27f9a26..f616dfd 100644 --- a/dockerfiles/alpine_3.5_2.2 +++ b/dockerfiles/alpine_3.5_2.2 @@ -17,17 +17,17 @@ ENV TARANTOOL_VERSION=${TNT_VER} \ GPERFTOOLS_TAG=gperftools-2.5 \ LUAROCK_SHARD_REPO=https://github.com/tarantool/shard.git \ LUAROCK_SHARD_TAG=8f8c5a7 \ - LUAROCK_AVRO_SCHEMA_VERSION=2.0.1 \ + LUAROCK_AVRO_SCHEMA_VERSION=3.0.3 \ LUAROCK_EXPERATIOND_VERSION=1.0.1 \ LUAROCK_QUEUE_VERSION=1.0.6 \ LUAROCK_CONNPOOL_VERSION=1.1.1 \ - LUAROCK_HTTP_VERSION=1.0.1 \ + LUAROCK_HTTP_VERSION=1.1.0 \ LUAROCK_MEMCACHED_VERSION=1.0.0 \ - LUAROCK_TARANTOOL_PG_VERSION=2.0.1 \ + LUAROCK_TARANTOOL_PG_VERSION=2.0.2 \ LUAROCK_TARANTOOL_MYSQL_VERSION=2.0.1 \ LUAROCK_TARANTOOL_MQTT_VERSION=1.2.1 \ LUAROCK_TARANTOOL_GIS_VERSION=1.0.0 \ - LUAROCK_TARANTOOL_PROMETHEUS_VERSION=1.0.0 \ + LUAROCK_TARANTOOL_PROMETHEUS_VERSION=1.0.4 \ LUAROCK_TARANTOOL_GPERFTOOLS_VERSION=1.0.1 COPY files/gperftools_alpine.diff / diff --git a/dockerfiles/alpine_3.5_2.x b/dockerfiles/alpine_3.5_2.x index 3d3733e..1817716 100644 --- a/dockerfiles/alpine_3.5_2.x +++ b/dockerfiles/alpine_3.5_2.x @@ -14,17 +14,17 @@ ENV TARANTOOL_VERSION=${TNT_VER} \ GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ GPERFTOOLS_TAG=gperftools-2.5 \ LUAROCK_VSHARD_VERSION=0.1.14 \ - LUAROCK_AVRO_SCHEMA_VERSION=2.0.1 \ + LUAROCK_AVRO_SCHEMA_VERSION=3.0.3 \ LUAROCK_EXPERATIOND_VERSION=1.0.1 \ LUAROCK_QUEUE_VERSION=1.0.6 \ LUAROCK_CONNPOOL_VERSION=1.1.1 \ - LUAROCK_HTTP_VERSION=1.0.1 \ + LUAROCK_HTTP_VERSION=1.1.0 \ LUAROCK_MEMCACHED_VERSION=1.0.0 \ - LUAROCK_TARANTOOL_PG_VERSION=2.0.1 \ + LUAROCK_TARANTOOL_PG_VERSION=2.0.2 \ LUAROCK_TARANTOOL_MYSQL_VERSION=2.0.1 \ LUAROCK_TARANTOOL_MQTT_VERSION=1.2.1 \ LUAROCK_TARANTOOL_GIS_VERSION=1.0.0 \ - LUAROCK_TARANTOOL_PROMETHEUS_VERSION=1.0.0 \ + LUAROCK_TARANTOOL_PROMETHEUS_VERSION=1.0.4 \ LUAROCK_TARANTOOL_GPERFTOOLS_VERSION=1.0.1 COPY files/gperftools_alpine.diff / diff --git a/dockerfiles/centos_7_1.x b/dockerfiles/centos_7_1.x index a1b0801..4da3d4d 100644 --- a/dockerfiles/centos_7_1.x +++ b/dockerfiles/centos_7_1.x @@ -12,17 +12,17 @@ ENV TARANTOOL_VERSION=${TNT_VER} \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ LUAROCK_SHARD_REPO=https://github.com/tarantool/shard.git \ LUAROCK_SHARD_TAG=8f8c5a7 \ - LUAROCK_CHECKS_VERSION=1.0.0 \ - LUAROCK_AVRO_SCHEMA_VERSION=2.0.1 \ + LUAROCK_CHECKS_VERSION=3.0.1 \ + LUAROCK_AVRO_SCHEMA_VERSION=3.0.3 \ LUAROCK_EXPERATIOND_VERSION=1.0.1 \ LUAROCK_QUEUE_VERSION=1.0.6 \ LUAROCK_CONNPOOL_VERSION=1.1.1 \ LUAROCK_HTTP_VERSION=1.1.0 \ LUAROCK_MEMCACHED_VERSION=1.0.0 \ - LUAROCK_TARANTOOL_PG_VERSION=2.0.1 \ + LUAROCK_TARANTOOL_PG_VERSION=2.0.2 \ LUAROCK_TARANTOOL_MYSQL_VERSION=2.0.1 \ LUAROCK_TARANTOOL_GIS_VERSION=1.0.0 \ - LUAROCK_TARANTOOL_PROMETHEUS_VERSION=1.0.0 \ + LUAROCK_TARANTOOL_PROMETHEUS_VERSION=1.0.4 \ LUAROCK_TARANTOOL_GPERFTOOLS_VERSION=1.0.1 RUN yum -y install epel-release && \ From 45c476890767b9da05619658f4a9a61786e7b7b5 Mon Sep 17 00:00:00 2001 From: "Alexander V. Tikhonov" Date: Thu, 16 Apr 2020 19:38:16 +0300 Subject: [PATCH 183/286] Postpone ICU version Updated ICU version to icu4c-65_1. --- dockerfiles/centos_7_1.x | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dockerfiles/centos_7_1.x b/dockerfiles/centos_7_1.x index 4da3d4d..1a3096b 100644 --- a/dockerfiles/centos_7_1.x +++ b/dockerfiles/centos_7_1.x @@ -67,10 +67,10 @@ RUN set -x \ go \ wget \ && : "---------- libicu ----------" \ - && wget https://github.com/unicode-org/icu/releases/download/release-64-2/icu4c-64_2-src.tgz \ + && wget https://github.com/unicode-org/icu/releases/download/release-65-1/icu4c-65_1-src.tgz \ && mkdir -p /usr/src/icu \ - && tar -xzf icu4c-64_2-src.tgz -C /usr/src/icu --strip-components=1 \ - && rm icu4c-64_2-src.tgz \ + && tar -xzf icu4c-65_1-src.tgz -C /usr/src/icu --strip-components=1 \ + && rm icu4c-65_1-src.tgz \ && (cd /usr/src/icu/source; \ chmod +x runConfigureICU configure install-sh; \ ./runConfigureICU Linux/gcc; \ From 109625449fc62454be24ba4dd5422e1a3ee684c8 Mon Sep 17 00:00:00 2001 From: "Alexander V. Tikhonov" Date: Thu, 16 Apr 2020 19:40:34 +0300 Subject: [PATCH 184/286] Remove lua-devel package Removed lua-devel packages from installation, due to previously it was used for luarocks building which is depricated for now. --- dockerfiles/alpine_3.5_1.10.3 | 2 -- dockerfiles/alpine_3.5_2.2 | 2 -- dockerfiles/centos_7_1.x | 2 -- 3 files changed, 6 deletions(-) diff --git a/dockerfiles/alpine_3.5_1.10.3 b/dockerfiles/alpine_3.5_1.10.3 index 87b2d2f..6a8b259 100644 --- a/dockerfiles/alpine_3.5_1.10.3 +++ b/dockerfiles/alpine_3.5_1.10.3 @@ -60,7 +60,6 @@ RUN set -x \ lz4-dev \ binutils-dev \ ncurses-dev \ - lua-dev \ musl-dev \ make \ git \ @@ -147,7 +146,6 @@ RUN set -x \ gcc \ g++ \ postgresql-dev \ - lua-dev \ musl-dev \ cyrus-sasl-dev \ mosquitto-dev \ diff --git a/dockerfiles/alpine_3.5_2.2 b/dockerfiles/alpine_3.5_2.2 index f616dfd..7f52fc1 100644 --- a/dockerfiles/alpine_3.5_2.2 +++ b/dockerfiles/alpine_3.5_2.2 @@ -59,7 +59,6 @@ RUN set -x \ lz4-dev \ binutils-dev \ ncurses-dev \ - lua-dev \ musl-dev \ make \ git \ @@ -147,7 +146,6 @@ RUN set -x \ gcc \ g++ \ postgresql-dev \ - lua-dev \ musl-dev \ cyrus-sasl-dev \ mosquitto-dev \ diff --git a/dockerfiles/centos_7_1.x b/dockerfiles/centos_7_1.x index 1a3096b..9491706 100644 --- a/dockerfiles/centos_7_1.x +++ b/dockerfiles/centos_7_1.x @@ -130,7 +130,6 @@ RUN set -x \ lz4-devel \ binutils-devel \ ncurses-devel \ - lua-devel \ make \ git \ libunwind-devel \ @@ -163,7 +162,6 @@ RUN set -x \ make \ gcc-c++ \ postgresql96-devel \ - lua-devel \ cyrus-sasl-devel \ libev-devel \ wget \ From 70bf12a84941aa8dc6a5a6d299a6bf71d382b34d Mon Sep 17 00:00:00 2001 From: "Alexander V. Tikhonov" Date: Thu, 16 Apr 2020 19:43:06 +0300 Subject: [PATCH 185/286] Remove msgpuck library Remove msgpuck library from installation. Tarantool already has it in third party and statically links, so no need to save its additional building. --- dockerfiles/alpine_3.5_1.10.3 | 9 --------- dockerfiles/alpine_3.5_1.x | 9 --------- dockerfiles/alpine_3.5_2.2 | 9 --------- dockerfiles/centos_7_1.x | 9 --------- 4 files changed, 36 deletions(-) diff --git a/dockerfiles/alpine_3.5_1.10.3 b/dockerfiles/alpine_3.5_1.10.3 index 6a8b259..03047b4 100644 --- a/dockerfiles/alpine_3.5_1.10.3 +++ b/dockerfiles/alpine_3.5_1.10.3 @@ -116,15 +116,6 @@ RUN set -x \ && make -C /usr/src/tarantool/src/lib/small \ && make -C /usr/src/tarantool/src/lib/small install \ && make -C /usr/src/tarantool/src/lib/small clean \ - && : "---------- msgpuck ----------" \ - && (cd /usr/src/tarantool/src/lib/msgpuck; \ - cmake -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - .) \ - && make -C /usr/src/tarantool/src/lib/msgpuck \ - && make -C /usr/src/tarantool/src/lib/msgpuck install \ - && make -C /usr/src/tarantool/src/lib/msgpuck clean \ && rm -rf /usr/src/tarantool \ && rm -rf /usr/src/gperftools \ && rm -rf /usr/src/go \ diff --git a/dockerfiles/alpine_3.5_1.x b/dockerfiles/alpine_3.5_1.x index a46dd47..1ba54a6 100644 --- a/dockerfiles/alpine_3.5_1.x +++ b/dockerfiles/alpine_3.5_1.x @@ -110,15 +110,6 @@ RUN set -x \ && make -C /usr/src/tarantool/src/lib/small \ && make -C /usr/src/tarantool/src/lib/small install \ && make -C /usr/src/tarantool/src/lib/small clean \ - && : "---------- msgpuck ----------" \ - && (cd /usr/src/tarantool/src/lib/msgpuck; \ - cmake -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - .) \ - && make -C /usr/src/tarantool/src/lib/msgpuck \ - && make -C /usr/src/tarantool/src/lib/msgpuck install \ - && make -C /usr/src/tarantool/src/lib/msgpuck clean \ && : "---------- luarocks ----------" \ && wget -O luarocks.tar.gz "$LUAROCKS_URL" \ && mkdir -p /usr/src/luarocks \ diff --git a/dockerfiles/alpine_3.5_2.2 b/dockerfiles/alpine_3.5_2.2 index 7f52fc1..0e59836 100644 --- a/dockerfiles/alpine_3.5_2.2 +++ b/dockerfiles/alpine_3.5_2.2 @@ -116,15 +116,6 @@ RUN set -x \ && make -C /usr/src/tarantool/src/lib/small \ && make -C /usr/src/tarantool/src/lib/small install \ && make -C /usr/src/tarantool/src/lib/small clean \ - && : "---------- msgpuck ----------" \ - && (cd /usr/src/tarantool/src/lib/msgpuck; \ - cmake -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - .) \ - && make -C /usr/src/tarantool/src/lib/msgpuck \ - && make -C /usr/src/tarantool/src/lib/msgpuck install \ - && make -C /usr/src/tarantool/src/lib/msgpuck clean \ && rm -rf /usr/src/tarantool \ && rm -rf /usr/src/gperftools \ && rm -rf /usr/src/go \ diff --git a/dockerfiles/centos_7_1.x b/dockerfiles/centos_7_1.x index 9491706..34e75ca 100644 --- a/dockerfiles/centos_7_1.x +++ b/dockerfiles/centos_7_1.x @@ -105,15 +105,6 @@ RUN set -x \ && make -C /usr/src/tarantool/src/lib/small \ && make -C /usr/src/tarantool/src/lib/small install \ && make -C /usr/src/tarantool/src/lib/small clean \ - && : "---------- msgpuck ----------" \ - && (cd /usr/src/tarantool/src/lib/msgpuck; \ - cmake -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - .) \ - && make -C /usr/src/tarantool/src/lib/msgpuck \ - && make -C /usr/src/tarantool/src/lib/msgpuck install \ - && make -C /usr/src/tarantool/src/lib/msgpuck clean \ && rm -rf /usr/src/tarantool \ && rm -rf /usr/src/go \ && rm -rf /usr/src/icu \ From a0c441642e2fff3eecb1fd6dadaff3aef0591067 Mon Sep 17 00:00:00 2001 From: "Alexander V. Tikhonov" Date: Thu, 16 Apr 2020 19:45:23 +0300 Subject: [PATCH 186/286] Remove small library Remove small library from installation. Tarantool already has it in third party and statically links, so no need to save its additional building. --- dockerfiles/alpine_3.5_1.10.3 | 9 --------- dockerfiles/alpine_3.5_1.x | 9 --------- dockerfiles/alpine_3.5_2.2 | 9 --------- dockerfiles/centos_7_1.x | 9 --------- 4 files changed, 36 deletions(-) diff --git a/dockerfiles/alpine_3.5_1.10.3 b/dockerfiles/alpine_3.5_1.10.3 index 03047b4..f6e176e 100644 --- a/dockerfiles/alpine_3.5_1.10.3 +++ b/dockerfiles/alpine_3.5_1.10.3 @@ -107,15 +107,6 @@ RUN set -x \ && make -C /usr/src/tarantool -j\ && make -C /usr/src/tarantool install \ && make -C /usr/src/tarantool clean \ - && : "---------- small ----------" \ - && (cd /usr/src/tarantool/src/lib/small; \ - cmake -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - .) \ - && make -C /usr/src/tarantool/src/lib/small \ - && make -C /usr/src/tarantool/src/lib/small install \ - && make -C /usr/src/tarantool/src/lib/small clean \ && rm -rf /usr/src/tarantool \ && rm -rf /usr/src/gperftools \ && rm -rf /usr/src/go \ diff --git a/dockerfiles/alpine_3.5_1.x b/dockerfiles/alpine_3.5_1.x index 1ba54a6..e04ef7a 100644 --- a/dockerfiles/alpine_3.5_1.x +++ b/dockerfiles/alpine_3.5_1.x @@ -101,15 +101,6 @@ RUN set -x \ && make -C /usr/src/tarantool -j\ && make -C /usr/src/tarantool install \ && make -C /usr/src/tarantool clean \ - && : "---------- small ----------" \ - && (cd /usr/src/tarantool/src/lib/small; \ - cmake -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - .) \ - && make -C /usr/src/tarantool/src/lib/small \ - && make -C /usr/src/tarantool/src/lib/small install \ - && make -C /usr/src/tarantool/src/lib/small clean \ && : "---------- luarocks ----------" \ && wget -O luarocks.tar.gz "$LUAROCKS_URL" \ && mkdir -p /usr/src/luarocks \ diff --git a/dockerfiles/alpine_3.5_2.2 b/dockerfiles/alpine_3.5_2.2 index 0e59836..fa21eb2 100644 --- a/dockerfiles/alpine_3.5_2.2 +++ b/dockerfiles/alpine_3.5_2.2 @@ -107,15 +107,6 @@ RUN set -x \ && make -C /usr/src/tarantool -j\ && make -C /usr/src/tarantool install \ && make -C /usr/src/tarantool clean \ - && : "---------- small ----------" \ - && (cd /usr/src/tarantool/src/lib/small; \ - cmake -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - .) \ - && make -C /usr/src/tarantool/src/lib/small \ - && make -C /usr/src/tarantool/src/lib/small install \ - && make -C /usr/src/tarantool/src/lib/small clean \ && rm -rf /usr/src/tarantool \ && rm -rf /usr/src/gperftools \ && rm -rf /usr/src/go \ diff --git a/dockerfiles/centos_7_1.x b/dockerfiles/centos_7_1.x index 34e75ca..82866f5 100644 --- a/dockerfiles/centos_7_1.x +++ b/dockerfiles/centos_7_1.x @@ -96,15 +96,6 @@ RUN set -x \ && make -C /usr/src/tarantool -j\ && make -C /usr/src/tarantool install \ && make -C /usr/src/tarantool clean \ - && : "---------- small ----------" \ - && (cd /usr/src/tarantool/src/lib/small; \ - cmake -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - .) \ - && make -C /usr/src/tarantool/src/lib/small \ - && make -C /usr/src/tarantool/src/lib/small install \ - && make -C /usr/src/tarantool/src/lib/small clean \ && rm -rf /usr/src/tarantool \ && rm -rf /usr/src/go \ && rm -rf /usr/src/icu \ From 6d9dd302f7fd775115e67588faab03aa200c055f Mon Sep 17 00:00:00 2001 From: "Alexander V. Tikhonov" Date: Mon, 20 Apr 2020 09:49:35 +0300 Subject: [PATCH 187/286] Speed up the build Made build in parallel by make '-j' option. --- dockerfiles/alpine_3.5_1.10.3 | 6 +++--- dockerfiles/alpine_3.5_1.x | 8 ++++---- dockerfiles/alpine_3.5_2.2 | 6 +++--- dockerfiles/alpine_3.5_2.x | 6 +++--- dockerfiles/centos_7_1.x | 2 +- dockerfiles/centos_7_2.x | 2 +- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/dockerfiles/alpine_3.5_1.10.3 b/dockerfiles/alpine_3.5_1.10.3 index f6e176e..23fd933 100644 --- a/dockerfiles/alpine_3.5_1.10.3 +++ b/dockerfiles/alpine_3.5_1.10.3 @@ -89,7 +89,7 @@ RUN set -x \ rm /gperftools_alpine.diff; \ ./autogen.sh; \ ./configure; \ - make; \ + make -j ; \ cp .libs/libprofiler.so* /usr/local/lib;) \ && (GOPATH=/usr/src/go go get github.com/google/pprof; \ cp /usr/src/go/bin/pprof /usr/local/bin) \ @@ -139,7 +139,7 @@ RUN set -x \ && tar -xzf proj.tar.gz -C /usr/src/proj --strip-components=1 \ && (cd /usr/src/proj; \ ./configure; \ - make; \ + make -j ; \ make install) \ && rm -r /usr/src/proj \ && rm -rf /usr/src/proj \ @@ -149,7 +149,7 @@ RUN set -x \ && tar -xjf geos.tar.bz2 -C /usr/src/geos --strip-components=1 \ && (cd /usr/src/geos; \ ./configure; \ - make; \ + make -j ; \ make install) \ && rm -r /usr/src/geos \ && rm -rf /usr/src/geos \ diff --git a/dockerfiles/alpine_3.5_1.x b/dockerfiles/alpine_3.5_1.x index e04ef7a..6730b40 100644 --- a/dockerfiles/alpine_3.5_1.x +++ b/dockerfiles/alpine_3.5_1.x @@ -83,7 +83,7 @@ RUN set -x \ rm /gperftools_alpine.diff; \ ./autogen.sh; \ ./configure; \ - make; \ + make -j ; \ cp .libs/libprofiler.so* /usr/local/lib;) \ && (GOPATH=/usr/src/go go get github.com/google/pprof; \ cp /usr/src/go/bin/pprof /usr/local/bin) \ @@ -107,7 +107,7 @@ RUN set -x \ && tar -xzf luarocks.tar.gz -C /usr/src/luarocks --strip-components=1 \ && (cd /usr/src/luarocks; \ ./configure; \ - make build; \ + make -j build; \ make install) \ && rm -r /usr/src/luarocks \ && rm -rf /usr/src/tarantool \ @@ -146,7 +146,7 @@ RUN set -x \ && tar -xzf proj.tar.gz -C /usr/src/proj --strip-components=1 \ && (cd /usr/src/proj; \ ./configure; \ - make; \ + make -j ; \ make install) \ && rm -r /usr/src/proj \ && rm -rf /usr/src/proj \ @@ -156,7 +156,7 @@ RUN set -x \ && tar -xjf geos.tar.bz2 -C /usr/src/geos --strip-components=1 \ && (cd /usr/src/geos; \ ./configure; \ - make; \ + make -j ; \ make install) \ && rm -r /usr/src/geos \ && rm -rf /usr/src/geos \ diff --git a/dockerfiles/alpine_3.5_2.2 b/dockerfiles/alpine_3.5_2.2 index fa21eb2..0b33f9a 100644 --- a/dockerfiles/alpine_3.5_2.2 +++ b/dockerfiles/alpine_3.5_2.2 @@ -89,7 +89,7 @@ RUN set -x \ rm /gperftools_alpine.diff; \ ./autogen.sh; \ ./configure; \ - make; \ + make -j ; \ cp .libs/libprofiler.so* /usr/local/lib;) \ && (GOPATH=/usr/src/go go get github.com/google/pprof; \ cp /usr/src/go/bin/pprof /usr/local/bin) \ @@ -141,7 +141,7 @@ RUN set -x \ && tar -xzf proj.tar.gz -C /usr/src/proj --strip-components=1 \ && (cd /usr/src/proj; \ ./configure; \ - make; \ + make -j ; \ make install) \ && rm -r /usr/src/proj \ && rm -rf /usr/src/proj \ @@ -151,7 +151,7 @@ RUN set -x \ && tar -xjf geos.tar.bz2 -C /usr/src/geos --strip-components=1 \ && (cd /usr/src/geos; \ ./configure; \ - make; \ + make -j ; \ make install) \ && rm -r /usr/src/geos \ && rm -rf /usr/src/geos \ diff --git a/dockerfiles/alpine_3.5_2.x b/dockerfiles/alpine_3.5_2.x index 1817716..c06e26a 100644 --- a/dockerfiles/alpine_3.5_2.x +++ b/dockerfiles/alpine_3.5_2.x @@ -78,7 +78,7 @@ RUN set -x \ rm /gperftools_alpine.diff; \ ./autogen.sh; \ ./configure; \ - make; \ + make -j ; \ cp .libs/libprofiler.so* /usr/local/lib;) \ && (GOPATH=/usr/src/go go get github.com/google/pprof; \ cp /usr/src/go/bin/pprof /usr/local/bin) \ @@ -130,7 +130,7 @@ RUN set -x \ && tar -xzf proj.tar.gz -C /usr/src/proj --strip-components=1 \ && (cd /usr/src/proj; \ ./configure; \ - make; \ + make -j ; \ make install) \ && rm -r /usr/src/proj \ && rm -rf /usr/src/proj \ @@ -141,7 +141,7 @@ RUN set -x \ && tar -xjf geos.tar.bz2 -C /usr/src/geos --strip-components=1 \ && (cd /usr/src/geos; \ ./configure; \ - make; \ + make -j ; \ make install) \ && rm -r /usr/src/geos \ && rm -rf /usr/src/geos \ diff --git a/dockerfiles/centos_7_1.x b/dockerfiles/centos_7_1.x index 82866f5..01b511c 100644 --- a/dockerfiles/centos_7_1.x +++ b/dockerfiles/centos_7_1.x @@ -74,7 +74,7 @@ RUN set -x \ && (cd /usr/src/icu/source; \ chmod +x runConfigureICU configure install-sh; \ ./runConfigureICU Linux/gcc; \ - make; \ + make -j ; \ make install; \ echo '/usr/local/lib' > /etc/ld.so.conf.d/local.conf; \ ldconfig ) \ diff --git a/dockerfiles/centos_7_2.x b/dockerfiles/centos_7_2.x index 025c099..2d3d241 100644 --- a/dockerfiles/centos_7_2.x +++ b/dockerfiles/centos_7_2.x @@ -71,7 +71,7 @@ RUN set -x \ && (cd /usr/src/icu/source; \ chmod +x runConfigureICU configure install-sh; \ ./runConfigureICU Linux/gcc; \ - make; \ + make -j ; \ make install; \ echo '/usr/local/lib' > /etc/ld.so.conf.d/local.conf; \ ldconfig ) \ From 507c6263af607f801430d43ae4600b0123608e70 Mon Sep 17 00:00:00 2001 From: "Alexander V. Tikhonov" Date: Mon, 20 Apr 2020 09:54:38 +0300 Subject: [PATCH 188/286] Cleanup the files Removed temporary used tarbals --- dockerfiles/alpine_3.5_1.10.3 | 4 +++- dockerfiles/alpine_3.5_1.x | 4 +++- dockerfiles/alpine_3.5_2.2 | 2 ++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/dockerfiles/alpine_3.5_1.10.3 b/dockerfiles/alpine_3.5_1.10.3 index 23fd933..b534aa2 100644 --- a/dockerfiles/alpine_3.5_1.10.3 +++ b/dockerfiles/alpine_3.5_1.10.3 @@ -5,7 +5,7 @@ RUN addgroup -S tarantool \ && adduser -S -G tarantool tarantool \ && apk add --no-cache 'su-exec>=0.2' -# An ARG instruction goes out of scope at the end of the build +# An ARG instruction goes out of scope at the end of the build # stage where it was defined. To use an arg in multiple stages, # each stage must include the ARG instruction ARG TNT_VER @@ -143,6 +143,7 @@ RUN set -x \ make install) \ && rm -r /usr/src/proj \ && rm -rf /usr/src/proj \ + && rm -rf /proj.tar.gz \ && : "---------- geos (for gis module) ----------" \ && wget -O geos.tar.bz2 http://download.osgeo.org/geos/geos-3.6.0.tar.bz2 \ && mkdir -p /usr/src/geos \ @@ -153,6 +154,7 @@ RUN set -x \ make install) \ && rm -r /usr/src/geos \ && rm -rf /usr/src/geos \ + && rm -rf /geos.tar.bz2 \ && : "---------- luarocks ----------" \ && cd / \ && : "lua-term" \ diff --git a/dockerfiles/alpine_3.5_1.x b/dockerfiles/alpine_3.5_1.x index 6730b40..f7ef159 100644 --- a/dockerfiles/alpine_3.5_1.x +++ b/dockerfiles/alpine_3.5_1.x @@ -5,7 +5,7 @@ RUN addgroup -S tarantool \ && adduser -S -G tarantool tarantool \ && apk add --no-cache 'su-exec>=0.2' -# An ARG instruction goes out of scope at the end of the build +# An ARG instruction goes out of scope at the end of the build # stage where it was defined. To use an arg in multiple stages, # each stage must include the ARG instruction ARG TNT_VER @@ -150,6 +150,7 @@ RUN set -x \ make install) \ && rm -r /usr/src/proj \ && rm -rf /usr/src/proj \ + && rm -rf /proj.tar.gz \ && : "---------- geos (for gis module) ----------" \ && wget -O geos.tar.bz2 http://download.osgeo.org/geos/geos-3.6.0.tar.bz2 \ && mkdir -p /usr/src/geos \ @@ -160,6 +161,7 @@ RUN set -x \ make install) \ && rm -r /usr/src/geos \ && rm -rf /usr/src/geos \ + && rm -rf /geos.tar.bz2 \ && : "---------- luarocks ----------" \ && luarocks install lua-term \ && luarocks install ldoc \ diff --git a/dockerfiles/alpine_3.5_2.2 b/dockerfiles/alpine_3.5_2.2 index 0b33f9a..1a56a29 100644 --- a/dockerfiles/alpine_3.5_2.2 +++ b/dockerfiles/alpine_3.5_2.2 @@ -145,6 +145,7 @@ RUN set -x \ make install) \ && rm -r /usr/src/proj \ && rm -rf /usr/src/proj \ + && rm -rf /proj.tar.gz \ && : "---------- geos (for gis module) ----------" \ && wget -O geos.tar.bz2 http://download.osgeo.org/geos/geos-3.6.0.tar.bz2 \ && mkdir -p /usr/src/geos \ @@ -155,6 +156,7 @@ RUN set -x \ make install) \ && rm -r /usr/src/geos \ && rm -rf /usr/src/geos \ + && rm -rf /geos.tar.bz2 \ && : "---------- luarocks ----------" \ && cd / \ && : "ldoc" \ From da754c2b9fb43339b944c40ce7d033ac5d4509aa Mon Sep 17 00:00:00 2001 From: "Alexander V. Tikhonov" Date: Mon, 20 Apr 2020 23:32:10 +0300 Subject: [PATCH 189/286] Create new versions and roll the old Rolled ahead old branches versions: alpine_3.5_1.x alpine_3.5_2.1 alpine_3.5_2.2 alpine_3.5_2.3 alpine_3.5_2.x Created new versions: alpine_3.5_1.10.1 alpine_3.5_1.10.5 alpine_3.5_1.10.6 alpine_3.5_2.1.0 alpine_3.5_2.2.3 alpine_3.5_2.3.0 alpine_3.5_2.3.2 alpine_3.5_2.4 alpine_3.5_2.4.0 alpine_3.5_2.4.1 alpine_3.5_2.5.0 Added information in README.md file how to push images. --- .gitlab-ci.yml | 112 +++++++++++++++++++++++++++++++++++++ README.md | 51 +++++++++++++++-- dockerfiles/alpine_3.5_2.2 | 2 + versions/alpine_3.5_1.10.1 | 1 + versions/alpine_3.5_1.10.5 | 1 + versions/alpine_3.5_1.10.6 | 1 + versions/alpine_3.5_1.x | 2 +- versions/alpine_3.5_2.1 | 2 +- versions/alpine_3.5_2.1.0 | 1 + versions/alpine_3.5_2.2 | 2 +- versions/alpine_3.5_2.2.3 | 1 + versions/alpine_3.5_2.3 | 2 +- versions/alpine_3.5_2.3.0 | 1 + versions/alpine_3.5_2.3.2 | 1 + versions/alpine_3.5_2.4 | 1 + versions/alpine_3.5_2.4.0 | 1 + versions/alpine_3.5_2.4.1 | 1 + versions/alpine_3.5_2.5.0 | 1 + versions/alpine_3.5_2.x | 2 +- versions/centos_7_1.x | 2 +- versions/centos_7_2.x | 2 +- 21 files changed, 177 insertions(+), 13 deletions(-) create mode 100644 versions/alpine_3.5_1.10.1 create mode 100644 versions/alpine_3.5_1.10.5 create mode 100644 versions/alpine_3.5_1.10.6 create mode 100644 versions/alpine_3.5_2.1.0 create mode 100644 versions/alpine_3.5_2.2.3 create mode 100644 versions/alpine_3.5_2.3.0 create mode 100644 versions/alpine_3.5_2.3.2 create mode 100644 versions/alpine_3.5_2.4 create mode 100644 versions/alpine_3.5_2.4.0 create mode 100644 versions/alpine_3.5_2.4.1 create mode 100644 versions/alpine_3.5_2.5.0 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c180174..81d7127 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -41,6 +41,16 @@ before_script: DVER: '1.10.3' PORT: 5101 +'alpine 3.5 1.10.1': + <<: *build_definition + <<: *force_build_definition + variables: + OS: 'alpine_3.5' + TAG: '1.10.1' + VER: '1.10.1' + DVER: '1.10.3' + PORT: 5101 + 'alpine 3.5 1.10.2': <<: *build_definition <<: *force_build_definition @@ -71,6 +81,26 @@ before_script: DVER: '1.x' PORT: 5104 +'alpine 3.5 1.10.5': + <<: *build_definition + <<: *force_build_definition + variables: + OS: 'alpine_3.5' + TAG: '1.10.5' + VER: '1.10.5' + DVER: '1.x' + PORT: 5105 + +'alpine 3.5 1.10.6': + <<: *build_definition + <<: *force_build_definition + variables: + OS: 'alpine_3.5' + TAG: '1.10.6' + VER: '1.10.6' + DVER: '1.x' + PORT: 5106 + 'alpine 3.5 1.x': <<: *build_definition <<: *force_build_definition @@ -83,6 +113,16 @@ before_script: # Tarantool branch 2.1 +'alpine 3.5 2.1.0': + <<: *build_definition + <<: *force_build_definition + variables: + OS: 'alpine_3.5' + TAG: '2.1.0' + VER: '2.1.0' + DVER: '2.2' + PORT: 5211 + 'alpine 3.5 2.1.1': <<: *build_definition <<: *force_build_definition @@ -155,6 +195,16 @@ before_script: DVER: '2.x' PORT: 5222 +'alpine 3.5 2.2.3': + <<: *build_definition + <<: *force_build_definition + variables: + OS: 'alpine_3.5' + TAG: '2.2.3' + VER: '2.2.3' + DVER: '2.x' + PORT: 5223 + 'alpine 3.5 2.2': <<: *build_definition <<: *force_build_definition @@ -167,6 +217,16 @@ before_script: # Tarantool branch 2.3 +'alpine 3.5 2.3.0': + <<: *build_definition + <<: *force_build_definition + variables: + OS: 'alpine_3.5' + TAG: '2.3.0' + VER: '2.3.0' + DVER: '2.2' + PORT: 5231 + 'alpine 3.5 2.3.1': <<: *build_definition <<: *force_build_definition @@ -177,6 +237,16 @@ before_script: DVER: '2.x' PORT: 5231 +'alpine 3.5 2.3.2': + <<: *build_definition + <<: *force_build_definition + variables: + OS: 'alpine_3.5' + TAG: '2.3.2' + VER: '2.3.2' + DVER: '2.x' + PORT: 5231 + 'alpine 3.5 2.3': <<: *build_definition <<: *force_build_definition @@ -187,8 +257,50 @@ before_script: DVER: '2.x' PORT: 5230 +# Tarantool branch 2.4 + +'alpine 3.5 2.4.0': + <<: *build_definition + <<: *force_build_definition + variables: + OS: 'alpine_3.5' + TAG: '2.4.0' + VER: '2.4.0' + DVER: '2.x' + PORT: 5241 + +'alpine 3.5 2.4.1': + <<: *build_definition + <<: *force_build_definition + variables: + OS: 'alpine_3.5' + TAG: '2.4.1' + VER: '2.4.1' + DVER: '2.x' + PORT: 5241 + +'alpine 3.5 2.4': + <<: *build_definition + <<: *force_build_definition + variables: + OS: 'alpine_3.5' + TAG: '2.4' + VER: '2.4' + DVER: '2.x' + PORT: 5240 + # Tarantool branch master +'alpine 3.5 2.5.0': + <<: *build_definition + <<: *force_build_definition + variables: + OS: 'alpine_3.5' + TAG: '2.5.0' + VER: '2.5.0' + DVER: '2.x' + PORT: 5251 + 'alpine 3.5 2.x': <<: *build_definition <<: *force_build_definition diff --git a/README.md b/README.md index d2837e9..ae88258 100644 --- a/README.md +++ b/README.md @@ -314,16 +314,28 @@ Fixed versions: | Docker tag | Dockerfile | | ---------- | ---------------------------- | | 1.10.0 | dockerfile/alpine_3.5_1.10.3 | +| 1.10.1 | dockerfile/alpine_3.5_1.10.3 | | 1.10.2 | dockerfile/alpine_3.5_1.10.3 | | 1.10.3 | dockerfile/alpine_3.5_1.10.3 | -| 1.10.4 | dockerfile/alpine_3.5_1.10.4 | -| 2.1.1 | dockerfile/alpine_3.5_2.2.1 | -| 2.1.2 | dockerfile/alpine_3.5_2.2.1 | +| 1.10.4 | dockerfile/alpine_3.5_1.x | +| 1.10.5 | dockerfile/alpine_3.5_1.x | +| 1.10.6 | dockerfile/alpine_3.5_1.x | +| 2.1.0 | dockerfile/alpine_3.5_2.2 | +| 2.1.1 | dockerfile/alpine_3.5_2.2 | +| 2.1.2 | dockerfile/alpine_3.5_2.2 | | 2.1.3 | dockerfile/alpine_3.5_1.x | -| 2.2.0 | dockerfile/alpine_3.5_2.2.1 | -| 2.2.1 | dockerfile/alpine_3.5_2.2.1 | +| 2.1.3 | dockerfile/alpine_3.5_1.x | +| 2.2.0 | dockerfile/alpine_3.5_2.2 | +| 2.2.1 | dockerfile/alpine_3.5_2.2 | +| 2.2.2 | dockerfile/alpine_3.5_2.x | +| 2.2.3 | dockerfile/alpine_3.5_2.x | | 2.2.2 | dockerfile/alpine_3.5_2.x | +| 2.3.0 | dockerfile/alpine_3.5_2.2 | | 2.3.1 | dockerfile/alpine_3.5_2.x | +| 2.3.2 | dockerfile/alpine_3.5_2.x | +| 2.4.0 | dockerfile/alpine_3.5_2.x | +| 2.4.1 | dockerfile/alpine_3.5_2.x | +| 2.5.0 | dockerfile/alpine_3.5_2.x | Rolling versions: @@ -331,8 +343,9 @@ Rolling versions: | ---------- | ------------------------- | | 1 | dockerfile/alpine_3.5_1.x | | 2.1 | dockerfile/alpine_3.5_2.2 | -| 2.2 | dockerfile/alpine_3.5_2.2 | +| 2.2 | dockerfile/alpine_3.5_2.x | | 2.3 | dockerfile/alpine_3.5_2.x | +| 2.4 | dockerfile/alpine_3.5_2.x | | 2/latest | dockerfile/alpine_3.5_2.x | Special builds: @@ -357,3 +370,29 @@ versions x and x.y in master, create fixed version x.y.z. A maintainer is responsible to check updated images. [1]: https://tarantool.io/en/doc/1.9/dev_guide/release_management/#how-to-make-a-minor-release + +## How to push images (for maintainers) +Gitlab-CI jobs after the images builds push it to its local +images repository in the format: + registry.gitlab.com/tarantool/docker: +To push collected images into the 'docker.io' repository with +the following format: + docker.io/tarantool/tarantool: +the following scripts can be used: + +```bash +echo List of available tags: \ + `grep " VER: " .gitlab-ci.yml | awk -F"'" '{print $2}'` +``` + +```bash +for tag in ; do \ + echo "============= $tag ==============" ; \ + docker pull registry.gitlab.com/tarantool/docker:$tag && \ + docker tag registry.gitlab.com/tarantool/docker:$tag \ + tarantool/tarantool:$tag && \ + docker push tarantool/tarantool:$tag ; \ + echo "$tag push resulted with: $?" ; \ +done +``` + diff --git a/dockerfiles/alpine_3.5_2.2 b/dockerfiles/alpine_3.5_2.2 index 1a56a29..12cfa30 100644 --- a/dockerfiles/alpine_3.5_2.2 +++ b/dockerfiles/alpine_3.5_2.2 @@ -45,6 +45,7 @@ RUN set -x \ lua \ tar \ zip \ + zlib \ libunwind \ icu \ ca-certificates \ @@ -57,6 +58,7 @@ RUN set -x \ libressl-dev \ yaml-dev \ lz4-dev \ + zlib-dev \ binutils-dev \ ncurses-dev \ musl-dev \ diff --git a/versions/alpine_3.5_1.10.1 b/versions/alpine_3.5_1.10.1 new file mode 100644 index 0000000..d611287 --- /dev/null +++ b/versions/alpine_3.5_1.10.1 @@ -0,0 +1 @@ +1.10.1-0-g8d7617d4c diff --git a/versions/alpine_3.5_1.10.5 b/versions/alpine_3.5_1.10.5 new file mode 100644 index 0000000..a502d5e --- /dev/null +++ b/versions/alpine_3.5_1.10.5 @@ -0,0 +1 @@ +1.10.5-0-g83a2ae919 diff --git a/versions/alpine_3.5_1.10.6 b/versions/alpine_3.5_1.10.6 new file mode 100644 index 0000000..642ac30 --- /dev/null +++ b/versions/alpine_3.5_1.10.6 @@ -0,0 +1 @@ +1.10.6-0-g5372cd2fa diff --git a/versions/alpine_3.5_1.x b/versions/alpine_3.5_1.x index e57a593..6931d63 100644 --- a/versions/alpine_3.5_1.x +++ b/versions/alpine_3.5_1.x @@ -1 +1 @@ -1.10.3-136-gc3c087d5c +1.10.6-1-g47c009ae7 diff --git a/versions/alpine_3.5_2.1 b/versions/alpine_3.5_2.1 index d97a56a..3c5e3dd 100644 --- a/versions/alpine_3.5_2.1 +++ b/versions/alpine_3.5_2.1 @@ -1 +1 @@ -2.1.2-143-g3edaaed6c +2.1.3-9-g85ad8508e diff --git a/versions/alpine_3.5_2.1.0 b/versions/alpine_3.5_2.1.0 new file mode 100644 index 0000000..7cc34be --- /dev/null +++ b/versions/alpine_3.5_2.1.0 @@ -0,0 +1 @@ +2.1.0-0-g2c6929204 diff --git a/versions/alpine_3.5_2.2 b/versions/alpine_3.5_2.2 index 243a7ec..96c38a4 100644 --- a/versions/alpine_3.5_2.2 +++ b/versions/alpine_3.5_2.2 @@ -1 +1 @@ -2.2.2-4-g4f8ac5999 +2.2.3-1-g98ecc909a diff --git a/versions/alpine_3.5_2.2.3 b/versions/alpine_3.5_2.2.3 new file mode 100644 index 0000000..cd11112 --- /dev/null +++ b/versions/alpine_3.5_2.2.3 @@ -0,0 +1 @@ +2.2.3-0-gb9c4c7c04 diff --git a/versions/alpine_3.5_2.3 b/versions/alpine_3.5_2.3 index 0d9a82f..715c20d 100644 --- a/versions/alpine_3.5_2.3 +++ b/versions/alpine_3.5_2.3 @@ -1 +1 @@ -2.3.1-2-g92750c828 +2.3.2-1-g9be641bcc diff --git a/versions/alpine_3.5_2.3.0 b/versions/alpine_3.5_2.3.0 new file mode 100644 index 0000000..4d06f89 --- /dev/null +++ b/versions/alpine_3.5_2.3.0 @@ -0,0 +1 @@ +2.3.0-0-gce0f2ef8b diff --git a/versions/alpine_3.5_2.3.2 b/versions/alpine_3.5_2.3.2 new file mode 100644 index 0000000..c66dd25 --- /dev/null +++ b/versions/alpine_3.5_2.3.2 @@ -0,0 +1 @@ +2.3.2-0-gcb25c5473 diff --git a/versions/alpine_3.5_2.4 b/versions/alpine_3.5_2.4 new file mode 100644 index 0000000..faab2f7 --- /dev/null +++ b/versions/alpine_3.5_2.4 @@ -0,0 +1 @@ +2.4.1-4-g6c75f80bb diff --git a/versions/alpine_3.5_2.4.0 b/versions/alpine_3.5_2.4.0 new file mode 100644 index 0000000..c88906d --- /dev/null +++ b/versions/alpine_3.5_2.4.0 @@ -0,0 +1 @@ +2.4.0-0-g9887ca8fe diff --git a/versions/alpine_3.5_2.4.1 b/versions/alpine_3.5_2.4.1 new file mode 100644 index 0000000..3e03af7 --- /dev/null +++ b/versions/alpine_3.5_2.4.1 @@ -0,0 +1 @@ +2.4.1-0-gc44ed3c08 diff --git a/versions/alpine_3.5_2.5.0 b/versions/alpine_3.5_2.5.0 new file mode 100644 index 0000000..de9aea1 --- /dev/null +++ b/versions/alpine_3.5_2.5.0 @@ -0,0 +1 @@ +2.5.0-0-gfef6505c7 diff --git a/versions/alpine_3.5_2.x b/versions/alpine_3.5_2.x index 7158865..f340165 100644 --- a/versions/alpine_3.5_2.x +++ b/versions/alpine_3.5_2.x @@ -1 +1 @@ -2.3.1-1-g4137134c0 +2.4.1-6-g83c0356a1 diff --git a/versions/centos_7_1.x b/versions/centos_7_1.x index e57a593..642ac30 100644 --- a/versions/centos_7_1.x +++ b/versions/centos_7_1.x @@ -1 +1 @@ -1.10.3-136-gc3c087d5c +1.10.6-0-g5372cd2fa diff --git a/versions/centos_7_2.x b/versions/centos_7_2.x index 4b74589..f340165 100644 --- a/versions/centos_7_2.x +++ b/versions/centos_7_2.x @@ -1 +1 @@ -2.3.0-117-g4c2d1eff2 +2.4.1-6-g83c0356a1 From afe59f39ec3d976857914cfe424a99205775ba29 Mon Sep 17 00:00:00 2001 From: "Alexander V. Tikhonov" Date: Tue, 21 Apr 2020 09:57:12 +0300 Subject: [PATCH 190/286] Block test/unit/cbus_hang test At the commit 63d75e92f6d5b8417ae8a973ab2ce44e574f46fc in Tarantool the new test test/unit/cbus_hang.c created. It breaks the Tarantool build with error: /usr/src/tarantool/test/unit/cbus_hang.c: In function 'main_f': /usr/src/tarantool/test/unit/cbus_hang.c:133:27: error: \ 'pthread_mutex_t {aka struct }' has no member named '__data' while(hang_endpoint.mutex.__data.__lock < 2) { ^ Found that mutex on Alpine 3.5 has no member named '__data', to avoid of this issue the fixing commit cherry picked: commit d7fa6d34ab4e0956fe8a80966ba628e0e3f81067 Author: Leonid Vasiliev Date: Tue Apr 21 19:16:17 2020 +0300 build: fix compilation on Alpine 3.5 The cbus hang test uses glibc pthread mutex implementation details. The reason why mutex implementation details is used: "For the bug reproducing the canceled thread must be canceled during processing cpipe_flush_cb. We need to synchronize the main thread and the canceled worker thread for that. So, thread synchronization has been realized by means of endpoint's mutex internal field(__data.__lock)." Therefore, it should not compile in case of using another library. --- dockerfiles/alpine_3.5_1.x | 3 +++ dockerfiles/alpine_3.5_2.x | 3 +++ 2 files changed, 6 insertions(+) diff --git a/dockerfiles/alpine_3.5_1.x b/dockerfiles/alpine_3.5_1.x index f7ef159..34abc7b 100644 --- a/dockerfiles/alpine_3.5_1.x +++ b/dockerfiles/alpine_3.5_1.x @@ -93,6 +93,9 @@ RUN set -x \ && git -C /usr/src/tarantool checkout "$TARANTOOL_VERSION" \ && git -C /usr/src/tarantool submodule update --init --recursive \ && (cd /usr/src/tarantool; \ + echo "WARNING: Temporary fix for test/unit/cbus_hang test" ; \ + git cherry-pick d7fa6d34ab4e0956fe8a80966ba628e0e3f81067 2>/dev/null || \ + git cherry-pick --abort ; \ cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo\ -DENABLE_BUNDLED_LIBYAML:BOOL=OFF\ -DENABLE_BACKTRACE:BOOL=ON\ diff --git a/dockerfiles/alpine_3.5_2.x b/dockerfiles/alpine_3.5_2.x index c06e26a..67c3db9 100644 --- a/dockerfiles/alpine_3.5_2.x +++ b/dockerfiles/alpine_3.5_2.x @@ -88,6 +88,9 @@ RUN set -x \ && git -C /usr/src/tarantool checkout "$TARANTOOL_VERSION" \ && git -C /usr/src/tarantool submodule update --init --recursive \ && (cd /usr/src/tarantool; \ + echo "WARNING: Temporary fix for test/unit/cbus_hang test" ; \ + git cherry-pick d7fa6d34ab4e0956fe8a80966ba628e0e3f81067 2>/dev/null || \ + git cherry-pick --abort ; \ cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo\ -DENABLE_BUNDLED_LIBYAML:BOOL=ON\ -DENABLE_BACKTRACE:BOOL=ON\ From 20a491e0e36afc73f47a9c28deac6ad366665e05 Mon Sep 17 00:00:00 2001 From: "Alexander V. Tikhonov" Date: Wed, 29 Apr 2020 19:32:00 +0300 Subject: [PATCH 191/286] Change obvious shard to vshard module Changed obvious shard module to vshard of the latest version. --- dockerfiles/alpine_3.5_1.10.3 | 12 ++++-------- dockerfiles/alpine_3.5_1.x | 13 ++++--------- dockerfiles/alpine_3.5_2.2 | 12 ++++-------- dockerfiles/centos_7_1.x | 9 +++------ 4 files changed, 15 insertions(+), 31 deletions(-) diff --git a/dockerfiles/alpine_3.5_1.10.3 b/dockerfiles/alpine_3.5_1.10.3 index b534aa2..90c8c1c 100644 --- a/dockerfiles/alpine_3.5_1.10.3 +++ b/dockerfiles/alpine_3.5_1.10.3 @@ -15,8 +15,7 @@ ENV TARANTOOL_VERSION=${TNT_VER} \ CURL_TAG=curl-7_59_0 \ GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ GPERFTOOLS_TAG=gperftools-2.5 \ - LUAROCK_SHARD_REPO=https://github.com/tarantool/shard.git \ - LUAROCK_SHARD_TAG=8f8c5a7 \ + LUAROCK_VSHARD_VERSION=0.1.14 \ LUAROCK_AVRO_SCHEMA_VERSION=3.0.3 \ LUAROCK_EXPERATIOND_VERSION=1.0.1 \ LUAROCK_QUEUE_VERSION=1.0.6 \ @@ -167,10 +166,8 @@ RUN set -x \ && tarantoolctl rocks install queue $LUAROCK_QUEUE_VERSION \ && : "connpool" \ && tarantoolctl rocks install connpool $LUAROCK_CONNPOOL_VERSION \ - && : "shard" \ - && git clone $LUAROCK_SHARD_REPO /rocks/shard \ - && git -C /rocks/shard checkout $LUAROCK_SHARD_TAG \ - && (cd /rocks/shard && tarantoolctl rocks make *rockspec) \ + && : "vshard" \ + && tarantoolctl rocks install vshard $LUAROCK_VSHARD_VERSION \ && : "http" \ && tarantoolctl rocks install http $LUAROCK_HTTP_VERSION \ && : "pg" \ @@ -190,8 +187,7 @@ RUN set -x \ && : "gperftools" \ && tarantoolctl rocks install gperftools $LUAROCK_TARANTOOL_GPERFTOOLS_VERSION \ && : "---------- remove build deps ----------" \ - && apk del .build-deps \ - && rm -rf /rocks + && apk del .build-deps RUN mkdir -p /var/lib/tarantool \ && chown tarantool:tarantool /var/lib/tarantool \ diff --git a/dockerfiles/alpine_3.5_1.x b/dockerfiles/alpine_3.5_1.x index 34abc7b..7863f78 100644 --- a/dockerfiles/alpine_3.5_1.x +++ b/dockerfiles/alpine_3.5_1.x @@ -14,9 +14,7 @@ ENV TARANTOOL_VERSION=${TNT_VER} \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ GPERFTOOLS_TAG=gperftools-2.5 \ - LUAROCKS_URL=https://github.com/tarantool/luarocks/archive/6e6fe62d9409fe2103c0fd091cccb3da0451faf5.tar.gz \ - LUAROCK_SHARD_REPO=https://github.com/tarantool/shard.git \ - LUAROCK_SHARD_TAG=8f8c5a7 \ + LUAROCK_VSHARD_VERSION=0.1.14 \ LUAROCK_AVRO_SCHEMA_VERSION=3.0.3 \ LUAROCK_EXPERATIOND_VERSION=1.0.1 \ LUAROCK_QUEUE_VERSION=1.0.6 \ @@ -176,10 +174,8 @@ RUN set -x \ && luarocks install queue $LUAROCK_QUEUE_VERSION \ && : "connpool" \ && luarocks install connpool $LUAROCK_CONNPOOL_VERSION \ - && : "shard" \ - && git clone $LUAROCK_SHARD_REPO /rocks/shard \ - && git -C /rocks/shard checkout $LUAROCK_SHARD_TAG \ - && (cd /rocks/shard && luarocks make *rockspec) \ + && : "vshard" \ + && luarocks install vshard $LUAROCK_VSHARD_VERSION \ && : "http" \ && luarocks install http $LUAROCK_HTTP_VERSION \ && : "pg" \ @@ -197,8 +193,7 @@ RUN set -x \ && : "gperftools" \ && luarocks install gperftools $LUAROCK_TARANTOOL_GPERFTOOLS_VERSION \ && : "---------- remove build deps ----------" \ - && apk del .build-deps \ - && rm -rf /rocks + && apk del .build-deps RUN mkdir -p /var/lib/tarantool \ && chown tarantool:tarantool /var/lib/tarantool \ diff --git a/dockerfiles/alpine_3.5_2.2 b/dockerfiles/alpine_3.5_2.2 index 12cfa30..14b9c40 100644 --- a/dockerfiles/alpine_3.5_2.2 +++ b/dockerfiles/alpine_3.5_2.2 @@ -15,8 +15,7 @@ ENV TARANTOOL_VERSION=${TNT_VER} \ CURL_TAG=curl-7_59_0 \ GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ GPERFTOOLS_TAG=gperftools-2.5 \ - LUAROCK_SHARD_REPO=https://github.com/tarantool/shard.git \ - LUAROCK_SHARD_TAG=8f8c5a7 \ + LUAROCK_VSHARD_VERSION=0.1.14 \ LUAROCK_AVRO_SCHEMA_VERSION=3.0.3 \ LUAROCK_EXPERATIOND_VERSION=1.0.1 \ LUAROCK_QUEUE_VERSION=1.0.6 \ @@ -173,10 +172,8 @@ RUN set -x \ && tarantoolctl rocks install queue $LUAROCK_QUEUE_VERSION \ && : "connpool" \ && tarantoolctl rocks install connpool $LUAROCK_CONNPOOL_VERSION \ - && : "shard" \ - && git clone $LUAROCK_SHARD_REPO /rocks/shard \ - && git -C /rocks/shard checkout $LUAROCK_SHARD_TAG \ - && (cd /rocks/shard && tarantoolctl rocks make *rockspec) \ + && : "vshard" \ + && tarantoolctl rocks install vshard $LUAROCK_VSHARD_VERSION \ && : "http" \ && tarantoolctl rocks install http $LUAROCK_HTTP_VERSION \ && : "pg" \ @@ -194,8 +191,7 @@ RUN set -x \ && : "gperftools" \ && tarantoolctl rocks install gperftools $LUAROCK_TARANTOOL_GPERFTOOLS_VERSION \ && : "---------- remove build deps ----------" \ - && apk del .build-deps \ - && rm -rf /rocks + && apk del .build-deps RUN mkdir -p /var/lib/tarantool \ && chown tarantool:tarantool /var/lib/tarantool \ diff --git a/dockerfiles/centos_7_1.x b/dockerfiles/centos_7_1.x index 01b511c..f34348d 100644 --- a/dockerfiles/centos_7_1.x +++ b/dockerfiles/centos_7_1.x @@ -10,8 +10,7 @@ RUN groupadd tarantool \ ARG TNT_VER ENV TARANTOOL_VERSION=${TNT_VER} \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ - LUAROCK_SHARD_REPO=https://github.com/tarantool/shard.git \ - LUAROCK_SHARD_TAG=8f8c5a7 \ + LUAROCK_VSHARD_VERSION=0.1.14 \ LUAROCK_CHECKS_VERSION=3.0.1 \ LUAROCK_AVRO_SCHEMA_VERSION=3.0.3 \ LUAROCK_EXPERATIOND_VERSION=1.0.1 \ @@ -156,6 +155,8 @@ RUN set -x \ && tarantoolctl rocks install lua-term \ && : "ldoc" \ && tarantoolctl rocks install ldoc --server=http://rocks.moonscript.org \ + && : "vshard" \ + && tarantoolctl rocks install vshard $LUAROCK_VSHARD_VERSION \ && : "checks" \ && tarantoolctl rocks install checks $LUAROCK_CHECKS_VERSION \ && : "avro" \ @@ -166,10 +167,6 @@ RUN set -x \ && tarantoolctl rocks install queue $LUAROCK_QUEUE_VERSION \ && : "connpool" \ && tarantoolctl rocks install connpool $LUAROCK_CONNPOOL_VERSION \ - && : "shard" \ - && git clone $LUAROCK_SHARD_REPO /rocks/shard \ - && (cd /rocks/shard; git checkout $LUAROCK_SHARD_TAG) \ - && (cd /rocks/shard && tarantoolctl rocks make *rockspec) \ && : "http" \ && tarantoolctl rocks install http $LUAROCK_HTTP_VERSION \ && : "pg" \ From 90f36ee8e822249ec7bae28cd88eb4f0ecca49ca Mon Sep 17 00:00:00 2001 From: Dmitry Krokhin Date: Tue, 19 May 2020 14:28:08 +0300 Subject: [PATCH 192/286] Add metrics module Added metrics modules 0.2.0 version. Closes #148 --- dockerfiles/alpine_3.5_1.10.3 | 3 +++ dockerfiles/alpine_3.5_1.x | 3 +++ dockerfiles/alpine_3.5_2.2 | 3 +++ dockerfiles/alpine_3.5_2.x | 3 +++ dockerfiles/centos_7_1.x | 3 +++ dockerfiles/centos_7_2.x | 3 +++ 6 files changed, 18 insertions(+) diff --git a/dockerfiles/alpine_3.5_1.10.3 b/dockerfiles/alpine_3.5_1.10.3 index 90c8c1c..94042c1 100644 --- a/dockerfiles/alpine_3.5_1.10.3 +++ b/dockerfiles/alpine_3.5_1.10.3 @@ -22,6 +22,7 @@ ENV TARANTOOL_VERSION=${TNT_VER} \ LUAROCK_CONNPOOL_VERSION=1.1.1 \ LUAROCK_HTTP_VERSION=1.1.0 \ LUAROCK_MEMCACHED_VERSION=1.0.0 \ + LUAROCK_METRICS_VERSION=0.2.0 \ LUAROCK_TARANTOOL_PG_VERSION=2.0.2 \ LUAROCK_TARANTOOL_MYSQL_VERSION=2.0.1 \ LUAROCK_TARANTOOL_CURL_VERSION=2.3.1 \ @@ -176,6 +177,8 @@ RUN set -x \ && tarantoolctl rocks install mysql $LUAROCK_TARANTOOL_MYSQL_VERSION \ && : "memcached" \ && tarantoolctl rocks install memcached $LUAROCK_MEMCACHED_VERSION \ + && : "metrics" \ + && tarantoolctl rocks install metrics $LUAROCK_METRICS_VERSION \ && : "prometheus" \ && tarantoolctl rocks install prometheus $LUAROCK_TARANTOOL_PROMETHEUS_VERSION \ && : "curl" \ diff --git a/dockerfiles/alpine_3.5_1.x b/dockerfiles/alpine_3.5_1.x index 7863f78..838a91c 100644 --- a/dockerfiles/alpine_3.5_1.x +++ b/dockerfiles/alpine_3.5_1.x @@ -21,6 +21,7 @@ ENV TARANTOOL_VERSION=${TNT_VER} \ LUAROCK_CONNPOOL_VERSION=1.1.1 \ LUAROCK_HTTP_VERSION=1.1.0 \ LUAROCK_MEMCACHED_VERSION=1.0.0 \ + LUAROCK_METRICS_VERSION=0.2.0 \ LUAROCK_TARANTOOL_PG_VERSION=2.0.2 \ LUAROCK_TARANTOOL_MYSQL_VERSION=2.0.1 \ LUAROCK_TARANTOOL_MQTT_VERSION=1.2.1 \ @@ -184,6 +185,8 @@ RUN set -x \ && luarocks install mysql $LUAROCK_TARANTOOL_MYSQL_VERSION \ && : "memcached" \ && luarocks install memcached $LUAROCK_MEMCACHED_VERSION \ + && : "metrics" \ + && luarocks install metrics $LUAROCK_METRICS_VERSION \ && : "prometheus" \ && luarocks install prometheus $LUAROCK_TARANTOOL_PROMETHEUS_VERSION \ && : "mqtt" \ diff --git a/dockerfiles/alpine_3.5_2.2 b/dockerfiles/alpine_3.5_2.2 index 14b9c40..629982a 100644 --- a/dockerfiles/alpine_3.5_2.2 +++ b/dockerfiles/alpine_3.5_2.2 @@ -22,6 +22,7 @@ ENV TARANTOOL_VERSION=${TNT_VER} \ LUAROCK_CONNPOOL_VERSION=1.1.1 \ LUAROCK_HTTP_VERSION=1.1.0 \ LUAROCK_MEMCACHED_VERSION=1.0.0 \ + LUAROCK_METRICS_VERSION=0.2.0 \ LUAROCK_TARANTOOL_PG_VERSION=2.0.2 \ LUAROCK_TARANTOOL_MYSQL_VERSION=2.0.1 \ LUAROCK_TARANTOOL_MQTT_VERSION=1.2.1 \ @@ -182,6 +183,8 @@ RUN set -x \ && tarantoolctl rocks install mysql $LUAROCK_TARANTOOL_MYSQL_VERSION \ && : "memcached" \ && tarantoolctl rocks install memcached $LUAROCK_MEMCACHED_VERSION \ + && : "metrics" \ + && tarantoolctl rocks install metrics $LUAROCK_METRICS_VERSION \ && : "prometheus" \ && tarantoolctl rocks install prometheus $LUAROCK_TARANTOOL_PROMETHEUS_VERSION \ && : "mqtt" \ diff --git a/dockerfiles/alpine_3.5_2.x b/dockerfiles/alpine_3.5_2.x index 67c3db9..5eca1ec 100644 --- a/dockerfiles/alpine_3.5_2.x +++ b/dockerfiles/alpine_3.5_2.x @@ -20,6 +20,7 @@ ENV TARANTOOL_VERSION=${TNT_VER} \ LUAROCK_CONNPOOL_VERSION=1.1.1 \ LUAROCK_HTTP_VERSION=1.1.0 \ LUAROCK_MEMCACHED_VERSION=1.0.0 \ + LUAROCK_METRICS_VERSION=0.2.0 \ LUAROCK_TARANTOOL_PG_VERSION=2.0.2 \ LUAROCK_TARANTOOL_MYSQL_VERSION=2.0.1 \ LUAROCK_TARANTOOL_MQTT_VERSION=1.2.1 \ @@ -173,6 +174,8 @@ RUN set -x \ && tarantoolctl rocks install mysql $LUAROCK_TARANTOOL_MYSQL_VERSION \ && : "memcached" \ && tarantoolctl rocks install memcached $LUAROCK_MEMCACHED_VERSION \ + && : "metrics" \ + && tarantoolctl rocks install metrics $LUAROCK_METRICS_VERSION \ && : "prometheus" \ && tarantoolctl rocks install prometheus $LUAROCK_TARANTOOL_PROMETHEUS_VERSION \ && : "mqtt" \ diff --git a/dockerfiles/centos_7_1.x b/dockerfiles/centos_7_1.x index f34348d..cc5bfd0 100644 --- a/dockerfiles/centos_7_1.x +++ b/dockerfiles/centos_7_1.x @@ -18,6 +18,7 @@ ENV TARANTOOL_VERSION=${TNT_VER} \ LUAROCK_CONNPOOL_VERSION=1.1.1 \ LUAROCK_HTTP_VERSION=1.1.0 \ LUAROCK_MEMCACHED_VERSION=1.0.0 \ + LUAROCK_METRICS_VERSION=0.2.0 \ LUAROCK_TARANTOOL_PG_VERSION=2.0.2 \ LUAROCK_TARANTOOL_MYSQL_VERSION=2.0.1 \ LUAROCK_TARANTOOL_GIS_VERSION=1.0.0 \ @@ -175,6 +176,8 @@ RUN set -x \ && tarantoolctl rocks install mysql $LUAROCK_TARANTOOL_MYSQL_VERSION \ && : "memcached" \ && tarantoolctl rocks install memcached $LUAROCK_MEMCACHED_VERSION \ + && : "metrics" \ + && tarantoolctl rocks install metrics $LUAROCK_METRICS_VERSION \ && : "prometheus" \ && tarantoolctl rocks install prometheus $LUAROCK_TARANTOOL_PROMETHEUS_VERSION \ && : "gis" \ diff --git a/dockerfiles/centos_7_2.x b/dockerfiles/centos_7_2.x index 2d3d241..2d03574 100644 --- a/dockerfiles/centos_7_2.x +++ b/dockerfiles/centos_7_2.x @@ -18,6 +18,7 @@ ENV TARANTOOL_VERSION=${TNT_VER} \ LUAROCK_CONNPOOL_VERSION=1.1.1 \ LUAROCK_HTTP_VERSION=1.1.0 \ LUAROCK_MEMCACHED_VERSION=1.0.0 \ + LUAROCK_METRICS_VERSION=0.2.0 \ LUAROCK_TARANTOOL_PG_VERSION=2.0.2 \ LUAROCK_TARANTOOL_MYSQL_VERSION=2.0.1 \ LUAROCK_TARANTOOL_GIS_VERSION=1.0.0 \ @@ -170,6 +171,8 @@ RUN set -x \ && tarantoolctl rocks install mysql $LUAROCK_TARANTOOL_MYSQL_VERSION \ && : "memcached" \ && tarantoolctl rocks install memcached $LUAROCK_MEMCACHED_VERSION \ + && : "metrics" \ + && tarantoolctl rocks install metrics $LUAROCK_METRICS_VERSION \ && : "prometheus" \ && tarantoolctl rocks install prometheus $LUAROCK_TARANTOOL_PROMETHEUS_VERSION \ && : "gis" \ From 7f7a404d9bd20bb93e375b0994a01abd4d4a305a Mon Sep 17 00:00:00 2001 From: "Alexander V. Tikhonov" Date: Thu, 4 Jun 2020 12:08:28 +0300 Subject: [PATCH 193/286] Bump memcached version Changed memcached version from 1.0.0 to 1.0.1. Closes #151 --- dockerfiles/alpine_3.5_1.10.3 | 2 +- dockerfiles/alpine_3.5_1.x | 2 +- dockerfiles/alpine_3.5_2.2 | 2 +- dockerfiles/alpine_3.5_2.x | 2 +- dockerfiles/centos_7_1.x | 2 +- dockerfiles/centos_7_2.x | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dockerfiles/alpine_3.5_1.10.3 b/dockerfiles/alpine_3.5_1.10.3 index 94042c1..a1103b0 100644 --- a/dockerfiles/alpine_3.5_1.10.3 +++ b/dockerfiles/alpine_3.5_1.10.3 @@ -21,7 +21,7 @@ ENV TARANTOOL_VERSION=${TNT_VER} \ LUAROCK_QUEUE_VERSION=1.0.6 \ LUAROCK_CONNPOOL_VERSION=1.1.1 \ LUAROCK_HTTP_VERSION=1.1.0 \ - LUAROCK_MEMCACHED_VERSION=1.0.0 \ + LUAROCK_MEMCACHED_VERSION=1.0.1 \ LUAROCK_METRICS_VERSION=0.2.0 \ LUAROCK_TARANTOOL_PG_VERSION=2.0.2 \ LUAROCK_TARANTOOL_MYSQL_VERSION=2.0.1 \ diff --git a/dockerfiles/alpine_3.5_1.x b/dockerfiles/alpine_3.5_1.x index 838a91c..973078c 100644 --- a/dockerfiles/alpine_3.5_1.x +++ b/dockerfiles/alpine_3.5_1.x @@ -20,7 +20,7 @@ ENV TARANTOOL_VERSION=${TNT_VER} \ LUAROCK_QUEUE_VERSION=1.0.6 \ LUAROCK_CONNPOOL_VERSION=1.1.1 \ LUAROCK_HTTP_VERSION=1.1.0 \ - LUAROCK_MEMCACHED_VERSION=1.0.0 \ + LUAROCK_MEMCACHED_VERSION=1.0.1 \ LUAROCK_METRICS_VERSION=0.2.0 \ LUAROCK_TARANTOOL_PG_VERSION=2.0.2 \ LUAROCK_TARANTOOL_MYSQL_VERSION=2.0.1 \ diff --git a/dockerfiles/alpine_3.5_2.2 b/dockerfiles/alpine_3.5_2.2 index 629982a..bb260a7 100644 --- a/dockerfiles/alpine_3.5_2.2 +++ b/dockerfiles/alpine_3.5_2.2 @@ -21,7 +21,7 @@ ENV TARANTOOL_VERSION=${TNT_VER} \ LUAROCK_QUEUE_VERSION=1.0.6 \ LUAROCK_CONNPOOL_VERSION=1.1.1 \ LUAROCK_HTTP_VERSION=1.1.0 \ - LUAROCK_MEMCACHED_VERSION=1.0.0 \ + LUAROCK_MEMCACHED_VERSION=1.0.1 \ LUAROCK_METRICS_VERSION=0.2.0 \ LUAROCK_TARANTOOL_PG_VERSION=2.0.2 \ LUAROCK_TARANTOOL_MYSQL_VERSION=2.0.1 \ diff --git a/dockerfiles/alpine_3.5_2.x b/dockerfiles/alpine_3.5_2.x index 5eca1ec..04f9903 100644 --- a/dockerfiles/alpine_3.5_2.x +++ b/dockerfiles/alpine_3.5_2.x @@ -19,7 +19,7 @@ ENV TARANTOOL_VERSION=${TNT_VER} \ LUAROCK_QUEUE_VERSION=1.0.6 \ LUAROCK_CONNPOOL_VERSION=1.1.1 \ LUAROCK_HTTP_VERSION=1.1.0 \ - LUAROCK_MEMCACHED_VERSION=1.0.0 \ + LUAROCK_MEMCACHED_VERSION=1.0.1 \ LUAROCK_METRICS_VERSION=0.2.0 \ LUAROCK_TARANTOOL_PG_VERSION=2.0.2 \ LUAROCK_TARANTOOL_MYSQL_VERSION=2.0.1 \ diff --git a/dockerfiles/centos_7_1.x b/dockerfiles/centos_7_1.x index cc5bfd0..f6cc15e 100644 --- a/dockerfiles/centos_7_1.x +++ b/dockerfiles/centos_7_1.x @@ -17,7 +17,7 @@ ENV TARANTOOL_VERSION=${TNT_VER} \ LUAROCK_QUEUE_VERSION=1.0.6 \ LUAROCK_CONNPOOL_VERSION=1.1.1 \ LUAROCK_HTTP_VERSION=1.1.0 \ - LUAROCK_MEMCACHED_VERSION=1.0.0 \ + LUAROCK_MEMCACHED_VERSION=1.0.1 \ LUAROCK_METRICS_VERSION=0.2.0 \ LUAROCK_TARANTOOL_PG_VERSION=2.0.2 \ LUAROCK_TARANTOOL_MYSQL_VERSION=2.0.1 \ diff --git a/dockerfiles/centos_7_2.x b/dockerfiles/centos_7_2.x index 2d03574..76ad1db 100644 --- a/dockerfiles/centos_7_2.x +++ b/dockerfiles/centos_7_2.x @@ -17,7 +17,7 @@ ENV TARANTOOL_VERSION=${TNT_VER} \ LUAROCK_QUEUE_VERSION=1.0.6 \ LUAROCK_CONNPOOL_VERSION=1.1.1 \ LUAROCK_HTTP_VERSION=1.1.0 \ - LUAROCK_MEMCACHED_VERSION=1.0.0 \ + LUAROCK_MEMCACHED_VERSION=1.0.1 \ LUAROCK_METRICS_VERSION=0.2.0 \ LUAROCK_TARANTOOL_PG_VERSION=2.0.2 \ LUAROCK_TARANTOOL_MYSQL_VERSION=2.0.1 \ From b326abb3d699efa6ba36c4e4292f91b09140d67e Mon Sep 17 00:00:00 2001 From: "Alexander V. Tikhonov" Date: Fri, 15 May 2020 14:53:21 +0300 Subject: [PATCH 194/286] Add luarocks as additional installed tool Luarocks tool was removed in commit: (d68c646cc437e2bf4a861285dded166f33f3cb2a "penlight package dependencies broken") Luarocks tool was used before for installing packages. After mentioned commit luarocks tool changed to tarantoolctl and due to no need in it was in the build it was completely removed from installation build of the images. For now found that some users still need it. It was decided to return luarocks tool installed in the image, but not to use it for packages installations in images builds. Follows up #140 --- dockerfiles/alpine_3.5_1.10.3 | 15 +++++++++++++++ dockerfiles/alpine_3.5_1.x | 1 + dockerfiles/alpine_3.5_2.2 | 15 +++++++++++++++ dockerfiles/alpine_3.5_2.x | 15 +++++++++++++++ dockerfiles/centos_7_1.x | 14 ++++++++++++++ dockerfiles/centos_7_2.x | 15 +++++++++++++++ files/luarocks-config_centos.lua | 11 +++++++++++ 7 files changed, 86 insertions(+) create mode 100644 files/luarocks-config_centos.lua diff --git a/dockerfiles/alpine_3.5_1.10.3 b/dockerfiles/alpine_3.5_1.10.3 index a1103b0..bc4f1ce 100644 --- a/dockerfiles/alpine_3.5_1.10.3 +++ b/dockerfiles/alpine_3.5_1.10.3 @@ -11,10 +11,12 @@ RUN addgroup -S tarantool \ ARG TNT_VER ENV TARANTOOL_VERSION=${TNT_VER} \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ + TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ CURL_REPO=https://github.com/curl/curl.git \ CURL_TAG=curl-7_59_0 \ GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ GPERFTOOLS_TAG=gperftools-2.5 \ + LUAROCKS_URL=https://github.com/tarantool/luarocks/archive/6e6fe62d9409fe2103c0fd091cccb3da0451faf5.tar.gz \ LUAROCK_VSHARD_VERSION=0.1.14 \ LUAROCK_AVRO_SCHEMA_VERSION=3.0.3 \ LUAROCK_EXPERATIOND_VERSION=1.0.1 \ @@ -60,6 +62,7 @@ RUN set -x \ lz4-dev \ binutils-dev \ ncurses-dev \ + lua-dev \ musl-dev \ make \ git \ @@ -107,12 +110,23 @@ RUN set -x \ && make -C /usr/src/tarantool -j\ && make -C /usr/src/tarantool install \ && make -C /usr/src/tarantool clean \ + && : "---------- luarocks ----------" \ + && wget -O luarocks.tar.gz "$LUAROCKS_URL" \ + && mkdir -p /usr/src/luarocks \ + && tar -xzf luarocks.tar.gz -C /usr/src/luarocks --strip-components=1 \ + && (cd /usr/src/luarocks; \ + ./configure; \ + make -j build; \ + make install) \ + && rm -r /usr/src/luarocks \ && rm -rf /usr/src/tarantool \ && rm -rf /usr/src/gperftools \ && rm -rf /usr/src/go \ && : "---------- remove build deps ----------" \ && apk del .build-deps +COPY files/luarocks-config.lua /usr/local/etc/luarocks/config-5.1.lua + RUN set -x \ && apk add --no-cache --virtual .run-deps \ mariadb-client-libs \ @@ -128,6 +142,7 @@ RUN set -x \ gcc \ g++ \ postgresql-dev \ + lua-dev \ musl-dev \ cyrus-sasl-dev \ mosquitto-dev \ diff --git a/dockerfiles/alpine_3.5_1.x b/dockerfiles/alpine_3.5_1.x index 973078c..b618b42 100644 --- a/dockerfiles/alpine_3.5_1.x +++ b/dockerfiles/alpine_3.5_1.x @@ -14,6 +14,7 @@ ENV TARANTOOL_VERSION=${TNT_VER} \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ GPERFTOOLS_TAG=gperftools-2.5 \ + LUAROCKS_URL=https://github.com/tarantool/luarocks/archive/6e6fe62d9409fe2103c0fd091cccb3da0451faf5.tar.gz \ LUAROCK_VSHARD_VERSION=0.1.14 \ LUAROCK_AVRO_SCHEMA_VERSION=3.0.3 \ LUAROCK_EXPERATIOND_VERSION=1.0.1 \ diff --git a/dockerfiles/alpine_3.5_2.2 b/dockerfiles/alpine_3.5_2.2 index bb260a7..7ca2755 100644 --- a/dockerfiles/alpine_3.5_2.2 +++ b/dockerfiles/alpine_3.5_2.2 @@ -11,10 +11,12 @@ RUN addgroup -S tarantool \ ARG TNT_VER ENV TARANTOOL_VERSION=${TNT_VER} \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ + TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ CURL_REPO=https://github.com/curl/curl.git \ CURL_TAG=curl-7_59_0 \ GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ GPERFTOOLS_TAG=gperftools-2.5 \ + LUAROCKS_URL=https://github.com/tarantool/luarocks/archive/6e6fe62d9409fe2103c0fd091cccb3da0451faf5.tar.gz \ LUAROCK_VSHARD_VERSION=0.1.14 \ LUAROCK_AVRO_SCHEMA_VERSION=3.0.3 \ LUAROCK_EXPERATIOND_VERSION=1.0.1 \ @@ -61,6 +63,7 @@ RUN set -x \ zlib-dev \ binutils-dev \ ncurses-dev \ + lua-dev \ musl-dev \ make \ git \ @@ -109,12 +112,23 @@ RUN set -x \ && make -C /usr/src/tarantool -j\ && make -C /usr/src/tarantool install \ && make -C /usr/src/tarantool clean \ + && : "---------- luarocks ----------" \ + && wget -O luarocks.tar.gz "$LUAROCKS_URL" \ + && mkdir -p /usr/src/luarocks \ + && tar -xzf luarocks.tar.gz -C /usr/src/luarocks --strip-components=1 \ + && (cd /usr/src/luarocks; \ + ./configure; \ + make -j build; \ + make install) \ + && rm -r /usr/src/luarocks \ && rm -rf /usr/src/tarantool \ && rm -rf /usr/src/gperftools \ && rm -rf /usr/src/go \ && : "---------- remove build deps ----------" \ && apk del .build-deps +COPY files/luarocks-config.lua /usr/local/etc/luarocks/config-5.1.lua + RUN set -x \ && apk add --no-cache --virtual .run-deps \ mariadb-client-libs \ @@ -130,6 +144,7 @@ RUN set -x \ gcc \ g++ \ postgresql-dev \ + lua-dev \ musl-dev \ cyrus-sasl-dev \ mosquitto-dev \ diff --git a/dockerfiles/alpine_3.5_2.x b/dockerfiles/alpine_3.5_2.x index 04f9903..b40a870 100644 --- a/dockerfiles/alpine_3.5_2.x +++ b/dockerfiles/alpine_3.5_2.x @@ -11,8 +11,10 @@ RUN addgroup -S tarantool \ ARG TNT_VER ENV TARANTOOL_VERSION=${TNT_VER} \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ + TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ GPERFTOOLS_TAG=gperftools-2.5 \ + LUAROCKS_URL=https://github.com/tarantool/luarocks/archive/6e6fe62d9409fe2103c0fd091cccb3da0451faf5.tar.gz \ LUAROCK_VSHARD_VERSION=0.1.14 \ LUAROCK_AVRO_SCHEMA_VERSION=3.0.3 \ LUAROCK_EXPERATIOND_VERSION=1.0.1 \ @@ -59,6 +61,7 @@ RUN set -x \ zlib-dev \ binutils-dev \ ncurses-dev \ + lua-dev \ musl-dev \ make \ git \ @@ -100,12 +103,23 @@ RUN set -x \ && make -C /usr/src/tarantool -j\ && make -C /usr/src/tarantool install \ && make -C /usr/src/tarantool clean \ + && : "---------- luarocks ----------" \ + && wget -O luarocks.tar.gz "$LUAROCKS_URL" \ + && mkdir -p /usr/src/luarocks \ + && tar -xzf luarocks.tar.gz -C /usr/src/luarocks --strip-components=1 \ + && (cd /usr/src/luarocks; \ + ./configure; \ + make -j build; \ + make install) \ + && rm -r /usr/src/luarocks \ && rm -rf /usr/src/tarantool \ && rm -rf /usr/src/gperftools \ && rm -rf /usr/src/go \ && : "---------- remove build deps ----------" \ && apk del .build-deps +COPY files/luarocks-config.lua /usr/local/etc/luarocks/config-5.1.lua + RUN set -x \ && apk add --no-cache --virtual .run-deps \ mariadb-client-libs \ @@ -121,6 +135,7 @@ RUN set -x \ gcc \ g++ \ postgresql-dev \ + lua-dev \ musl-dev \ cyrus-sasl-dev \ mosquitto-dev \ diff --git a/dockerfiles/centos_7_1.x b/dockerfiles/centos_7_1.x index f6cc15e..d667212 100644 --- a/dockerfiles/centos_7_1.x +++ b/dockerfiles/centos_7_1.x @@ -10,6 +10,8 @@ RUN groupadd tarantool \ ARG TNT_VER ENV TARANTOOL_VERSION=${TNT_VER} \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ + TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ + LUAROCKS_URL=https://github.com/tarantool/luarocks/archive/6e6fe62d9409fe2103c0fd091cccb3da0451faf5.tar.gz \ LUAROCK_VSHARD_VERSION=0.1.14 \ LUAROCK_CHECKS_VERSION=3.0.1 \ LUAROCK_AVRO_SCHEMA_VERSION=3.0.3 \ @@ -58,6 +60,7 @@ RUN set -x \ lz4-devel \ binutils-devel \ ncurses-devel \ + lua-devel \ make \ git \ libunwind-devel \ @@ -96,6 +99,15 @@ RUN set -x \ && make -C /usr/src/tarantool -j\ && make -C /usr/src/tarantool install \ && make -C /usr/src/tarantool clean \ + && : "---------- luarocks ----------" \ + && wget -O luarocks.tar.gz "$LUAROCKS_URL" \ + && mkdir -p /usr/src/luarocks \ + && tar -xzf luarocks.tar.gz -C /usr/src/luarocks --strip-components=1 \ + && (cd /usr/src/luarocks; \ + ./configure; \ + make -j build; \ + make install) \ + && rm -r /usr/src/luarocks \ && rm -rf /usr/src/tarantool \ && rm -rf /usr/src/go \ && rm -rf /usr/src/icu \ @@ -127,6 +139,8 @@ RUN set -x \ && rpm -qa | grep devel | xargs yum -y remove \ && rm -rf /var/cache/yum +COPY files/luarocks-config_centos.lua /usr/local/etc/luarocks/config-5.1.lua + RUN set -x \ && yum -y install https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm \ && yum -y install \ diff --git a/dockerfiles/centos_7_2.x b/dockerfiles/centos_7_2.x index 76ad1db..8fc44b1 100644 --- a/dockerfiles/centos_7_2.x +++ b/dockerfiles/centos_7_2.x @@ -10,6 +10,8 @@ RUN groupadd tarantool \ ARG TNT_VER ENV TARANTOOL_VERSION=${TNT_VER} \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ + TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ + LUAROCKS_URL=https://github.com/tarantool/luarocks/archive/6e6fe62d9409fe2103c0fd091cccb3da0451faf5.tar.gz \ LUAROCK_VSHARD_VERSION=0.1.14 \ LUAROCK_CHECKS_VERSION=3.0.1 \ LUAROCK_AVRO_SCHEMA_VERSION=3.0.3 \ @@ -56,6 +58,7 @@ RUN set -x \ lz4-devel \ binutils-devel \ ncurses-devel \ + lua-devel \ make \ git \ libunwind-devel \ @@ -93,6 +96,16 @@ RUN set -x \ .) \ && make -C /usr/src/tarantool -j\ && make -C /usr/src/tarantool install \ + && make -C /usr/src/tarantool clean \ + && : "---------- luarocks ----------" \ + && wget -O luarocks.tar.gz "$LUAROCKS_URL" \ + && mkdir -p /usr/src/luarocks \ + && tar -xzf luarocks.tar.gz -C /usr/src/luarocks --strip-components=1 \ + && (cd /usr/src/luarocks; \ + ./configure; \ + make -j build; \ + make install) \ + && rm -r /usr/src/luarocks \ && rm -rf /usr/src/tarantool \ && rm -rf /usr/src/go \ && rm -rf /usr/src/icu \ @@ -122,6 +135,8 @@ RUN set -x \ && rpm -qa | grep devel | xargs yum -y remove \ && rm -rf /var/cache/yum +COPY files/luarocks-config_centos.lua /usr/local/etc/luarocks/config-5.1.lua + RUN set -x \ && yum -y install https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm \ && yum -y install \ diff --git a/files/luarocks-config_centos.lua b/files/luarocks-config_centos.lua new file mode 100644 index 0000000..4c48b74 --- /dev/null +++ b/files/luarocks-config_centos.lua @@ -0,0 +1,11 @@ +rocks_trees = { + { name = [[user]], root = home..[[/.luarocks]] }, + { name = [[system]], root = [[/usr/local]] } +} + +lib_modules_path="/lib64/lua/"..lua_version + +rocks_servers = { + [[http://rocks.tarantool.org/]], + [[http://luarocks.org/repositories/rocks]] +} From 6c3a72c65c100a5ed2826bf9d47ac6c54458dd21 Mon Sep 17 00:00:00 2001 From: "Alexander V. Tikhonov" Date: Sun, 17 May 2020 20:51:18 +0300 Subject: [PATCH 195/286] gitlab-ci: always rebuild all images on master Added ability to run master branch with complete rebuild of all the images. It is needed to run master branch in gitlab-ci schedules regularly to detect missing packages links. Closes #146 --- .gitlab-ci.yml | 42 +++++++----------------------------------- 1 file changed, 7 insertions(+), 35 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 81d7127..44b76fd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -10,17 +10,18 @@ before_script: # Enable GitLab registry - docker login -u gitlab-ci-token -p ${CI_BUILD_TOKEN} ${REGISTRY} -.force_build_template: &force_build_definition - only: - - /^.*-force-build$/ - .build_template: &build_definition stage: build + tags: + - deploy_test script: - > - if ${CHECK_GIT} | grep "^versions/${OS}_${VER}$" || \ + if [ ${CI_COMMIT_REF_NAME} = master ] || \ + ${CHECK_GIT} | grep "^versions/${OS}_${VER}$" || \ ${CHECK_GIT} | grep "^dockerfiles/${OS}_${DVER}$" || \ - ${CHECK_GIT} | grep "^files/" + ${CHECK_GIT} | grep "^files/" || \ + ${CHECK_GIT} | grep "^.gitlab-ci.yml$" || \ + ${CHECK_GIT} | grep "^.gitlab.mk$" then make -f .gitlab.mk build fi; @@ -33,7 +34,6 @@ before_script: 'alpine 3.5 1.10.0': <<: *build_definition - <<: *force_build_definition variables: OS: 'alpine_3.5' TAG: '1.10.0' @@ -43,7 +43,6 @@ before_script: 'alpine 3.5 1.10.1': <<: *build_definition - <<: *force_build_definition variables: OS: 'alpine_3.5' TAG: '1.10.1' @@ -53,7 +52,6 @@ before_script: 'alpine 3.5 1.10.2': <<: *build_definition - <<: *force_build_definition variables: OS: 'alpine_3.5' TAG: '1.10.2' @@ -63,7 +61,6 @@ before_script: 'alpine 3.5 1.10.3': <<: *build_definition - <<: *force_build_definition variables: OS: 'alpine_3.5' TAG: '1.10.3' @@ -73,7 +70,6 @@ before_script: 'alpine 3.5 1.10.4': <<: *build_definition - <<: *force_build_definition variables: OS: 'alpine_3.5' TAG: '1.10.4' @@ -83,7 +79,6 @@ before_script: 'alpine 3.5 1.10.5': <<: *build_definition - <<: *force_build_definition variables: OS: 'alpine_3.5' TAG: '1.10.5' @@ -93,7 +88,6 @@ before_script: 'alpine 3.5 1.10.6': <<: *build_definition - <<: *force_build_definition variables: OS: 'alpine_3.5' TAG: '1.10.6' @@ -103,7 +97,6 @@ before_script: 'alpine 3.5 1.x': <<: *build_definition - <<: *force_build_definition variables: OS: 'alpine_3.5' TAG: '1' @@ -115,7 +108,6 @@ before_script: 'alpine 3.5 2.1.0': <<: *build_definition - <<: *force_build_definition variables: OS: 'alpine_3.5' TAG: '2.1.0' @@ -125,7 +117,6 @@ before_script: 'alpine 3.5 2.1.1': <<: *build_definition - <<: *force_build_definition variables: OS: 'alpine_3.5' TAG: '2.1.1' @@ -135,7 +126,6 @@ before_script: 'alpine 3.5 2.1.2': <<: *build_definition - <<: *force_build_definition variables: OS: 'alpine_3.5' TAG: '2.1.2' @@ -145,7 +135,6 @@ before_script: 'alpine 3.5 2.1.3': <<: *build_definition - <<: *force_build_definition variables: OS: 'alpine_3.5' TAG: '2.1.3' @@ -155,7 +144,6 @@ before_script: 'alpine 3.5 2.1': <<: *build_definition - <<: *force_build_definition variables: OS: 'alpine_3.5' TAG: '2.1' @@ -167,7 +155,6 @@ before_script: 'alpine 3.5 2.2.0': <<: *build_definition - <<: *force_build_definition variables: OS: 'alpine_3.5' TAG: '2.2.0' @@ -177,7 +164,6 @@ before_script: 'alpine 3.5 2.2.1': <<: *build_definition - <<: *force_build_definition variables: OS: 'alpine_3.5' TAG: '2.2.1' @@ -187,7 +173,6 @@ before_script: 'alpine 3.5 2.2.2': <<: *build_definition - <<: *force_build_definition variables: OS: 'alpine_3.5' TAG: '2.2.2' @@ -197,7 +182,6 @@ before_script: 'alpine 3.5 2.2.3': <<: *build_definition - <<: *force_build_definition variables: OS: 'alpine_3.5' TAG: '2.2.3' @@ -207,7 +191,6 @@ before_script: 'alpine 3.5 2.2': <<: *build_definition - <<: *force_build_definition variables: OS: 'alpine_3.5' TAG: '2.2' @@ -219,7 +202,6 @@ before_script: 'alpine 3.5 2.3.0': <<: *build_definition - <<: *force_build_definition variables: OS: 'alpine_3.5' TAG: '2.3.0' @@ -229,7 +211,6 @@ before_script: 'alpine 3.5 2.3.1': <<: *build_definition - <<: *force_build_definition variables: OS: 'alpine_3.5' TAG: '2.3.1' @@ -239,7 +220,6 @@ before_script: 'alpine 3.5 2.3.2': <<: *build_definition - <<: *force_build_definition variables: OS: 'alpine_3.5' TAG: '2.3.2' @@ -249,7 +229,6 @@ before_script: 'alpine 3.5 2.3': <<: *build_definition - <<: *force_build_definition variables: OS: 'alpine_3.5' TAG: '2.3' @@ -261,7 +240,6 @@ before_script: 'alpine 3.5 2.4.0': <<: *build_definition - <<: *force_build_definition variables: OS: 'alpine_3.5' TAG: '2.4.0' @@ -271,7 +249,6 @@ before_script: 'alpine 3.5 2.4.1': <<: *build_definition - <<: *force_build_definition variables: OS: 'alpine_3.5' TAG: '2.4.1' @@ -281,7 +258,6 @@ before_script: 'alpine 3.5 2.4': <<: *build_definition - <<: *force_build_definition variables: OS: 'alpine_3.5' TAG: '2.4' @@ -293,7 +269,6 @@ before_script: 'alpine 3.5 2.5.0': <<: *build_definition - <<: *force_build_definition variables: OS: 'alpine_3.5' TAG: '2.5.0' @@ -303,7 +278,6 @@ before_script: 'alpine 3.5 2.x': <<: *build_definition - <<: *force_build_definition variables: OS: 'alpine_3.5' TAG: '2' @@ -320,7 +294,6 @@ before_script: 'centos 7 1.x': <<: *build_definition - <<: *force_build_definition variables: OS: 'centos_7' TAG: '1.x-centos7' @@ -332,7 +305,6 @@ before_script: 'centos 7 2.x': <<: *build_definition - <<: *force_build_definition variables: OS: 'centos_7' TAG: '2.x-centos7' From bb6fcb5d50d35f358df610f8c9005524ac5719dd Mon Sep 17 00:00:00 2001 From: "Alexander V. Tikhonov" Date: Fri, 3 Jul 2020 16:59:56 +0300 Subject: [PATCH 196/286] Fix pprof installation Found that pprof tool installation became broken at the github sources. Error on pprof installation found: $ sudo snap install go --classic go 1.14.3 from Michael Hudson-Doyle (mwhudson) installed $ GOPATH=/usr/src/go go get github.com/google/pprof ; echo $? /usr/src/go/src/github.com/google/pprof/internal/driver/settings.go:27:14: undefined: os.UserConfigDir 2 Also found that the issue is known and to avoid of it: 'The master branch is Incompatible with go version < 1.13 #538' https://github.com/google/pprof/issues/538 used latest workable commit with the old GO versions: 160c4290d1d8cee56daa51d7ba5d223291d392aa 'Update README to reflect what green nodes/edges mean. (#531)' Closes #147 --- dockerfiles/alpine_3.5_1.10.3 | 20 ++++++++++++++++++-- dockerfiles/alpine_3.5_1.x | 20 ++++++++++++++++++-- dockerfiles/alpine_3.5_2.2 | 20 ++++++++++++++++++-- dockerfiles/alpine_3.5_2.x | 20 ++++++++++++++++++-- 4 files changed, 72 insertions(+), 8 deletions(-) diff --git a/dockerfiles/alpine_3.5_1.10.3 b/dockerfiles/alpine_3.5_1.10.3 index bc4f1ce..4155913 100644 --- a/dockerfiles/alpine_3.5_1.10.3 +++ b/dockerfiles/alpine_3.5_1.10.3 @@ -94,8 +94,24 @@ RUN set -x \ ./configure; \ make -j ; \ cp .libs/libprofiler.so* /usr/local/lib;) \ - && (GOPATH=/usr/src/go go get github.com/google/pprof; \ - cp /usr/src/go/bin/pprof /usr/local/bin) \ + && : "---------- pprof for gperftools ----------" \ + && : "To avoid of the issue:" \ + && : "'The master branch is Incompatible with go version < 1.13 #538'" \ + && : "https://github.com/google/pprof/issues/538" \ + && : "use latest workable commits with the old GO versions" \ + && ( export GOPATH=/root/go && \ + export PATH=${GOPATH}/bin:/usr/local/go/bin:$PATH && \ + export GOBIN=$GOROOT/bin && \ + mkdir -p ${GOPATH}/src ${GOPATH}/bin && \ + go get github.com/google/pprof || : && \ + cd /root/go/src/github.com/google/pprof && \ + git checkout 160c4290d1d8cee56daa51d7ba5d223291d392aa && \ + ( cd /root/go/src/github.com/chzyer/readline && \ + git checkout f6d7a1f6fbf35bbf9beb80dc63c56a29dcfb759f ) && \ + ( cd /root/go/src/github.com/ianlancetaylor/demangle && \ + git checkout 039b1ae3a3406573c84daaf91166d70ad2bc0519 ) && \ + go build && \ + cp pprof /usr/local/bin/pprof ) \ && : "---------- tarantool ----------" \ && mkdir -p /usr/src/tarantool \ && git clone "$TARANTOOL_DOWNLOAD_URL" /usr/src/tarantool \ diff --git a/dockerfiles/alpine_3.5_1.x b/dockerfiles/alpine_3.5_1.x index b618b42..6d9a1ab 100644 --- a/dockerfiles/alpine_3.5_1.x +++ b/dockerfiles/alpine_3.5_1.x @@ -85,8 +85,24 @@ RUN set -x \ ./configure; \ make -j ; \ cp .libs/libprofiler.so* /usr/local/lib;) \ - && (GOPATH=/usr/src/go go get github.com/google/pprof; \ - cp /usr/src/go/bin/pprof /usr/local/bin) \ + && : "---------- pprof for gperftools ----------" \ + && : "To avoid of the issue:" \ + && : "'The master branch is Incompatible with go version < 1.13 #538'" \ + && : "https://github.com/google/pprof/issues/538" \ + && : "use latest workable commits with the old GO versions" \ + && ( export GOPATH=/root/go && \ + export PATH=${GOPATH}/bin:/usr/local/go/bin:$PATH && \ + export GOBIN=$GOROOT/bin && \ + mkdir -p ${GOPATH}/src ${GOPATH}/bin && \ + go get github.com/google/pprof || : && \ + cd /root/go/src/github.com/google/pprof && \ + git checkout 160c4290d1d8cee56daa51d7ba5d223291d392aa && \ + ( cd /root/go/src/github.com/chzyer/readline && \ + git checkout f6d7a1f6fbf35bbf9beb80dc63c56a29dcfb759f ) && \ + ( cd /root/go/src/github.com/ianlancetaylor/demangle && \ + git checkout 039b1ae3a3406573c84daaf91166d70ad2bc0519 ) && \ + go build && \ + cp pprof /usr/local/bin/pprof ) \ && : "---------- tarantool ----------" \ && mkdir -p /usr/src/tarantool \ && git clone "$TARANTOOL_DOWNLOAD_URL" /usr/src/tarantool \ diff --git a/dockerfiles/alpine_3.5_2.2 b/dockerfiles/alpine_3.5_2.2 index 7ca2755..01790e3 100644 --- a/dockerfiles/alpine_3.5_2.2 +++ b/dockerfiles/alpine_3.5_2.2 @@ -96,8 +96,24 @@ RUN set -x \ ./configure; \ make -j ; \ cp .libs/libprofiler.so* /usr/local/lib;) \ - && (GOPATH=/usr/src/go go get github.com/google/pprof; \ - cp /usr/src/go/bin/pprof /usr/local/bin) \ + && : "---------- pprof for gperftools ----------" \ + && : "To avoid of the issue:" \ + && : "'The master branch is Incompatible with go version < 1.13 #538'" \ + && : "https://github.com/google/pprof/issues/538" \ + && : "use latest workable commits with the old GO versions" \ + && ( export GOPATH=/root/go && \ + export PATH=${GOPATH}/bin:/usr/local/go/bin:$PATH && \ + export GOBIN=$GOROOT/bin && \ + mkdir -p ${GOPATH}/src ${GOPATH}/bin && \ + go get github.com/google/pprof || : && \ + cd /root/go/src/github.com/google/pprof && \ + git checkout 160c4290d1d8cee56daa51d7ba5d223291d392aa && \ + ( cd /root/go/src/github.com/chzyer/readline && \ + git checkout f6d7a1f6fbf35bbf9beb80dc63c56a29dcfb759f ) && \ + ( cd /root/go/src/github.com/ianlancetaylor/demangle && \ + git checkout 039b1ae3a3406573c84daaf91166d70ad2bc0519 ) && \ + go build && \ + cp pprof /usr/local/bin/pprof ) \ && : "---------- tarantool ----------" \ && mkdir -p /usr/src/tarantool \ && git clone "$TARANTOOL_DOWNLOAD_URL" /usr/src/tarantool \ diff --git a/dockerfiles/alpine_3.5_2.x b/dockerfiles/alpine_3.5_2.x index b40a870..8a6747c 100644 --- a/dockerfiles/alpine_3.5_2.x +++ b/dockerfiles/alpine_3.5_2.x @@ -84,8 +84,24 @@ RUN set -x \ ./configure; \ make -j ; \ cp .libs/libprofiler.so* /usr/local/lib;) \ - && (GOPATH=/usr/src/go go get github.com/google/pprof; \ - cp /usr/src/go/bin/pprof /usr/local/bin) \ + && : "---------- pprof for gperftools ----------" \ + && : "To avoid of the issue:" \ + && : "'The master branch is Incompatible with go version < 1.13 #538'" \ + && : "https://github.com/google/pprof/issues/538" \ + && : "use latest workable commits with the old GO versions" \ + && ( export GOPATH=/root/go && \ + export PATH=${GOPATH}/bin:/usr/local/go/bin:$PATH && \ + export GOBIN=$GOROOT/bin && \ + mkdir -p ${GOPATH}/src ${GOPATH}/bin && \ + go get github.com/google/pprof || : && \ + cd /root/go/src/github.com/google/pprof && \ + git checkout 160c4290d1d8cee56daa51d7ba5d223291d392aa && \ + ( cd /root/go/src/github.com/chzyer/readline && \ + git checkout f6d7a1f6fbf35bbf9beb80dc63c56a29dcfb759f ) && \ + ( cd /root/go/src/github.com/ianlancetaylor/demangle && \ + git checkout 039b1ae3a3406573c84daaf91166d70ad2bc0519 ) && \ + go build && \ + cp pprof /usr/local/bin/pprof ) \ && : "---------- tarantool ----------" \ && mkdir -p /usr/src/tarantool \ && git clone "$TARANTOOL_DOWNLOAD_URL" /usr/src/tarantool \ From bf1bf5eaa861318f4e4b30118d14abe15b9998d6 Mon Sep 17 00:00:00 2001 From: "Alexander V. Tikhonov" Date: Fri, 3 Jul 2020 22:38:34 +0300 Subject: [PATCH 197/286] gitlab-ci: make all build jobs interruptible Set for all jobs interruptible flag to be able to reset duplicating jobs in the gitlab-ci testing queue. Closes #171 --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 44b76fd..6f23912 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -14,6 +14,7 @@ before_script: stage: build tags: - deploy_test + interruptible: true script: - > if [ ${CI_COMMIT_REF_NAME} = master ] || \ From aef661e81bc8e7c26f4ac6f516d83a69204653b3 Mon Sep 17 00:00:00 2001 From: "Alexander V. Tikhonov" Date: Wed, 10 Jun 2020 20:15:00 +0300 Subject: [PATCH 198/286] Bump alpine images version Checked versions: 3.12 - failed 3.11 - failed 3.10 - failed 3.9 - passed 3.6 - passed Decide to use 3.9. The next steps to fix the issue need to fix 3.12 version. Also implemented ability to build images for different Docker's base images, setting it in build options. Tunned configuration to make all builds pass. Part of #152 --- .gitlab-ci.yml | 189 ++++++++++-------- .gitlab.mk | 5 +- README.md | 64 +++--- dockerfiles/alpine_3.5_1.10.3 | 3 +- dockerfiles/alpine_3.5_2.2 | 3 +- .../{alpine_3.5_1.x => alpine_3.9_1.x} | 3 +- .../{alpine_3.5_2.x => alpine_3.9_2.x} | 3 +- dockerfiles/centos_7_1.x | 3 +- dockerfiles/centos_7_2.x | 3 +- .../{alpine_3.5_1.10.4 => alpine_3.9_1.10.4} | 0 .../{alpine_3.5_1.10.5 => alpine_3.9_1.10.5} | 0 .../{alpine_3.5_1.10.6 => alpine_3.9_1.10.6} | 0 versions/{alpine_3.5_1.x => alpine_3.9_1.x} | 0 versions/{alpine_3.5_2.1 => alpine_3.9_2.1} | 0 .../{alpine_3.5_2.1.3 => alpine_3.9_2.1.3} | 0 versions/{alpine_3.5_2.2 => alpine_3.9_2.2} | 0 .../{alpine_3.5_2.2.2 => alpine_3.9_2.2.2} | 0 .../{alpine_3.5_2.2.3 => alpine_3.9_2.2.3} | 0 versions/{alpine_3.5_2.3 => alpine_3.9_2.3} | 0 .../{alpine_3.5_2.3.1 => alpine_3.9_2.3.1} | 0 .../{alpine_3.5_2.3.2 => alpine_3.9_2.3.2} | 0 versions/{alpine_3.5_2.4 => alpine_3.9_2.4} | 0 .../{alpine_3.5_2.4.0 => alpine_3.9_2.4.0} | 0 .../{alpine_3.5_2.4.1 => alpine_3.9_2.4.1} | 0 .../{alpine_3.5_2.5.0 => alpine_3.9_2.5.0} | 0 versions/{alpine_3.5_2.x => alpine_3.9_2.x} | 0 26 files changed, 155 insertions(+), 121 deletions(-) rename dockerfiles/{alpine_3.5_1.x => alpine_3.9_1.x} (99%) rename dockerfiles/{alpine_3.5_2.x => alpine_3.9_2.x} (99%) rename versions/{alpine_3.5_1.10.4 => alpine_3.9_1.10.4} (100%) rename versions/{alpine_3.5_1.10.5 => alpine_3.9_1.10.5} (100%) rename versions/{alpine_3.5_1.10.6 => alpine_3.9_1.10.6} (100%) rename versions/{alpine_3.5_1.x => alpine_3.9_1.x} (100%) rename versions/{alpine_3.5_2.1 => alpine_3.9_2.1} (100%) rename versions/{alpine_3.5_2.1.3 => alpine_3.9_2.1.3} (100%) rename versions/{alpine_3.5_2.2 => alpine_3.9_2.2} (100%) rename versions/{alpine_3.5_2.2.2 => alpine_3.9_2.2.2} (100%) rename versions/{alpine_3.5_2.2.3 => alpine_3.9_2.2.3} (100%) rename versions/{alpine_3.5_2.3 => alpine_3.9_2.3} (100%) rename versions/{alpine_3.5_2.3.1 => alpine_3.9_2.3.1} (100%) rename versions/{alpine_3.5_2.3.2 => alpine_3.9_2.3.2} (100%) rename versions/{alpine_3.5_2.4 => alpine_3.9_2.4} (100%) rename versions/{alpine_3.5_2.4.0 => alpine_3.9_2.4.0} (100%) rename versions/{alpine_3.5_2.4.1 => alpine_3.9_2.4.1} (100%) rename versions/{alpine_3.5_2.5.0 => alpine_3.9_2.5.0} (100%) rename versions/{alpine_3.5_2.x => alpine_3.9_2.x} (100%) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6f23912..fb0000d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -18,8 +18,8 @@ before_script: script: - > if [ ${CI_COMMIT_REF_NAME} = master ] || \ - ${CHECK_GIT} | grep "^versions/${OS}_${VER}$" || \ - ${CHECK_GIT} | grep "^dockerfiles/${OS}_${DVER}$" || \ + ${CHECK_GIT} | grep "^versions/${OS}_${DIST}_${VER}$" || \ + ${CHECK_GIT} | grep "^dockerfiles/${OS}_${DIST}_${DOCKERFILE_NAME_SUFFIX}$" || \ ${CHECK_GIT} | grep "^files/" || \ ${CHECK_GIT} | grep "^.gitlab-ci.yml$" || \ ${CHECK_GIT} | grep "^.gitlab.mk$" @@ -27,82 +27,90 @@ before_script: make -f .gitlab.mk build fi; -# ########## -# ALPINE 3.5 -# ########## +# ############## +# ALPINE 3.5/3.9 +# ############## # Tarantool branch 1.10 'alpine 3.5 1.10.0': <<: *build_definition variables: - OS: 'alpine_3.5' + OS: 'alpine' + DIST: '3.5' TAG: '1.10.0' VER: '1.10.0' - DVER: '1.10.3' + DOCKERFILE_NAME_SUFFIX: '1.10.3' PORT: 5101 'alpine 3.5 1.10.1': <<: *build_definition variables: - OS: 'alpine_3.5' + OS: 'alpine' + DIST: '3.5' TAG: '1.10.1' VER: '1.10.1' - DVER: '1.10.3' + DOCKERFILE_NAME_SUFFIX: '1.10.3' PORT: 5101 'alpine 3.5 1.10.2': <<: *build_definition variables: - OS: 'alpine_3.5' + OS: 'alpine' + DIST: '3.5' TAG: '1.10.2' VER: '1.10.2' - DVER: '1.10.3' + DOCKERFILE_NAME_SUFFIX: '1.10.3' PORT: 5102 'alpine 3.5 1.10.3': <<: *build_definition variables: - OS: 'alpine_3.5' + OS: 'alpine' + DIST: '3.5' TAG: '1.10.3' VER: '1.10.3' - DVER: '1.10.3' + DOCKERFILE_NAME_SUFFIX: '1.10.3' PORT: 5103 -'alpine 3.5 1.10.4': +'alpine 3.9 1.10.4': <<: *build_definition variables: - OS: 'alpine_3.5' + OS: 'alpine' + DIST: '3.9' TAG: '1.10.4' VER: '1.10.4' - DVER: '1.x' + DOCKERFILE_NAME_SUFFIX: '1.x' PORT: 5104 -'alpine 3.5 1.10.5': +'alpine 3.9 1.10.5': <<: *build_definition variables: - OS: 'alpine_3.5' + OS: 'alpine' + DIST: '3.9' TAG: '1.10.5' VER: '1.10.5' - DVER: '1.x' + DOCKERFILE_NAME_SUFFIX: '1.x' PORT: 5105 -'alpine 3.5 1.10.6': +'alpine 3.9 1.10.6': <<: *build_definition variables: - OS: 'alpine_3.5' + OS: 'alpine' + DIST: '3.9' TAG: '1.10.6' VER: '1.10.6' - DVER: '1.x' + DOCKERFILE_NAME_SUFFIX: '1.x' PORT: 5106 -'alpine 3.5 1.x': +'alpine 3.9 1.x': <<: *build_definition variables: - OS: 'alpine_3.5' + OS: 'alpine' + DIST: '3.9' TAG: '1' VER: '1.x' - DVER: '1.x' + DOCKERFILE_NAME_SUFFIX: '1.x' PORT: 5100 # Tarantool branch 2.1 @@ -110,46 +118,51 @@ before_script: 'alpine 3.5 2.1.0': <<: *build_definition variables: - OS: 'alpine_3.5' + OS: 'alpine' + DIST: '3.5' TAG: '2.1.0' VER: '2.1.0' - DVER: '2.2' + DOCKERFILE_NAME_SUFFIX: '2.2' PORT: 5211 'alpine 3.5 2.1.1': <<: *build_definition variables: - OS: 'alpine_3.5' + OS: 'alpine' + DIST: '3.5' TAG: '2.1.1' VER: '2.1.1' - DVER: '2.2' + DOCKERFILE_NAME_SUFFIX: '2.2' PORT: 5211 'alpine 3.5 2.1.2': <<: *build_definition variables: - OS: 'alpine_3.5' + OS: 'alpine' + DIST: '3.5' TAG: '2.1.2' VER: '2.1.2' - DVER: '2.2' + DOCKERFILE_NAME_SUFFIX: '2.2' PORT: 5212 -'alpine 3.5 2.1.3': +'alpine 3.9 2.1.3': <<: *build_definition variables: - OS: 'alpine_3.5' + OS: 'alpine' + DIST: '3.9' TAG: '2.1.3' VER: '2.1.3' - DVER: '1.x' + DOCKERFILE_NAME_SUFFIX: '1.x' PORT: 5213 -'alpine 3.5 2.1': +'alpine 3.9 2.1': <<: *build_definition variables: - OS: 'alpine_3.5' + OS: 'alpine' + DIST: '3.9' TAG: '2.1' VER: '2.1' - DVER: '2.2' + DOCKERFILE_NAME_SUFFIX: '2.2' PORT: 5210 # Tarantool branch 2.2 @@ -157,46 +170,51 @@ before_script: 'alpine 3.5 2.2.0': <<: *build_definition variables: - OS: 'alpine_3.5' + OS: 'alpine' + DIST: '3.5' TAG: '2.2.0' VER: '2.2.0' - DVER: '2.2' + DOCKERFILE_NAME_SUFFIX: '2.2' PORT: 5220 'alpine 3.5 2.2.1': <<: *build_definition variables: - OS: 'alpine_3.5' + OS: 'alpine' + DIST: '3.5' TAG: '2.2.1' VER: '2.2.1' - DVER: '2.2' + DOCKERFILE_NAME_SUFFIX: '2.2' PORT: 5221 -'alpine 3.5 2.2.2': +'alpine 3.9 2.2.2': <<: *build_definition variables: - OS: 'alpine_3.5' + OS: 'alpine' + DIST: '3.9' TAG: '2.2.2' VER: '2.2.2' - DVER: '2.x' + DOCKERFILE_NAME_SUFFIX: '2.x' PORT: 5222 -'alpine 3.5 2.2.3': +'alpine 3.9 2.2.3': <<: *build_definition variables: - OS: 'alpine_3.5' + OS: 'alpine' + DIST: '3.9' TAG: '2.2.3' VER: '2.2.3' - DVER: '2.x' + DOCKERFILE_NAME_SUFFIX: '2.x' PORT: 5223 -'alpine 3.5 2.2': +'alpine 3.9 2.2': <<: *build_definition variables: - OS: 'alpine_3.5' + OS: 'alpine' + DIST: '3.9' TAG: '2.2' VER: '2.2' - DVER: '2.x' + DOCKERFILE_NAME_SUFFIX: '2.x' PORT: 5220 # Tarantool branch 2.3 @@ -204,86 +222,95 @@ before_script: 'alpine 3.5 2.3.0': <<: *build_definition variables: - OS: 'alpine_3.5' + OS: 'alpine' + DIST: '3.5' TAG: '2.3.0' VER: '2.3.0' - DVER: '2.2' + DOCKERFILE_NAME_SUFFIX: '2.2' PORT: 5231 -'alpine 3.5 2.3.1': +'alpine 3.9 2.3.1': <<: *build_definition variables: - OS: 'alpine_3.5' + OS: 'alpine' + DIST: '3.9' TAG: '2.3.1' VER: '2.3.1' - DVER: '2.x' + DOCKERFILE_NAME_SUFFIX: '2.x' PORT: 5231 -'alpine 3.5 2.3.2': +'alpine 3.9 2.3.2': <<: *build_definition variables: - OS: 'alpine_3.5' + OS: 'alpine' + DIST: '3.9' TAG: '2.3.2' VER: '2.3.2' - DVER: '2.x' + DOCKERFILE_NAME_SUFFIX: '2.x' PORT: 5231 -'alpine 3.5 2.3': +'alpine 3.9 2.3': <<: *build_definition variables: - OS: 'alpine_3.5' + OS: 'alpine' + DIST: '3.9' TAG: '2.3' VER: '2.3' - DVER: '2.x' + DOCKERFILE_NAME_SUFFIX: '2.x' PORT: 5230 # Tarantool branch 2.4 -'alpine 3.5 2.4.0': +'alpine 3.9 2.4.0': <<: *build_definition variables: - OS: 'alpine_3.5' + OS: 'alpine' + DIST: '3.9' TAG: '2.4.0' VER: '2.4.0' - DVER: '2.x' + DOCKERFILE_NAME_SUFFIX: '2.x' PORT: 5241 -'alpine 3.5 2.4.1': +'alpine 3.9 2.4.1': <<: *build_definition variables: - OS: 'alpine_3.5' + OS: 'alpine' + DIST: '3.9' TAG: '2.4.1' VER: '2.4.1' - DVER: '2.x' + DOCKERFILE_NAME_SUFFIX: '2.x' PORT: 5241 -'alpine 3.5 2.4': +'alpine 3.9 2.4': <<: *build_definition variables: - OS: 'alpine_3.5' + OS: 'alpine' + DIST: '3.9' TAG: '2.4' VER: '2.4' - DVER: '2.x' + DOCKERFILE_NAME_SUFFIX: '2.x' PORT: 5240 # Tarantool branch master -'alpine 3.5 2.5.0': +'alpine 3.9 2.5.0': <<: *build_definition variables: - OS: 'alpine_3.5' + OS: 'alpine' + DIST: '3.9' TAG: '2.5.0' VER: '2.5.0' - DVER: '2.x' + DOCKERFILE_NAME_SUFFIX: '2.x' PORT: 5251 -'alpine 3.5 2.x': +'alpine 3.9 2.x': <<: *build_definition variables: - OS: 'alpine_3.5' + OS: 'alpine' + DIST: '3.9' TAG: '2' VER: '2.x' - DVER: '2.x' + DOCKERFILE_NAME_SUFFIX: '2.x' PORT: 5200 TAG_LATEST: 'latest' @@ -296,10 +323,11 @@ before_script: 'centos 7 1.x': <<: *build_definition variables: - OS: 'centos_7' + OS: 'centos' + DIST: '7' TAG: '1.x-centos7' VER: '1.x' - DVER: '1.x' + DOCKERFILE_NAME_SUFFIX: '1.x' PORT: 7100 # Tarantool branch master @@ -307,8 +335,9 @@ before_script: 'centos 7 2.x': <<: *build_definition variables: - OS: 'centos_7' + OS: 'centos' + DIST: '7' TAG: '2.x-centos7' VER: '2.x' - DVER: '2.x' + DOCKERFILE_NAME_SUFFIX: '2.x' PORT: 7200 diff --git a/.gitlab.mk b/.gitlab.mk index a215f53..65202ee 100644 --- a/.gitlab.mk +++ b/.gitlab.mk @@ -1,8 +1,9 @@ -TNT_VER=$(shell cat versions/${OS}_${VER}) +TNT_VER=$(shell cat versions/${OS}_${DIST}_${VER}) build: docker build --no-cache --network=host --build-arg TNT_VER=${TNT_VER} \ - -t ${IMAGE}:${TAG} -f dockerfiles/${OS}_${DVER} . + --build-arg BASE_IMAGE="${OS}:${DIST}" \ + -t ${IMAGE}:${TAG} -f dockerfiles/${OS}_${DIST}_${DOCKERFILE_NAME_SUFFIX} . docker run --rm --name tarantool_${TAG} -p ${PORT}:${PORT} -d ${IMAGE}:${TAG} docker exec -t tarantool_${TAG} tarantool_is_up docker stop tarantool_${TAG} diff --git a/README.md b/README.md index ae88258..d773bd4 100644 --- a/README.md +++ b/README.md @@ -298,10 +298,10 @@ A maintaner is responsible for merging the PR. ## How to check -Say, we have updated dockerfiles/alpine_3.5_2.x and want to check it: +Say, we have updated dockerfiles/alpine_3.9_2.x and want to check it: ```sh -$ IMAGE=tarantool/tarantool TAG=2 OS=alpine_3.5 VER=2.x DVER=2.x \ +$ IMAGE=tarantool/tarantool TAG=2 OS=alpine DIST=3.9 VER=2.x DOCKERFILE_NAME_SUFFIX=2.x \ PORT=5200 make -f .gitlab.mk build $ docker run -it tarantool/tarantool:2 ...perform a test... @@ -311,42 +311,40 @@ $ docker run -it tarantool/tarantool:2 Fixed versions: -| Docker tag | Dockerfile | -| ---------- | ---------------------------- | -| 1.10.0 | dockerfile/alpine_3.5_1.10.3 | -| 1.10.1 | dockerfile/alpine_3.5_1.10.3 | -| 1.10.2 | dockerfile/alpine_3.5_1.10.3 | -| 1.10.3 | dockerfile/alpine_3.5_1.10.3 | -| 1.10.4 | dockerfile/alpine_3.5_1.x | -| 1.10.5 | dockerfile/alpine_3.5_1.x | -| 1.10.6 | dockerfile/alpine_3.5_1.x | -| 2.1.0 | dockerfile/alpine_3.5_2.2 | -| 2.1.1 | dockerfile/alpine_3.5_2.2 | -| 2.1.2 | dockerfile/alpine_3.5_2.2 | -| 2.1.3 | dockerfile/alpine_3.5_1.x | -| 2.1.3 | dockerfile/alpine_3.5_1.x | -| 2.2.0 | dockerfile/alpine_3.5_2.2 | -| 2.2.1 | dockerfile/alpine_3.5_2.2 | -| 2.2.2 | dockerfile/alpine_3.5_2.x | -| 2.2.3 | dockerfile/alpine_3.5_2.x | -| 2.2.2 | dockerfile/alpine_3.5_2.x | -| 2.3.0 | dockerfile/alpine_3.5_2.2 | -| 2.3.1 | dockerfile/alpine_3.5_2.x | -| 2.3.2 | dockerfile/alpine_3.5_2.x | -| 2.4.0 | dockerfile/alpine_3.5_2.x | -| 2.4.1 | dockerfile/alpine_3.5_2.x | -| 2.5.0 | dockerfile/alpine_3.5_2.x | +| Docker tag | Dockerfile | +| ---------- | ------------------------- | +| 1.10.0 | dockerfile/alpine_3.5_1.x | +| 1.10.1 | dockerfile/alpine_3.5_1.x | +| 1.10.2 | dockerfile/alpine_3.5_1.x | +| 1.10.3 | dockerfile/alpine_3.5_1.x | +| 1.10.4 | dockerfile/alpine_3.9_1.x | +| 1.10.5 | dockerfile/alpine_3.9_1.x | +| 1.10.6 | dockerfile/alpine_3.9_1.x | +| 2.1.0 | dockerfile/alpine_3.5_2.x | +| 2.1.1 | dockerfile/alpine_3.5_2.x | +| 2.1.2 | dockerfile/alpine_3.5_2.x | +| 2.1.3 | dockerfile/alpine_3.9_1.x | +| 2.2.0 | dockerfile/alpine_3.5_2.x | +| 2.2.1 | dockerfile/alpine_3.5_2.x | +| 2.2.2 | dockerfile/alpine_3.9_2.x | +| 2.2.3 | dockerfile/alpine_3.9_2.x | +| 2.3.0 | dockerfile/alpine_3.5_2.x | +| 2.3.1 | dockerfile/alpine_3.9_2.x | +| 2.3.2 | dockerfile/alpine_3.9_2.x | +| 2.4.0 | dockerfile/alpine_3.9_2.x | +| 2.4.1 | dockerfile/alpine_3.9_2.x | +| 2.5.0 | dockerfile/alpine_3.9_2.x | Rolling versions: | Docker tag | Dockerfile | | ---------- | ------------------------- | -| 1 | dockerfile/alpine_3.5_1.x | -| 2.1 | dockerfile/alpine_3.5_2.2 | -| 2.2 | dockerfile/alpine_3.5_2.x | -| 2.3 | dockerfile/alpine_3.5_2.x | -| 2.4 | dockerfile/alpine_3.5_2.x | -| 2/latest | dockerfile/alpine_3.5_2.x | +| 1 | dockerfile/alpine_3.9_1.x | +| 2.1 | dockerfile/alpine_3.9_2.2 | +| 2.2 | dockerfile/alpine_3.9_2.x | +| 2.3 | dockerfile/alpine_3.9_2.x | +| 2.4 | dockerfile/alpine_3.9_2.x | +| 2/latest | dockerfile/alpine_3.9_2.x | Special builds: diff --git a/dockerfiles/alpine_3.5_1.10.3 b/dockerfiles/alpine_3.5_1.10.3 index 4155913..234efac 100644 --- a/dockerfiles/alpine_3.5_1.10.3 +++ b/dockerfiles/alpine_3.5_1.10.3 @@ -1,4 +1,5 @@ -FROM alpine:3.5 +ARG BASE_IMAGE +FROM ${BASE_IMAGE} MAINTAINER mail@racktear.com RUN addgroup -S tarantool \ diff --git a/dockerfiles/alpine_3.5_2.2 b/dockerfiles/alpine_3.5_2.2 index 01790e3..fddbae0 100644 --- a/dockerfiles/alpine_3.5_2.2 +++ b/dockerfiles/alpine_3.5_2.2 @@ -1,4 +1,5 @@ -FROM alpine:3.5 +ARG BASE_IMAGE +FROM ${BASE_IMAGE} MAINTAINER mail@racktear.com RUN addgroup -S tarantool \ diff --git a/dockerfiles/alpine_3.5_1.x b/dockerfiles/alpine_3.9_1.x similarity index 99% rename from dockerfiles/alpine_3.5_1.x rename to dockerfiles/alpine_3.9_1.x index 6d9a1ab..8a1f130 100644 --- a/dockerfiles/alpine_3.5_1.x +++ b/dockerfiles/alpine_3.9_1.x @@ -1,4 +1,5 @@ -FROM alpine:3.5 +ARG BASE_IMAGE +FROM ${BASE_IMAGE} MAINTAINER mail@racktear.com RUN addgroup -S tarantool \ diff --git a/dockerfiles/alpine_3.5_2.x b/dockerfiles/alpine_3.9_2.x similarity index 99% rename from dockerfiles/alpine_3.5_2.x rename to dockerfiles/alpine_3.9_2.x index 8a6747c..d7a242c 100644 --- a/dockerfiles/alpine_3.5_2.x +++ b/dockerfiles/alpine_3.9_2.x @@ -1,4 +1,5 @@ -FROM alpine:3.5 +ARG BASE_IMAGE +FROM ${BASE_IMAGE} MAINTAINER mail@racktear.com RUN addgroup -S tarantool \ diff --git a/dockerfiles/centos_7_1.x b/dockerfiles/centos_7_1.x index d667212..f0eff82 100644 --- a/dockerfiles/centos_7_1.x +++ b/dockerfiles/centos_7_1.x @@ -1,4 +1,5 @@ -FROM centos:7 +ARG BASE_IMAGE +FROM ${BASE_IMAGE} MAINTAINER mail@racktear.com RUN groupadd tarantool \ diff --git a/dockerfiles/centos_7_2.x b/dockerfiles/centos_7_2.x index 8fc44b1..e17debb 100644 --- a/dockerfiles/centos_7_2.x +++ b/dockerfiles/centos_7_2.x @@ -1,4 +1,5 @@ -FROM centos:7 +ARG BASE_IMAGE +FROM ${BASE_IMAGE} MAINTAINER mail@racktear.com RUN groupadd tarantool \ diff --git a/versions/alpine_3.5_1.10.4 b/versions/alpine_3.9_1.10.4 similarity index 100% rename from versions/alpine_3.5_1.10.4 rename to versions/alpine_3.9_1.10.4 diff --git a/versions/alpine_3.5_1.10.5 b/versions/alpine_3.9_1.10.5 similarity index 100% rename from versions/alpine_3.5_1.10.5 rename to versions/alpine_3.9_1.10.5 diff --git a/versions/alpine_3.5_1.10.6 b/versions/alpine_3.9_1.10.6 similarity index 100% rename from versions/alpine_3.5_1.10.6 rename to versions/alpine_3.9_1.10.6 diff --git a/versions/alpine_3.5_1.x b/versions/alpine_3.9_1.x similarity index 100% rename from versions/alpine_3.5_1.x rename to versions/alpine_3.9_1.x diff --git a/versions/alpine_3.5_2.1 b/versions/alpine_3.9_2.1 similarity index 100% rename from versions/alpine_3.5_2.1 rename to versions/alpine_3.9_2.1 diff --git a/versions/alpine_3.5_2.1.3 b/versions/alpine_3.9_2.1.3 similarity index 100% rename from versions/alpine_3.5_2.1.3 rename to versions/alpine_3.9_2.1.3 diff --git a/versions/alpine_3.5_2.2 b/versions/alpine_3.9_2.2 similarity index 100% rename from versions/alpine_3.5_2.2 rename to versions/alpine_3.9_2.2 diff --git a/versions/alpine_3.5_2.2.2 b/versions/alpine_3.9_2.2.2 similarity index 100% rename from versions/alpine_3.5_2.2.2 rename to versions/alpine_3.9_2.2.2 diff --git a/versions/alpine_3.5_2.2.3 b/versions/alpine_3.9_2.2.3 similarity index 100% rename from versions/alpine_3.5_2.2.3 rename to versions/alpine_3.9_2.2.3 diff --git a/versions/alpine_3.5_2.3 b/versions/alpine_3.9_2.3 similarity index 100% rename from versions/alpine_3.5_2.3 rename to versions/alpine_3.9_2.3 diff --git a/versions/alpine_3.5_2.3.1 b/versions/alpine_3.9_2.3.1 similarity index 100% rename from versions/alpine_3.5_2.3.1 rename to versions/alpine_3.9_2.3.1 diff --git a/versions/alpine_3.5_2.3.2 b/versions/alpine_3.9_2.3.2 similarity index 100% rename from versions/alpine_3.5_2.3.2 rename to versions/alpine_3.9_2.3.2 diff --git a/versions/alpine_3.5_2.4 b/versions/alpine_3.9_2.4 similarity index 100% rename from versions/alpine_3.5_2.4 rename to versions/alpine_3.9_2.4 diff --git a/versions/alpine_3.5_2.4.0 b/versions/alpine_3.9_2.4.0 similarity index 100% rename from versions/alpine_3.5_2.4.0 rename to versions/alpine_3.9_2.4.0 diff --git a/versions/alpine_3.5_2.4.1 b/versions/alpine_3.9_2.4.1 similarity index 100% rename from versions/alpine_3.5_2.4.1 rename to versions/alpine_3.9_2.4.1 diff --git a/versions/alpine_3.5_2.5.0 b/versions/alpine_3.9_2.5.0 similarity index 100% rename from versions/alpine_3.5_2.5.0 rename to versions/alpine_3.9_2.5.0 diff --git a/versions/alpine_3.5_2.x b/versions/alpine_3.9_2.x similarity index 100% rename from versions/alpine_3.5_2.x rename to versions/alpine_3.9_2.x From 9edc9c35a9ec5fd84797d0dfae611633b7d6fac5 Mon Sep 17 00:00:00 2001 From: "Alexander V. Tikhonov" Date: Wed, 10 Jun 2020 20:23:17 +0300 Subject: [PATCH 199/286] Correct dockerfiles naming Current commit finishes the corrections for dockerfiles structure. Files renamed in the following format: __1.x - for Tarantool 1.x __2.x - for Tarantool 2.x NOTE: Current commit can't be squashed with the previous, because the new files names duplicates renamed files in that commit and git shows wrong changes between files. Closes #152 --- .gitlab-ci.yml | 20 +++++++++---------- .../{alpine_3.5_1.10.3 => alpine_3.5_1.x} | 0 .../{alpine_3.5_2.2 => alpine_3.5_2.x} | 0 3 files changed, 10 insertions(+), 10 deletions(-) rename dockerfiles/{alpine_3.5_1.10.3 => alpine_3.5_1.x} (100%) rename dockerfiles/{alpine_3.5_2.2 => alpine_3.5_2.x} (100%) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fb0000d..be10cbb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -40,7 +40,7 @@ before_script: DIST: '3.5' TAG: '1.10.0' VER: '1.10.0' - DOCKERFILE_NAME_SUFFIX: '1.10.3' + DOCKERFILE_NAME_SUFFIX: '1.x' PORT: 5101 'alpine 3.5 1.10.1': @@ -50,7 +50,7 @@ before_script: DIST: '3.5' TAG: '1.10.1' VER: '1.10.1' - DOCKERFILE_NAME_SUFFIX: '1.10.3' + DOCKERFILE_NAME_SUFFIX: '1.x' PORT: 5101 'alpine 3.5 1.10.2': @@ -60,7 +60,7 @@ before_script: DIST: '3.5' TAG: '1.10.2' VER: '1.10.2' - DOCKERFILE_NAME_SUFFIX: '1.10.3' + DOCKERFILE_NAME_SUFFIX: '1.x' PORT: 5102 'alpine 3.5 1.10.3': @@ -70,7 +70,7 @@ before_script: DIST: '3.5' TAG: '1.10.3' VER: '1.10.3' - DOCKERFILE_NAME_SUFFIX: '1.10.3' + DOCKERFILE_NAME_SUFFIX: '1.x' PORT: 5103 'alpine 3.9 1.10.4': @@ -122,7 +122,7 @@ before_script: DIST: '3.5' TAG: '2.1.0' VER: '2.1.0' - DOCKERFILE_NAME_SUFFIX: '2.2' + DOCKERFILE_NAME_SUFFIX: '2.x' PORT: 5211 'alpine 3.5 2.1.1': @@ -132,7 +132,7 @@ before_script: DIST: '3.5' TAG: '2.1.1' VER: '2.1.1' - DOCKERFILE_NAME_SUFFIX: '2.2' + DOCKERFILE_NAME_SUFFIX: '2.x' PORT: 5211 'alpine 3.5 2.1.2': @@ -142,7 +142,7 @@ before_script: DIST: '3.5' TAG: '2.1.2' VER: '2.1.2' - DOCKERFILE_NAME_SUFFIX: '2.2' + DOCKERFILE_NAME_SUFFIX: '2.x' PORT: 5212 'alpine 3.9 2.1.3': @@ -174,7 +174,7 @@ before_script: DIST: '3.5' TAG: '2.2.0' VER: '2.2.0' - DOCKERFILE_NAME_SUFFIX: '2.2' + DOCKERFILE_NAME_SUFFIX: '2.x' PORT: 5220 'alpine 3.5 2.2.1': @@ -184,7 +184,7 @@ before_script: DIST: '3.5' TAG: '2.2.1' VER: '2.2.1' - DOCKERFILE_NAME_SUFFIX: '2.2' + DOCKERFILE_NAME_SUFFIX: '2.x' PORT: 5221 'alpine 3.9 2.2.2': @@ -226,7 +226,7 @@ before_script: DIST: '3.5' TAG: '2.3.0' VER: '2.3.0' - DOCKERFILE_NAME_SUFFIX: '2.2' + DOCKERFILE_NAME_SUFFIX: '2.x' PORT: 5231 'alpine 3.9 2.3.1': diff --git a/dockerfiles/alpine_3.5_1.10.3 b/dockerfiles/alpine_3.5_1.x similarity index 100% rename from dockerfiles/alpine_3.5_1.10.3 rename to dockerfiles/alpine_3.5_1.x diff --git a/dockerfiles/alpine_3.5_2.2 b/dockerfiles/alpine_3.5_2.x similarity index 100% rename from dockerfiles/alpine_3.5_2.2 rename to dockerfiles/alpine_3.5_2.x From 03f9cac8554dfeab0486bc8399d58d88fe3a8491 Mon Sep 17 00:00:00 2001 From: Dmitry Krokhin Date: Wed, 24 Jun 2020 16:00:40 +0300 Subject: [PATCH 200/286] Prometheus default metrics port configuration If specified environment variable: TARANTOOL_PROMETHEUS_DEFAULT_METRICS_PORT Tarantool will start http server on given port and expose prometheus `metrics` endpoint with common metrics (fibers, memory, network, replication, etc... ). --- README.md | 4 ++++ files/tarantool-entrypoint.lua | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/README.md b/README.md index d773bd4..df35d6a 100644 --- a/README.md +++ b/README.md @@ -238,6 +238,10 @@ Tarantool. In the above example, it is set to "mysecretpassword". Optional. Specifying this variable will tell Tarantool to listen for incoming connections on a specific port. Default is 3301. +### `TARANTOOL_PROMETHEUS_DEFAULT_METRICS_PORT` + +Optional. If specified tarantool will start http server on given port and expose prometheus `metrics` endpoint with common metrics (fibers, memory, network, replication, etc... ) + ### `TARANTOOL_REPLICATION` Optional. Comma-separated list of URIs to treat as replication diff --git a/files/tarantool-entrypoint.lua b/files/tarantool-entrypoint.lua index 512163a..b65b6b5 100755 --- a/files/tarantool-entrypoint.lua +++ b/files/tarantool-entrypoint.lua @@ -264,6 +264,14 @@ local function wrapper_cfg(override) console.listen(CONSOLE_SOCKET_PATH) + local metrics_port = tonumber(os.getenv('TARANTOOL_PROMETHEUS_DEFAULT_METRICS_PORT')) or 0 + if metrics_port > 0 then + require('metrics.default_metrics.tarantool').enable() + local prometheus = require('metrics.plugins.prometheus') + local httpd = require('http.server').new('0.0.0.0', metrics_port) + httpd:route( { path = '/metrics' }, prometheus.collect_http) + httpd:start() + end end box.cfg = wrapper_cfg From 085c886176180ad200f263dab905fc091c3c4140 Mon Sep 17 00:00:00 2001 From: Dmitry Krokhin Date: Wed, 24 Jun 2020 15:56:21 +0300 Subject: [PATCH 201/286] add metrics module to readme --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index df35d6a..183ec81 100644 --- a/README.md +++ b/README.md @@ -66,6 +66,7 @@ is only one Tarantool instance running in the container. - [pg](https://github.com/tarantool/pg): Query PostgreSQL right from Tarantool - [mysql](https://github.com/tarantool/mysql): Query MySql right from Tarantool - [memcached](https://github.com/tarantool/memcached): Access Tarantool as if it was a Memcached instance +- [metrics](https://github.com/tarantool/metrics): Metric collection library for Tarantool - [prometheus](https://github.com/tarantool/prometheus): Instrument code and export metrics to Prometheus monitoring - [mqtt](https://github.com/tarantool/mqtt): Client for MQTT message brokers - [gis](https://github.com/tarantool/gis): store and query geospatial data From fa08443f8306873fbd4828cd87b3a40b9eb67aee Mon Sep 17 00:00:00 2001 From: Dmitry Krokhin Date: Wed, 24 Jun 2020 15:32:24 +0300 Subject: [PATCH 202/286] Environment force recovery option If specified environment variable: TARANTOOL_FORCE_RECOVERY When set to "true" Tarantool tries to continue if there is an error while reading a snapshot file or a write-ahead log file. Skips invalid records, reads as much data as possible, print a warning in console and start the database. --- README.md | 4 ++++ files/tarantool-entrypoint.lua | 3 +++ files/tarantool_set_config.lua | 1 + 3 files changed, 8 insertions(+) diff --git a/README.md b/README.md index 183ec81..2657360 100644 --- a/README.md +++ b/README.md @@ -287,6 +287,10 @@ decreased if most of the tuples are very small. Default is 16. Optional. Specifies how often snapshots will be made, in seconds. Default is 3600 (every 1 hour). +### `TARANTOOL_FORCE_RECOVERY` + +Optional. When set to "true" Tarantool tries to continue if there is an error while reading a snapshot file or a write-ahead log file. Skips invalid records, reads as much data as possible, print a warning in console and start the database. + # Reporting problems and getting help You can report problems and request diff --git a/files/tarantool-entrypoint.lua b/files/tarantool-entrypoint.lua index b65b6b5..db69dfc 100755 --- a/files/tarantool-entrypoint.lua +++ b/files/tarantool-entrypoint.lua @@ -181,6 +181,7 @@ local function wrapper_cfg(override) file_cfg.TARANTOOL_SLAB_ALLOC_MINIMAL = os.getenv('TARANTOOL_SLAB_ALLOC_MINIMAL') file_cfg.TARANTOOL_SLAB_ALLOC_MAXIMAL = os.getenv('TARANTOOL_SLAB_ALLOC_MAXIMAL') file_cfg.TARANTOOL_PORT = os.getenv('TARANTOOL_PORT') + file_cfg.TARANTOOL_FORCE_RECOVERY = os.getenv('TARANTOOL_FORCE_RECOVERY') file_cfg.TARANTOOL_WAL_MODE = os.getenv('TARANTOOL_WAL_MODE') file_cfg.TARANTOOL_REPLICATION_SOURCE = os.getenv('TARANTOOL_REPLICATION_SOURCE') file_cfg.TARANTOOL_REPLICATION = os.getenv('TARANTOOL_REPLICATION') @@ -234,6 +235,8 @@ local function wrapper_cfg(override) cfg.wal_mode = file_cfg.TARANTOOL_WAL_MODE or override.wal_mode + cfg.force_recovery = file_cfg.TARANTOOL_FORCE_RECOVERY == 'true' + cfg.wal_dir = override.wal_dir or '/var/lib/tarantool' cfg.vinyl_dir = override.vinyl_dir or '/var/lib/tarantool' cfg.pid_file = override.pid_file or '/var/run/tarantool/tarantool.pid' diff --git a/files/tarantool_set_config.lua b/files/tarantool_set_config.lua index f638978..17ef143 100755 --- a/files/tarantool_set_config.lua +++ b/files/tarantool_set_config.lua @@ -86,6 +86,7 @@ local vars = { TARANTOOL_SLAB_ALLOC_MAXIMAL=nop, TARANTOOL_SLAB_ALLOC_MINIMAL=nop, TARANTOOL_PORT=nop, + TARANTOOL_FORCE_RECOVERY=nop, TARANTOOL_WAL_MODE=nop, TARANTOOL_USER_NAME=update_credentials, TARANTOOL_USER_PASSWORD=update_credentials, From 9e11c19f1253590b2aa3e62b6efd61a8f56b55e5 Mon Sep 17 00:00:00 2001 From: "Alexander V. Tikhonov" Date: Fri, 3 Jul 2020 23:03:01 +0300 Subject: [PATCH 203/286] Change the dockerfile for Tarantool 2.1 Before bumping alpine from 3.5 to 3.9 at commit: aef661e81bc8e7c26f4ac6f516d83a69204653b3 "Bump alpine images version" Tarantool versions at 2.1 branch with versions equal and later than 2.1.3 tag failed building on alpine 3.5 with both dockerfiles that were available for it, due to issue: /usr/src/tarantool/third_party/curl/lib/vtls/openssl.c: In function 'set_ssl_version_min_max': /usr/src/tarantool/third_party/curl/lib/vtls/openssl.c:2195:9: error: implicit declaration of function 'SSL_CTX_set_min_proto_version' [-Werror=implicit-function-declaration] if(!SSL_CTX_set_min_proto_version(ctx, ossl_ssl_version_min)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ It happened because, before the mentioned commit this gitlab-ci job used for building 'dockerfile/alpine_3.5_2.2', which was renamed to 'dockerfile/alpine_3.5_2.x' at that commit, but the job's variables 'DIST' and 'VER' were not completely updated. So the gitlab-ci job build was broken after that commit, due to not found dockerfile. Testing manually the current job with the currently nested for it 'dockerfile/alpine_3.5_2.x' produced the shown issue. It occurred because of the unsupported openssl version, please check [1]. These macros are only available in OpenSSL 1.1.0. While alpine versions uses different openssl versions: Alpine 3.5: openssl (1.0.2q-r0) Alpine 3.9: openssl (1.1.1g-r0) Also in #152 the alpine version was bumped and current change of the build job for Tarantool 2.1 to use alpine 3.9 resolved the issue. Currently found that on alpine 3.9 it successfully built, but only with *1.x dockerfile, due to tarantoolctl tool failed installing rocks at *2.x file. So decided to use for Tarantool 2.1 -> alpine_3.9_1.x dockerfile. Closes #173 Follows up #152 [1] - https://www.openssl.org/docs/man1.1.0/ssl/SSL_CTX_set_max_proto_version.html --- .gitlab-ci.yml | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index be10cbb..0bcfe16 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -162,7 +162,7 @@ before_script: DIST: '3.9' TAG: '2.1' VER: '2.1' - DOCKERFILE_NAME_SUFFIX: '2.2' + DOCKERFILE_NAME_SUFFIX: '1.x' PORT: 5210 # Tarantool branch 2.2 diff --git a/README.md b/README.md index 2657360..af999bb 100644 --- a/README.md +++ b/README.md @@ -349,7 +349,7 @@ Rolling versions: | Docker tag | Dockerfile | | ---------- | ------------------------- | | 1 | dockerfile/alpine_3.9_1.x | -| 2.1 | dockerfile/alpine_3.9_2.2 | +| 2.1 | dockerfile/alpine_3.9_1.x | | 2.2 | dockerfile/alpine_3.9_2.x | | 2.3 | dockerfile/alpine_3.9_2.x | | 2.4 | dockerfile/alpine_3.9_2.x | From 564e75af1bd198b1cf3450dd86ec0c40873378bd Mon Sep 17 00:00:00 2001 From: "Alexander V. Tikhonov" Date: Sat, 1 Aug 2020 08:08:37 +0300 Subject: [PATCH 204/286] Fix luarocks installation for alpine 3.5 Alpine 3.5 had internal wget tool based on it's busybox. Found that it was not workable with luacheck tool. The current fix changes wget tool from busybox to wget from package. To install wget from the package added git package installation. Also repository update added. Part of #170 --- dockerfiles/alpine_3.5_1.x | 4 ++++ dockerfiles/alpine_3.5_2.x | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/dockerfiles/alpine_3.5_1.x b/dockerfiles/alpine_3.5_1.x index 234efac..05d5dfc 100644 --- a/dockerfiles/alpine_3.5_1.x +++ b/dockerfiles/alpine_3.5_1.x @@ -224,6 +224,10 @@ RUN set -x \ && : "---------- remove build deps ----------" \ && apk del .build-deps +# gh-170: needed for luarocks +RUN apk update \ + && apk add wget git + RUN mkdir -p /var/lib/tarantool \ && chown tarantool:tarantool /var/lib/tarantool \ && mkdir -p /opt/tarantool \ diff --git a/dockerfiles/alpine_3.5_2.x b/dockerfiles/alpine_3.5_2.x index fddbae0..9b2ef46 100644 --- a/dockerfiles/alpine_3.5_2.x +++ b/dockerfiles/alpine_3.5_2.x @@ -228,6 +228,10 @@ RUN set -x \ && : "---------- remove build deps ----------" \ && apk del .build-deps +# gh-170: needed for luarocks +RUN apk update \ + && apk add wget git + RUN mkdir -p /var/lib/tarantool \ && chown tarantool:tarantool /var/lib/tarantool \ && mkdir -p /opt/tarantool \ From 2107fb0b35c7ece01079ec8bd4fb94e28d6a4d80 Mon Sep 17 00:00:00 2001 From: "Alexander V. Tikhonov" Date: Sat, 1 Aug 2020 08:18:17 +0300 Subject: [PATCH 205/286] Fix luarocks installation for alpine 3.9 Alpine 3.9 had internal wget tool based on it's busybox. Found that it was not workable with luacheck tool. The current fix changes wget tool from busybox to wget from package. To install wget from the package added git package installation. Also repository update added. Closes #170 --- dockerfiles/alpine_3.9_1.x | 4 ++++ dockerfiles/alpine_3.9_2.x | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/dockerfiles/alpine_3.9_1.x b/dockerfiles/alpine_3.9_1.x index 8a1f130..9c3b7cd 100644 --- a/dockerfiles/alpine_3.9_1.x +++ b/dockerfiles/alpine_3.9_1.x @@ -216,6 +216,10 @@ RUN set -x \ && : "---------- remove build deps ----------" \ && apk del .build-deps +# gh-170: needed for luarocks +RUN apk update \ + && apk add wget git + RUN mkdir -p /var/lib/tarantool \ && chown tarantool:tarantool /var/lib/tarantool \ && mkdir -p /opt/tarantool \ diff --git a/dockerfiles/alpine_3.9_2.x b/dockerfiles/alpine_3.9_2.x index d7a242c..19e1ff2 100644 --- a/dockerfiles/alpine_3.9_2.x +++ b/dockerfiles/alpine_3.9_2.x @@ -219,6 +219,10 @@ RUN set -x \ && : "---------- remove build deps ----------" \ && apk del .build-deps +# gh-170: needed for luarocks +RUN apk update \ + && apk add wget git + RUN mkdir -p /var/lib/tarantool \ && chown tarantool:tarantool /var/lib/tarantool \ && mkdir -p /opt/tarantool \ From ca4735866c75c407e105bbadf2eae89eff8a65b5 Mon Sep 17 00:00:00 2001 From: "Alexander V. Tikhonov" Date: Wed, 8 Jul 2020 08:57:13 +0300 Subject: [PATCH 206/286] Add ldoc luarocks to all the dockerfiles in common Found that ldoc rock installation fails using tarantoolctl without additional setup of tarantoolctl configuration file and without server path in options. In this case ldoc rock couldn't be found. To avoid of it in past additional server path was set, but in real the configuration file for tarantoolctl had to be installed as: /usr/local/etc/tarantool/rocks/config-5.1.lua It was missed in commit: d68c646cc437e2bf4a861285dded166f33f3cb2a "penlight package dependencies broken" Found that tarantoolctl didn't fail with the other rocks installations, because it had its rocks in server path 'http://rocks.tarantool.org', which is default for tarantoolctl tool even without additional configurating, while ldoc didn't have any rock there. To fix ldoc rock installation using tarantoolctl the configuration file created and removed not needed for now additional server path setup from tarantoolctl call options. For CentOS 7 based images configuration file was used without setup 'lib_modules_path' variable to be sure that libs will be created in both paths: /opt/tarantool/.rocks/lib/ /opt/tarantool/.rocks/lib64/ Closes #175 --- dockerfiles/alpine_3.5_1.x | 6 ++++++ dockerfiles/alpine_3.5_2.x | 6 +++++- dockerfiles/alpine_3.9_1.x | 8 +++++++- dockerfiles/alpine_3.9_2.x | 6 +++++- dockerfiles/centos_7_1.x | 6 +++++- dockerfiles/centos_7_2.x | 6 +++++- 6 files changed, 33 insertions(+), 5 deletions(-) diff --git a/dockerfiles/alpine_3.5_1.x b/dockerfiles/alpine_3.5_1.x index 05d5dfc..27b4fed 100644 --- a/dockerfiles/alpine_3.5_1.x +++ b/dockerfiles/alpine_3.5_1.x @@ -142,7 +142,11 @@ RUN set -x \ && : "---------- remove build deps ----------" \ && apk del .build-deps +RUN mkdir -p /usr/local/etc/luarocks \ + && mkdir -p /usr/local/etc/tarantool/rocks + COPY files/luarocks-config.lua /usr/local/etc/luarocks/config-5.1.lua +COPY files/luarocks-config.lua /usr/local/etc/tarantool/rocks/config-5.1.lua RUN set -x \ && apk add --no-cache --virtual .run-deps \ @@ -189,6 +193,8 @@ RUN set -x \ && rm -rf /geos.tar.bz2 \ && : "---------- luarocks ----------" \ && cd / \ + && : "ldoc" \ + && tarantoolctl rocks install ldoc \ && : "lua-term" \ && tarantoolctl rocks install lua-term \ && : "avro" \ diff --git a/dockerfiles/alpine_3.5_2.x b/dockerfiles/alpine_3.5_2.x index 9b2ef46..4ab7e3f 100644 --- a/dockerfiles/alpine_3.5_2.x +++ b/dockerfiles/alpine_3.5_2.x @@ -144,7 +144,11 @@ RUN set -x \ && : "---------- remove build deps ----------" \ && apk del .build-deps +RUN mkdir -p /usr/local/etc/luarocks \ + && mkdir -p /usr/local/etc/tarantool/rocks + COPY files/luarocks-config.lua /usr/local/etc/luarocks/config-5.1.lua +COPY files/luarocks-config.lua /usr/local/etc/tarantool/rocks/config-5.1.lua RUN set -x \ && apk add --no-cache --virtual .run-deps \ @@ -194,7 +198,7 @@ RUN set -x \ && : "---------- luarocks ----------" \ && cd / \ && : "ldoc" \ - && tarantoolctl rocks install ldoc --server=http://rocks.moonscript.org \ + && tarantoolctl rocks install ldoc \ && : "lua-term" \ && tarantoolctl rocks install lua-term \ && : "avro" \ diff --git a/dockerfiles/alpine_3.9_1.x b/dockerfiles/alpine_3.9_1.x index 9c3b7cd..b89ef5b 100644 --- a/dockerfiles/alpine_3.9_1.x +++ b/dockerfiles/alpine_3.9_1.x @@ -136,7 +136,11 @@ RUN set -x \ && : "---------- remove build deps ----------" \ && apk del .build-deps +RUN mkdir -p /usr/local/etc/luarocks \ + && mkdir -p /usr/local/etc/tarantool/rocks + COPY files/luarocks-config.lua /usr/local/etc/luarocks/config-5.1.lua +COPY files/luarocks-config.lua /usr/local/etc/tarantool/rocks/config-5.1.lua RUN set -x \ && apk add --no-cache --virtual .run-deps \ @@ -183,8 +187,10 @@ RUN set -x \ && rm -rf /usr/src/geos \ && rm -rf /geos.tar.bz2 \ && : "---------- luarocks ----------" \ - && luarocks install lua-term \ + && : "ldoc" \ && luarocks install ldoc \ + && : "lua-term" \ + && luarocks install lua-term \ && : "avro" \ && luarocks install avro-schema $LUAROCK_AVRO_SCHEMA_VERSION \ && : "expirationd" \ diff --git a/dockerfiles/alpine_3.9_2.x b/dockerfiles/alpine_3.9_2.x index 19e1ff2..115726f 100644 --- a/dockerfiles/alpine_3.9_2.x +++ b/dockerfiles/alpine_3.9_2.x @@ -135,7 +135,11 @@ RUN set -x \ && : "---------- remove build deps ----------" \ && apk del .build-deps +RUN mkdir -p /usr/local/etc/luarocks \ + && mkdir -p /usr/local/etc/tarantool/rocks + COPY files/luarocks-config.lua /usr/local/etc/luarocks/config-5.1.lua +COPY files/luarocks-config.lua /usr/local/etc/tarantool/rocks/config-5.1.lua RUN set -x \ && apk add --no-cache --virtual .run-deps \ @@ -185,7 +189,7 @@ RUN set -x \ && : "---------- luarocks ----------" \ && cd / \ && : "ldoc" \ - && tarantoolctl rocks install ldoc --server=http://rocks.moonscript.org \ + && tarantoolctl rocks install ldoc \ && : "lua-term" \ && tarantoolctl rocks install lua-term \ && : "avro" \ diff --git a/dockerfiles/centos_7_1.x b/dockerfiles/centos_7_1.x index f0eff82..a04e268 100644 --- a/dockerfiles/centos_7_1.x +++ b/dockerfiles/centos_7_1.x @@ -140,7 +140,11 @@ RUN set -x \ && rpm -qa | grep devel | xargs yum -y remove \ && rm -rf /var/cache/yum +RUN mkdir -p /usr/local/etc/luarocks \ + && mkdir -p /usr/local/etc/tarantool/rocks + COPY files/luarocks-config_centos.lua /usr/local/etc/luarocks/config-5.1.lua +COPY files/luarocks-config.lua /usr/local/etc/tarantool/rocks/config-5.1.lua RUN set -x \ && yum -y install https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm \ @@ -170,7 +174,7 @@ RUN set -x \ && : "lua-term" \ && tarantoolctl rocks install lua-term \ && : "ldoc" \ - && tarantoolctl rocks install ldoc --server=http://rocks.moonscript.org \ + && tarantoolctl rocks install ldoc \ && : "vshard" \ && tarantoolctl rocks install vshard $LUAROCK_VSHARD_VERSION \ && : "checks" \ diff --git a/dockerfiles/centos_7_2.x b/dockerfiles/centos_7_2.x index e17debb..1711dd1 100644 --- a/dockerfiles/centos_7_2.x +++ b/dockerfiles/centos_7_2.x @@ -136,7 +136,11 @@ RUN set -x \ && rpm -qa | grep devel | xargs yum -y remove \ && rm -rf /var/cache/yum +RUN mkdir -p /usr/local/etc/luarocks \ + && mkdir -p /usr/local/etc/tarantool/rocks + COPY files/luarocks-config_centos.lua /usr/local/etc/luarocks/config-5.1.lua +COPY files/luarocks-config.lua /usr/local/etc/tarantool/rocks/config-5.1.lua RUN set -x \ && yum -y install https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm \ @@ -166,7 +170,7 @@ RUN set -x \ && : "lua-term" \ && tarantoolctl rocks install lua-term \ && : "ldoc" \ - && tarantoolctl rocks install ldoc --server=http://rocks.moonscript.org \ + && tarantoolctl rocks install ldoc \ && : "vshard" \ && tarantoolctl rocks install vshard $LUAROCK_VSHARD_VERSION \ && : "checks" \ From 5befbb18f9f43c28f2a4219909ea4227e46a5ca6 Mon Sep 17 00:00:00 2001 From: "Alexander V. Tikhonov" Date: Sat, 1 Aug 2020 08:50:36 +0300 Subject: [PATCH 207/286] Set rocks tool installer using variable Added ROCKS_INSTALLER variable for dockerfile build to be able to set needed rocks tool installer. --- .gitlab.mk | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitlab.mk b/.gitlab.mk index 65202ee..c6e2441 100644 --- a/.gitlab.mk +++ b/.gitlab.mk @@ -1,7 +1,10 @@ TNT_VER=$(shell cat versions/${OS}_${DIST}_${VER}) +ROCKS_INSTALLER?='tarantoolctl rocks' build: - docker build --no-cache --network=host --build-arg TNT_VER=${TNT_VER} \ + docker build --no-cache --network=host \ + --build-arg ROCKS_INSTALLER=${ROCKS_INSTALLER} \ + --build-arg TNT_VER=${TNT_VER} \ --build-arg BASE_IMAGE="${OS}:${DIST}" \ -t ${IMAGE}:${TAG} -f dockerfiles/${OS}_${DIST}_${DOCKERFILE_NAME_SUFFIX} . docker run --rm --name tarantool_${TAG} -p ${PORT}:${PORT} -d ${IMAGE}:${TAG} From b6831930ff61622c83cced9243ef56df0a141e6a Mon Sep 17 00:00:00 2001 From: "Alexander V. Tikhonov" Date: Sat, 1 Aug 2020 09:24:01 +0300 Subject: [PATCH 208/286] Use ROCKS_INSTALLER variable for dockerfile builds Some of the Tarantool versions have not workable tarantoolctl tool. It uses luarocks tool instead of it. The following gitlab-ci target builds were set to use ROCKS_INSTALLER variable with 'luarocks' tool: alpine 3.9 1.10.4 alpine 3.9 1.10.5 alpine 3.9 1.10.6 alpine 3.9 1.x alpine 3.9 2.1.3 alpine 3.9 2.1 --- .gitlab-ci.yml | 6 ++++++ dockerfiles/alpine_3.9_1.x | 33 +++++++++++++++++---------------- dockerfiles/alpine_3.9_2.x | 33 +++++++++++++++++---------------- 3 files changed, 40 insertions(+), 32 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0bcfe16..2b076d9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -82,6 +82,7 @@ before_script: VER: '1.10.4' DOCKERFILE_NAME_SUFFIX: '1.x' PORT: 5104 + ROCKS_INSTALLER: 'luarocks' 'alpine 3.9 1.10.5': <<: *build_definition @@ -92,6 +93,7 @@ before_script: VER: '1.10.5' DOCKERFILE_NAME_SUFFIX: '1.x' PORT: 5105 + ROCKS_INSTALLER: 'luarocks' 'alpine 3.9 1.10.6': <<: *build_definition @@ -102,6 +104,7 @@ before_script: VER: '1.10.6' DOCKERFILE_NAME_SUFFIX: '1.x' PORT: 5106 + ROCKS_INSTALLER: 'luarocks' 'alpine 3.9 1.x': <<: *build_definition @@ -112,6 +115,7 @@ before_script: VER: '1.x' DOCKERFILE_NAME_SUFFIX: '1.x' PORT: 5100 + ROCKS_INSTALLER: 'luarocks' # Tarantool branch 2.1 @@ -154,6 +158,7 @@ before_script: VER: '2.1.3' DOCKERFILE_NAME_SUFFIX: '1.x' PORT: 5213 + ROCKS_INSTALLER: 'luarocks' 'alpine 3.9 2.1': <<: *build_definition @@ -164,6 +169,7 @@ before_script: VER: '2.1' DOCKERFILE_NAME_SUFFIX: '1.x' PORT: 5210 + ROCKS_INSTALLER: 'luarocks' # Tarantool branch 2.2 diff --git a/dockerfiles/alpine_3.9_1.x b/dockerfiles/alpine_3.9_1.x index b89ef5b..5b30941 100644 --- a/dockerfiles/alpine_3.9_1.x +++ b/dockerfiles/alpine_3.9_1.x @@ -142,6 +142,7 @@ RUN mkdir -p /usr/local/etc/luarocks \ COPY files/luarocks-config.lua /usr/local/etc/luarocks/config-5.1.lua COPY files/luarocks-config.lua /usr/local/etc/tarantool/rocks/config-5.1.lua +ARG ROCKS_INSTALLER RUN set -x \ && apk add --no-cache --virtual .run-deps \ mariadb-client-libs \ @@ -188,37 +189,37 @@ RUN set -x \ && rm -rf /geos.tar.bz2 \ && : "---------- luarocks ----------" \ && : "ldoc" \ - && luarocks install ldoc \ + && ${ROCKS_INSTALLER} install ldoc \ && : "lua-term" \ - && luarocks install lua-term \ + && ${ROCKS_INSTALLER} install lua-term \ && : "avro" \ - && luarocks install avro-schema $LUAROCK_AVRO_SCHEMA_VERSION \ + && ${ROCKS_INSTALLER} install avro-schema $LUAROCK_AVRO_SCHEMA_VERSION \ && : "expirationd" \ - && luarocks install expirationd $LUAROCK_EXPERATIOND_VERSION \ + && ${ROCKS_INSTALLER} install expirationd $LUAROCK_EXPERATIOND_VERSION \ && : "queue" \ - && luarocks install queue $LUAROCK_QUEUE_VERSION \ + && ${ROCKS_INSTALLER} install queue $LUAROCK_QUEUE_VERSION \ && : "connpool" \ - && luarocks install connpool $LUAROCK_CONNPOOL_VERSION \ + && ${ROCKS_INSTALLER} install connpool $LUAROCK_CONNPOOL_VERSION \ && : "vshard" \ - && luarocks install vshard $LUAROCK_VSHARD_VERSION \ + && ${ROCKS_INSTALLER} install vshard $LUAROCK_VSHARD_VERSION \ && : "http" \ - && luarocks install http $LUAROCK_HTTP_VERSION \ + && ${ROCKS_INSTALLER} install http $LUAROCK_HTTP_VERSION \ && : "pg" \ - && luarocks install pg $LUAROCK_TARANTOOL_PG_VERSION \ + && ${ROCKS_INSTALLER} install pg $LUAROCK_TARANTOOL_PG_VERSION \ && : "mysql" \ - && luarocks install mysql $LUAROCK_TARANTOOL_MYSQL_VERSION \ + && ${ROCKS_INSTALLER} install mysql $LUAROCK_TARANTOOL_MYSQL_VERSION \ && : "memcached" \ - && luarocks install memcached $LUAROCK_MEMCACHED_VERSION \ + && ${ROCKS_INSTALLER} install memcached $LUAROCK_MEMCACHED_VERSION \ && : "metrics" \ - && luarocks install metrics $LUAROCK_METRICS_VERSION \ + && ${ROCKS_INSTALLER} install metrics $LUAROCK_METRICS_VERSION \ && : "prometheus" \ - && luarocks install prometheus $LUAROCK_TARANTOOL_PROMETHEUS_VERSION \ + && ${ROCKS_INSTALLER} install prometheus $LUAROCK_TARANTOOL_PROMETHEUS_VERSION \ && : "mqtt" \ - && luarocks install mqtt $LUAROCK_TARANTOOL_MQTT_VERSION \ + && ${ROCKS_INSTALLER} install mqtt $LUAROCK_TARANTOOL_MQTT_VERSION \ && : "gis" \ - && luarocks install gis $LUAROCK_TARANTOOL_GIS_VERSION \ + && ${ROCKS_INSTALLER} install gis $LUAROCK_TARANTOOL_GIS_VERSION \ && : "gperftools" \ - && luarocks install gperftools $LUAROCK_TARANTOOL_GPERFTOOLS_VERSION \ + && ${ROCKS_INSTALLER} install gperftools $LUAROCK_TARANTOOL_GPERFTOOLS_VERSION \ && : "---------- remove build deps ----------" \ && apk del .build-deps diff --git a/dockerfiles/alpine_3.9_2.x b/dockerfiles/alpine_3.9_2.x index 115726f..949730d 100644 --- a/dockerfiles/alpine_3.9_2.x +++ b/dockerfiles/alpine_3.9_2.x @@ -141,6 +141,7 @@ RUN mkdir -p /usr/local/etc/luarocks \ COPY files/luarocks-config.lua /usr/local/etc/luarocks/config-5.1.lua COPY files/luarocks-config.lua /usr/local/etc/tarantool/rocks/config-5.1.lua +ARG ROCKS_INSTALLER RUN set -x \ && apk add --no-cache --virtual .run-deps \ mariadb-client-libs \ @@ -189,37 +190,37 @@ RUN set -x \ && : "---------- luarocks ----------" \ && cd / \ && : "ldoc" \ - && tarantoolctl rocks install ldoc \ + && ${ROCKS_INSTALLER} install ldoc \ && : "lua-term" \ - && tarantoolctl rocks install lua-term \ + && ${ROCKS_INSTALLER} install lua-term \ && : "avro" \ - && tarantoolctl rocks install avro-schema $LUAROCK_AVRO_SCHEMA_VERSION \ + && ${ROCKS_INSTALLER} install avro-schema $LUAROCK_AVRO_SCHEMA_VERSION \ && : "expirationd" \ - && tarantoolctl rocks install expirationd $LUAROCK_EXPERATIOND_VERSION \ + && ${ROCKS_INSTALLER} install expirationd $LUAROCK_EXPERATIOND_VERSION \ && : "queue" \ - && tarantoolctl rocks install queue $LUAROCK_QUEUE_VERSION \ + && ${ROCKS_INSTALLER} install queue $LUAROCK_QUEUE_VERSION \ && : "connpool" \ - && tarantoolctl rocks install connpool $LUAROCK_CONNPOOL_VERSION \ + && ${ROCKS_INSTALLER} install connpool $LUAROCK_CONNPOOL_VERSION \ && : "vshard" \ - && tarantoolctl rocks install vshard $LUAROCK_VSHARD_VERSION \ + && ${ROCKS_INSTALLER} install vshard $LUAROCK_VSHARD_VERSION \ && : "http" \ - && tarantoolctl rocks install http $LUAROCK_HTTP_VERSION \ + && ${ROCKS_INSTALLER} install http $LUAROCK_HTTP_VERSION \ && : "pg" \ - && tarantoolctl rocks install pg $LUAROCK_TARANTOOL_PG_VERSION \ + && ${ROCKS_INSTALLER} install pg $LUAROCK_TARANTOOL_PG_VERSION \ && : "mysql" \ - && tarantoolctl rocks install mysql $LUAROCK_TARANTOOL_MYSQL_VERSION \ + && ${ROCKS_INSTALLER} install mysql $LUAROCK_TARANTOOL_MYSQL_VERSION \ && : "memcached" \ - && tarantoolctl rocks install memcached $LUAROCK_MEMCACHED_VERSION \ + && ${ROCKS_INSTALLER} install memcached $LUAROCK_MEMCACHED_VERSION \ && : "metrics" \ - && tarantoolctl rocks install metrics $LUAROCK_METRICS_VERSION \ + && ${ROCKS_INSTALLER} install metrics $LUAROCK_METRICS_VERSION \ && : "prometheus" \ - && tarantoolctl rocks install prometheus $LUAROCK_TARANTOOL_PROMETHEUS_VERSION \ + && ${ROCKS_INSTALLER} install prometheus $LUAROCK_TARANTOOL_PROMETHEUS_VERSION \ && : "mqtt" \ - && tarantoolctl rocks install mqtt $LUAROCK_TARANTOOL_MQTT_VERSION \ + && ${ROCKS_INSTALLER} install mqtt $LUAROCK_TARANTOOL_MQTT_VERSION \ && : "gis" \ - && tarantoolctl rocks install gis $LUAROCK_TARANTOOL_GIS_VERSION \ + && ${ROCKS_INSTALLER} install gis $LUAROCK_TARANTOOL_GIS_VERSION \ && : "gperftools" \ - && tarantoolctl rocks install gperftools $LUAROCK_TARANTOOL_GPERFTOOLS_VERSION \ + && ${ROCKS_INSTALLER} install gperftools $LUAROCK_TARANTOOL_GPERFTOOLS_VERSION \ && : "---------- remove build deps ----------" \ && apk del .build-deps From 9c6e1d474552680291ef09ef49bdb3f6d4b453a0 Mon Sep 17 00:00:00 2001 From: "Alexander V. Tikhonov" Date: Mon, 3 Aug 2020 11:58:52 +0300 Subject: [PATCH 209/286] Use ROCKS_INSTALLER for rest of dockerfiles Set 'dockerfiles/alpine_3.5_*.x' files to use ROCKS_INSTALLER variable to make dockerfiles common between each other. Part of #152 --- dockerfiles/alpine_3.5_1.x | 33 +++++++++++++++++---------------- dockerfiles/alpine_3.5_2.x | 33 +++++++++++++++++---------------- 2 files changed, 34 insertions(+), 32 deletions(-) diff --git a/dockerfiles/alpine_3.5_1.x b/dockerfiles/alpine_3.5_1.x index 27b4fed..c74bf22 100644 --- a/dockerfiles/alpine_3.5_1.x +++ b/dockerfiles/alpine_3.5_1.x @@ -148,6 +148,7 @@ RUN mkdir -p /usr/local/etc/luarocks \ COPY files/luarocks-config.lua /usr/local/etc/luarocks/config-5.1.lua COPY files/luarocks-config.lua /usr/local/etc/tarantool/rocks/config-5.1.lua +ARG ROCKS_INSTALLER RUN set -x \ && apk add --no-cache --virtual .run-deps \ mariadb-client-libs \ @@ -196,37 +197,37 @@ RUN set -x \ && : "ldoc" \ && tarantoolctl rocks install ldoc \ && : "lua-term" \ - && tarantoolctl rocks install lua-term \ + && ${ROCKS_INSTALLER} install lua-term \ && : "avro" \ - && tarantoolctl rocks install avro-schema $LUAROCK_AVRO_SCHEMA_VERSION \ + && ${ROCKS_INSTALLER} install avro-schema $LUAROCK_AVRO_SCHEMA_VERSION \ && : "expirationd" \ - && tarantoolctl rocks install expirationd $LUAROCK_EXPERATIOND_VERSION \ + && ${ROCKS_INSTALLER} install expirationd $LUAROCK_EXPERATIOND_VERSION \ && : "queue" \ - && tarantoolctl rocks install queue $LUAROCK_QUEUE_VERSION \ + && ${ROCKS_INSTALLER} install queue $LUAROCK_QUEUE_VERSION \ && : "connpool" \ - && tarantoolctl rocks install connpool $LUAROCK_CONNPOOL_VERSION \ + && ${ROCKS_INSTALLER} install connpool $LUAROCK_CONNPOOL_VERSION \ && : "vshard" \ - && tarantoolctl rocks install vshard $LUAROCK_VSHARD_VERSION \ + && ${ROCKS_INSTALLER} install vshard $LUAROCK_VSHARD_VERSION \ && : "http" \ - && tarantoolctl rocks install http $LUAROCK_HTTP_VERSION \ + && ${ROCKS_INSTALLER} install http $LUAROCK_HTTP_VERSION \ && : "pg" \ - && tarantoolctl rocks install pg $LUAROCK_TARANTOOL_PG_VERSION \ + && ${ROCKS_INSTALLER} install pg $LUAROCK_TARANTOOL_PG_VERSION \ && : "mysql" \ - && tarantoolctl rocks install mysql $LUAROCK_TARANTOOL_MYSQL_VERSION \ + && ${ROCKS_INSTALLER} install mysql $LUAROCK_TARANTOOL_MYSQL_VERSION \ && : "memcached" \ - && tarantoolctl rocks install memcached $LUAROCK_MEMCACHED_VERSION \ + && ${ROCKS_INSTALLER} install memcached $LUAROCK_MEMCACHED_VERSION \ && : "metrics" \ - && tarantoolctl rocks install metrics $LUAROCK_METRICS_VERSION \ + && ${ROCKS_INSTALLER} install metrics $LUAROCK_METRICS_VERSION \ && : "prometheus" \ - && tarantoolctl rocks install prometheus $LUAROCK_TARANTOOL_PROMETHEUS_VERSION \ + && ${ROCKS_INSTALLER} install prometheus $LUAROCK_TARANTOOL_PROMETHEUS_VERSION \ && : "curl" \ - && tarantoolctl rocks install tarantool-curl $LUAROCK_TARANTOOL_CURL_VERSION \ + && ${ROCKS_INSTALLER} install tarantool-curl $LUAROCK_TARANTOOL_CURL_VERSION \ && : "mqtt" \ - && tarantoolctl rocks install mqtt $LUAROCK_TARANTOOL_MQTT_VERSION \ + && ${ROCKS_INSTALLER} install mqtt $LUAROCK_TARANTOOL_MQTT_VERSION \ && : "gis" \ - && tarantoolctl rocks install gis $LUAROCK_TARANTOOL_GIS_VERSION \ + && ${ROCKS_INSTALLER} install gis $LUAROCK_TARANTOOL_GIS_VERSION \ && : "gperftools" \ - && tarantoolctl rocks install gperftools $LUAROCK_TARANTOOL_GPERFTOOLS_VERSION \ + && ${ROCKS_INSTALLER} install gperftools $LUAROCK_TARANTOOL_GPERFTOOLS_VERSION \ && : "---------- remove build deps ----------" \ && apk del .build-deps diff --git a/dockerfiles/alpine_3.5_2.x b/dockerfiles/alpine_3.5_2.x index 4ab7e3f..97169de 100644 --- a/dockerfiles/alpine_3.5_2.x +++ b/dockerfiles/alpine_3.5_2.x @@ -150,6 +150,7 @@ RUN mkdir -p /usr/local/etc/luarocks \ COPY files/luarocks-config.lua /usr/local/etc/luarocks/config-5.1.lua COPY files/luarocks-config.lua /usr/local/etc/tarantool/rocks/config-5.1.lua +ARG ROCKS_INSTALLER RUN set -x \ && apk add --no-cache --virtual .run-deps \ mariadb-client-libs \ @@ -198,37 +199,37 @@ RUN set -x \ && : "---------- luarocks ----------" \ && cd / \ && : "ldoc" \ - && tarantoolctl rocks install ldoc \ + && ${ROCKS_INSTALLER} install ldoc \ && : "lua-term" \ - && tarantoolctl rocks install lua-term \ + && ${ROCKS_INSTALLER} install lua-term \ && : "avro" \ - && tarantoolctl rocks install avro-schema $LUAROCK_AVRO_SCHEMA_VERSION \ + && ${ROCKS_INSTALLER} install avro-schema $LUAROCK_AVRO_SCHEMA_VERSION \ && : "expirationd" \ - && tarantoolctl rocks install expirationd $LUAROCK_EXPERATIOND_VERSION \ + && ${ROCKS_INSTALLER} install expirationd $LUAROCK_EXPERATIOND_VERSION \ && : "queue" \ - && tarantoolctl rocks install queue $LUAROCK_QUEUE_VERSION \ + && ${ROCKS_INSTALLER} install queue $LUAROCK_QUEUE_VERSION \ && : "connpool" \ - && tarantoolctl rocks install connpool $LUAROCK_CONNPOOL_VERSION \ + && ${ROCKS_INSTALLER} install connpool $LUAROCK_CONNPOOL_VERSION \ && : "vshard" \ - && tarantoolctl rocks install vshard $LUAROCK_VSHARD_VERSION \ + && ${ROCKS_INSTALLER} install vshard $LUAROCK_VSHARD_VERSION \ && : "http" \ - && tarantoolctl rocks install http $LUAROCK_HTTP_VERSION \ + && ${ROCKS_INSTALLER} install http $LUAROCK_HTTP_VERSION \ && : "pg" \ - && tarantoolctl rocks install pg $LUAROCK_TARANTOOL_PG_VERSION \ + && ${ROCKS_INSTALLER} install pg $LUAROCK_TARANTOOL_PG_VERSION \ && : "mysql" \ - && tarantoolctl rocks install mysql $LUAROCK_TARANTOOL_MYSQL_VERSION \ + && ${ROCKS_INSTALLER} install mysql $LUAROCK_TARANTOOL_MYSQL_VERSION \ && : "memcached" \ - && tarantoolctl rocks install memcached $LUAROCK_MEMCACHED_VERSION \ + && ${ROCKS_INSTALLER} install memcached $LUAROCK_MEMCACHED_VERSION \ && : "metrics" \ - && tarantoolctl rocks install metrics $LUAROCK_METRICS_VERSION \ + && ${ROCKS_INSTALLER} install metrics $LUAROCK_METRICS_VERSION \ && : "prometheus" \ - && tarantoolctl rocks install prometheus $LUAROCK_TARANTOOL_PROMETHEUS_VERSION \ + && ${ROCKS_INSTALLER} install prometheus $LUAROCK_TARANTOOL_PROMETHEUS_VERSION \ && : "mqtt" \ - && tarantoolctl rocks install mqtt $LUAROCK_TARANTOOL_MQTT_VERSION \ + && ${ROCKS_INSTALLER} install mqtt $LUAROCK_TARANTOOL_MQTT_VERSION \ && : "gis" \ - && tarantoolctl rocks install gis $LUAROCK_TARANTOOL_GIS_VERSION \ + && ${ROCKS_INSTALLER} install gis $LUAROCK_TARANTOOL_GIS_VERSION \ && : "gperftools" \ - && tarantoolctl rocks install gperftools $LUAROCK_TARANTOOL_GPERFTOOLS_VERSION \ + && ${ROCKS_INSTALLER} install gperftools $LUAROCK_TARANTOOL_GPERFTOOLS_VERSION \ && : "---------- remove build deps ----------" \ && apk del .build-deps From 6e3167b72d89a007de22479f810694ffa8f464e5 Mon Sep 17 00:00:00 2001 From: "Alexander V. Tikhonov" Date: Sat, 1 Aug 2020 23:58:42 +0300 Subject: [PATCH 210/286] Enable ENABLE_BUNDLED_LIBYAML flag After we started using bundled version of libyaml by default, (check Tarantool commit 2.2.0-595-g1e509a030 [1] and commit 1.10.6-57-gc7ff3c9d7 [2]) we can set default variable: ENABLE_BUNDLED_LIBYAML=ON [1] - https://github.com/tarantool/tarantool/commit/47b91e90f2a4e23e70a1a6735af3de203ffd59f4 [2] - https://github.com/tarantool/tarantool/commit/c7ff3c9d712d11eb2cf49c7b30305144c2bf0620 --- .gitlab-ci.yml | 13 +++++++++++++ .gitlab.mk | 2 ++ dockerfiles/alpine_3.5_1.x | 3 ++- dockerfiles/alpine_3.5_2.x | 3 ++- dockerfiles/alpine_3.9_1.x | 3 ++- dockerfiles/alpine_3.9_2.x | 3 ++- dockerfiles/centos_7_1.x | 2 +- 7 files changed, 24 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2b076d9..7f77bbb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -42,6 +42,7 @@ before_script: VER: '1.10.0' DOCKERFILE_NAME_SUFFIX: '1.x' PORT: 5101 + ENABLE_BUNDLED_LIBYAML: 'OFF' 'alpine 3.5 1.10.1': <<: *build_definition @@ -52,6 +53,7 @@ before_script: VER: '1.10.1' DOCKERFILE_NAME_SUFFIX: '1.x' PORT: 5101 + ENABLE_BUNDLED_LIBYAML: 'OFF' 'alpine 3.5 1.10.2': <<: *build_definition @@ -62,6 +64,7 @@ before_script: VER: '1.10.2' DOCKERFILE_NAME_SUFFIX: '1.x' PORT: 5102 + ENABLE_BUNDLED_LIBYAML: 'OFF' 'alpine 3.5 1.10.3': <<: *build_definition @@ -72,6 +75,7 @@ before_script: VER: '1.10.3' DOCKERFILE_NAME_SUFFIX: '1.x' PORT: 5103 + ENABLE_BUNDLED_LIBYAML: 'OFF' 'alpine 3.9 1.10.4': <<: *build_definition @@ -83,6 +87,7 @@ before_script: DOCKERFILE_NAME_SUFFIX: '1.x' PORT: 5104 ROCKS_INSTALLER: 'luarocks' + ENABLE_BUNDLED_LIBYAML: 'OFF' 'alpine 3.9 1.10.5': <<: *build_definition @@ -94,6 +99,7 @@ before_script: DOCKERFILE_NAME_SUFFIX: '1.x' PORT: 5105 ROCKS_INSTALLER: 'luarocks' + ENABLE_BUNDLED_LIBYAML: 'OFF' 'alpine 3.9 1.10.6': <<: *build_definition @@ -105,6 +111,7 @@ before_script: DOCKERFILE_NAME_SUFFIX: '1.x' PORT: 5106 ROCKS_INSTALLER: 'luarocks' + ENABLE_BUNDLED_LIBYAML: 'OFF' 'alpine 3.9 1.x': <<: *build_definition @@ -128,6 +135,7 @@ before_script: VER: '2.1.0' DOCKERFILE_NAME_SUFFIX: '2.x' PORT: 5211 + ENABLE_BUNDLED_LIBYAML: 'OFF' 'alpine 3.5 2.1.1': <<: *build_definition @@ -138,6 +146,7 @@ before_script: VER: '2.1.1' DOCKERFILE_NAME_SUFFIX: '2.x' PORT: 5211 + ENABLE_BUNDLED_LIBYAML: 'OFF' 'alpine 3.5 2.1.2': <<: *build_definition @@ -148,6 +157,7 @@ before_script: VER: '2.1.2' DOCKERFILE_NAME_SUFFIX: '2.x' PORT: 5212 + ENABLE_BUNDLED_LIBYAML: 'OFF' 'alpine 3.9 2.1.3': <<: *build_definition @@ -159,6 +169,7 @@ before_script: DOCKERFILE_NAME_SUFFIX: '1.x' PORT: 5213 ROCKS_INSTALLER: 'luarocks' + ENABLE_BUNDLED_LIBYAML: 'OFF' 'alpine 3.9 2.1': <<: *build_definition @@ -170,6 +181,7 @@ before_script: DOCKERFILE_NAME_SUFFIX: '1.x' PORT: 5210 ROCKS_INSTALLER: 'luarocks' + ENABLE_BUNDLED_LIBYAML: 'OFF' # Tarantool branch 2.2 @@ -182,6 +194,7 @@ before_script: VER: '2.2.0' DOCKERFILE_NAME_SUFFIX: '2.x' PORT: 5220 + ENABLE_BUNDLED_LIBYAML: 'OFF' 'alpine 3.5 2.2.1': <<: *build_definition diff --git a/.gitlab.mk b/.gitlab.mk index c6e2441..6275ede 100644 --- a/.gitlab.mk +++ b/.gitlab.mk @@ -1,9 +1,11 @@ TNT_VER=$(shell cat versions/${OS}_${DIST}_${VER}) ROCKS_INSTALLER?='tarantoolctl rocks' +ENABLE_BUNDLED_LIBYAML?='ON' build: docker build --no-cache --network=host \ --build-arg ROCKS_INSTALLER=${ROCKS_INSTALLER} \ + --build-arg ENABLE_BUNDLED_LIBYAML=${ENABLE_BUNDLED_LIBYAML} \ --build-arg TNT_VER=${TNT_VER} \ --build-arg BASE_IMAGE="${OS}:${DIST}" \ -t ${IMAGE}:${TAG} -f dockerfiles/${OS}_${DIST}_${DOCKERFILE_NAME_SUFFIX} . diff --git a/dockerfiles/alpine_3.5_1.x b/dockerfiles/alpine_3.5_1.x index c74bf22..65d37cb 100644 --- a/dockerfiles/alpine_3.5_1.x +++ b/dockerfiles/alpine_3.5_1.x @@ -36,6 +36,7 @@ ENV TARANTOOL_VERSION=${TNT_VER} \ COPY files/gperftools_alpine.diff / +ARG ENABLE_BUNDLED_LIBYAML RUN set -x \ && apk add --no-cache --virtual .run-deps \ libstdc++ \ @@ -120,7 +121,7 @@ RUN set -x \ && git -C /usr/src/tarantool submodule update --init --recursive \ && (cd /usr/src/tarantool; \ cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo\ - -DENABLE_BUNDLED_LIBYAML:BOOL=OFF\ + -DENABLE_BUNDLED_LIBYAML:BOOL=${ENABLE_BUNDLED_LIBYAML}\ -DENABLE_BACKTRACE:BOOL=ON\ -DENABLE_DIST:BOOL=ON\ .) \ diff --git a/dockerfiles/alpine_3.5_2.x b/dockerfiles/alpine_3.5_2.x index 97169de..9b83551 100644 --- a/dockerfiles/alpine_3.5_2.x +++ b/dockerfiles/alpine_3.5_2.x @@ -35,6 +35,7 @@ ENV TARANTOOL_VERSION=${TNT_VER} \ COPY files/gperftools_alpine.diff / +ARG ENABLE_BUNDLED_LIBYAML RUN set -x \ && apk add --no-cache --virtual .run-deps \ libstdc++ \ @@ -122,7 +123,7 @@ RUN set -x \ && git -C /usr/src/tarantool submodule update --init --recursive \ && (cd /usr/src/tarantool; \ cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo\ - -DENABLE_BUNDLED_LIBYAML:BOOL=OFF\ + -DENABLE_BUNDLED_LIBYAML:BOOL=${ENABLE_BUNDLED_LIBYAML}\ -DENABLE_BACKTRACE:BOOL=ON\ -DENABLE_DIST:BOOL=ON\ .) \ diff --git a/dockerfiles/alpine_3.9_1.x b/dockerfiles/alpine_3.9_1.x index 5b30941..faea26e 100644 --- a/dockerfiles/alpine_3.9_1.x +++ b/dockerfiles/alpine_3.9_1.x @@ -33,6 +33,7 @@ ENV TARANTOOL_VERSION=${TNT_VER} \ COPY files/gperftools_alpine.diff / +ARG ENABLE_BUNDLED_LIBYAML RUN set -x \ && apk add --no-cache --virtual .run-deps \ libstdc++ \ @@ -114,7 +115,7 @@ RUN set -x \ git cherry-pick d7fa6d34ab4e0956fe8a80966ba628e0e3f81067 2>/dev/null || \ git cherry-pick --abort ; \ cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo\ - -DENABLE_BUNDLED_LIBYAML:BOOL=OFF\ + -DENABLE_BUNDLED_LIBYAML:BOOL=${ENABLE_BUNDLED_LIBYAML}\ -DENABLE_BACKTRACE:BOOL=ON\ -DENABLE_DIST:BOOL=ON\ .) \ diff --git a/dockerfiles/alpine_3.9_2.x b/dockerfiles/alpine_3.9_2.x index 949730d..26e83bd 100644 --- a/dockerfiles/alpine_3.9_2.x +++ b/dockerfiles/alpine_3.9_2.x @@ -33,6 +33,7 @@ ENV TARANTOOL_VERSION=${TNT_VER} \ COPY files/gperftools_alpine.diff / +ARG ENABLE_BUNDLED_LIBYAML RUN set -x \ && apk add --no-cache --virtual .run-deps \ libstdc++ \ @@ -113,7 +114,7 @@ RUN set -x \ git cherry-pick d7fa6d34ab4e0956fe8a80966ba628e0e3f81067 2>/dev/null || \ git cherry-pick --abort ; \ cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo\ - -DENABLE_BUNDLED_LIBYAML:BOOL=ON\ + -DENABLE_BUNDLED_LIBYAML:BOOL=${ENABLE_BUNDLED_LIBYAML}\ -DENABLE_BACKTRACE:BOOL=ON\ -DENABLE_DIST:BOOL=ON\ .) \ diff --git a/dockerfiles/centos_7_1.x b/dockerfiles/centos_7_1.x index a04e268..cc94d78 100644 --- a/dockerfiles/centos_7_1.x +++ b/dockerfiles/centos_7_1.x @@ -93,7 +93,7 @@ RUN set -x \ && (cd /usr/src/tarantool; git submodule update --init --recursive;) \ && (cd /usr/src/tarantool; \ cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo\ - -DENABLE_BUNDLED_LIBYAML:BOOL=OFF\ + -DENABLE_BUNDLED_LIBYAML:BOOL=ON\ -DENABLE_BACKTRACE:BOOL=ON\ -DENABLE_DIST:BOOL=ON\ .) \ From bdefa84fab61ab8de6b5e20ceef1ceabf3c96ba9 Mon Sep 17 00:00:00 2001 From: "Alexander V. Tikhonov" Date: Sun, 2 Aug 2020 21:08:51 +0300 Subject: [PATCH 211/286] Enable manual build with makefile Setup makefile to be able to build images manually on local host without gitlab-ci use. --- .gitlab.mk | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.gitlab.mk b/.gitlab.mk index 6275ede..148c7d4 100644 --- a/.gitlab.mk +++ b/.gitlab.mk @@ -1,19 +1,25 @@ TNT_VER=$(shell cat versions/${OS}_${DIST}_${VER}) ROCKS_INSTALLER?='tarantoolctl rocks' ENABLE_BUNDLED_LIBYAML?='ON' +IMAGE?='tarantool/tarantool' build: + [ "${TNT_VER}" != "" ] || (echo "ERROR: TNT_VER not defined" ; exit 1) + [ "${DOCKERFILE_NAME_SUFFIX}" != "" ] && \ + DOCKERFILE_SUFFIX=_${DOCKERFILE_NAME_SUFFIX} ; \ docker build --no-cache --network=host \ --build-arg ROCKS_INSTALLER=${ROCKS_INSTALLER} \ --build-arg ENABLE_BUNDLED_LIBYAML=${ENABLE_BUNDLED_LIBYAML} \ --build-arg TNT_VER=${TNT_VER} \ --build-arg BASE_IMAGE="${OS}:${DIST}" \ - -t ${IMAGE}:${TAG} -f dockerfiles/${OS}_${DIST}_${DOCKERFILE_NAME_SUFFIX} . + -t ${IMAGE}:${TAG} -f dockerfiles/${OS}_${DIST}$${DOCKERFILE_SUFFIX} . docker run --rm --name tarantool_${TAG} -p ${PORT}:${PORT} -d ${IMAGE}:${TAG} docker exec -t tarantool_${TAG} tarantool_is_up docker stop tarantool_${TAG} - docker push ${IMAGE}:${TAG} - if [ -n "${TAG_LATEST}" ] ; then \ - docker tag ${IMAGE}:${TAG} ${IMAGE}:${TAG_LATEST} ; \ - docker push ${IMAGE}:${TAG_LATEST} ; \ + if [ -n "${GITLAB_CI}" ] ; then \ + docker push ${IMAGE}:${TAG} ; \ + if [ -n "${TAG_LATEST}" ] ; then \ + docker tag ${IMAGE}:${TAG} ${IMAGE}:${TAG_LATEST} ; \ + docker push ${IMAGE}:${TAG_LATEST} ; \ + fi ; \ fi From 2b93a198c16d659b41fb77e0e0e8d2a5820b6651 Mon Sep 17 00:00:00 2001 From: "Alexander V. Tikhonov" Date: Mon, 3 Aug 2020 00:04:38 +0300 Subject: [PATCH 212/286] Remove perl installation from build depends Removed perl installation from build depends as not needed. --- dockerfiles/alpine_3.5_1.x | 1 - dockerfiles/alpine_3.5_2.x | 1 - dockerfiles/alpine_3.9_1.x | 1 - dockerfiles/centos_7_1.x | 4 ---- dockerfiles/centos_7_2.x | 4 ---- 5 files changed, 11 deletions(-) diff --git a/dockerfiles/alpine_3.5_1.x b/dockerfiles/alpine_3.5_1.x index 65d37cb..7f1b998 100644 --- a/dockerfiles/alpine_3.5_1.x +++ b/dockerfiles/alpine_3.5_1.x @@ -54,7 +54,6 @@ RUN set -x \ icu \ ca-certificates \ && apk add --no-cache --virtual .build-deps \ - perl \ gcc \ g++ \ cmake \ diff --git a/dockerfiles/alpine_3.5_2.x b/dockerfiles/alpine_3.5_2.x index 9b83551..395b0eb 100644 --- a/dockerfiles/alpine_3.5_2.x +++ b/dockerfiles/alpine_3.5_2.x @@ -54,7 +54,6 @@ RUN set -x \ icu \ ca-certificates \ && apk add --no-cache --virtual .build-deps \ - perl \ gcc \ g++ \ cmake \ diff --git a/dockerfiles/alpine_3.9_1.x b/dockerfiles/alpine_3.9_1.x index faea26e..a61ec18 100644 --- a/dockerfiles/alpine_3.9_1.x +++ b/dockerfiles/alpine_3.9_1.x @@ -52,7 +52,6 @@ RUN set -x \ icu \ ca-certificates \ && apk add --no-cache --virtual .build-deps \ - perl \ gcc \ g++ \ cmake \ diff --git a/dockerfiles/centos_7_1.x b/dockerfiles/centos_7_1.x index cc94d78..103eea7 100644 --- a/dockerfiles/centos_7_1.x +++ b/dockerfiles/centos_7_1.x @@ -50,7 +50,6 @@ RUN set -x \ libunwind \ ca-certificates \ && yum -y install \ - perl \ file \ gcc-c++ \ cmake \ @@ -115,7 +114,6 @@ RUN set -x \ && rm -rf /usr/src/curl \ && : "---------- remove build deps ----------" \ && yum -y remove \ - perl \ gcc-c++ \ cmake \ readline-devel \ @@ -133,7 +131,6 @@ RUN set -x \ libtool \ go \ wget \ - perl \ file \ kernel-headers \ golang-src \ @@ -218,7 +215,6 @@ RUN set -x \ proj-devel \ geos-devel \ openssl-devel \ - perl \ kernel-headers \ golang-src \ && rpm -qa | grep devel | xargs yum -y remove \ diff --git a/dockerfiles/centos_7_2.x b/dockerfiles/centos_7_2.x index 1711dd1..cf1312e 100644 --- a/dockerfiles/centos_7_2.x +++ b/dockerfiles/centos_7_2.x @@ -49,7 +49,6 @@ RUN set -x \ libunwind \ ca-certificates \ && yum -y install \ - perl \ file \ gcc-c++ \ cmake \ @@ -112,7 +111,6 @@ RUN set -x \ && rm -rf /usr/src/icu \ && : "---------- remove build deps ----------" \ && yum -y remove \ - perl \ file \ gcc-c++ \ cmake \ @@ -130,7 +128,6 @@ RUN set -x \ libtool \ go \ wget \ - perl \ kernel-headers \ golang-src \ && rpm -qa | grep devel | xargs yum -y remove \ @@ -214,7 +211,6 @@ RUN set -x \ proj-devel \ geos-devel \ openssl-devel \ - perl \ kernel-headers \ golang-src \ && rpm -qa | grep devel | xargs yum -y remove \ From ee36b9d5ca8633673748d0f524178afdb2e64147 Mon Sep 17 00:00:00 2001 From: "Alexander V. Tikhonov" Date: Mon, 3 Aug 2020 07:33:12 +0300 Subject: [PATCH 213/286] Add unzip tool to rocks installations Found issue: tarantoolctl rocks install ldoc --server=http://rocks.moonscript.org Warning: Failed searching manifest: Failed extracting manifest file: 'unzip -n' program not found. Make sure unzip is installed and is available in your PATH (or you may want to edit the 'variables.UNZIP' value in file '/usr/local/etc/tarantool/rocks/config-5.1.lua') ldoc not found for Lua 5.1. ... Error: No results matching query were found for Lua 5.1. To fix it the unzip package tool was added to be installed before rocks installations. --- dockerfiles/alpine_3.5_1.x | 1 + dockerfiles/alpine_3.9_1.x | 1 + 2 files changed, 2 insertions(+) diff --git a/dockerfiles/alpine_3.5_1.x b/dockerfiles/alpine_3.5_1.x index 7f1b998..6e1d4b1 100644 --- a/dockerfiles/alpine_3.5_1.x +++ b/dockerfiles/alpine_3.5_1.x @@ -169,6 +169,7 @@ RUN set -x \ cyrus-sasl-dev \ mosquitto-dev \ libev-dev \ + unzip \ && mkdir -p /rocks \ && : "---------- proj (for gis module) ----------" \ && wget -O proj.tar.gz http://download.osgeo.org/proj/proj-4.9.3.tar.gz \ diff --git a/dockerfiles/alpine_3.9_1.x b/dockerfiles/alpine_3.9_1.x index a61ec18..25cb19c 100644 --- a/dockerfiles/alpine_3.9_1.x +++ b/dockerfiles/alpine_3.9_1.x @@ -164,6 +164,7 @@ RUN set -x \ mosquitto-dev \ libev-dev \ wget \ + unzip \ && mkdir -p /rocks \ && : "---------- proj (for gis module) ----------" \ && wget -O proj.tar.gz http://download.osgeo.org/proj/proj-4.9.3.tar.gz \ From 256d857a74f1dfe01d764e0df3027d789e3685aa Mon Sep 17 00:00:00 2001 From: "Alexander V. Tikhonov" Date: Mon, 3 Aug 2020 08:47:48 +0300 Subject: [PATCH 214/286] Use openssl in alpine based images builds Decided to use openssl instead of libressl in alpine 3.9 based images builds, due to all the issues that caused the use of libressl in previous were resolved when alpine base image was bumped from 3.5 to 3.9 version. --- dockerfiles/alpine_3.9_1.x | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dockerfiles/alpine_3.9_1.x b/dockerfiles/alpine_3.9_1.x index 25cb19c..4123924 100644 --- a/dockerfiles/alpine_3.9_1.x +++ b/dockerfiles/alpine_3.9_1.x @@ -38,7 +38,7 @@ RUN set -x \ && apk add --no-cache --virtual .run-deps \ libstdc++ \ readline \ - libressl \ + openssl \ yaml \ lz4 \ binutils \ @@ -57,7 +57,7 @@ RUN set -x \ cmake \ file \ readline-dev \ - libressl-dev \ + openssl-dev \ yaml-dev \ lz4-dev \ zlib-dev \ From da6d177f60aab329dc37571cf451ee97710b78f0 Mon Sep 17 00:00:00 2001 From: "Alexander V. Tikhonov" Date: Wed, 5 Aug 2020 15:00:20 +0300 Subject: [PATCH 215/286] Merge same Alpine 3.9 dockerfiles Due to dockerfiles for Alpine 3.9 builds became the same, it were merged into common file. --- .gitlab-ci.yml | 17 -- README.md | 43 ++-- dockerfiles/{alpine_3.9_1.x => alpine_3.9} | 0 dockerfiles/alpine_3.9_2.x | 257 --------------------- 4 files changed, 21 insertions(+), 296 deletions(-) rename dockerfiles/{alpine_3.9_1.x => alpine_3.9} (100%) delete mode 100644 dockerfiles/alpine_3.9_2.x diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7f77bbb..5ee955c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -84,7 +84,6 @@ before_script: DIST: '3.9' TAG: '1.10.4' VER: '1.10.4' - DOCKERFILE_NAME_SUFFIX: '1.x' PORT: 5104 ROCKS_INSTALLER: 'luarocks' ENABLE_BUNDLED_LIBYAML: 'OFF' @@ -96,7 +95,6 @@ before_script: DIST: '3.9' TAG: '1.10.5' VER: '1.10.5' - DOCKERFILE_NAME_SUFFIX: '1.x' PORT: 5105 ROCKS_INSTALLER: 'luarocks' ENABLE_BUNDLED_LIBYAML: 'OFF' @@ -108,7 +106,6 @@ before_script: DIST: '3.9' TAG: '1.10.6' VER: '1.10.6' - DOCKERFILE_NAME_SUFFIX: '1.x' PORT: 5106 ROCKS_INSTALLER: 'luarocks' ENABLE_BUNDLED_LIBYAML: 'OFF' @@ -120,7 +117,6 @@ before_script: DIST: '3.9' TAG: '1' VER: '1.x' - DOCKERFILE_NAME_SUFFIX: '1.x' PORT: 5100 ROCKS_INSTALLER: 'luarocks' @@ -166,7 +162,6 @@ before_script: DIST: '3.9' TAG: '2.1.3' VER: '2.1.3' - DOCKERFILE_NAME_SUFFIX: '1.x' PORT: 5213 ROCKS_INSTALLER: 'luarocks' ENABLE_BUNDLED_LIBYAML: 'OFF' @@ -178,7 +173,6 @@ before_script: DIST: '3.9' TAG: '2.1' VER: '2.1' - DOCKERFILE_NAME_SUFFIX: '1.x' PORT: 5210 ROCKS_INSTALLER: 'luarocks' ENABLE_BUNDLED_LIBYAML: 'OFF' @@ -213,7 +207,6 @@ before_script: DIST: '3.9' TAG: '2.2.2' VER: '2.2.2' - DOCKERFILE_NAME_SUFFIX: '2.x' PORT: 5222 'alpine 3.9 2.2.3': @@ -223,7 +216,6 @@ before_script: DIST: '3.9' TAG: '2.2.3' VER: '2.2.3' - DOCKERFILE_NAME_SUFFIX: '2.x' PORT: 5223 'alpine 3.9 2.2': @@ -233,7 +225,6 @@ before_script: DIST: '3.9' TAG: '2.2' VER: '2.2' - DOCKERFILE_NAME_SUFFIX: '2.x' PORT: 5220 # Tarantool branch 2.3 @@ -255,7 +246,6 @@ before_script: DIST: '3.9' TAG: '2.3.1' VER: '2.3.1' - DOCKERFILE_NAME_SUFFIX: '2.x' PORT: 5231 'alpine 3.9 2.3.2': @@ -265,7 +255,6 @@ before_script: DIST: '3.9' TAG: '2.3.2' VER: '2.3.2' - DOCKERFILE_NAME_SUFFIX: '2.x' PORT: 5231 'alpine 3.9 2.3': @@ -275,7 +264,6 @@ before_script: DIST: '3.9' TAG: '2.3' VER: '2.3' - DOCKERFILE_NAME_SUFFIX: '2.x' PORT: 5230 # Tarantool branch 2.4 @@ -287,7 +275,6 @@ before_script: DIST: '3.9' TAG: '2.4.0' VER: '2.4.0' - DOCKERFILE_NAME_SUFFIX: '2.x' PORT: 5241 'alpine 3.9 2.4.1': @@ -297,7 +284,6 @@ before_script: DIST: '3.9' TAG: '2.4.1' VER: '2.4.1' - DOCKERFILE_NAME_SUFFIX: '2.x' PORT: 5241 'alpine 3.9 2.4': @@ -307,7 +293,6 @@ before_script: DIST: '3.9' TAG: '2.4' VER: '2.4' - DOCKERFILE_NAME_SUFFIX: '2.x' PORT: 5240 # Tarantool branch master @@ -319,7 +304,6 @@ before_script: DIST: '3.9' TAG: '2.5.0' VER: '2.5.0' - DOCKERFILE_NAME_SUFFIX: '2.x' PORT: 5251 'alpine 3.9 2.x': @@ -329,7 +313,6 @@ before_script: DIST: '3.9' TAG: '2' VER: '2.x' - DOCKERFILE_NAME_SUFFIX: '2.x' PORT: 5200 TAG_LATEST: 'latest' diff --git a/README.md b/README.md index af999bb..b1a3474 100644 --- a/README.md +++ b/README.md @@ -307,11 +307,10 @@ A maintaner is responsible for merging the PR. ## How to check -Say, we have updated dockerfiles/alpine_3.9_2.x and want to check it: +Say, we have updated 'dockerfiles/alpine_3.9' and want to check it: ```sh -$ IMAGE=tarantool/tarantool TAG=2 OS=alpine DIST=3.9 VER=2.x DOCKERFILE_NAME_SUFFIX=2.x \ - PORT=5200 make -f .gitlab.mk build +$ TAG=2 OS=alpine DIST=3.9 VER=2.x PORT=5200 make -f .gitlab.mk build $ docker run -it tarantool/tarantool:2 ...perform a test... ``` @@ -326,34 +325,34 @@ Fixed versions: | 1.10.1 | dockerfile/alpine_3.5_1.x | | 1.10.2 | dockerfile/alpine_3.5_1.x | | 1.10.3 | dockerfile/alpine_3.5_1.x | -| 1.10.4 | dockerfile/alpine_3.9_1.x | -| 1.10.5 | dockerfile/alpine_3.9_1.x | -| 1.10.6 | dockerfile/alpine_3.9_1.x | +| 1.10.4 | dockerfile/alpine_3.9 | +| 1.10.5 | dockerfile/alpine_3.9 | +| 1.10.6 | dockerfile/alpine_3.9 | | 2.1.0 | dockerfile/alpine_3.5_2.x | | 2.1.1 | dockerfile/alpine_3.5_2.x | | 2.1.2 | dockerfile/alpine_3.5_2.x | -| 2.1.3 | dockerfile/alpine_3.9_1.x | +| 2.1.3 | dockerfile/alpine_3.9 | | 2.2.0 | dockerfile/alpine_3.5_2.x | | 2.2.1 | dockerfile/alpine_3.5_2.x | -| 2.2.2 | dockerfile/alpine_3.9_2.x | -| 2.2.3 | dockerfile/alpine_3.9_2.x | +| 2.2.2 | dockerfile/alpine_3.9 | +| 2.2.3 | dockerfile/alpine_3.9 | | 2.3.0 | dockerfile/alpine_3.5_2.x | -| 2.3.1 | dockerfile/alpine_3.9_2.x | -| 2.3.2 | dockerfile/alpine_3.9_2.x | -| 2.4.0 | dockerfile/alpine_3.9_2.x | -| 2.4.1 | dockerfile/alpine_3.9_2.x | -| 2.5.0 | dockerfile/alpine_3.9_2.x | +| 2.3.1 | dockerfile/alpine_3.9 | +| 2.3.2 | dockerfile/alpine_3.9 | +| 2.4.0 | dockerfile/alpine_3.9 | +| 2.4.1 | dockerfile/alpine_3.9 | +| 2.5.0 | dockerfile/alpine_3.9 | Rolling versions: -| Docker tag | Dockerfile | -| ---------- | ------------------------- | -| 1 | dockerfile/alpine_3.9_1.x | -| 2.1 | dockerfile/alpine_3.9_1.x | -| 2.2 | dockerfile/alpine_3.9_2.x | -| 2.3 | dockerfile/alpine_3.9_2.x | -| 2.4 | dockerfile/alpine_3.9_2.x | -| 2/latest | dockerfile/alpine_3.9_2.x | +| Docker tag | Dockerfile | +| ---------- | --------------------- | +| 1 | dockerfile/alpine_3.9 | +| 2.1 | dockerfile/alpine_3.9 | +| 2.2 | dockerfile/alpine_3.9 | +| 2.3 | dockerfile/alpine_3.9 | +| 2.4 | dockerfile/alpine_3.9 | +| 2/latest | dockerfile/alpine_3.9 | Special builds: diff --git a/dockerfiles/alpine_3.9_1.x b/dockerfiles/alpine_3.9 similarity index 100% rename from dockerfiles/alpine_3.9_1.x rename to dockerfiles/alpine_3.9 diff --git a/dockerfiles/alpine_3.9_2.x b/dockerfiles/alpine_3.9_2.x deleted file mode 100644 index 26e83bd..0000000 --- a/dockerfiles/alpine_3.9_2.x +++ /dev/null @@ -1,257 +0,0 @@ -ARG BASE_IMAGE -FROM ${BASE_IMAGE} -MAINTAINER mail@racktear.com - -RUN addgroup -S tarantool \ - && adduser -S -G tarantool tarantool \ - && apk add --no-cache 'su-exec>=0.2' - -# An ARG instruction goes out of scope at the end of the build -# stage where it was defined. To use an arg in multiple stages, -# each stage must include the ARG instruction -ARG TNT_VER -ENV TARANTOOL_VERSION=${TNT_VER} \ - TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ - TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ - GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ - GPERFTOOLS_TAG=gperftools-2.5 \ - LUAROCKS_URL=https://github.com/tarantool/luarocks/archive/6e6fe62d9409fe2103c0fd091cccb3da0451faf5.tar.gz \ - LUAROCK_VSHARD_VERSION=0.1.14 \ - LUAROCK_AVRO_SCHEMA_VERSION=3.0.3 \ - LUAROCK_EXPERATIOND_VERSION=1.0.1 \ - LUAROCK_QUEUE_VERSION=1.0.6 \ - LUAROCK_CONNPOOL_VERSION=1.1.1 \ - LUAROCK_HTTP_VERSION=1.1.0 \ - LUAROCK_MEMCACHED_VERSION=1.0.1 \ - LUAROCK_METRICS_VERSION=0.2.0 \ - LUAROCK_TARANTOOL_PG_VERSION=2.0.2 \ - LUAROCK_TARANTOOL_MYSQL_VERSION=2.0.1 \ - LUAROCK_TARANTOOL_MQTT_VERSION=1.2.1 \ - LUAROCK_TARANTOOL_GIS_VERSION=1.0.0 \ - LUAROCK_TARANTOOL_PROMETHEUS_VERSION=1.0.4 \ - LUAROCK_TARANTOOL_GPERFTOOLS_VERSION=1.0.1 - -COPY files/gperftools_alpine.diff / - -ARG ENABLE_BUNDLED_LIBYAML -RUN set -x \ - && apk add --no-cache --virtual .run-deps \ - libstdc++ \ - readline \ - openssl \ - yaml \ - lz4 \ - binutils \ - ncurses \ - libgomp \ - lua \ - tar \ - zip \ - zlib \ - libunwind \ - icu \ - ca-certificates \ - && apk add --no-cache --virtual .build-deps \ - gcc \ - g++ \ - cmake \ - file \ - readline-dev \ - openssl-dev \ - yaml-dev \ - lz4-dev \ - zlib-dev \ - binutils-dev \ - ncurses-dev \ - lua-dev \ - musl-dev \ - make \ - git \ - libunwind-dev \ - autoconf \ - automake \ - libtool \ - linux-headers \ - go \ - icu-dev \ - wget \ - && : "---------- gperftools ----------" \ - && mkdir -p /usr/src/gperftools \ - && git clone "$GPERFTOOLS_REPO" /usr/src/gperftools \ - && git -C /usr/src/gperftools checkout "$GPERFTOOLS_TAG" \ - && (cd /usr/src/gperftools; \ - patch -p1 < /gperftools_alpine.diff; \ - rm /gperftools_alpine.diff; \ - ./autogen.sh; \ - ./configure; \ - make -j ; \ - cp .libs/libprofiler.so* /usr/local/lib;) \ - && : "---------- pprof for gperftools ----------" \ - && : "To avoid of the issue:" \ - && : "'The master branch is Incompatible with go version < 1.13 #538'" \ - && : "https://github.com/google/pprof/issues/538" \ - && : "use latest workable commits with the old GO versions" \ - && ( export GOPATH=/root/go && \ - export PATH=${GOPATH}/bin:/usr/local/go/bin:$PATH && \ - export GOBIN=$GOROOT/bin && \ - mkdir -p ${GOPATH}/src ${GOPATH}/bin && \ - go get github.com/google/pprof || : && \ - cd /root/go/src/github.com/google/pprof && \ - git checkout 160c4290d1d8cee56daa51d7ba5d223291d392aa && \ - ( cd /root/go/src/github.com/chzyer/readline && \ - git checkout f6d7a1f6fbf35bbf9beb80dc63c56a29dcfb759f ) && \ - ( cd /root/go/src/github.com/ianlancetaylor/demangle && \ - git checkout 039b1ae3a3406573c84daaf91166d70ad2bc0519 ) && \ - go build && \ - cp pprof /usr/local/bin/pprof ) \ - && : "---------- tarantool ----------" \ - && mkdir -p /usr/src/tarantool \ - && git clone "$TARANTOOL_DOWNLOAD_URL" /usr/src/tarantool \ - && git -C /usr/src/tarantool checkout "$TARANTOOL_VERSION" \ - && git -C /usr/src/tarantool submodule update --init --recursive \ - && (cd /usr/src/tarantool; \ - echo "WARNING: Temporary fix for test/unit/cbus_hang test" ; \ - git cherry-pick d7fa6d34ab4e0956fe8a80966ba628e0e3f81067 2>/dev/null || \ - git cherry-pick --abort ; \ - cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo\ - -DENABLE_BUNDLED_LIBYAML:BOOL=${ENABLE_BUNDLED_LIBYAML}\ - -DENABLE_BACKTRACE:BOOL=ON\ - -DENABLE_DIST:BOOL=ON\ - .) \ - && make -C /usr/src/tarantool -j\ - && make -C /usr/src/tarantool install \ - && make -C /usr/src/tarantool clean \ - && : "---------- luarocks ----------" \ - && wget -O luarocks.tar.gz "$LUAROCKS_URL" \ - && mkdir -p /usr/src/luarocks \ - && tar -xzf luarocks.tar.gz -C /usr/src/luarocks --strip-components=1 \ - && (cd /usr/src/luarocks; \ - ./configure; \ - make -j build; \ - make install) \ - && rm -r /usr/src/luarocks \ - && rm -rf /usr/src/tarantool \ - && rm -rf /usr/src/gperftools \ - && rm -rf /usr/src/go \ - && : "---------- remove build deps ----------" \ - && apk del .build-deps - -RUN mkdir -p /usr/local/etc/luarocks \ - && mkdir -p /usr/local/etc/tarantool/rocks - -COPY files/luarocks-config.lua /usr/local/etc/luarocks/config-5.1.lua -COPY files/luarocks-config.lua /usr/local/etc/tarantool/rocks/config-5.1.lua - -ARG ROCKS_INSTALLER -RUN set -x \ - && apk add --no-cache --virtual .run-deps \ - mariadb-client-libs \ - libpq \ - cyrus-sasl \ - mosquitto-libs \ - libev \ - && apk add --no-cache --virtual .build-deps \ - git \ - cmake \ - make \ - coreutils \ - gcc \ - g++ \ - postgresql-dev \ - lua-dev \ - musl-dev \ - cyrus-sasl-dev \ - mosquitto-dev \ - libev-dev \ - wget \ - unzip \ - && mkdir -p /rocks \ - && : "---------- proj (for gis module) ----------" \ - && wget -O proj.tar.gz http://download.osgeo.org/proj/proj-4.9.3.tar.gz \ - && mkdir -p /usr/src/proj \ - && tar -xzf proj.tar.gz -C /usr/src/proj --strip-components=1 \ - && (cd /usr/src/proj; \ - ./configure; \ - make -j ; \ - make install) \ - && rm -r /usr/src/proj \ - && rm -rf /usr/src/proj \ - && rm -rf /proj.tar.gz \ - && : "---------- geos (for gis module) ----------" \ - && wget -O geos.tar.bz2 http://download.osgeo.org/geos/geos-3.6.0.tar.bz2 \ - && mkdir -p /usr/src/geos \ - && tar -xjf geos.tar.bz2 -C /usr/src/geos --strip-components=1 \ - && (cd /usr/src/geos; \ - ./configure; \ - make -j ; \ - make install) \ - && rm -r /usr/src/geos \ - && rm -rf /usr/src/geos \ - && rm -rf /geos.tar.bz2 \ - && : "---------- luarocks ----------" \ - && cd / \ - && : "ldoc" \ - && ${ROCKS_INSTALLER} install ldoc \ - && : "lua-term" \ - && ${ROCKS_INSTALLER} install lua-term \ - && : "avro" \ - && ${ROCKS_INSTALLER} install avro-schema $LUAROCK_AVRO_SCHEMA_VERSION \ - && : "expirationd" \ - && ${ROCKS_INSTALLER} install expirationd $LUAROCK_EXPERATIOND_VERSION \ - && : "queue" \ - && ${ROCKS_INSTALLER} install queue $LUAROCK_QUEUE_VERSION \ - && : "connpool" \ - && ${ROCKS_INSTALLER} install connpool $LUAROCK_CONNPOOL_VERSION \ - && : "vshard" \ - && ${ROCKS_INSTALLER} install vshard $LUAROCK_VSHARD_VERSION \ - && : "http" \ - && ${ROCKS_INSTALLER} install http $LUAROCK_HTTP_VERSION \ - && : "pg" \ - && ${ROCKS_INSTALLER} install pg $LUAROCK_TARANTOOL_PG_VERSION \ - && : "mysql" \ - && ${ROCKS_INSTALLER} install mysql $LUAROCK_TARANTOOL_MYSQL_VERSION \ - && : "memcached" \ - && ${ROCKS_INSTALLER} install memcached $LUAROCK_MEMCACHED_VERSION \ - && : "metrics" \ - && ${ROCKS_INSTALLER} install metrics $LUAROCK_METRICS_VERSION \ - && : "prometheus" \ - && ${ROCKS_INSTALLER} install prometheus $LUAROCK_TARANTOOL_PROMETHEUS_VERSION \ - && : "mqtt" \ - && ${ROCKS_INSTALLER} install mqtt $LUAROCK_TARANTOOL_MQTT_VERSION \ - && : "gis" \ - && ${ROCKS_INSTALLER} install gis $LUAROCK_TARANTOOL_GIS_VERSION \ - && : "gperftools" \ - && ${ROCKS_INSTALLER} install gperftools $LUAROCK_TARANTOOL_GPERFTOOLS_VERSION \ - && : "---------- remove build deps ----------" \ - && apk del .build-deps - -# gh-170: needed for luarocks -RUN apk update \ - && apk add wget git - -RUN mkdir -p /var/lib/tarantool \ - && chown tarantool:tarantool /var/lib/tarantool \ - && mkdir -p /opt/tarantool \ - && chown tarantool:tarantool /opt/tarantool \ - && mkdir -p /var/run/tarantool \ - && chown tarantool:tarantool /var/run/tarantool \ - && mkdir /etc/tarantool \ - && chown tarantool:tarantool /etc/tarantool - -VOLUME /var/lib/tarantool -WORKDIR /opt/tarantool - -COPY files/tarantool-entrypoint.lua /usr/local/bin/ -COPY files/tarantool_set_config.lua /usr/local/bin/ -COPY files/docker-entrypoint.sh /usr/local/bin/ -COPY files/console /usr/local/bin/ -COPY files/tarantool_is_up /usr/local/bin/ -COPY files/tarantool.default /usr/local/etc/default/tarantool - -RUN ln -s usr/local/bin/docker-entrypoint.sh /entrypoint.sh # backwards compat -ENTRYPOINT ["docker-entrypoint.sh"] - -HEALTHCHECK CMD tarantool_is_up - -EXPOSE 3301 -CMD [ "tarantool" ] From 93add3e26c1441420c5cf913baab927de771d525 Mon Sep 17 00:00:00 2001 From: "Alexander V. Tikhonov" Date: Thu, 6 Aug 2020 20:30:15 +0300 Subject: [PATCH 216/286] Remove tarantool_curl rock Removed installation of tarantool_curl rock from alpine_3.5_1.x dockerfile. It affected Tarantool tags builds 1.10.[0-3]. --- dockerfiles/alpine_3.5_1.x | 3 --- 1 file changed, 3 deletions(-) diff --git a/dockerfiles/alpine_3.5_1.x b/dockerfiles/alpine_3.5_1.x index 6e1d4b1..bfe0648 100644 --- a/dockerfiles/alpine_3.5_1.x +++ b/dockerfiles/alpine_3.5_1.x @@ -28,7 +28,6 @@ ENV TARANTOOL_VERSION=${TNT_VER} \ LUAROCK_METRICS_VERSION=0.2.0 \ LUAROCK_TARANTOOL_PG_VERSION=2.0.2 \ LUAROCK_TARANTOOL_MYSQL_VERSION=2.0.1 \ - LUAROCK_TARANTOOL_CURL_VERSION=2.3.1 \ LUAROCK_TARANTOOL_MQTT_VERSION=1.2.1 \ LUAROCK_TARANTOOL_GIS_VERSION=1.0.0 \ LUAROCK_TARANTOOL_PROMETHEUS_VERSION=1.0.4 \ @@ -221,8 +220,6 @@ RUN set -x \ && ${ROCKS_INSTALLER} install metrics $LUAROCK_METRICS_VERSION \ && : "prometheus" \ && ${ROCKS_INSTALLER} install prometheus $LUAROCK_TARANTOOL_PROMETHEUS_VERSION \ - && : "curl" \ - && ${ROCKS_INSTALLER} install tarantool-curl $LUAROCK_TARANTOOL_CURL_VERSION \ && : "mqtt" \ && ${ROCKS_INSTALLER} install mqtt $LUAROCK_TARANTOOL_MQTT_VERSION \ && : "gis" \ From b86137cf151925ee96418422b708b4e472613dbe Mon Sep 17 00:00:00 2001 From: "Alexander V. Tikhonov" Date: Thu, 6 Aug 2020 20:32:58 +0300 Subject: [PATCH 217/286] gitlab-ci: disable use alpine_3.5_1.x dockerfile Due to the dockerfiles 'alpine_3.5_[1,2].x' became the same w/o any differences that can change the images builds, gitlab-ci jobs were moved to use only one of it - 'alpine_3.5_2.x' to clean it up later. --- .gitlab-ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5ee955c..7f292a2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -40,7 +40,7 @@ before_script: DIST: '3.5' TAG: '1.10.0' VER: '1.10.0' - DOCKERFILE_NAME_SUFFIX: '1.x' + DOCKERFILE_NAME_SUFFIX: '2.x' PORT: 5101 ENABLE_BUNDLED_LIBYAML: 'OFF' @@ -51,7 +51,7 @@ before_script: DIST: '3.5' TAG: '1.10.1' VER: '1.10.1' - DOCKERFILE_NAME_SUFFIX: '1.x' + DOCKERFILE_NAME_SUFFIX: '2.x' PORT: 5101 ENABLE_BUNDLED_LIBYAML: 'OFF' @@ -62,7 +62,7 @@ before_script: DIST: '3.5' TAG: '1.10.2' VER: '1.10.2' - DOCKERFILE_NAME_SUFFIX: '1.x' + DOCKERFILE_NAME_SUFFIX: '2.x' PORT: 5102 ENABLE_BUNDLED_LIBYAML: 'OFF' @@ -73,7 +73,7 @@ before_script: DIST: '3.5' TAG: '1.10.3' VER: '1.10.3' - DOCKERFILE_NAME_SUFFIX: '1.x' + DOCKERFILE_NAME_SUFFIX: '2.x' PORT: 5103 ENABLE_BUNDLED_LIBYAML: 'OFF' From c376d4ff6a2a24f96c43fe103dcd9f55b4eb36e5 Mon Sep 17 00:00:00 2001 From: "Alexander V. Tikhonov" Date: Thu, 6 Aug 2020 20:37:09 +0300 Subject: [PATCH 218/286] Cleanup dockerfiles alpine_3.5_*.x Due to the dockerfile 'alpine_3.5_1.x' became unused, it was removed. Standalone dockerfile 'alpine_3.5_2.x' renamed to 'alpine_3.5'. --- .gitlab-ci.yml | 10 - README.md | 46 ++-- dockerfiles/{alpine_3.5_2.x => alpine_3.5} | 0 dockerfiles/alpine_3.5_1.x | 261 --------------------- 4 files changed, 23 insertions(+), 294 deletions(-) rename dockerfiles/{alpine_3.5_2.x => alpine_3.5} (100%) delete mode 100644 dockerfiles/alpine_3.5_1.x diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7f292a2..f0fe6e2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -40,7 +40,6 @@ before_script: DIST: '3.5' TAG: '1.10.0' VER: '1.10.0' - DOCKERFILE_NAME_SUFFIX: '2.x' PORT: 5101 ENABLE_BUNDLED_LIBYAML: 'OFF' @@ -51,7 +50,6 @@ before_script: DIST: '3.5' TAG: '1.10.1' VER: '1.10.1' - DOCKERFILE_NAME_SUFFIX: '2.x' PORT: 5101 ENABLE_BUNDLED_LIBYAML: 'OFF' @@ -62,7 +60,6 @@ before_script: DIST: '3.5' TAG: '1.10.2' VER: '1.10.2' - DOCKERFILE_NAME_SUFFIX: '2.x' PORT: 5102 ENABLE_BUNDLED_LIBYAML: 'OFF' @@ -73,7 +70,6 @@ before_script: DIST: '3.5' TAG: '1.10.3' VER: '1.10.3' - DOCKERFILE_NAME_SUFFIX: '2.x' PORT: 5103 ENABLE_BUNDLED_LIBYAML: 'OFF' @@ -129,7 +125,6 @@ before_script: DIST: '3.5' TAG: '2.1.0' VER: '2.1.0' - DOCKERFILE_NAME_SUFFIX: '2.x' PORT: 5211 ENABLE_BUNDLED_LIBYAML: 'OFF' @@ -140,7 +135,6 @@ before_script: DIST: '3.5' TAG: '2.1.1' VER: '2.1.1' - DOCKERFILE_NAME_SUFFIX: '2.x' PORT: 5211 ENABLE_BUNDLED_LIBYAML: 'OFF' @@ -151,7 +145,6 @@ before_script: DIST: '3.5' TAG: '2.1.2' VER: '2.1.2' - DOCKERFILE_NAME_SUFFIX: '2.x' PORT: 5212 ENABLE_BUNDLED_LIBYAML: 'OFF' @@ -186,7 +179,6 @@ before_script: DIST: '3.5' TAG: '2.2.0' VER: '2.2.0' - DOCKERFILE_NAME_SUFFIX: '2.x' PORT: 5220 ENABLE_BUNDLED_LIBYAML: 'OFF' @@ -197,7 +189,6 @@ before_script: DIST: '3.5' TAG: '2.2.1' VER: '2.2.1' - DOCKERFILE_NAME_SUFFIX: '2.x' PORT: 5221 'alpine 3.9 2.2.2': @@ -236,7 +227,6 @@ before_script: DIST: '3.5' TAG: '2.3.0' VER: '2.3.0' - DOCKERFILE_NAME_SUFFIX: '2.x' PORT: 5231 'alpine 3.9 2.3.1': diff --git a/README.md b/README.md index b1a3474..d3fc406 100644 --- a/README.md +++ b/README.md @@ -319,29 +319,29 @@ $ docker run -it tarantool/tarantool:2 Fixed versions: -| Docker tag | Dockerfile | -| ---------- | ------------------------- | -| 1.10.0 | dockerfile/alpine_3.5_1.x | -| 1.10.1 | dockerfile/alpine_3.5_1.x | -| 1.10.2 | dockerfile/alpine_3.5_1.x | -| 1.10.3 | dockerfile/alpine_3.5_1.x | -| 1.10.4 | dockerfile/alpine_3.9 | -| 1.10.5 | dockerfile/alpine_3.9 | -| 1.10.6 | dockerfile/alpine_3.9 | -| 2.1.0 | dockerfile/alpine_3.5_2.x | -| 2.1.1 | dockerfile/alpine_3.5_2.x | -| 2.1.2 | dockerfile/alpine_3.5_2.x | -| 2.1.3 | dockerfile/alpine_3.9 | -| 2.2.0 | dockerfile/alpine_3.5_2.x | -| 2.2.1 | dockerfile/alpine_3.5_2.x | -| 2.2.2 | dockerfile/alpine_3.9 | -| 2.2.3 | dockerfile/alpine_3.9 | -| 2.3.0 | dockerfile/alpine_3.5_2.x | -| 2.3.1 | dockerfile/alpine_3.9 | -| 2.3.2 | dockerfile/alpine_3.9 | -| 2.4.0 | dockerfile/alpine_3.9 | -| 2.4.1 | dockerfile/alpine_3.9 | -| 2.5.0 | dockerfile/alpine_3.9 | +| Docker tag | Dockerfile | +| ---------- | --------------------- | +| 1.10.0 | dockerfile/alpine_3.5 | +| 1.10.1 | dockerfile/alpine_3.5 | +| 1.10.2 | dockerfile/alpine_3.5 | +| 1.10.3 | dockerfile/alpine_3.5 | +| 1.10.4 | dockerfile/alpine_3.9 | +| 1.10.5 | dockerfile/alpine_3.9 | +| 1.10.6 | dockerfile/alpine_3.9 | +| 2.1.0 | dockerfile/alpine_3.5 | +| 2.1.1 | dockerfile/alpine_3.5 | +| 2.1.2 | dockerfile/alpine_3.5 | +| 2.1.3 | dockerfile/alpine_3.9 | +| 2.2.0 | dockerfile/alpine_3.5 | +| 2.2.1 | dockerfile/alpine_3.5 | +| 2.2.2 | dockerfile/alpine_3.9 | +| 2.2.3 | dockerfile/alpine_3.9 | +| 2.3.0 | dockerfile/alpine_3.5 | +| 2.3.1 | dockerfile/alpine_3.9 | +| 2.3.2 | dockerfile/alpine_3.9 | +| 2.4.0 | dockerfile/alpine_3.9 | +| 2.4.1 | dockerfile/alpine_3.9 | +| 2.5.0 | dockerfile/alpine_3.9 | Rolling versions: diff --git a/dockerfiles/alpine_3.5_2.x b/dockerfiles/alpine_3.5 similarity index 100% rename from dockerfiles/alpine_3.5_2.x rename to dockerfiles/alpine_3.5 diff --git a/dockerfiles/alpine_3.5_1.x b/dockerfiles/alpine_3.5_1.x deleted file mode 100644 index bfe0648..0000000 --- a/dockerfiles/alpine_3.5_1.x +++ /dev/null @@ -1,261 +0,0 @@ -ARG BASE_IMAGE -FROM ${BASE_IMAGE} -MAINTAINER mail@racktear.com - -RUN addgroup -S tarantool \ - && adduser -S -G tarantool tarantool \ - && apk add --no-cache 'su-exec>=0.2' - -# An ARG instruction goes out of scope at the end of the build -# stage where it was defined. To use an arg in multiple stages, -# each stage must include the ARG instruction -ARG TNT_VER -ENV TARANTOOL_VERSION=${TNT_VER} \ - TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ - TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ - CURL_REPO=https://github.com/curl/curl.git \ - CURL_TAG=curl-7_59_0 \ - GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ - GPERFTOOLS_TAG=gperftools-2.5 \ - LUAROCKS_URL=https://github.com/tarantool/luarocks/archive/6e6fe62d9409fe2103c0fd091cccb3da0451faf5.tar.gz \ - LUAROCK_VSHARD_VERSION=0.1.14 \ - LUAROCK_AVRO_SCHEMA_VERSION=3.0.3 \ - LUAROCK_EXPERATIOND_VERSION=1.0.1 \ - LUAROCK_QUEUE_VERSION=1.0.6 \ - LUAROCK_CONNPOOL_VERSION=1.1.1 \ - LUAROCK_HTTP_VERSION=1.1.0 \ - LUAROCK_MEMCACHED_VERSION=1.0.1 \ - LUAROCK_METRICS_VERSION=0.2.0 \ - LUAROCK_TARANTOOL_PG_VERSION=2.0.2 \ - LUAROCK_TARANTOOL_MYSQL_VERSION=2.0.1 \ - LUAROCK_TARANTOOL_MQTT_VERSION=1.2.1 \ - LUAROCK_TARANTOOL_GIS_VERSION=1.0.0 \ - LUAROCK_TARANTOOL_PROMETHEUS_VERSION=1.0.4 \ - LUAROCK_TARANTOOL_GPERFTOOLS_VERSION=1.0.1 - -COPY files/gperftools_alpine.diff / - -ARG ENABLE_BUNDLED_LIBYAML -RUN set -x \ - && apk add --no-cache --virtual .run-deps \ - libstdc++ \ - readline \ - libressl \ - yaml \ - lz4 \ - binutils \ - ncurses \ - libgomp \ - lua \ - tar \ - zip \ - libunwind \ - icu \ - ca-certificates \ - && apk add --no-cache --virtual .build-deps \ - gcc \ - g++ \ - cmake \ - readline-dev \ - libressl-dev \ - yaml-dev \ - lz4-dev \ - binutils-dev \ - ncurses-dev \ - lua-dev \ - musl-dev \ - make \ - git \ - libunwind-dev \ - autoconf \ - automake \ - libtool \ - linux-headers \ - go \ - icu-dev \ - wget \ - && : "---------- curl ----------" \ - && mkdir -p /usr/src/curl \ - && git clone "$CURL_REPO" /usr/src/curl \ - && git -C /usr/src/curl checkout "$CURL_TAG" \ - && (cd /usr/src/curl \ - && ./buildconf \ - && ./configure --prefix "/usr/local" \ - && make -j \ - && make install) \ - && : "---------- gperftools ----------" \ - && mkdir -p /usr/src/gperftools \ - && git clone "$GPERFTOOLS_REPO" /usr/src/gperftools \ - && git -C /usr/src/gperftools checkout "$GPERFTOOLS_TAG" \ - && (cd /usr/src/gperftools; \ - patch -p1 < /gperftools_alpine.diff; \ - rm /gperftools_alpine.diff; \ - ./autogen.sh; \ - ./configure; \ - make -j ; \ - cp .libs/libprofiler.so* /usr/local/lib;) \ - && : "---------- pprof for gperftools ----------" \ - && : "To avoid of the issue:" \ - && : "'The master branch is Incompatible with go version < 1.13 #538'" \ - && : "https://github.com/google/pprof/issues/538" \ - && : "use latest workable commits with the old GO versions" \ - && ( export GOPATH=/root/go && \ - export PATH=${GOPATH}/bin:/usr/local/go/bin:$PATH && \ - export GOBIN=$GOROOT/bin && \ - mkdir -p ${GOPATH}/src ${GOPATH}/bin && \ - go get github.com/google/pprof || : && \ - cd /root/go/src/github.com/google/pprof && \ - git checkout 160c4290d1d8cee56daa51d7ba5d223291d392aa && \ - ( cd /root/go/src/github.com/chzyer/readline && \ - git checkout f6d7a1f6fbf35bbf9beb80dc63c56a29dcfb759f ) && \ - ( cd /root/go/src/github.com/ianlancetaylor/demangle && \ - git checkout 039b1ae3a3406573c84daaf91166d70ad2bc0519 ) && \ - go build && \ - cp pprof /usr/local/bin/pprof ) \ - && : "---------- tarantool ----------" \ - && mkdir -p /usr/src/tarantool \ - && git clone "$TARANTOOL_DOWNLOAD_URL" /usr/src/tarantool \ - && git -C /usr/src/tarantool checkout "$TARANTOOL_VERSION" \ - && git -C /usr/src/tarantool submodule update --init --recursive \ - && (cd /usr/src/tarantool; \ - cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo\ - -DENABLE_BUNDLED_LIBYAML:BOOL=${ENABLE_BUNDLED_LIBYAML}\ - -DENABLE_BACKTRACE:BOOL=ON\ - -DENABLE_DIST:BOOL=ON\ - .) \ - && make -C /usr/src/tarantool -j\ - && make -C /usr/src/tarantool install \ - && make -C /usr/src/tarantool clean \ - && : "---------- luarocks ----------" \ - && wget -O luarocks.tar.gz "$LUAROCKS_URL" \ - && mkdir -p /usr/src/luarocks \ - && tar -xzf luarocks.tar.gz -C /usr/src/luarocks --strip-components=1 \ - && (cd /usr/src/luarocks; \ - ./configure; \ - make -j build; \ - make install) \ - && rm -r /usr/src/luarocks \ - && rm -rf /usr/src/tarantool \ - && rm -rf /usr/src/gperftools \ - && rm -rf /usr/src/go \ - && : "---------- remove build deps ----------" \ - && apk del .build-deps - -RUN mkdir -p /usr/local/etc/luarocks \ - && mkdir -p /usr/local/etc/tarantool/rocks - -COPY files/luarocks-config.lua /usr/local/etc/luarocks/config-5.1.lua -COPY files/luarocks-config.lua /usr/local/etc/tarantool/rocks/config-5.1.lua - -ARG ROCKS_INSTALLER -RUN set -x \ - && apk add --no-cache --virtual .run-deps \ - mariadb-client-libs \ - libpq \ - cyrus-sasl \ - mosquitto-libs \ - libev \ - && apk add --no-cache --virtual .build-deps \ - git \ - cmake \ - make \ - coreutils \ - gcc \ - g++ \ - postgresql-dev \ - lua-dev \ - musl-dev \ - cyrus-sasl-dev \ - mosquitto-dev \ - libev-dev \ - unzip \ - && mkdir -p /rocks \ - && : "---------- proj (for gis module) ----------" \ - && wget -O proj.tar.gz http://download.osgeo.org/proj/proj-4.9.3.tar.gz \ - && mkdir -p /usr/src/proj \ - && tar -xzf proj.tar.gz -C /usr/src/proj --strip-components=1 \ - && (cd /usr/src/proj; \ - ./configure; \ - make -j ; \ - make install) \ - && rm -r /usr/src/proj \ - && rm -rf /usr/src/proj \ - && rm -rf /proj.tar.gz \ - && : "---------- geos (for gis module) ----------" \ - && wget -O geos.tar.bz2 http://download.osgeo.org/geos/geos-3.6.0.tar.bz2 \ - && mkdir -p /usr/src/geos \ - && tar -xjf geos.tar.bz2 -C /usr/src/geos --strip-components=1 \ - && (cd /usr/src/geos; \ - ./configure; \ - make -j ; \ - make install) \ - && rm -r /usr/src/geos \ - && rm -rf /usr/src/geos \ - && rm -rf /geos.tar.bz2 \ - && : "---------- luarocks ----------" \ - && cd / \ - && : "ldoc" \ - && tarantoolctl rocks install ldoc \ - && : "lua-term" \ - && ${ROCKS_INSTALLER} install lua-term \ - && : "avro" \ - && ${ROCKS_INSTALLER} install avro-schema $LUAROCK_AVRO_SCHEMA_VERSION \ - && : "expirationd" \ - && ${ROCKS_INSTALLER} install expirationd $LUAROCK_EXPERATIOND_VERSION \ - && : "queue" \ - && ${ROCKS_INSTALLER} install queue $LUAROCK_QUEUE_VERSION \ - && : "connpool" \ - && ${ROCKS_INSTALLER} install connpool $LUAROCK_CONNPOOL_VERSION \ - && : "vshard" \ - && ${ROCKS_INSTALLER} install vshard $LUAROCK_VSHARD_VERSION \ - && : "http" \ - && ${ROCKS_INSTALLER} install http $LUAROCK_HTTP_VERSION \ - && : "pg" \ - && ${ROCKS_INSTALLER} install pg $LUAROCK_TARANTOOL_PG_VERSION \ - && : "mysql" \ - && ${ROCKS_INSTALLER} install mysql $LUAROCK_TARANTOOL_MYSQL_VERSION \ - && : "memcached" \ - && ${ROCKS_INSTALLER} install memcached $LUAROCK_MEMCACHED_VERSION \ - && : "metrics" \ - && ${ROCKS_INSTALLER} install metrics $LUAROCK_METRICS_VERSION \ - && : "prometheus" \ - && ${ROCKS_INSTALLER} install prometheus $LUAROCK_TARANTOOL_PROMETHEUS_VERSION \ - && : "mqtt" \ - && ${ROCKS_INSTALLER} install mqtt $LUAROCK_TARANTOOL_MQTT_VERSION \ - && : "gis" \ - && ${ROCKS_INSTALLER} install gis $LUAROCK_TARANTOOL_GIS_VERSION \ - && : "gperftools" \ - && ${ROCKS_INSTALLER} install gperftools $LUAROCK_TARANTOOL_GPERFTOOLS_VERSION \ - && : "---------- remove build deps ----------" \ - && apk del .build-deps - -# gh-170: needed for luarocks -RUN apk update \ - && apk add wget git - -RUN mkdir -p /var/lib/tarantool \ - && chown tarantool:tarantool /var/lib/tarantool \ - && mkdir -p /opt/tarantool \ - && chown tarantool:tarantool /opt/tarantool \ - && mkdir -p /var/run/tarantool \ - && chown tarantool:tarantool /var/run/tarantool \ - && mkdir /etc/tarantool \ - && chown tarantool:tarantool /etc/tarantool - -VOLUME /var/lib/tarantool -WORKDIR /opt/tarantool - -COPY files/tarantool-entrypoint.lua /usr/local/bin/ -COPY files/tarantool_set_config.lua /usr/local/bin/ -COPY files/docker-entrypoint.sh /usr/local/bin/ -COPY files/console /usr/local/bin/ -COPY files/tarantool_is_up /usr/local/bin/ -COPY files/tarantool.default /usr/local/etc/default/tarantool - -RUN ln -s usr/local/bin/docker-entrypoint.sh /entrypoint.sh # backwards compat -ENTRYPOINT ["docker-entrypoint.sh"] - -HEALTHCHECK CMD tarantool_is_up - -EXPOSE 3301 -CMD [ "tarantool" ] From 63051e8c5e1e73bf7626c6a5537f8661930020b0 Mon Sep 17 00:00:00 2001 From: "Alexander V. Tikhonov" Date: Thu, 6 Aug 2020 20:45:52 +0300 Subject: [PATCH 219/286] gitlab-ci: disable use centos_7_1.x dockerfile Due to the dockerfiles 'centos_7_[1,2].x' became the same w/o any differences that can change the images builds, gitlab-ci jobs were moved to use only one of it - 'centos_7_2.x' to clean it up later. --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f0fe6e2..dcea1f2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -319,7 +319,7 @@ before_script: DIST: '7' TAG: '1.x-centos7' VER: '1.x' - DOCKERFILE_NAME_SUFFIX: '1.x' + DOCKERFILE_NAME_SUFFIX: '2.x' PORT: 7100 # Tarantool branch master From a3b565b8eb73170b4da133450cc7424705b53598 Mon Sep 17 00:00:00 2001 From: "Alexander V. Tikhonov" Date: Thu, 6 Aug 2020 20:52:48 +0300 Subject: [PATCH 220/286] Cleanup dockerfiles centos_7_*.x Due to the dockerfile 'centos_7_1.x' became unused, it was removed. Standalone dockerfile 'centos_7_2.x' renamed to 'centos_7'. --- .gitlab-ci.yml | 2 - README.md | 8 +- dockerfiles/{centos_7_2.x => centos_7} | 0 dockerfiles/centos_7_1.x | 263 ------------------------- 4 files changed, 4 insertions(+), 269 deletions(-) rename dockerfiles/{centos_7_2.x => centos_7} (100%) delete mode 100644 dockerfiles/centos_7_1.x diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index dcea1f2..14ce83e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -319,7 +319,6 @@ before_script: DIST: '7' TAG: '1.x-centos7' VER: '1.x' - DOCKERFILE_NAME_SUFFIX: '2.x' PORT: 7100 # Tarantool branch master @@ -331,5 +330,4 @@ before_script: DIST: '7' TAG: '2.x-centos7' VER: '2.x' - DOCKERFILE_NAME_SUFFIX: '2.x' PORT: 7200 diff --git a/README.md b/README.md index d3fc406..b1f85a0 100644 --- a/README.md +++ b/README.md @@ -356,10 +356,10 @@ Rolling versions: Special builds: -| Docker tag | Dockerfile | -| ----------- | ---------- | -| 1.x-centos7 | dockerfile/centos_7_1.x | -| 2.x-centos7 | dockerfile/centos_7_2.x | +| Docker tag | Dockerfile | +| ----------- | ------------------- | +| 1.x-centos7 | dockerfile/centos_7 | +| 2.x-centos7 | dockerfile/centos_7 | ## How to push changes (for maintainers) diff --git a/dockerfiles/centos_7_2.x b/dockerfiles/centos_7 similarity index 100% rename from dockerfiles/centos_7_2.x rename to dockerfiles/centos_7 diff --git a/dockerfiles/centos_7_1.x b/dockerfiles/centos_7_1.x deleted file mode 100644 index 103eea7..0000000 --- a/dockerfiles/centos_7_1.x +++ /dev/null @@ -1,263 +0,0 @@ -ARG BASE_IMAGE -FROM ${BASE_IMAGE} -MAINTAINER mail@racktear.com - -RUN groupadd tarantool \ - && adduser -g tarantool tarantool - -# An ARG instruction goes out of scope at the end of the build -# stage where it was defined. To use an arg in multiple stages, -# each stage must include the ARG instruction -ARG TNT_VER -ENV TARANTOOL_VERSION=${TNT_VER} \ - TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ - TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ - LUAROCKS_URL=https://github.com/tarantool/luarocks/archive/6e6fe62d9409fe2103c0fd091cccb3da0451faf5.tar.gz \ - LUAROCK_VSHARD_VERSION=0.1.14 \ - LUAROCK_CHECKS_VERSION=3.0.1 \ - LUAROCK_AVRO_SCHEMA_VERSION=3.0.3 \ - LUAROCK_EXPERATIOND_VERSION=1.0.1 \ - LUAROCK_QUEUE_VERSION=1.0.6 \ - LUAROCK_CONNPOOL_VERSION=1.1.1 \ - LUAROCK_HTTP_VERSION=1.1.0 \ - LUAROCK_MEMCACHED_VERSION=1.0.1 \ - LUAROCK_METRICS_VERSION=0.2.0 \ - LUAROCK_TARANTOOL_PG_VERSION=2.0.2 \ - LUAROCK_TARANTOOL_MYSQL_VERSION=2.0.1 \ - LUAROCK_TARANTOOL_GIS_VERSION=1.0.0 \ - LUAROCK_TARANTOOL_PROMETHEUS_VERSION=1.0.4 \ - LUAROCK_TARANTOOL_GPERFTOOLS_VERSION=1.0.1 - -RUN yum -y install epel-release && \ - yum -y update && \ - yum -y clean all - -RUN set -x \ - && yum -y install \ - libstdc++ \ - readline \ - openssl \ - yaml \ - lz4 \ - binutils \ - ncurses \ - libgomp \ - lua \ - tar \ - zip \ - zlib \ - unzip \ - libunwind \ - ca-certificates \ - && yum -y install \ - file \ - gcc-c++ \ - cmake \ - readline-devel \ - openssl-devel \ - libyaml-devel \ - zlib-devel \ - lz4-devel \ - binutils-devel \ - ncurses-devel \ - lua-devel \ - make \ - git \ - libunwind-devel \ - autoconf \ - automake \ - libtool \ - go \ - wget \ - && : "---------- libicu ----------" \ - && wget https://github.com/unicode-org/icu/releases/download/release-65-1/icu4c-65_1-src.tgz \ - && mkdir -p /usr/src/icu \ - && tar -xzf icu4c-65_1-src.tgz -C /usr/src/icu --strip-components=1 \ - && rm icu4c-65_1-src.tgz \ - && (cd /usr/src/icu/source; \ - chmod +x runConfigureICU configure install-sh; \ - ./runConfigureICU Linux/gcc; \ - make -j ; \ - make install; \ - echo '/usr/local/lib' > /etc/ld.so.conf.d/local.conf; \ - ldconfig ) \ - && : "---------- gperftools ----------" \ - && yum install -y gperftools-libs \ - && (GOPATH=/usr/src/go go get github.com/google/pprof; \ - cp /usr/src/go/bin/pprof /usr/local/bin) \ - && : "---------- tarantool ----------" \ - && mkdir -p /usr/src/tarantool \ - && git clone "$TARANTOOL_DOWNLOAD_URL" /usr/src/tarantool \ - && (cd /usr/src/tarantool; git checkout "$TARANTOOL_VERSION";) \ - && (cd /usr/src/tarantool; git submodule update --init --recursive;) \ - && (cd /usr/src/tarantool; \ - cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo\ - -DENABLE_BUNDLED_LIBYAML:BOOL=ON\ - -DENABLE_BACKTRACE:BOOL=ON\ - -DENABLE_DIST:BOOL=ON\ - .) \ - && make -C /usr/src/tarantool -j\ - && make -C /usr/src/tarantool install \ - && make -C /usr/src/tarantool clean \ - && : "---------- luarocks ----------" \ - && wget -O luarocks.tar.gz "$LUAROCKS_URL" \ - && mkdir -p /usr/src/luarocks \ - && tar -xzf luarocks.tar.gz -C /usr/src/luarocks --strip-components=1 \ - && (cd /usr/src/luarocks; \ - ./configure; \ - make -j build; \ - make install) \ - && rm -r /usr/src/luarocks \ - && rm -rf /usr/src/tarantool \ - && rm -rf /usr/src/go \ - && rm -rf /usr/src/icu \ - && rm -rf /usr/src/curl \ - && : "---------- remove build deps ----------" \ - && yum -y remove \ - gcc-c++ \ - cmake \ - readline-devel \ - openssl-devel \ - libyaml-devel \ - zlib-devel \ - lz4-devel \ - binutils-devel \ - ncurses-devel \ - make \ - git \ - libunwind-devel \ - autoconf \ - automake \ - libtool \ - go \ - wget \ - file \ - kernel-headers \ - golang-src \ - && rpm -qa | grep devel | xargs yum -y remove \ - && rm -rf /var/cache/yum - -RUN mkdir -p /usr/local/etc/luarocks \ - && mkdir -p /usr/local/etc/tarantool/rocks - -COPY files/luarocks-config_centos.lua /usr/local/etc/luarocks/config-5.1.lua -COPY files/luarocks-config.lua /usr/local/etc/tarantool/rocks/config-5.1.lua - -RUN set -x \ - && yum -y install https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm \ - && yum -y install \ - mariadb-libs \ - postgresql96-libs \ - cyrus-sasl \ - libev \ - proj \ - geos \ - unzip \ - openssl-libs \ - && yum -y install \ - git \ - cmake \ - make \ - gcc-c++ \ - postgresql96-devel \ - cyrus-sasl-devel \ - libev-devel \ - wget \ - proj-devel \ - geos-devel \ - openssl-devel \ - && mkdir -p /rocks \ - && : "---------- luarocks ----------" \ - && : "lua-term" \ - && tarantoolctl rocks install lua-term \ - && : "ldoc" \ - && tarantoolctl rocks install ldoc \ - && : "vshard" \ - && tarantoolctl rocks install vshard $LUAROCK_VSHARD_VERSION \ - && : "checks" \ - && tarantoolctl rocks install checks $LUAROCK_CHECKS_VERSION \ - && : "avro" \ - && tarantoolctl rocks install avro-schema $LUAROCK_AVRO_SCHEMA_VERSION \ - && : "expirationd" \ - && tarantoolctl rocks install expirationd $LUAROCK_EXPERATIOND_VERSION \ - && : "queue" \ - && tarantoolctl rocks install queue $LUAROCK_QUEUE_VERSION \ - && : "connpool" \ - && tarantoolctl rocks install connpool $LUAROCK_CONNPOOL_VERSION \ - && : "http" \ - && tarantoolctl rocks install http $LUAROCK_HTTP_VERSION \ - && : "pg" \ - && tarantoolctl rocks install pg $LUAROCK_TARANTOOL_PG_VERSION \ - && : "mysql" \ - && tarantoolctl rocks install mysql $LUAROCK_TARANTOOL_MYSQL_VERSION \ - && : "memcached" \ - && tarantoolctl rocks install memcached $LUAROCK_MEMCACHED_VERSION \ - && : "metrics" \ - && tarantoolctl rocks install metrics $LUAROCK_METRICS_VERSION \ - && : "prometheus" \ - && tarantoolctl rocks install prometheus $LUAROCK_TARANTOOL_PROMETHEUS_VERSION \ - && : "gis" \ - && tarantoolctl rocks install gis $LUAROCK_TARANTOOL_GIS_VERSION \ - && : "gperftools" \ - && tarantoolctl rocks install gperftools $LUAROCK_TARANTOOL_GPERFTOOLS_VERSION \ - && : "---------- remove build deps ----------" \ - && rm -rf /rocks \ - && yum -y remove \ - git \ - cmake \ - make \ - gcc-c++ \ - postgresql96-devel \ - lua-devel \ - cyrus-sasl-devel \ - libev-devel \ - wget \ - proj-devel \ - geos-devel \ - openssl-devel \ - kernel-headers \ - golang-src \ - && rpm -qa | grep devel | xargs yum -y remove \ - && rm -rf /var/cache/yum - - -RUN set -x \ - && : "---------- gosu ----------" \ - && gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys \ - B42F6819007F00F88E364FD4036A9C25BF357DD4 \ - && curl -o /usr/local/bin/gosu -SL \ - "https://github.com/tianon/gosu/releases/download/1.2/gosu-amd64" \ - && curl -o /usr/local/bin/gosu.asc -SL \ - "https://github.com/tianon/gosu/releases/download/1.2/gosu-amd64.asc" \ - && gpg --verify /usr/local/bin/gosu.asc \ - && rm /usr/local/bin/gosu.asc \ - && rm -r /root/.gnupg/ \ - && chmod +x /usr/local/bin/gosu - - -RUN mkdir -p /var/lib/tarantool \ - && chown tarantool:tarantool /var/lib/tarantool \ - && mkdir -p /opt/tarantool \ - && chown tarantool:tarantool /opt/tarantool \ - && mkdir -p /var/run/tarantool \ - && chown tarantool:tarantool /var/run/tarantool \ - && mkdir /etc/tarantool \ - && chown tarantool:tarantool /etc/tarantool - -VOLUME /var/lib/tarantool -WORKDIR /opt/tarantool - -COPY files/tarantool-entrypoint.lua /usr/local/bin/ -COPY files/tarantool_set_config.lua /usr/local/bin/ -COPY files/docker-entrypoint_centos.sh /usr/local/bin/docker-entrypoint.sh -COPY files/console /usr/local/bin/ -COPY files/tarantool_is_up /usr/local/bin/ -COPY files/tarantool.default /usr/local/etc/default/tarantool - -RUN ln -s usr/local/bin/docker-entrypoint.sh /entrypoint.sh # backwards compat -ENTRYPOINT ["docker-entrypoint.sh"] - -HEALTHCHECK CMD tarantool_is_up - -EXPOSE 3301 -CMD [ "tarantool" ] From 726c03d7ab3fbaa2c9c01da80c0ada7123c9de8a Mon Sep 17 00:00:00 2001 From: "Alexander V. Tikhonov" Date: Fri, 17 Jul 2020 22:27:16 +0300 Subject: [PATCH 221/286] Add new tags/branches and bump versions Added new tags: 1.10.7: 1.10.7-0-g554d439a5 2.3.3: 2.3.3-0-g5be85a37f 2.4.2: 2.4.2-0-gcccd89701 2.5.1: 2.5.1-0-gc2d8c03ee 2.6.0: 2.6.0-0-g47aa4e01e Bumped branches: 2.3: 2.3.3-1-g43af95e77 2.4: 2.4.2-1-g3f00d29f9 Created branches: 2.5: 2.5.1-1-g635f6e507 Updated stable images: *1.x: 1.10.7-1-gb93a33ab2 *2.x: 2.4.2-0-gcccd89701 --- .gitlab-ci.yml | 59 +++++++++++++++++++++++++++++++++++++- README.md | 6 ++++ versions/alpine_3.9_1.10.7 | 1 + versions/alpine_3.9_1.x | 2 +- versions/alpine_3.9_2.3 | 2 +- versions/alpine_3.9_2.3.3 | 1 + versions/alpine_3.9_2.4 | 2 +- versions/alpine_3.9_2.4.2 | 1 + versions/alpine_3.9_2.5 | 1 + versions/alpine_3.9_2.5.1 | 1 + versions/alpine_3.9_2.6.0 | 1 + versions/alpine_3.9_2.x | 2 +- versions/centos_7_1.x | 2 +- versions/centos_7_2.x | 2 +- 14 files changed, 76 insertions(+), 7 deletions(-) create mode 100644 versions/alpine_3.9_1.10.7 create mode 100644 versions/alpine_3.9_2.3.3 create mode 100644 versions/alpine_3.9_2.4.2 create mode 100644 versions/alpine_3.9_2.5 create mode 100644 versions/alpine_3.9_2.5.1 create mode 100644 versions/alpine_3.9_2.6.0 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 14ce83e..b3d7c64 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -106,6 +106,16 @@ before_script: ROCKS_INSTALLER: 'luarocks' ENABLE_BUNDLED_LIBYAML: 'OFF' +'alpine 3.9 1.10.7': + <<: *build_definition + variables: + OS: 'alpine' + DIST: '3.9' + TAG: '1.10.7' + VER: '1.10.7' + PORT: 5107 + ROCKS_INSTALLER: 'luarocks' + 'alpine 3.9 1.x': <<: *build_definition variables: @@ -247,6 +257,15 @@ before_script: VER: '2.3.2' PORT: 5231 +'alpine 3.9 2.3.3': + <<: *build_definition + variables: + OS: 'alpine' + DIST: '3.9' + TAG: '2.3.3' + VER: '2.3.3' + PORT: 5233 + 'alpine 3.9 2.3': <<: *build_definition variables: @@ -276,6 +295,15 @@ before_script: VER: '2.4.1' PORT: 5241 +'alpine 3.9 2.4.2': + <<: *build_definition + variables: + OS: 'alpine' + DIST: '3.9' + TAG: '2.4.2' + VER: '2.4.2' + PORT: 5242 + 'alpine 3.9 2.4': <<: *build_definition variables: @@ -285,7 +313,7 @@ before_script: VER: '2.4' PORT: 5240 -# Tarantool branch master +# Tarantool branch 2.5 'alpine 3.9 2.5.0': <<: *build_definition @@ -296,6 +324,35 @@ before_script: VER: '2.5.0' PORT: 5251 +'alpine 3.9 2.5.1': + <<: *build_definition + variables: + OS: 'alpine' + DIST: '3.9' + TAG: '2.5.1' + VER: '2.5.1' + PORT: 5252 + +'alpine 3.9 2.5': + <<: *build_definition + variables: + OS: 'alpine' + DIST: '3.9' + TAG: '2.5' + VER: '2.5' + PORT: 5250 + +# Tarantool branch master + +'alpine 3.9 2.6.0': + <<: *build_definition + variables: + OS: 'alpine' + DIST: '3.9' + TAG: '2.6.0' + VER: '2.6.0' + PORT: 5260 + 'alpine 3.9 2.x': <<: *build_definition variables: diff --git a/README.md b/README.md index b1f85a0..b85f99f 100644 --- a/README.md +++ b/README.md @@ -328,6 +328,7 @@ Fixed versions: | 1.10.4 | dockerfile/alpine_3.9 | | 1.10.5 | dockerfile/alpine_3.9 | | 1.10.6 | dockerfile/alpine_3.9 | +| 1.10.7 | dockerfile/alpine_3.9 | | 2.1.0 | dockerfile/alpine_3.5 | | 2.1.1 | dockerfile/alpine_3.5 | | 2.1.2 | dockerfile/alpine_3.5 | @@ -339,9 +340,13 @@ Fixed versions: | 2.3.0 | dockerfile/alpine_3.5 | | 2.3.1 | dockerfile/alpine_3.9 | | 2.3.2 | dockerfile/alpine_3.9 | +| 2.3.3 | dockerfile/alpine_3.9 | | 2.4.0 | dockerfile/alpine_3.9 | | 2.4.1 | dockerfile/alpine_3.9 | +| 2.4.2 | dockerfile/alpine_3.9 | | 2.5.0 | dockerfile/alpine_3.9 | +| 2.5.1 | dockerfile/alpine_3.9 | +| 2.6.0 | dockerfile/alpine_3.9 | Rolling versions: @@ -352,6 +357,7 @@ Rolling versions: | 2.2 | dockerfile/alpine_3.9 | | 2.3 | dockerfile/alpine_3.9 | | 2.4 | dockerfile/alpine_3.9 | +| 2.5 | dockerfile/alpine_3.9 | | 2/latest | dockerfile/alpine_3.9 | Special builds: diff --git a/versions/alpine_3.9_1.10.7 b/versions/alpine_3.9_1.10.7 new file mode 100644 index 0000000..2abbc88 --- /dev/null +++ b/versions/alpine_3.9_1.10.7 @@ -0,0 +1 @@ +1.10.7-0-g554d439a5 diff --git a/versions/alpine_3.9_1.x b/versions/alpine_3.9_1.x index 6931d63..05ce5b6 100644 --- a/versions/alpine_3.9_1.x +++ b/versions/alpine_3.9_1.x @@ -1 +1 @@ -1.10.6-1-g47c009ae7 +1.10.7-1-gb93a33ab2 diff --git a/versions/alpine_3.9_2.3 b/versions/alpine_3.9_2.3 index 715c20d..99fbc53 100644 --- a/versions/alpine_3.9_2.3 +++ b/versions/alpine_3.9_2.3 @@ -1 +1 @@ -2.3.2-1-g9be641bcc +2.3.3-1-g43af95e77 diff --git a/versions/alpine_3.9_2.3.3 b/versions/alpine_3.9_2.3.3 new file mode 100644 index 0000000..af16b25 --- /dev/null +++ b/versions/alpine_3.9_2.3.3 @@ -0,0 +1 @@ +2.3.3-0-g5be85a37f diff --git a/versions/alpine_3.9_2.4 b/versions/alpine_3.9_2.4 index faab2f7..ecb3f3d 100644 --- a/versions/alpine_3.9_2.4 +++ b/versions/alpine_3.9_2.4 @@ -1 +1 @@ -2.4.1-4-g6c75f80bb +2.4.2-1-g3f00d29f9 diff --git a/versions/alpine_3.9_2.4.2 b/versions/alpine_3.9_2.4.2 new file mode 100644 index 0000000..f0a6664 --- /dev/null +++ b/versions/alpine_3.9_2.4.2 @@ -0,0 +1 @@ +2.4.2-0-gcccd89701 diff --git a/versions/alpine_3.9_2.5 b/versions/alpine_3.9_2.5 new file mode 100644 index 0000000..3b51d80 --- /dev/null +++ b/versions/alpine_3.9_2.5 @@ -0,0 +1 @@ +2.5.1-1-g635f6e507 diff --git a/versions/alpine_3.9_2.5.1 b/versions/alpine_3.9_2.5.1 new file mode 100644 index 0000000..e2c967c --- /dev/null +++ b/versions/alpine_3.9_2.5.1 @@ -0,0 +1 @@ +2.5.1-0-gc2d8c03ee diff --git a/versions/alpine_3.9_2.6.0 b/versions/alpine_3.9_2.6.0 new file mode 100644 index 0000000..434471f --- /dev/null +++ b/versions/alpine_3.9_2.6.0 @@ -0,0 +1 @@ +2.6.0-0-g47aa4e01e diff --git a/versions/alpine_3.9_2.x b/versions/alpine_3.9_2.x index f340165..f0a6664 100644 --- a/versions/alpine_3.9_2.x +++ b/versions/alpine_3.9_2.x @@ -1 +1 @@ -2.4.1-6-g83c0356a1 +2.4.2-0-gcccd89701 diff --git a/versions/centos_7_1.x b/versions/centos_7_1.x index 642ac30..05ce5b6 100644 --- a/versions/centos_7_1.x +++ b/versions/centos_7_1.x @@ -1 +1 @@ -1.10.6-0-g5372cd2fa +1.10.7-1-gb93a33ab2 diff --git a/versions/centos_7_2.x b/versions/centos_7_2.x index f340165..f0a6664 100644 --- a/versions/centos_7_2.x +++ b/versions/centos_7_2.x @@ -1 +1 @@ -2.4.1-6-g83c0356a1 +2.4.2-0-gcccd89701 From 8c61b5ac322102b10a1c7430a3dcdfaf692bfccb Mon Sep 17 00:00:00 2001 From: Alexander Turenko Date: Fri, 7 Aug 2020 23:10:11 +0300 Subject: [PATCH 222/286] readme: update the release policy Until a recent discussion we have to update existing docker tag on Docker Hub if something is fixed in a Dockerfile. Now we reconsidered the process and decided to never change existing docker tags. The reason is simple: there should be a way to freeze an image to get rid of all possible negative impact due to a change. The discussion is raised by @tsafin. Thank you, Timur! --- README.md | 66 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 34 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index b85f99f..b919802 100644 --- a/README.md +++ b/README.md @@ -367,44 +367,46 @@ Special builds: | 1.x-centos7 | dockerfile/centos_7 | | 2.x-centos7 | dockerfile/centos_7 | -## How to push changes (for maintainers) +## Release policy -When the change is about specific tarantool version or versions -range, update all relevant fixed versions & rolling versions -according to the pipelines listed above. +All images are pushed to [Docker Hub](docker_hub_tags). -When the change is about the environment at all, all versions -need to be updated. +Fixed version tags (`x.y.z`) are frozen: we never update them. -Add a new release (say, x.y.z). Create / update rolling -versions x and x.y in master, create fixed version x.y.z. +Rolling versions are updated to the last fixed version tags: -A maintainer is responsible to check updated images. +- `x.y` == `x.y.` (`==` means 'points to the same image') +- `1` == `1..` +- `2` == `2..` +- `latest` == `2` -[1]: https://tarantool.io/en/doc/1.9/dev_guide/release_management/#how-to-make-a-minor-release +Special builds (CentOS) are updated with the same policy as rolling versions: -## How to push images (for maintainers) -Gitlab-CI jobs after the images builds push it to its local -images repository in the format: - registry.gitlab.com/tarantool/docker: -To push collected images into the 'docker.io' repository with -the following format: - docker.io/tarantool/tarantool: -the following scripts can be used: +- `1.x-centos7` image offers a last `1..` release +- `2.x-centos7` image offers a last `2..` release -```bash -echo List of available tags: \ - `grep " VER: " .gitlab-ci.yml | awk -F"'" '{print $2}'` -``` +[docker_hub_tags]: https://hub.docker.com/r/tarantool/tarantool/tags -```bash -for tag in ; do \ - echo "============= $tag ==============" ; \ - docker pull registry.gitlab.com/tarantool/docker:$tag && \ - docker tag registry.gitlab.com/tarantool/docker:$tag \ - tarantool/tarantool:$tag && \ - docker push tarantool/tarantool:$tag ; \ - echo "$tag push resulted with: $?" ; \ -done -``` +### Exceptional cases + +As an exception we can deliver an important update for the existing tarantool +release within `x.y.z-r1`, `x.y.z-r2`, ... tags. + +When `x.y.z-r` is released, the corresponding rolling releases (`x.y`, `x` +and `latest` if `x` == 2) should be updated to point to the same image. + +There is no strict policy, which updates should be considered important. Let's +decide on demand and define the policy later. +TBD: How to notify users about the exceptional updates? + +## How to push an image (for maintainers) + +Example: + +```console +$ export TAG=2 +$ export OS=alpine DIST=3.9 VER=2.x # double check the values! +$ PORT=5200 make -f .gitlab.mk build +$ docker push tarantool/tarantool:${TAG} +``` From 16a4cf179fbf81bec6344d3cdc24b156e87b084e Mon Sep 17 00:00:00 2001 From: "Alexander V. Tikhonov" Date: Wed, 21 Oct 2020 09:58:22 +0300 Subject: [PATCH 223/286] Fix mariadb-client-libs installation on alpine 3.9 Found that since alpine 3.8 the package mariadb-client-libs was changed to mariadb-connector-c-dev, check [1], [2]. [1] - https://github.com/docker-in-aws/docker-in-aws/issues/1 [2] - https://pkgs.alpinelinux.org/contents?file=libmysqlclient.so*&path=&name=&branch=v3.9&repo=main&arch=x86_64 --- dockerfiles/alpine_3.9 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dockerfiles/alpine_3.9 b/dockerfiles/alpine_3.9 index 4123924..edbac9e 100644 --- a/dockerfiles/alpine_3.9 +++ b/dockerfiles/alpine_3.9 @@ -145,7 +145,7 @@ COPY files/luarocks-config.lua /usr/local/etc/tarantool/rocks/config-5.1.lua ARG ROCKS_INSTALLER RUN set -x \ && apk add --no-cache --virtual .run-deps \ - mariadb-client-libs \ + mariadb-connector-c-dev \ libpq \ cyrus-sasl \ mosquitto-libs \ From b135db4a4ced72855b221658abeeaec29cc1f7fa Mon Sep 17 00:00:00 2001 From: "Alexander V. Tikhonov" Date: Mon, 19 Oct 2020 19:45:54 +0300 Subject: [PATCH 224/286] Fix packages installation on alpine 3.9 Found that apk installation fails using '--virtual' option. Also found that there were two different degradations in Alpine 3.9 [1], one of which really caused the issue [2]. Degradations where fixed in Alpine 3.11 and backported in Alpine 3.10. To fix the issue on the current Alpine 3.9 was used the workaround - virtual package was named with additional suffix to have uniq naming. Closes #120 Closes #169 Closes #189 Co-authored-by: Alexander Turenko [1] - https://github.com/tarantool/docker/pull/195#issuecomment-713726189 [2] - https://gitlab.alpinelinux.org/alpine/apk-tools/-/issues/9651 --- dockerfiles/alpine_3.9 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dockerfiles/alpine_3.9 b/dockerfiles/alpine_3.9 index edbac9e..ce74847 100644 --- a/dockerfiles/alpine_3.9 +++ b/dockerfiles/alpine_3.9 @@ -35,7 +35,7 @@ COPY files/gperftools_alpine.diff / ARG ENABLE_BUNDLED_LIBYAML RUN set -x \ - && apk add --no-cache --virtual .run-deps \ + && apk add --no-cache --virtual .run-deps.1 \ libstdc++ \ readline \ openssl \ @@ -51,7 +51,7 @@ RUN set -x \ libunwind \ icu \ ca-certificates \ - && apk add --no-cache --virtual .build-deps \ + && apk add --no-cache --virtual .build-deps.1 \ gcc \ g++ \ cmake \ @@ -134,7 +134,7 @@ RUN set -x \ && rm -rf /usr/src/gperftools \ && rm -rf /usr/src/go \ && : "---------- remove build deps ----------" \ - && apk del .build-deps + && apk del .build-deps.1 RUN mkdir -p /usr/local/etc/luarocks \ && mkdir -p /usr/local/etc/tarantool/rocks @@ -144,13 +144,13 @@ COPY files/luarocks-config.lua /usr/local/etc/tarantool/rocks/config-5.1.lua ARG ROCKS_INSTALLER RUN set -x \ - && apk add --no-cache --virtual .run-deps \ + && apk add --no-cache --virtual .run-deps.2 \ mariadb-connector-c-dev \ libpq \ cyrus-sasl \ mosquitto-libs \ libev \ - && apk add --no-cache --virtual .build-deps \ + && apk add --no-cache --virtual .build-deps.2 \ git \ cmake \ make \ @@ -222,7 +222,7 @@ RUN set -x \ && : "gperftools" \ && ${ROCKS_INSTALLER} install gperftools $LUAROCK_TARANTOOL_GPERFTOOLS_VERSION \ && : "---------- remove build deps ----------" \ - && apk del .build-deps + && apk del .build-deps.2 # gh-170: needed for luarocks RUN apk update \ From b43ea3a893104a8a952e436238f34294a31d5031 Mon Sep 17 00:00:00 2001 From: "Alexander V. Tikhonov" Date: Thu, 22 Oct 2020 22:32:54 +0300 Subject: [PATCH 225/286] gitlab-ci: update tags/branches and bump versions Set to manual build of the old tagged images. Added new tags with manual builds: 1.10.8: 1.10.8-0-g2f18757b7 2.4.3: 2.4.3-0-g5180d98f1 2.5.2: 2.5.2-1-gf63c43b9a 2.6.1: 2.6.1-0-gcfe0d1a55 2.7.0: 2.7.0-1-g1ad696c09 Bumped branches: 2.3: 2.3.3-2-g7eea3a6cb 2.4: 2.4.3-1-g986fab717 2.5: 2.5.2-1-gf63c43b9a 2.6: 2.6.1-0-gcfe0d1a55 Updated stable images: *1.x: 1.10.8-1-ge69e13015 *2.x: 2.5.2-0-g05730d326 --- .gitlab-ci.yml | 90 +++++++++++++++++++++++++++++++++++++- versions/alpine_3.9_1.10.8 | 1 + versions/alpine_3.9_1.x | 2 +- versions/alpine_3.9_2.3 | 2 +- versions/alpine_3.9_2.4 | 2 +- versions/alpine_3.9_2.4.3 | 1 + versions/alpine_3.9_2.5 | 2 +- versions/alpine_3.9_2.5.2 | 1 + versions/alpine_3.9_2.6 | 1 + versions/alpine_3.9_2.6.1 | 1 + versions/alpine_3.9_2.7.0 | 1 + versions/alpine_3.9_2.x | 2 +- versions/centos_7_1.x | 2 +- versions/centos_7_2.x | 2 +- 14 files changed, 102 insertions(+), 8 deletions(-) create mode 100644 versions/alpine_3.9_1.10.8 create mode 100644 versions/alpine_3.9_2.4.3 create mode 100644 versions/alpine_3.9_2.5.2 create mode 100644 versions/alpine_3.9_2.6 create mode 100644 versions/alpine_3.9_2.6.1 create mode 100644 versions/alpine_3.9_2.7.0 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b3d7c64..84a07ab 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -35,6 +35,7 @@ before_script: 'alpine 3.5 1.10.0': <<: *build_definition + when: manual variables: OS: 'alpine' DIST: '3.5' @@ -45,6 +46,7 @@ before_script: 'alpine 3.5 1.10.1': <<: *build_definition + when: manual variables: OS: 'alpine' DIST: '3.5' @@ -55,6 +57,7 @@ before_script: 'alpine 3.5 1.10.2': <<: *build_definition + when: manual variables: OS: 'alpine' DIST: '3.5' @@ -65,6 +68,7 @@ before_script: 'alpine 3.5 1.10.3': <<: *build_definition + when: manual variables: OS: 'alpine' DIST: '3.5' @@ -75,6 +79,7 @@ before_script: 'alpine 3.9 1.10.4': <<: *build_definition + when: manual variables: OS: 'alpine' DIST: '3.9' @@ -86,6 +91,7 @@ before_script: 'alpine 3.9 1.10.5': <<: *build_definition + when: manual variables: OS: 'alpine' DIST: '3.9' @@ -97,6 +103,7 @@ before_script: 'alpine 3.9 1.10.6': <<: *build_definition + when: manual variables: OS: 'alpine' DIST: '3.9' @@ -108,6 +115,7 @@ before_script: 'alpine 3.9 1.10.7': <<: *build_definition + when: manual variables: OS: 'alpine' DIST: '3.9' @@ -116,6 +124,17 @@ before_script: PORT: 5107 ROCKS_INSTALLER: 'luarocks' +'alpine 3.9 1.10.8': + <<: *build_definition + when: manual + variables: + OS: 'alpine' + DIST: '3.9' + TAG: '1.10.8' + VER: '1.10.8' + PORT: 5108 + ROCKS_INSTALLER: 'luarocks' + 'alpine 3.9 1.x': <<: *build_definition variables: @@ -130,6 +149,7 @@ before_script: 'alpine 3.5 2.1.0': <<: *build_definition + when: manual variables: OS: 'alpine' DIST: '3.5' @@ -140,6 +160,7 @@ before_script: 'alpine 3.5 2.1.1': <<: *build_definition + when: manual variables: OS: 'alpine' DIST: '3.5' @@ -150,6 +171,7 @@ before_script: 'alpine 3.5 2.1.2': <<: *build_definition + when: manual variables: OS: 'alpine' DIST: '3.5' @@ -160,6 +182,7 @@ before_script: 'alpine 3.9 2.1.3': <<: *build_definition + when: manual variables: OS: 'alpine' DIST: '3.9' @@ -184,6 +207,7 @@ before_script: 'alpine 3.5 2.2.0': <<: *build_definition + when: manual variables: OS: 'alpine' DIST: '3.5' @@ -194,6 +218,7 @@ before_script: 'alpine 3.5 2.2.1': <<: *build_definition + when: manual variables: OS: 'alpine' DIST: '3.5' @@ -203,6 +228,7 @@ before_script: 'alpine 3.9 2.2.2': <<: *build_definition + when: manual variables: OS: 'alpine' DIST: '3.9' @@ -212,6 +238,7 @@ before_script: 'alpine 3.9 2.2.3': <<: *build_definition + when: manual variables: OS: 'alpine' DIST: '3.9' @@ -232,6 +259,7 @@ before_script: 'alpine 3.5 2.3.0': <<: *build_definition + when: manual variables: OS: 'alpine' DIST: '3.5' @@ -241,6 +269,7 @@ before_script: 'alpine 3.9 2.3.1': <<: *build_definition + when: manual variables: OS: 'alpine' DIST: '3.9' @@ -250,6 +279,7 @@ before_script: 'alpine 3.9 2.3.2': <<: *build_definition + when: manual variables: OS: 'alpine' DIST: '3.9' @@ -259,6 +289,7 @@ before_script: 'alpine 3.9 2.3.3': <<: *build_definition + when: manual variables: OS: 'alpine' DIST: '3.9' @@ -279,6 +310,7 @@ before_script: 'alpine 3.9 2.4.0': <<: *build_definition + when: manual variables: OS: 'alpine' DIST: '3.9' @@ -288,6 +320,7 @@ before_script: 'alpine 3.9 2.4.1': <<: *build_definition + when: manual variables: OS: 'alpine' DIST: '3.9' @@ -297,6 +330,7 @@ before_script: 'alpine 3.9 2.4.2': <<: *build_definition + when: manual variables: OS: 'alpine' DIST: '3.9' @@ -304,6 +338,16 @@ before_script: VER: '2.4.2' PORT: 5242 +'alpine 3.9 2.4.3': + <<: *build_definition + when: manual + variables: + OS: 'alpine' + DIST: '3.9' + TAG: '2.4.3' + VER: '2.4.3' + PORT: 5243 + 'alpine 3.9 2.4': <<: *build_definition variables: @@ -317,6 +361,7 @@ before_script: 'alpine 3.9 2.5.0': <<: *build_definition + when: manual variables: OS: 'alpine' DIST: '3.9' @@ -326,6 +371,7 @@ before_script: 'alpine 3.9 2.5.1': <<: *build_definition + when: manual variables: OS: 'alpine' DIST: '3.9' @@ -333,6 +379,16 @@ before_script: VER: '2.5.1' PORT: 5252 +'alpine 3.9 2.5.2': + <<: *build_definition + when: manual + variables: + OS: 'alpine' + DIST: '3.9' + TAG: '2.5.2' + VER: '2.5.2' + PORT: 5253 + 'alpine 3.9 2.5': <<: *build_definition variables: @@ -342,10 +398,11 @@ before_script: VER: '2.5' PORT: 5250 -# Tarantool branch master +# Tarantool branch 2.6 'alpine 3.9 2.6.0': <<: *build_definition + when: manual variables: OS: 'alpine' DIST: '3.9' @@ -353,6 +410,37 @@ before_script: VER: '2.6.0' PORT: 5260 +'alpine 3.9 2.6.1': + <<: *build_definition + when: manual + variables: + OS: 'alpine' + DIST: '3.9' + TAG: '2.6.1' + VER: '2.6.1' + PORT: 5261 + +'alpine 3.9 2.6': + <<: *build_definition + variables: + OS: 'alpine' + DIST: '3.9' + TAG: '2.6' + VER: '2.6' + PORT: 5269 + +# Tarantool branch master + +'alpine 3.9 2.7.0': + <<: *build_definition + when: manual + variables: + OS: 'alpine' + DIST: '3.9' + TAG: '2.7.0' + VER: '2.7.0' + PORT: 5270 + 'alpine 3.9 2.x': <<: *build_definition variables: diff --git a/versions/alpine_3.9_1.10.8 b/versions/alpine_3.9_1.10.8 new file mode 100644 index 0000000..ec84c5b --- /dev/null +++ b/versions/alpine_3.9_1.10.8 @@ -0,0 +1 @@ +1.10.8-0-g2f18757b7 diff --git a/versions/alpine_3.9_1.x b/versions/alpine_3.9_1.x index 05ce5b6..1dd86be 100644 --- a/versions/alpine_3.9_1.x +++ b/versions/alpine_3.9_1.x @@ -1 +1 @@ -1.10.7-1-gb93a33ab2 +1.10.8-1-ge69e13015 diff --git a/versions/alpine_3.9_2.3 b/versions/alpine_3.9_2.3 index 99fbc53..1ca9a1f 100644 --- a/versions/alpine_3.9_2.3 +++ b/versions/alpine_3.9_2.3 @@ -1 +1 @@ -2.3.3-1-g43af95e77 +2.3.3-2-g7eea3a6cb diff --git a/versions/alpine_3.9_2.4 b/versions/alpine_3.9_2.4 index ecb3f3d..b17eaf1 100644 --- a/versions/alpine_3.9_2.4 +++ b/versions/alpine_3.9_2.4 @@ -1 +1 @@ -2.4.2-1-g3f00d29f9 +2.4.3-1-g986fab717 diff --git a/versions/alpine_3.9_2.4.3 b/versions/alpine_3.9_2.4.3 new file mode 100644 index 0000000..c60bf40 --- /dev/null +++ b/versions/alpine_3.9_2.4.3 @@ -0,0 +1 @@ +2.4.3-0-g5180d98f1 diff --git a/versions/alpine_3.9_2.5 b/versions/alpine_3.9_2.5 index 3b51d80..0f47b6e 100644 --- a/versions/alpine_3.9_2.5 +++ b/versions/alpine_3.9_2.5 @@ -1 +1 @@ -2.5.1-1-g635f6e507 +2.5.2-1-gf63c43b9a diff --git a/versions/alpine_3.9_2.5.2 b/versions/alpine_3.9_2.5.2 new file mode 100644 index 0000000..c55bc39 --- /dev/null +++ b/versions/alpine_3.9_2.5.2 @@ -0,0 +1 @@ +2.5.2-0-g05730d326 diff --git a/versions/alpine_3.9_2.6 b/versions/alpine_3.9_2.6 new file mode 100644 index 0000000..8f67fcd --- /dev/null +++ b/versions/alpine_3.9_2.6 @@ -0,0 +1 @@ +2.6.1-0-gcfe0d1a55 diff --git a/versions/alpine_3.9_2.6.1 b/versions/alpine_3.9_2.6.1 new file mode 100644 index 0000000..8f67fcd --- /dev/null +++ b/versions/alpine_3.9_2.6.1 @@ -0,0 +1 @@ +2.6.1-0-gcfe0d1a55 diff --git a/versions/alpine_3.9_2.7.0 b/versions/alpine_3.9_2.7.0 new file mode 100644 index 0000000..fe66789 --- /dev/null +++ b/versions/alpine_3.9_2.7.0 @@ -0,0 +1 @@ +2.7.0-1-g1ad696c09 diff --git a/versions/alpine_3.9_2.x b/versions/alpine_3.9_2.x index f0a6664..c55bc39 100644 --- a/versions/alpine_3.9_2.x +++ b/versions/alpine_3.9_2.x @@ -1 +1 @@ -2.4.2-0-gcccd89701 +2.5.2-0-g05730d326 diff --git a/versions/centos_7_1.x b/versions/centos_7_1.x index 05ce5b6..1dd86be 100644 --- a/versions/centos_7_1.x +++ b/versions/centos_7_1.x @@ -1 +1 @@ -1.10.7-1-gb93a33ab2 +1.10.8-1-ge69e13015 diff --git a/versions/centos_7_2.x b/versions/centos_7_2.x index f0a6664..c55bc39 100644 --- a/versions/centos_7_2.x +++ b/versions/centos_7_2.x @@ -1 +1 @@ -2.4.2-0-gcccd89701 +2.5.2-0-g05730d326 From 75c890fd14c31f44c1679a53109c5199a4e0ad22 Mon Sep 17 00:00:00 2001 From: "Alexander V. Tikhonov" Date: Thu, 31 Dec 2020 14:06:52 +0300 Subject: [PATCH 226/286] gitlab-ci: update tags/branches and bump versions Added new tags with manual builds: 1.10.9: 1.10.9-0-g720ffdd23 2.5.3: 2.5.3-0-gf93e48013 2.6.2: 2.6.2-0-g34d504d7d 2.7.1: 2.7.1-0-g3ac498c9f 2.8.0: 2.8.0-0-gefc30ccf8 Bumped branches: 2.5: 2.5.3-0-gf93e48013 2.6: 2.6.2-0-g34d504d7d 2.7: 2.7.1-0-g3ac498c9f Updated stable images: *1.x: 1.10.9-0-g720ffdd23 *2.x: 2.6.2-0-g34d504d7d --- .gitlab-ci.yml | 68 +++++++++++++++++++++++++++++++++++++- versions/alpine_3.9_1.10.9 | 1 + versions/alpine_3.9_1.x | 2 +- versions/alpine_3.9_2.5 | 2 +- versions/alpine_3.9_2.5.3 | 1 + versions/alpine_3.9_2.6 | 2 +- versions/alpine_3.9_2.6.2 | 1 + versions/alpine_3.9_2.7 | 1 + versions/alpine_3.9_2.7.1 | 1 + versions/alpine_3.9_2.8.0 | 1 + versions/alpine_3.9_2.x | 2 +- versions/centos_7_1.x | 2 +- versions/centos_7_2.x | 2 +- 13 files changed, 79 insertions(+), 7 deletions(-) create mode 100644 versions/alpine_3.9_1.10.9 create mode 100644 versions/alpine_3.9_2.5.3 create mode 100644 versions/alpine_3.9_2.6.2 create mode 100644 versions/alpine_3.9_2.7 create mode 100644 versions/alpine_3.9_2.7.1 create mode 100644 versions/alpine_3.9_2.8.0 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 84a07ab..3c251d3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -135,6 +135,17 @@ before_script: PORT: 5108 ROCKS_INSTALLER: 'luarocks' +'alpine 3.9 1.10.9': + <<: *build_definition + when: manual + variables: + OS: 'alpine' + DIST: '3.9' + TAG: '1.10.9' + VER: '1.10.9' + PORT: 5109 + ROCKS_INSTALLER: 'luarocks' + 'alpine 3.9 1.x': <<: *build_definition variables: @@ -194,6 +205,7 @@ before_script: 'alpine 3.9 2.1': <<: *build_definition + when: manual variables: OS: 'alpine' DIST: '3.9' @@ -248,6 +260,7 @@ before_script: 'alpine 3.9 2.2': <<: *build_definition + when: manual variables: OS: 'alpine' DIST: '3.9' @@ -299,6 +312,7 @@ before_script: 'alpine 3.9 2.3': <<: *build_definition + when: manual variables: OS: 'alpine' DIST: '3.9' @@ -350,6 +364,7 @@ before_script: 'alpine 3.9 2.4': <<: *build_definition + when: manual variables: OS: 'alpine' DIST: '3.9' @@ -389,6 +404,16 @@ before_script: VER: '2.5.2' PORT: 5253 +'alpine 3.9 2.5.3': + <<: *build_definition + when: manual + variables: + OS: 'alpine' + DIST: '3.9' + TAG: '2.5.3' + VER: '2.5.3' + PORT: 5254 + 'alpine 3.9 2.5': <<: *build_definition variables: @@ -420,6 +445,16 @@ before_script: VER: '2.6.1' PORT: 5261 +'alpine 3.9 2.6.2': + <<: *build_definition + when: manual + variables: + OS: 'alpine' + DIST: '3.9' + TAG: '2.6.2' + VER: '2.6.2' + PORT: 5262 + 'alpine 3.9 2.6': <<: *build_definition variables: @@ -429,7 +464,7 @@ before_script: VER: '2.6' PORT: 5269 -# Tarantool branch master +# Tarantool branch 2.7 'alpine 3.9 2.7.0': <<: *build_definition @@ -441,6 +476,37 @@ before_script: VER: '2.7.0' PORT: 5270 +'alpine 3.9 2.7.1': + <<: *build_definition + when: manual + variables: + OS: 'alpine' + DIST: '3.9' + TAG: '2.7.1' + VER: '2.7.1' + PORT: 5271 + +'alpine 3.9 2.7': + <<: *build_definition + variables: + OS: 'alpine' + DIST: '3.9' + TAG: '2.7' + VER: '2.7' + PORT: 5279 + +# Tarantool branch master + +'alpine 3.9 2.8.0': + <<: *build_definition + when: manual + variables: + OS: 'alpine' + DIST: '3.9' + TAG: '2.8.0' + VER: '2.8.0' + PORT: 5270 + 'alpine 3.9 2.x': <<: *build_definition variables: diff --git a/versions/alpine_3.9_1.10.9 b/versions/alpine_3.9_1.10.9 new file mode 100644 index 0000000..beeb43b --- /dev/null +++ b/versions/alpine_3.9_1.10.9 @@ -0,0 +1 @@ +1.10.9-0-g720ffdd23 diff --git a/versions/alpine_3.9_1.x b/versions/alpine_3.9_1.x index 1dd86be..beeb43b 100644 --- a/versions/alpine_3.9_1.x +++ b/versions/alpine_3.9_1.x @@ -1 +1 @@ -1.10.8-1-ge69e13015 +1.10.9-0-g720ffdd23 diff --git a/versions/alpine_3.9_2.5 b/versions/alpine_3.9_2.5 index 0f47b6e..45d968d 100644 --- a/versions/alpine_3.9_2.5 +++ b/versions/alpine_3.9_2.5 @@ -1 +1 @@ -2.5.2-1-gf63c43b9a +2.5.3-0-gf93e48013 diff --git a/versions/alpine_3.9_2.5.3 b/versions/alpine_3.9_2.5.3 new file mode 100644 index 0000000..45d968d --- /dev/null +++ b/versions/alpine_3.9_2.5.3 @@ -0,0 +1 @@ +2.5.3-0-gf93e48013 diff --git a/versions/alpine_3.9_2.6 b/versions/alpine_3.9_2.6 index 8f67fcd..a5b2bcb 100644 --- a/versions/alpine_3.9_2.6 +++ b/versions/alpine_3.9_2.6 @@ -1 +1 @@ -2.6.1-0-gcfe0d1a55 +2.6.2-0-g34d504d7d diff --git a/versions/alpine_3.9_2.6.2 b/versions/alpine_3.9_2.6.2 new file mode 100644 index 0000000..a5b2bcb --- /dev/null +++ b/versions/alpine_3.9_2.6.2 @@ -0,0 +1 @@ +2.6.2-0-g34d504d7d diff --git a/versions/alpine_3.9_2.7 b/versions/alpine_3.9_2.7 new file mode 100644 index 0000000..f8b07c8 --- /dev/null +++ b/versions/alpine_3.9_2.7 @@ -0,0 +1 @@ +2.7.1-0-g3ac498c9f diff --git a/versions/alpine_3.9_2.7.1 b/versions/alpine_3.9_2.7.1 new file mode 100644 index 0000000..f8b07c8 --- /dev/null +++ b/versions/alpine_3.9_2.7.1 @@ -0,0 +1 @@ +2.7.1-0-g3ac498c9f diff --git a/versions/alpine_3.9_2.8.0 b/versions/alpine_3.9_2.8.0 new file mode 100644 index 0000000..b2ff29b --- /dev/null +++ b/versions/alpine_3.9_2.8.0 @@ -0,0 +1 @@ +2.8.0-0-gefc30ccf8 diff --git a/versions/alpine_3.9_2.x b/versions/alpine_3.9_2.x index c55bc39..a5b2bcb 100644 --- a/versions/alpine_3.9_2.x +++ b/versions/alpine_3.9_2.x @@ -1 +1 @@ -2.5.2-0-g05730d326 +2.6.2-0-g34d504d7d diff --git a/versions/centos_7_1.x b/versions/centos_7_1.x index 1dd86be..beeb43b 100644 --- a/versions/centos_7_1.x +++ b/versions/centos_7_1.x @@ -1 +1 @@ -1.10.8-1-ge69e13015 +1.10.9-0-g720ffdd23 diff --git a/versions/centos_7_2.x b/versions/centos_7_2.x index c55bc39..a5b2bcb 100644 --- a/versions/centos_7_2.x +++ b/versions/centos_7_2.x @@ -1 +1 @@ -2.5.2-0-g05730d326 +2.6.2-0-g34d504d7d From 18c14f9c82966039ae5c56232fe93a29407c09d8 Mon Sep 17 00:00:00 2001 From: "Alexander V. Tikhonov" Date: Tue, 12 Jan 2021 19:55:32 +0300 Subject: [PATCH 227/286] Update readme file - Added new tags and rolling versions. - Reorganized tables of versions to make it compact. - Corrected patterns for stable versions set. --- README.md | 70 ++++++++++++++++++++++++------------------------------- 1 file changed, 30 insertions(+), 40 deletions(-) diff --git a/README.md b/README.md index b919802..68c6d28 100644 --- a/README.md +++ b/README.md @@ -319,46 +319,29 @@ $ docker run -it tarantool/tarantool:2 Fixed versions: -| Docker tag | Dockerfile | -| ---------- | --------------------- | -| 1.10.0 | dockerfile/alpine_3.5 | -| 1.10.1 | dockerfile/alpine_3.5 | -| 1.10.2 | dockerfile/alpine_3.5 | -| 1.10.3 | dockerfile/alpine_3.5 | -| 1.10.4 | dockerfile/alpine_3.9 | -| 1.10.5 | dockerfile/alpine_3.9 | -| 1.10.6 | dockerfile/alpine_3.9 | -| 1.10.7 | dockerfile/alpine_3.9 | -| 2.1.0 | dockerfile/alpine_3.5 | -| 2.1.1 | dockerfile/alpine_3.5 | -| 2.1.2 | dockerfile/alpine_3.5 | -| 2.1.3 | dockerfile/alpine_3.9 | -| 2.2.0 | dockerfile/alpine_3.5 | -| 2.2.1 | dockerfile/alpine_3.5 | -| 2.2.2 | dockerfile/alpine_3.9 | -| 2.2.3 | dockerfile/alpine_3.9 | -| 2.3.0 | dockerfile/alpine_3.5 | -| 2.3.1 | dockerfile/alpine_3.9 | -| 2.3.2 | dockerfile/alpine_3.9 | -| 2.3.3 | dockerfile/alpine_3.9 | -| 2.4.0 | dockerfile/alpine_3.9 | -| 2.4.1 | dockerfile/alpine_3.9 | -| 2.4.2 | dockerfile/alpine_3.9 | -| 2.5.0 | dockerfile/alpine_3.9 | -| 2.5.1 | dockerfile/alpine_3.9 | -| 2.6.0 | dockerfile/alpine_3.9 | +| Docker tag | Dockerfile | +| ---------------- | --------------------- | +| 1.10.0 .. 1.10.3 | dockerfile/alpine_3.5 | +| 1.10.4 .. 1.10.9 | dockerfile/alpine_3.9 | +| 2.1.0 .. 2.1.2 | dockerfile/alpine_3.5 | +| 2.1.3 | dockerfile/alpine_3.9 | +| 2.2.0 .. 2.2.1 | dockerfile/alpine_3.5 | +| 2.2.2 .. 2.2.3 | dockerfile/alpine_3.9 | +| 2.3.0 | dockerfile/alpine_3.5 | +| 2.3.1 .. 2.3.3 | dockerfile/alpine_3.9 | +| 2.4.0 .. 2.4.3 | dockerfile/alpine_3.9 | +| 2.5.0 .. 2.5.3 | dockerfile/alpine_3.9 | +| 2.6.0 .. 2.6.2 | dockerfile/alpine_3.9 | +| 2.7.0 .. 2.7.1 | dockerfile/alpine_3.9 | +| 2.8.0 | dockerfile/alpine_3.9 | Rolling versions: | Docker tag | Dockerfile | | ---------- | --------------------- | | 1 | dockerfile/alpine_3.9 | -| 2.1 | dockerfile/alpine_3.9 | -| 2.2 | dockerfile/alpine_3.9 | -| 2.3 | dockerfile/alpine_3.9 | -| 2.4 | dockerfile/alpine_3.9 | -| 2.5 | dockerfile/alpine_3.9 | -| 2/latest | dockerfile/alpine_3.9 | +| 2.1 .. 2.7 | dockerfile/alpine_3.9 | +| 2, latest | dockerfile/alpine_3.9 | Special builds: @@ -373,17 +356,24 @@ All images are pushed to [Docker Hub](docker_hub_tags). Fixed version tags (`x.y.z`) are frozen: we never update them. -Rolling versions are updated to the last fixed version tags: +Example of minor versions timeline: + +- `x.y.0` - Alpha + - `x.y.1` - Beta + - `x.y.2` - Stable + - `x.y.3` - Stable + +Rolling versions are updated to the last stable fixed version tags: - `x.y` == `x.y.` (`==` means 'points to the same image') -- `1` == `1..` -- `2` == `2..` +- `1` == `1..2` +- `2` == `2..2` - `latest` == `2` -Special builds (CentOS) are updated with the same policy as rolling versions: +Special stable builds (CentOS) are updated with the same policy as rolling versions: -- `1.x-centos7` image offers a last `1..` release -- `2.x-centos7` image offers a last `2..` release +- `1.x-centos7` image offers a last `1..2` release +- `2.x-centos7` image offers a last `2..2` release [docker_hub_tags]: https://hub.docker.com/r/tarantool/tarantool/tags From 65f86a3c9967cfdb1110724c1fef8f51d1c8af57 Mon Sep 17 00:00:00 2001 From: "Alexander V. Tikhonov" Date: Thu, 22 Apr 2021 21:11:44 +0300 Subject: [PATCH 228/286] Add cmake3 installation for luajit build To avoid of issue: CMake Error at third_party/luajit/CMakeLists.txt:11 (cmake_minimum_required): CMake 3.1 or higher is required. You are running version 2.8.12.2 added cmake3 package to CentOS image dockerfile build. --- dockerfiles/centos_7 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dockerfiles/centos_7 b/dockerfiles/centos_7 index cf1312e..86720de 100644 --- a/dockerfiles/centos_7 +++ b/dockerfiles/centos_7 @@ -51,7 +51,7 @@ RUN set -x \ && yum -y install \ file \ gcc-c++ \ - cmake \ + cmake3 \ readline-devel \ openssl-devel \ zlib-devel \ @@ -89,7 +89,7 @@ RUN set -x \ && (cd /usr/src/tarantool; git checkout "$TARANTOOL_VERSION";) \ && (cd /usr/src/tarantool; git submodule update --init --recursive;) \ && (cd /usr/src/tarantool; \ - cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo\ + cmake3 -DCMAKE_BUILD_TYPE=RelWithDebInfo\ -DENABLE_BUNDLED_LIBYAML:BOOL=ON\ -DENABLE_BACKTRACE:BOOL=ON\ -DENABLE_DIST:BOOL=ON\ @@ -113,7 +113,7 @@ RUN set -x \ && yum -y remove \ file \ gcc-c++ \ - cmake \ + cmake3 \ readline-devel \ openssl-devel \ lz4-devel \ From 3eff4038ff0d7e3d6ef9f7878389dc9e5466f06b Mon Sep 17 00:00:00 2001 From: "Alexander V. Tikhonov" Date: Thu, 22 Apr 2021 17:11:40 +0300 Subject: [PATCH 229/286] gitlab-ci: update tags/branches and bump versions Added new tags with manual builds: 1.10.10: 1.10.10-0-gaea7ae77a 2.6.3: 2.6.3-0-gcd487a2c5 2.7.2: 2.7.2-0-g4d8c06890 2.8.1: 2.8.1-0-ge2a1ec0c2 2.9.0: 2.9.0-0-g15bbdab92 Bumped/created branches: 2.6: 2.6.3-0-gcd487a2c5 2.7: 2.7.2-0-g4d8c06890 2.8: 2.8.1-0-ge2a1ec0c2 Updated stable images: *1.x: 1.10.10-0-gaea7ae77a *2.x: 2.7.2-0-g4d8c06890 --- .gitlab-ci.yml | 65 ++++++++++++++++++++++++++++++++++++- README.md | 9 ++--- versions/alpine_3.9_1.10.10 | 1 + versions/alpine_3.9_1.x | 2 +- versions/alpine_3.9_2.6 | 2 +- versions/alpine_3.9_2.6.3 | 1 + versions/alpine_3.9_2.7 | 2 +- versions/alpine_3.9_2.7.2 | 1 + versions/alpine_3.9_2.8 | 1 + versions/alpine_3.9_2.8.1 | 1 + versions/alpine_3.9_2.9.0 | 1 + versions/alpine_3.9_2.x | 2 +- versions/centos_7_1.x | 2 +- versions/centos_7_2.x | 2 +- 14 files changed, 81 insertions(+), 11 deletions(-) create mode 100644 versions/alpine_3.9_1.10.10 create mode 100644 versions/alpine_3.9_2.6.3 create mode 100644 versions/alpine_3.9_2.7.2 create mode 100644 versions/alpine_3.9_2.8 create mode 100644 versions/alpine_3.9_2.8.1 create mode 100644 versions/alpine_3.9_2.9.0 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3c251d3..aef21ab 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -146,6 +146,17 @@ before_script: PORT: 5109 ROCKS_INSTALLER: 'luarocks' +'alpine 3.9 1.10.10': + <<: *build_definition + when: manual + variables: + OS: 'alpine' + DIST: '3.9' + TAG: '1.10.10' + VER: '1.10.10' + PORT: 5110 + ROCKS_INSTALLER: 'luarocks' + 'alpine 3.9 1.x': <<: *build_definition variables: @@ -416,6 +427,7 @@ before_script: 'alpine 3.9 2.5': <<: *build_definition + when: manual variables: OS: 'alpine' DIST: '3.9' @@ -455,6 +467,16 @@ before_script: VER: '2.6.2' PORT: 5262 +'alpine 3.9 2.6.3': + <<: *build_definition + when: manual + variables: + OS: 'alpine' + DIST: '3.9' + TAG: '2.6.3' + VER: '2.6.3' + PORT: 5263 + 'alpine 3.9 2.6': <<: *build_definition variables: @@ -486,6 +508,16 @@ before_script: VER: '2.7.1' PORT: 5271 +'alpine 3.9 2.7.2': + <<: *build_definition + when: manual + variables: + OS: 'alpine' + DIST: '3.9' + TAG: '2.7.2' + VER: '2.7.2' + PORT: 5272 + 'alpine 3.9 2.7': <<: *build_definition variables: @@ -495,7 +527,7 @@ before_script: VER: '2.7' PORT: 5279 -# Tarantool branch master +# Tarantool branch 2.8 'alpine 3.9 2.8.0': <<: *build_definition @@ -507,6 +539,37 @@ before_script: VER: '2.8.0' PORT: 5270 +'alpine 3.9 2.8.1': + <<: *build_definition + when: manual + variables: + OS: 'alpine' + DIST: '3.9' + TAG: '2.8.1' + VER: '2.8.1' + PORT: 5281 + +'alpine 3.9 2.8': + <<: *build_definition + variables: + OS: 'alpine' + DIST: '3.9' + TAG: '2.8' + VER: '2.8' + PORT: 5289 + +# Tarantool branch master + +'alpine 3.9 2.9.0': + <<: *build_definition + when: manual + variables: + OS: 'alpine' + DIST: '3.9' + TAG: '2.9.0' + VER: '2.9.0' + PORT: 5290 + 'alpine 3.9 2.x': <<: *build_definition variables: diff --git a/README.md b/README.md index 68c6d28..e854b9a 100644 --- a/README.md +++ b/README.md @@ -331,16 +331,17 @@ Fixed versions: | 2.3.1 .. 2.3.3 | dockerfile/alpine_3.9 | | 2.4.0 .. 2.4.3 | dockerfile/alpine_3.9 | | 2.5.0 .. 2.5.3 | dockerfile/alpine_3.9 | -| 2.6.0 .. 2.6.2 | dockerfile/alpine_3.9 | -| 2.7.0 .. 2.7.1 | dockerfile/alpine_3.9 | -| 2.8.0 | dockerfile/alpine_3.9 | +| 2.6.0 .. 2.6.3 | dockerfile/alpine_3.9 | +| 2.7.0 .. 2.7.2 | dockerfile/alpine_3.9 | +| 2.8.0 .. 2.8.1 | dockerfile/alpine_3.9 | +| 2.9.0 | dockerfile/alpine_3.9 | Rolling versions: | Docker tag | Dockerfile | | ---------- | --------------------- | | 1 | dockerfile/alpine_3.9 | -| 2.1 .. 2.7 | dockerfile/alpine_3.9 | +| 2.1 .. 2.8 | dockerfile/alpine_3.9 | | 2, latest | dockerfile/alpine_3.9 | Special builds: diff --git a/versions/alpine_3.9_1.10.10 b/versions/alpine_3.9_1.10.10 new file mode 100644 index 0000000..21750c0 --- /dev/null +++ b/versions/alpine_3.9_1.10.10 @@ -0,0 +1 @@ +1.10.10-0-gaea7ae77a diff --git a/versions/alpine_3.9_1.x b/versions/alpine_3.9_1.x index beeb43b..21750c0 100644 --- a/versions/alpine_3.9_1.x +++ b/versions/alpine_3.9_1.x @@ -1 +1 @@ -1.10.9-0-g720ffdd23 +1.10.10-0-gaea7ae77a diff --git a/versions/alpine_3.9_2.6 b/versions/alpine_3.9_2.6 index a5b2bcb..6e81225 100644 --- a/versions/alpine_3.9_2.6 +++ b/versions/alpine_3.9_2.6 @@ -1 +1 @@ -2.6.2-0-g34d504d7d +2.6.3-0-gcd487a2c5 diff --git a/versions/alpine_3.9_2.6.3 b/versions/alpine_3.9_2.6.3 new file mode 100644 index 0000000..6e81225 --- /dev/null +++ b/versions/alpine_3.9_2.6.3 @@ -0,0 +1 @@ +2.6.3-0-gcd487a2c5 diff --git a/versions/alpine_3.9_2.7 b/versions/alpine_3.9_2.7 index f8b07c8..63b9bd4 100644 --- a/versions/alpine_3.9_2.7 +++ b/versions/alpine_3.9_2.7 @@ -1 +1 @@ -2.7.1-0-g3ac498c9f +2.7.2-0-g4d8c06890 diff --git a/versions/alpine_3.9_2.7.2 b/versions/alpine_3.9_2.7.2 new file mode 100644 index 0000000..63b9bd4 --- /dev/null +++ b/versions/alpine_3.9_2.7.2 @@ -0,0 +1 @@ +2.7.2-0-g4d8c06890 diff --git a/versions/alpine_3.9_2.8 b/versions/alpine_3.9_2.8 new file mode 100644 index 0000000..8d4caa2 --- /dev/null +++ b/versions/alpine_3.9_2.8 @@ -0,0 +1 @@ +2.8.1-0-ge2a1ec0c2 diff --git a/versions/alpine_3.9_2.8.1 b/versions/alpine_3.9_2.8.1 new file mode 100644 index 0000000..8d4caa2 --- /dev/null +++ b/versions/alpine_3.9_2.8.1 @@ -0,0 +1 @@ +2.8.1-0-ge2a1ec0c2 diff --git a/versions/alpine_3.9_2.9.0 b/versions/alpine_3.9_2.9.0 new file mode 100644 index 0000000..302c949 --- /dev/null +++ b/versions/alpine_3.9_2.9.0 @@ -0,0 +1 @@ +2.9.0-0-g15bbdab92 diff --git a/versions/alpine_3.9_2.x b/versions/alpine_3.9_2.x index a5b2bcb..63b9bd4 100644 --- a/versions/alpine_3.9_2.x +++ b/versions/alpine_3.9_2.x @@ -1 +1 @@ -2.6.2-0-g34d504d7d +2.7.2-0-g4d8c06890 diff --git a/versions/centos_7_1.x b/versions/centos_7_1.x index beeb43b..21750c0 100644 --- a/versions/centos_7_1.x +++ b/versions/centos_7_1.x @@ -1 +1 @@ -1.10.9-0-g720ffdd23 +1.10.10-0-gaea7ae77a diff --git a/versions/centos_7_2.x b/versions/centos_7_2.x index a5b2bcb..63b9bd4 100644 --- a/versions/centos_7_2.x +++ b/versions/centos_7_2.x @@ -1 +1 @@ -2.6.2-0-g34d504d7d +2.7.2-0-g4d8c06890 From 10df03f462d6d1a8d1bad51617a670c8dad4249a Mon Sep 17 00:00:00 2001 From: Igor Zolotarev <63460867+yngvar-antonsson@users.noreply.github.com> Date: Fri, 6 Aug 2021 15:03:28 +0300 Subject: [PATCH 230/286] Updated metrics to 0.10.0 (#209) --- dockerfiles/alpine_3.5 | 2 +- dockerfiles/alpine_3.9 | 2 +- dockerfiles/centos_7 | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dockerfiles/alpine_3.5 b/dockerfiles/alpine_3.5 index 395b0eb..53b3491 100644 --- a/dockerfiles/alpine_3.5 +++ b/dockerfiles/alpine_3.5 @@ -25,7 +25,7 @@ ENV TARANTOOL_VERSION=${TNT_VER} \ LUAROCK_CONNPOOL_VERSION=1.1.1 \ LUAROCK_HTTP_VERSION=1.1.0 \ LUAROCK_MEMCACHED_VERSION=1.0.1 \ - LUAROCK_METRICS_VERSION=0.2.0 \ + LUAROCK_METRICS_VERSION=0.10.0 \ LUAROCK_TARANTOOL_PG_VERSION=2.0.2 \ LUAROCK_TARANTOOL_MYSQL_VERSION=2.0.1 \ LUAROCK_TARANTOOL_MQTT_VERSION=1.2.1 \ diff --git a/dockerfiles/alpine_3.9 b/dockerfiles/alpine_3.9 index ce74847..50a162e 100644 --- a/dockerfiles/alpine_3.9 +++ b/dockerfiles/alpine_3.9 @@ -23,7 +23,7 @@ ENV TARANTOOL_VERSION=${TNT_VER} \ LUAROCK_CONNPOOL_VERSION=1.1.1 \ LUAROCK_HTTP_VERSION=1.1.0 \ LUAROCK_MEMCACHED_VERSION=1.0.1 \ - LUAROCK_METRICS_VERSION=0.2.0 \ + LUAROCK_METRICS_VERSION=0.10.0 \ LUAROCK_TARANTOOL_PG_VERSION=2.0.2 \ LUAROCK_TARANTOOL_MYSQL_VERSION=2.0.1 \ LUAROCK_TARANTOOL_MQTT_VERSION=1.2.1 \ diff --git a/dockerfiles/centos_7 b/dockerfiles/centos_7 index 86720de..240c608 100644 --- a/dockerfiles/centos_7 +++ b/dockerfiles/centos_7 @@ -21,7 +21,7 @@ ENV TARANTOOL_VERSION=${TNT_VER} \ LUAROCK_CONNPOOL_VERSION=1.1.1 \ LUAROCK_HTTP_VERSION=1.1.0 \ LUAROCK_MEMCACHED_VERSION=1.0.1 \ - LUAROCK_METRICS_VERSION=0.2.0 \ + LUAROCK_METRICS_VERSION=0.10.0 \ LUAROCK_TARANTOOL_PG_VERSION=2.0.2 \ LUAROCK_TARANTOOL_MYSQL_VERSION=2.0.1 \ LUAROCK_TARANTOOL_GIS_VERSION=1.0.0 \ From 632d7e8cec200b1a27c33f8555239fdf928f6c7c Mon Sep 17 00:00:00 2001 From: VitaliyaIoffe Date: Fri, 27 Aug 2021 21:11:19 +0300 Subject: [PATCH 231/286] Enable build different architectures Since 2.10.0-beta1 release tarantool supports ARM architecture. Support it in the official docker images. Build command example: 'export TAG=2.10.0-beta1-amd64 && export OS=alpine DIST=3.9 VER=2.10.0-beta1 ARCH=amd64/ && PORT=5200 make -f .gitlab.mk build' Close tarantool/tarantool#5868 Close tarantool/tarantool#6154 --- .gitlab.mk | 11 ++++++----- dockerfiles/alpine_3.9 | 9 +++++---- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.gitlab.mk b/.gitlab.mk index 148c7d4..88c8666 100644 --- a/.gitlab.mk +++ b/.gitlab.mk @@ -1,18 +1,19 @@ TNT_VER=$(shell cat versions/${OS}_${DIST}_${VER}) ROCKS_INSTALLER?='tarantoolctl rocks' ENABLE_BUNDLED_LIBYAML?='ON' -IMAGE?='tarantool/tarantool' +IMAGE?=tarantool/tarantool +NPROC?=4 build: [ "${TNT_VER}" != "" ] || (echo "ERROR: TNT_VER not defined" ; exit 1) - [ "${DOCKERFILE_NAME_SUFFIX}" != "" ] && \ - DOCKERFILE_SUFFIX=_${DOCKERFILE_NAME_SUFFIX} ; \ docker build --no-cache --network=host \ --build-arg ROCKS_INSTALLER=${ROCKS_INSTALLER} \ --build-arg ENABLE_BUNDLED_LIBYAML=${ENABLE_BUNDLED_LIBYAML} \ --build-arg TNT_VER=${TNT_VER} \ - --build-arg BASE_IMAGE="${OS}:${DIST}" \ - -t ${IMAGE}:${TAG} -f dockerfiles/${OS}_${DIST}$${DOCKERFILE_SUFFIX} . + --build-arg NPROC=${NPROC} \ + --build-arg BASE_IMAGE="${ARCH}${OS}:${DIST}" \ + --progress=plain \ + -t ${IMAGE}:${TAG} -f dockerfiles/${OS}_${DIST} . docker run --rm --name tarantool_${TAG} -p ${PORT}:${PORT} -d ${IMAGE}:${TAG} docker exec -t tarantool_${TAG} tarantool_is_up docker stop tarantool_${TAG} diff --git a/dockerfiles/alpine_3.9 b/dockerfiles/alpine_3.9 index 50a162e..39cfa69 100644 --- a/dockerfiles/alpine_3.9 +++ b/dockerfiles/alpine_3.9 @@ -10,6 +10,7 @@ RUN addgroup -S tarantool \ # stage where it was defined. To use an arg in multiple stages, # each stage must include the ARG instruction ARG TNT_VER +ARG NPROC ENV TARANTOOL_VERSION=${TNT_VER} \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ @@ -84,7 +85,7 @@ RUN set -x \ rm /gperftools_alpine.diff; \ ./autogen.sh; \ ./configure; \ - make -j ; \ + make -j ${NPROC}; \ cp .libs/libprofiler.so* /usr/local/lib;) \ && : "---------- pprof for gperftools ----------" \ && : "To avoid of the issue:" \ @@ -118,7 +119,7 @@ RUN set -x \ -DENABLE_BACKTRACE:BOOL=ON\ -DENABLE_DIST:BOOL=ON\ .) \ - && make -C /usr/src/tarantool -j\ + && make -C /usr/src/tarantool -j ${NPROC} \ && make -C /usr/src/tarantool install \ && make -C /usr/src/tarantool clean \ && : "---------- luarocks ----------" \ @@ -172,7 +173,7 @@ RUN set -x \ && tar -xzf proj.tar.gz -C /usr/src/proj --strip-components=1 \ && (cd /usr/src/proj; \ ./configure; \ - make -j ; \ + make -j ${NPROC}; \ make install) \ && rm -r /usr/src/proj \ && rm -rf /usr/src/proj \ @@ -183,7 +184,7 @@ RUN set -x \ && tar -xjf geos.tar.bz2 -C /usr/src/geos --strip-components=1 \ && (cd /usr/src/geos; \ ./configure; \ - make -j ; \ + make -j ${NPROC}; \ make install) \ && rm -r /usr/src/geos \ && rm -rf /usr/src/geos \ From 175fbfdecad5bcf8809707625bfe9f83f8208019 Mon Sep 17 00:00:00 2001 From: VitaliyaIoffe Date: Fri, 27 Aug 2021 21:13:46 +0300 Subject: [PATCH 232/286] Update versions Update releases: 1.10.11, 2.7.3, 2.8.2, 2.10.0-beta1 Have to set ROCKS_INSTALLER in 1.10.11 version 'export TAG=1.10.11 && export OS=alpine DIST=3.9 VER=1.10.11 ROCKS_INSTALLER=luarocks && PORT=5200 make -f .gitlab.mk build --- README.md | 33 ++++++++++++++++---------------- versions/alpine_3.9_1.10.11 | 1 + versions/alpine_3.9_2.10.0-beta1 | 1 + versions/alpine_3.9_2.7.3 | 1 + versions/alpine_3.9_2.8.2 | 1 + 5 files changed, 21 insertions(+), 16 deletions(-) create mode 100644 versions/alpine_3.9_1.10.11 create mode 100644 versions/alpine_3.9_2.10.0-beta1 create mode 100644 versions/alpine_3.9_2.7.3 create mode 100644 versions/alpine_3.9_2.8.2 diff --git a/README.md b/README.md index e854b9a..b2bbdfd 100644 --- a/README.md +++ b/README.md @@ -319,22 +319,23 @@ $ docker run -it tarantool/tarantool:2 Fixed versions: -| Docker tag | Dockerfile | -| ---------------- | --------------------- | -| 1.10.0 .. 1.10.3 | dockerfile/alpine_3.5 | -| 1.10.4 .. 1.10.9 | dockerfile/alpine_3.9 | -| 2.1.0 .. 2.1.2 | dockerfile/alpine_3.5 | -| 2.1.3 | dockerfile/alpine_3.9 | -| 2.2.0 .. 2.2.1 | dockerfile/alpine_3.5 | -| 2.2.2 .. 2.2.3 | dockerfile/alpine_3.9 | -| 2.3.0 | dockerfile/alpine_3.5 | -| 2.3.1 .. 2.3.3 | dockerfile/alpine_3.9 | -| 2.4.0 .. 2.4.3 | dockerfile/alpine_3.9 | -| 2.5.0 .. 2.5.3 | dockerfile/alpine_3.9 | -| 2.6.0 .. 2.6.3 | dockerfile/alpine_3.9 | -| 2.7.0 .. 2.7.2 | dockerfile/alpine_3.9 | -| 2.8.0 .. 2.8.1 | dockerfile/alpine_3.9 | -| 2.9.0 | dockerfile/alpine_3.9 | +| Docker tag | Dockerfile | +| ----------------- | --------------------- | +| 1.10.0 .. 1.10.3 | dockerfile/alpine_3.5 | +| 1.10.4 .. 1.10.11 | dockerfile/alpine_3.9 | +| 2.1.0 .. 2.1.2 | dockerfile/alpine_3.5 | +| 2.1.3 | dockerfile/alpine_3.9 | +| 2.2.0 .. 2.2.1 | dockerfile/alpine_3.5 | +| 2.2.2 .. 2.2.3 | dockerfile/alpine_3.9 | +| 2.3.0 | dockerfile/alpine_3.5 | +| 2.3.1 .. 2.3.3 | dockerfile/alpine_3.9 | +| 2.4.0 .. 2.4.3 | dockerfile/alpine_3.9 | +| 2.5.0 .. 2.5.3 | dockerfile/alpine_3.9 | +| 2.6.0 .. 2.6.3 | dockerfile/alpine_3.9 | +| 2.7.0 .. 2.7.3 | dockerfile/alpine_3.9 | +| 2.8.0 .. 2.8.2 | dockerfile/alpine_3.9 | +| 2.9.0 | dockerfile/alpine_3.9 | +| 2.10.0-beta1 | dockerfile/alpine_3.9 | Rolling versions: diff --git a/versions/alpine_3.9_1.10.11 b/versions/alpine_3.9_1.10.11 new file mode 100644 index 0000000..5fca5e7 --- /dev/null +++ b/versions/alpine_3.9_1.10.11 @@ -0,0 +1 @@ +1.10.11-0-gf0b0e7ecf diff --git a/versions/alpine_3.9_2.10.0-beta1 b/versions/alpine_3.9_2.10.0-beta1 new file mode 100644 index 0000000..fefa942 --- /dev/null +++ b/versions/alpine_3.9_2.10.0-beta1 @@ -0,0 +1 @@ +2.10.0-beta1-0-g7da4b1438 diff --git a/versions/alpine_3.9_2.7.3 b/versions/alpine_3.9_2.7.3 new file mode 100644 index 0000000..ce6aec8 --- /dev/null +++ b/versions/alpine_3.9_2.7.3 @@ -0,0 +1 @@ +2.7.3-0-gdddf926c3 diff --git a/versions/alpine_3.9_2.8.2 b/versions/alpine_3.9_2.8.2 new file mode 100644 index 0000000..e2af2f4 --- /dev/null +++ b/versions/alpine_3.9_2.8.2 @@ -0,0 +1 @@ +2.8.2-0-gfc96d10f5 From 54d16777bf34530ac895852d4979de8b7ec678c6 Mon Sep 17 00:00:00 2001 From: dmitry krokhin Date: Mon, 30 Aug 2021 17:36:36 +0300 Subject: [PATCH 233/286] log configuration environment options --- README.md | 9 +++++++++ files/tarantool-entrypoint.lua | 4 ++++ files/tarantool_set_config.lua | 2 ++ 3 files changed, 15 insertions(+) diff --git a/README.md b/README.md index b2bbdfd..42a477a 100644 --- a/README.md +++ b/README.md @@ -291,6 +291,15 @@ Default is 3600 (every 1 hour). Optional. When set to "true" Tarantool tries to continue if there is an error while reading a snapshot file or a write-ahead log file. Skips invalid records, reads as much data as possible, print a warning in console and start the database. +### `TARANTOOL_LOG_FORMAT` + +Optional. There are two possible log formats - 'plain' (default) or 'json' (with more detail and with json labels). +More details can be found in [log module reference](https://www.tarantool.io/en/doc/latest/reference/configuration/#confval-log_format) + +### `TARANTOOL_LOG_LEVEL` + +Optional. Default value is 5 (that means INFO). More details can be found in [logging log levels configuration](https://www.tarantool.io/en/doc/latest/reference/configuration/#cfg-logging-log-level) + # Reporting problems and getting help You can report problems and request diff --git a/files/tarantool-entrypoint.lua b/files/tarantool-entrypoint.lua index db69dfc..ba6f907 100755 --- a/files/tarantool-entrypoint.lua +++ b/files/tarantool-entrypoint.lua @@ -182,6 +182,8 @@ local function wrapper_cfg(override) file_cfg.TARANTOOL_SLAB_ALLOC_MAXIMAL = os.getenv('TARANTOOL_SLAB_ALLOC_MAXIMAL') file_cfg.TARANTOOL_PORT = os.getenv('TARANTOOL_PORT') file_cfg.TARANTOOL_FORCE_RECOVERY = os.getenv('TARANTOOL_FORCE_RECOVERY') + file_cfg.TARANTOOL_LOG_FORMAT = os.getenv('TARANTOOL_LOG_FORMAT') + file_cfg.TARANTOOL_LOG_LEVEL = os.getenv('TARANTOOL_LOG_LEVEL') file_cfg.TARANTOOL_WAL_MODE = os.getenv('TARANTOOL_WAL_MODE') file_cfg.TARANTOOL_REPLICATION_SOURCE = os.getenv('TARANTOOL_REPLICATION_SOURCE') file_cfg.TARANTOOL_REPLICATION = os.getenv('TARANTOOL_REPLICATION') @@ -236,6 +238,8 @@ local function wrapper_cfg(override) override.wal_mode cfg.force_recovery = file_cfg.TARANTOOL_FORCE_RECOVERY == 'true' + cfg.log_format = file_cfg.TARANTOOL_LOG_FORMAT or 'plain' + cfg.log_level = tonumber(file_cfg.TARANTOOL_LOG_LEVEL) or 5 cfg.wal_dir = override.wal_dir or '/var/lib/tarantool' cfg.vinyl_dir = override.vinyl_dir or '/var/lib/tarantool' diff --git a/files/tarantool_set_config.lua b/files/tarantool_set_config.lua index 17ef143..95d3a25 100755 --- a/files/tarantool_set_config.lua +++ b/files/tarantool_set_config.lua @@ -87,6 +87,8 @@ local vars = { TARANTOOL_SLAB_ALLOC_MINIMAL=nop, TARANTOOL_PORT=nop, TARANTOOL_FORCE_RECOVERY=nop, + TARANTOOL_LOG_FORMAT=nop, + TARANTOOL_LOG_LEVEL=nop, TARANTOOL_WAL_MODE=nop, TARANTOOL_USER_NAME=update_credentials, TARANTOOL_USER_PASSWORD=update_credentials, From 750c06ce47dfa40b204aa8af0ed4458865dd574e Mon Sep 17 00:00:00 2001 From: Yaroslav Lobankov Date: Mon, 6 Dec 2021 18:39:46 +0400 Subject: [PATCH 234/286] Update versions for tarantool modules This patch updates the version for each tarantool module to the latest tag of the module where it's possible. Also, a build issue was fixed for Centos 7. It was impossible to download the pgdg-redhat-repo-latest.noarch.rpm package by the link from the docker file. So the link was updated. Clases #208 Closes #215 --- dockerfiles/alpine_3.9 | 14 +++++++------- dockerfiles/centos_7 | 15 +++++++-------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/dockerfiles/alpine_3.9 b/dockerfiles/alpine_3.9 index 39cfa69..d553e08 100644 --- a/dockerfiles/alpine_3.9 +++ b/dockerfiles/alpine_3.9 @@ -17,17 +17,17 @@ ENV TARANTOOL_VERSION=${TNT_VER} \ GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ GPERFTOOLS_TAG=gperftools-2.5 \ LUAROCKS_URL=https://github.com/tarantool/luarocks/archive/6e6fe62d9409fe2103c0fd091cccb3da0451faf5.tar.gz \ - LUAROCK_VSHARD_VERSION=0.1.14 \ - LUAROCK_AVRO_SCHEMA_VERSION=3.0.3 \ - LUAROCK_EXPERATIOND_VERSION=1.0.1 \ - LUAROCK_QUEUE_VERSION=1.0.6 \ + LUAROCK_VSHARD_VERSION=0.1.18 \ + LUAROCK_AVRO_SCHEMA_VERSION=3.0.6 \ + LUAROCK_EXPERATIOND_VERSION=1.1.1 \ + LUAROCK_QUEUE_VERSION=1.1.0 \ LUAROCK_CONNPOOL_VERSION=1.1.1 \ - LUAROCK_HTTP_VERSION=1.1.0 \ + LUAROCK_HTTP_VERSION=1.2.0 \ LUAROCK_MEMCACHED_VERSION=1.0.1 \ - LUAROCK_METRICS_VERSION=0.10.0 \ + LUAROCK_METRICS_VERSION=0.12.0 \ LUAROCK_TARANTOOL_PG_VERSION=2.0.2 \ LUAROCK_TARANTOOL_MYSQL_VERSION=2.0.1 \ - LUAROCK_TARANTOOL_MQTT_VERSION=1.2.1 \ + LUAROCK_TARANTOOL_MQTT_VERSION=1.5.0 \ LUAROCK_TARANTOOL_GIS_VERSION=1.0.0 \ LUAROCK_TARANTOOL_PROMETHEUS_VERSION=1.0.4 \ LUAROCK_TARANTOOL_GPERFTOOLS_VERSION=1.0.1 diff --git a/dockerfiles/centos_7 b/dockerfiles/centos_7 index 240c608..c910ea6 100644 --- a/dockerfiles/centos_7 +++ b/dockerfiles/centos_7 @@ -13,15 +13,14 @@ ENV TARANTOOL_VERSION=${TNT_VER} \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ LUAROCKS_URL=https://github.com/tarantool/luarocks/archive/6e6fe62d9409fe2103c0fd091cccb3da0451faf5.tar.gz \ - LUAROCK_VSHARD_VERSION=0.1.14 \ - LUAROCK_CHECKS_VERSION=3.0.1 \ - LUAROCK_AVRO_SCHEMA_VERSION=3.0.3 \ - LUAROCK_EXPERATIOND_VERSION=1.0.1 \ - LUAROCK_QUEUE_VERSION=1.0.6 \ + LUAROCK_VSHARD_VERSION=0.1.18 \ + LUAROCK_AVRO_SCHEMA_VERSION=3.0.6 \ + LUAROCK_EXPERATIOND_VERSION=1.1.1 \ + LUAROCK_QUEUE_VERSION=1.1.0 \ LUAROCK_CONNPOOL_VERSION=1.1.1 \ - LUAROCK_HTTP_VERSION=1.1.0 \ + LUAROCK_HTTP_VERSION=1.2.0 \ LUAROCK_MEMCACHED_VERSION=1.0.1 \ - LUAROCK_METRICS_VERSION=0.10.0 \ + LUAROCK_METRICS_VERSION=0.12.0 \ LUAROCK_TARANTOOL_PG_VERSION=2.0.2 \ LUAROCK_TARANTOOL_MYSQL_VERSION=2.0.1 \ LUAROCK_TARANTOOL_GIS_VERSION=1.0.0 \ @@ -140,7 +139,7 @@ COPY files/luarocks-config_centos.lua /usr/local/etc/luarocks/config-5.1.lua COPY files/luarocks-config.lua /usr/local/etc/tarantool/rocks/config-5.1.lua RUN set -x \ - && yum -y install https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm \ + && yum -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm \ && yum -y install \ mariadb-libs \ postgresql96-libs \ From 063993eaa6fbd544ae0ac3ac363056eff3624e2a Mon Sep 17 00:00:00 2001 From: Yaroslav Lobankov Date: Fri, 24 Dec 2021 15:17:42 +0300 Subject: [PATCH 235/286] Update tarantool versions - added new version files for 1.10.12, 2.8.3, 2.10.0-beta2 - updated the corresponding version files to the latest releases --- README.md | 5 +++-- versions/alpine_3.9_1.10.12 | 1 + versions/alpine_3.9_1.x | 2 +- versions/alpine_3.9_2.10.0-beta2 | 1 + versions/alpine_3.9_2.8 | 2 +- versions/alpine_3.9_2.8.3 | 1 + versions/alpine_3.9_2.x | 2 +- versions/centos_7_1.x | 2 +- versions/centos_7_2.x | 2 +- 9 files changed, 11 insertions(+), 7 deletions(-) create mode 100644 versions/alpine_3.9_1.10.12 create mode 100644 versions/alpine_3.9_2.10.0-beta2 create mode 100644 versions/alpine_3.9_2.8.3 diff --git a/README.md b/README.md index 42a477a..147a497 100644 --- a/README.md +++ b/README.md @@ -331,7 +331,7 @@ Fixed versions: | Docker tag | Dockerfile | | ----------------- | --------------------- | | 1.10.0 .. 1.10.3 | dockerfile/alpine_3.5 | -| 1.10.4 .. 1.10.11 | dockerfile/alpine_3.9 | +| 1.10.4 .. 1.10.12 | dockerfile/alpine_3.9 | | 2.1.0 .. 2.1.2 | dockerfile/alpine_3.5 | | 2.1.3 | dockerfile/alpine_3.9 | | 2.2.0 .. 2.2.1 | dockerfile/alpine_3.5 | @@ -342,9 +342,10 @@ Fixed versions: | 2.5.0 .. 2.5.3 | dockerfile/alpine_3.9 | | 2.6.0 .. 2.6.3 | dockerfile/alpine_3.9 | | 2.7.0 .. 2.7.3 | dockerfile/alpine_3.9 | -| 2.8.0 .. 2.8.2 | dockerfile/alpine_3.9 | +| 2.8.0 .. 2.8.3 | dockerfile/alpine_3.9 | | 2.9.0 | dockerfile/alpine_3.9 | | 2.10.0-beta1 | dockerfile/alpine_3.9 | +| 2.10.0-beta2 | dockerfile/alpine_3.9 | Rolling versions: diff --git a/versions/alpine_3.9_1.10.12 b/versions/alpine_3.9_1.10.12 new file mode 100644 index 0000000..a296e63 --- /dev/null +++ b/versions/alpine_3.9_1.10.12 @@ -0,0 +1 @@ +1.10.12-0-g7f88f54fe diff --git a/versions/alpine_3.9_1.x b/versions/alpine_3.9_1.x index 21750c0..a296e63 100644 --- a/versions/alpine_3.9_1.x +++ b/versions/alpine_3.9_1.x @@ -1 +1 @@ -1.10.10-0-gaea7ae77a +1.10.12-0-g7f88f54fe diff --git a/versions/alpine_3.9_2.10.0-beta2 b/versions/alpine_3.9_2.10.0-beta2 new file mode 100644 index 0000000..86230ba --- /dev/null +++ b/versions/alpine_3.9_2.10.0-beta2 @@ -0,0 +1 @@ +2.10.0-beta2-0-g9d80b68b9 diff --git a/versions/alpine_3.9_2.8 b/versions/alpine_3.9_2.8 index 8d4caa2..b97ffcf 100644 --- a/versions/alpine_3.9_2.8 +++ b/versions/alpine_3.9_2.8 @@ -1 +1 @@ -2.8.1-0-ge2a1ec0c2 +2.8.3-0-g01023dbc2 diff --git a/versions/alpine_3.9_2.8.3 b/versions/alpine_3.9_2.8.3 new file mode 100644 index 0000000..b97ffcf --- /dev/null +++ b/versions/alpine_3.9_2.8.3 @@ -0,0 +1 @@ +2.8.3-0-g01023dbc2 diff --git a/versions/alpine_3.9_2.x b/versions/alpine_3.9_2.x index 63b9bd4..b97ffcf 100644 --- a/versions/alpine_3.9_2.x +++ b/versions/alpine_3.9_2.x @@ -1 +1 @@ -2.7.2-0-g4d8c06890 +2.8.3-0-g01023dbc2 diff --git a/versions/centos_7_1.x b/versions/centos_7_1.x index 21750c0..a296e63 100644 --- a/versions/centos_7_1.x +++ b/versions/centos_7_1.x @@ -1 +1 @@ -1.10.10-0-gaea7ae77a +1.10.12-0-g7f88f54fe diff --git a/versions/centos_7_2.x b/versions/centos_7_2.x index 63b9bd4..b97ffcf 100644 --- a/versions/centos_7_2.x +++ b/versions/centos_7_2.x @@ -1 +1 @@ -2.7.2-0-g4d8c06890 +2.8.3-0-g01023dbc2 From 81851963bc709e7b68f8b68293dc59ecec760364 Mon Sep 17 00:00:00 2001 From: vr009 Date: Wed, 2 Feb 2022 11:44:04 +0300 Subject: [PATCH 236/286] Update the version for mqtt module This patch updates the version for mqtt module to the latest tag and removes the steps with installing the mosquitto library for alpine:3.9. With the new release of mqtt module, libmosquitto builds statically when the module is installed from luarocks. That fix eliminates the dependencies that are not necessary anymore. Closes tarantool/mqtt#41 --- dockerfiles/alpine_3.9 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/dockerfiles/alpine_3.9 b/dockerfiles/alpine_3.9 index d553e08..2d5abdb 100644 --- a/dockerfiles/alpine_3.9 +++ b/dockerfiles/alpine_3.9 @@ -27,7 +27,7 @@ ENV TARANTOOL_VERSION=${TNT_VER} \ LUAROCK_METRICS_VERSION=0.12.0 \ LUAROCK_TARANTOOL_PG_VERSION=2.0.2 \ LUAROCK_TARANTOOL_MYSQL_VERSION=2.0.1 \ - LUAROCK_TARANTOOL_MQTT_VERSION=1.5.0 \ + LUAROCK_TARANTOOL_MQTT_VERSION=1.5.1 \ LUAROCK_TARANTOOL_GIS_VERSION=1.0.0 \ LUAROCK_TARANTOOL_PROMETHEUS_VERSION=1.0.4 \ LUAROCK_TARANTOOL_GPERFTOOLS_VERSION=1.0.1 @@ -149,7 +149,6 @@ RUN set -x \ mariadb-connector-c-dev \ libpq \ cyrus-sasl \ - mosquitto-libs \ libev \ && apk add --no-cache --virtual .build-deps.2 \ git \ @@ -162,7 +161,6 @@ RUN set -x \ lua-dev \ musl-dev \ cyrus-sasl-dev \ - mosquitto-dev \ libev-dev \ wget \ unzip \ From 9d7e35a5f4894c3d71c225effcbf3cdd3baba1e4 Mon Sep 17 00:00:00 2001 From: Patience Daur Date: Mon, 7 Feb 2022 12:57:48 +0300 Subject: [PATCH 237/286] Fix the link to tarantoolctl documentation --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 147a497..3af421f 100644 --- a/README.md +++ b/README.md @@ -136,7 +136,7 @@ unix socket in the container to connect to Tarantool. But it requires you to have direct access to the container. If you need a remote console via TCP/IP, use `tarantoolctl` utility -as explained [here](https://tarantool.org/doc/book/administration.html#administration-tarantoolctl-connect). +as explained [here](https://www.tarantool.io/en/doc/latest/reference/tarantoolctl/). ## Start a master-master replica set From 08a12ba74b57b9f22b193dd08639f0b4a23f9c43 Mon Sep 17 00:00:00 2001 From: Vasiliy Tyubek Date: Tue, 22 Mar 2022 13:31:46 +0400 Subject: [PATCH 238/286] fix readme: replace shard with vshard (#198) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3af421f..6fb22c7 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ is only one Tarantool instance running in the container. - [expirationd](https://github.com/tarantool/expirationd): Automatically delete tuples based on expiration time - [queue](https://github.com/tarantool/queue): Priority queues with TTL and confirmations - [connpool](https://github.com/tarantool/connpool): Keep a pool of connections to other Tarantool instances -- [shard](https://github.com/tarantool/shard): Automatically distribute data across multiple instances +- [vshard](https://github.com/tarantool/vshard): Automatically distribute data across multiple instances - [http](https://github.com/tarantool/http): Embedded HTTP server with flask-style routing support - [curl](https://github.com/tarantool/curl): HTTP client based on libcurl - [pg](https://github.com/tarantool/pg): Query PostgreSQL right from Tarantool From 044c1acf983ec7764f8a49f2e8ee164a7e5855bf Mon Sep 17 00:00:00 2001 From: artembo Date: Wed, 4 May 2022 13:20:06 +0300 Subject: [PATCH 239/286] Add 2.8.4 and 1.10.13 versions Since 2.8.4 and 1.10.13 have been released the correnponding docker images need to be uploaded to the Docker Hub. Added 'bsd-compat-headers' package for alpine 3.9 Dockerfile as it is required for `cdefs.h`. Without the package an error raises during the build: fatal error: sys/cdefs.h: No such file or directory Part of #222 --- README.md | 4 ++-- dockerfiles/alpine_3.9 | 1 + versions/alpine_3.9_1.10.13 | 1 + versions/alpine_3.9_1.x | 2 +- versions/alpine_3.9_2.8 | 2 +- versions/alpine_3.9_2.8.4 | 1 + versions/alpine_3.9_2.x | 2 +- 7 files changed, 8 insertions(+), 5 deletions(-) create mode 100644 versions/alpine_3.9_1.10.13 create mode 100644 versions/alpine_3.9_2.8.4 diff --git a/README.md b/README.md index 6fb22c7..b9ad18f 100644 --- a/README.md +++ b/README.md @@ -331,7 +331,7 @@ Fixed versions: | Docker tag | Dockerfile | | ----------------- | --------------------- | | 1.10.0 .. 1.10.3 | dockerfile/alpine_3.5 | -| 1.10.4 .. 1.10.12 | dockerfile/alpine_3.9 | +| 1.10.4 .. 1.10.13 | dockerfile/alpine_3.9 | | 2.1.0 .. 2.1.2 | dockerfile/alpine_3.5 | | 2.1.3 | dockerfile/alpine_3.9 | | 2.2.0 .. 2.2.1 | dockerfile/alpine_3.5 | @@ -342,7 +342,7 @@ Fixed versions: | 2.5.0 .. 2.5.3 | dockerfile/alpine_3.9 | | 2.6.0 .. 2.6.3 | dockerfile/alpine_3.9 | | 2.7.0 .. 2.7.3 | dockerfile/alpine_3.9 | -| 2.8.0 .. 2.8.3 | dockerfile/alpine_3.9 | +| 2.8.0 .. 2.8.4 | dockerfile/alpine_3.9 | | 2.9.0 | dockerfile/alpine_3.9 | | 2.10.0-beta1 | dockerfile/alpine_3.9 | | 2.10.0-beta2 | dockerfile/alpine_3.9 | diff --git a/dockerfiles/alpine_3.9 b/dockerfiles/alpine_3.9 index 2d5abdb..c8fe69b 100644 --- a/dockerfiles/alpine_3.9 +++ b/dockerfiles/alpine_3.9 @@ -60,6 +60,7 @@ RUN set -x \ readline-dev \ openssl-dev \ yaml-dev \ + bsd-compat-headers \ lz4-dev \ zlib-dev \ binutils-dev \ diff --git a/versions/alpine_3.9_1.10.13 b/versions/alpine_3.9_1.10.13 new file mode 100644 index 0000000..a62d73a --- /dev/null +++ b/versions/alpine_3.9_1.10.13 @@ -0,0 +1 @@ +1.10.13-0-g1d2c5aad5 diff --git a/versions/alpine_3.9_1.x b/versions/alpine_3.9_1.x index a296e63..a62d73a 100644 --- a/versions/alpine_3.9_1.x +++ b/versions/alpine_3.9_1.x @@ -1 +1 @@ -1.10.12-0-g7f88f54fe +1.10.13-0-g1d2c5aad5 diff --git a/versions/alpine_3.9_2.8 b/versions/alpine_3.9_2.8 index b97ffcf..9181f8d 100644 --- a/versions/alpine_3.9_2.8 +++ b/versions/alpine_3.9_2.8 @@ -1 +1 @@ -2.8.3-0-g01023dbc2 +2.8.4-0-g47e6bd362 diff --git a/versions/alpine_3.9_2.8.4 b/versions/alpine_3.9_2.8.4 new file mode 100644 index 0000000..9181f8d --- /dev/null +++ b/versions/alpine_3.9_2.8.4 @@ -0,0 +1 @@ +2.8.4-0-g47e6bd362 diff --git a/versions/alpine_3.9_2.x b/versions/alpine_3.9_2.x index b97ffcf..9181f8d 100644 --- a/versions/alpine_3.9_2.x +++ b/versions/alpine_3.9_2.x @@ -1 +1 @@ -2.8.3-0-g01023dbc2 +2.8.4-0-g47e6bd362 From 6e3d2ea3725ccc10c837c2e404743f5c9a1a56fd Mon Sep 17 00:00:00 2001 From: artembo Date: Fri, 13 May 2022 16:08:26 +0300 Subject: [PATCH 240/286] Add 2.10.0-rc1 version Added two new args: - LUAJIT_DISABLE_SYSPROF to disable sysprof due to an error 'undefined reference to backtrace' during the build - LUAJIT_ENABLE_GC64 to build Tarantool with enabled GC64 Part of tarantool/infra#88 --- .gitlab.mk | 4 ++++ README.md | 1 + dockerfiles/alpine_3.9 | 7 ++++++- versions/alpine_3.9_2.10.0-rc1 | 1 + 4 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 versions/alpine_3.9_2.10.0-rc1 diff --git a/.gitlab.mk b/.gitlab.mk index 88c8666..4a6fd5c 100644 --- a/.gitlab.mk +++ b/.gitlab.mk @@ -2,6 +2,8 @@ TNT_VER=$(shell cat versions/${OS}_${DIST}_${VER}) ROCKS_INSTALLER?='tarantoolctl rocks' ENABLE_BUNDLED_LIBYAML?='ON' IMAGE?=tarantool/tarantool +LUAJIT_DISABLE_SYSPROF?=OFF +LUAJIT_ENABLE_GC64?=OFF NPROC?=4 build: @@ -10,6 +12,8 @@ build: --build-arg ROCKS_INSTALLER=${ROCKS_INSTALLER} \ --build-arg ENABLE_BUNDLED_LIBYAML=${ENABLE_BUNDLED_LIBYAML} \ --build-arg TNT_VER=${TNT_VER} \ + --build-arg LUAJIT_DISABLE_SYSPROF=${LUAJIT_DISABLE_SYSPROF} \ + --build-arg LUAJIT_ENABLE_GC64=${LUAJIT_ENABLE_GC64} \ --build-arg NPROC=${NPROC} \ --build-arg BASE_IMAGE="${ARCH}${OS}:${DIST}" \ --progress=plain \ diff --git a/README.md b/README.md index b9ad18f..9ecce50 100644 --- a/README.md +++ b/README.md @@ -346,6 +346,7 @@ Fixed versions: | 2.9.0 | dockerfile/alpine_3.9 | | 2.10.0-beta1 | dockerfile/alpine_3.9 | | 2.10.0-beta2 | dockerfile/alpine_3.9 | +| 2.10.0-rc1 | dockerfile/alpine_3.9 | Rolling versions: diff --git a/dockerfiles/alpine_3.9 b/dockerfiles/alpine_3.9 index c8fe69b..491128a 100644 --- a/dockerfiles/alpine_3.9 +++ b/dockerfiles/alpine_3.9 @@ -34,7 +34,10 @@ ENV TARANTOOL_VERSION=${TNT_VER} \ COPY files/gperftools_alpine.diff / -ARG ENABLE_BUNDLED_LIBYAML +ARG ENABLE_BUNDLED_LIBYAML \ + LUAJIT_DISABLE_SYSPROF \ + LUAJIT_ENABLE_GC64 + RUN set -x \ && apk add --no-cache --virtual .run-deps.1 \ libstdc++ \ @@ -118,6 +121,8 @@ RUN set -x \ cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo\ -DENABLE_BUNDLED_LIBYAML:BOOL=${ENABLE_BUNDLED_LIBYAML}\ -DENABLE_BACKTRACE:BOOL=ON\ + -DLUAJIT_DISABLE_SYSPROF:BOOL=${LUAJIT_DISABLE_SYSPROF} \ + -DLUAJIT_ENABLE_GC64:BOOL=${LUAJIT_ENABLE_GC64} \ -DENABLE_DIST:BOOL=ON\ .) \ && make -C /usr/src/tarantool -j ${NPROC} \ diff --git a/versions/alpine_3.9_2.10.0-rc1 b/versions/alpine_3.9_2.10.0-rc1 new file mode 100644 index 0000000..cfb12b5 --- /dev/null +++ b/versions/alpine_3.9_2.10.0-rc1 @@ -0,0 +1 @@ +2.10.0-rc1-0-g7ed15e62b From d9de887713ccdd89d6aeb9b94dd83c75d10b572c Mon Sep 17 00:00:00 2001 From: artembo Date: Mon, 23 May 2022 10:44:02 +0300 Subject: [PATCH 241/286] Add 2.10.0 version Added alpine 3.15 image with updated packages: - gperftools bumped to 2.9.1 version - mysql bumped to 2.1.0 Closes #229 --- dockerfiles/alpine_3.15 | 250 ++++++++++++++++++++++++++++++++++++ versions/alpine_3.15_2 | 1 + versions/alpine_3.15_2.10 | 1 + versions/alpine_3.15_2.10.0 | 1 + 4 files changed, 253 insertions(+) create mode 100644 dockerfiles/alpine_3.15 create mode 100644 versions/alpine_3.15_2 create mode 100644 versions/alpine_3.15_2.10 create mode 100644 versions/alpine_3.15_2.10.0 diff --git a/dockerfiles/alpine_3.15 b/dockerfiles/alpine_3.15 new file mode 100644 index 0000000..7faffda --- /dev/null +++ b/dockerfiles/alpine_3.15 @@ -0,0 +1,250 @@ +ARG BASE_IMAGE +FROM ${BASE_IMAGE} +LABEL org.opencontainers.image.authors="artembo@me.com; piligrim@rootnix.net" + +RUN addgroup -S tarantool \ + && adduser -S -G tarantool tarantool \ + && apk add --no-cache 'su-exec>=0.2' + +# An ARG instruction goes out of scope at the end of the build +# stage where it was defined. To use an arg in multiple stages, +# each stage must include the ARG instruction +ARG TNT_VER +ARG NPROC +ENV TARANTOOL_VERSION=${TNT_VER} \ + TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ + TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ + GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ + GPERFTOOLS_TAG=gperftools-2.9.1 \ + LUAROCKS_URL=https://github.com/tarantool/luarocks/archive/6e6fe62d9409fe2103c0fd091cccb3da0451faf5.tar.gz \ + LUAROCK_VSHARD_VERSION=0.1.18 \ + LUAROCK_AVRO_SCHEMA_VERSION=3.0.6 \ + LUAROCK_EXPERATIOND_VERSION=1.1.1 \ + LUAROCK_QUEUE_VERSION=1.1.0 \ + LUAROCK_CONNPOOL_VERSION=1.1.1 \ + LUAROCK_HTTP_VERSION=1.2.0 \ + LUAROCK_MEMCACHED_VERSION=1.0.1 \ + LUAROCK_METRICS_VERSION=0.12.0 \ + LUAROCK_TARANTOOL_PG_VERSION=2.0.2 \ + LUAROCK_TARANTOOL_MYSQL_VERSION=2.1.0 \ + LUAROCK_TARANTOOL_MQTT_VERSION=1.5.1 \ + LUAROCK_TARANTOOL_GIS_VERSION=1.0.0 \ + LUAROCK_TARANTOOL_PROMETHEUS_VERSION=1.0.4 \ + LUAROCK_TARANTOOL_GPERFTOOLS_VERSION=1.0.1 + +COPY files/gperftools_alpine.diff / + +ARG ENABLE_BUNDLED_LIBYAML \ + LUAJIT_DISABLE_SYSPROF \ + LUAJIT_ENABLE_GC64 + +RUN set -x \ + && apk add --no-cache --virtual .run-deps.1 \ + libstdc++ \ + readline \ + openssl \ + yaml \ + lz4 \ + binutils \ + ncurses \ + libgomp \ + lua \ + tar \ + zip \ + zlib \ + libunwind \ + icu \ + ca-certificates \ + && apk add --no-cache --virtual .build-deps.1 \ + gcc \ + g++ \ + cmake \ + file \ + readline-dev \ + openssl-dev \ + yaml-dev \ + bsd-compat-headers \ + lz4-dev \ + zlib-dev \ + binutils-dev \ + ncurses-dev \ + lua-dev \ + musl-dev \ + make \ + git \ + libunwind-dev \ + autoconf \ + automake \ + libtool \ + linux-headers \ + go \ + icu-dev \ + wget \ + && : "---------- gperftools ----------" \ + && mkdir -p /usr/src/gperftools \ + && git clone "$GPERFTOOLS_REPO" /usr/src/gperftools \ + && git -C /usr/src/gperftools checkout "$GPERFTOOLS_TAG" \ + && (cd /usr/src/gperftools; \ + ./autogen.sh; \ + ./configure --disable-libunwind --enable-frame-pointers; \ + make -j ${NPROC}; \ + cp .libs/libprofiler.so* /usr/local/lib/) \ + && : "---------- pprof for gperftools ----------" \ + && : "To avoid of the issue:" \ + && : "'The master branch is Incompatible with go version < 1.13 #538'" \ + && : "https://github.com/google/pprof/issues/538" \ + && : "use latest workable commits with the old GO versions" \ + && ( export GOPATH=/root/go && \ + export PATH=${GOPATH}/bin:/usr/local/go/bin:$PATH && \ + export GOBIN=$GOROOT/bin && \ + mkdir -p ${GOPATH}/src ${GOPATH}/bin && \ + go install github.com/google/pprof@latest ) \ + && : "---------- tarantool ----------" \ + && mkdir -p /usr/src/tarantool \ + && git clone "$TARANTOOL_DOWNLOAD_URL" /usr/src/tarantool \ + && git -C /usr/src/tarantool checkout "$TARANTOOL_VERSION" \ + && git -C /usr/src/tarantool submodule update --init --recursive \ + && (cd /usr/src/tarantool; \ + echo "WARNING: Temporary fix for test/unit/cbus_hang test" ; \ + git cherry-pick d7fa6d34ab4e0956fe8a80966ba628e0e3f81067 2>/dev/null || \ + git cherry-pick --abort ; \ + cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo\ + -DENABLE_BUNDLED_LIBYAML:BOOL=${ENABLE_BUNDLED_LIBYAML}\ + -DENABLE_BACKTRACE:BOOL=ON\ + -DLUAJIT_DISABLE_SYSPROF:BOOL=${LUAJIT_DISABLE_SYSPROF} \ + -DLUAJIT_ENABLE_GC64:BOOL=${LUAJIT_ENABLE_GC64} \ + -DENABLE_DIST:BOOL=ON\ + .) \ + && make -C /usr/src/tarantool -j ${NPROC} \ + && make -C /usr/src/tarantool install \ + && make -C /usr/src/tarantool clean \ + && : "---------- luarocks ----------" \ + && wget -O luarocks.tar.gz "$LUAROCKS_URL" \ + && mkdir -p /usr/src/luarocks \ + && tar -xzf luarocks.tar.gz -C /usr/src/luarocks --strip-components=1 \ + && (cd /usr/src/luarocks; \ + ./configure; \ + make -j ${NPROC} build; \ + make install) \ + && rm -r /usr/src/luarocks \ + && rm -rf /usr/src/tarantool \ + && rm -rf /usr/src/gperftools \ + && rm -rf /usr/src/go \ + && : "---------- remove build deps ----------" \ + && apk del .build-deps.1 + +RUN mkdir -p /usr/local/etc/luarocks \ + && mkdir -p /usr/local/etc/tarantool/rocks + +COPY files/luarocks-config.lua /usr/local/etc/luarocks/config-5.1.lua +COPY files/luarocks-config.lua /usr/local/etc/tarantool/rocks/config-5.1.lua + +ARG ROCKS_INSTALLER +RUN set -x \ + && apk add --no-cache --virtual .run-deps.2 \ + mariadb-connector-c-dev \ + libpq \ + cyrus-sasl \ + libev \ + && apk add --no-cache --virtual .build-deps.2 \ + git \ + cmake \ + make \ + coreutils \ + gcc \ + g++ \ + postgresql-dev \ + lua-dev \ + musl-dev \ + cyrus-sasl-dev \ + libev-dev \ + libressl-dev \ + wget \ + unzip \ + && mkdir -p /rocks \ + && : "---------- proj (for gis module) ----------" \ + && wget -O proj.tar.gz http://download.osgeo.org/proj/proj-4.9.3.tar.gz \ + && mkdir -p /usr/src/proj \ + && tar -xzf proj.tar.gz -C /usr/src/proj --strip-components=1 \ + && (cd /usr/src/proj; \ + ./configure; \ + make -j ${NPROC}; \ + make install) \ + && rm -r /usr/src/proj \ + && rm -rf /usr/src/proj \ + && rm -rf /proj.tar.gz \ + && : "---------- geos (for gis module) ----------" \ + && wget -O geos.tar.bz2 http://download.osgeo.org/geos/geos-3.6.0.tar.bz2 \ + && mkdir -p /usr/src/geos \ + && tar -xjf geos.tar.bz2 -C /usr/src/geos --strip-components=1 \ + && (cd /usr/src/geos; \ + ./configure; \ + make -j ${NPROC}; \ + make install) \ + && rm -r /usr/src/geos \ + && rm -rf /usr/src/geos \ + && rm -rf /geos.tar.bz2 \ + && : "---------- luarocks ----------" \ + && : "ldoc" \ + && ${ROCKS_INSTALLER} install ldoc \ + && : "lua-term" \ + && ${ROCKS_INSTALLER} install lua-term \ + && : "avro" \ + && ${ROCKS_INSTALLER} install avro-schema $LUAROCK_AVRO_SCHEMA_VERSION \ + && : "expirationd" \ + && ${ROCKS_INSTALLER} install expirationd $LUAROCK_EXPERATIOND_VERSION \ + && : "queue" \ + && ${ROCKS_INSTALLER} install queue $LUAROCK_QUEUE_VERSION \ + && : "connpool" \ + && ${ROCKS_INSTALLER} install connpool $LUAROCK_CONNPOOL_VERSION \ + && : "vshard" \ + && ${ROCKS_INSTALLER} install vshard $LUAROCK_VSHARD_VERSION \ + && : "http" \ + && ${ROCKS_INSTALLER} install http $LUAROCK_HTTP_VERSION \ + && : "pg" \ + && ${ROCKS_INSTALLER} install pg $LUAROCK_TARANTOOL_PG_VERSION \ + && : "memcached" \ + && ${ROCKS_INSTALLER} install memcached $LUAROCK_MEMCACHED_VERSION \ + && : "metrics" \ + && ${ROCKS_INSTALLER} install metrics $LUAROCK_METRICS_VERSION \ + && : "prometheus" \ + && ${ROCKS_INSTALLER} install prometheus $LUAROCK_TARANTOOL_PROMETHEUS_VERSION \ + && : "mqtt" \ + && ${ROCKS_INSTALLER} install mqtt $LUAROCK_TARANTOOL_MQTT_VERSION \ + && : "gis" \ + && ${ROCKS_INSTALLER} install gis $LUAROCK_TARANTOOL_GIS_VERSION \ + && : "gperftools" \ + && ${ROCKS_INSTALLER} install gperftools $LUAROCK_TARANTOOL_GPERFTOOLS_VERSION \ + && : "---------- remove build deps ----------" \ + && apk del .build-deps.2 + +# gh-170: needed for luarocks +RUN apk update \ + && apk add wget git + +RUN mkdir -p /var/lib/tarantool \ + && chown tarantool:tarantool /var/lib/tarantool \ + && mkdir -p /opt/tarantool \ + && chown tarantool:tarantool /opt/tarantool \ + && mkdir -p /var/run/tarantool \ + && chown tarantool:tarantool /var/run/tarantool \ + && mkdir /etc/tarantool \ + && chown tarantool:tarantool /etc/tarantool + +VOLUME /var/lib/tarantool +WORKDIR /opt/tarantool + +COPY files/tarantool-entrypoint.lua /usr/local/bin/ +COPY files/tarantool_set_config.lua /usr/local/bin/ +COPY files/docker-entrypoint.sh /usr/local/bin/ +COPY files/console /usr/local/bin/ +COPY files/tarantool_is_up /usr/local/bin/ +COPY files/tarantool.default /usr/local/etc/default/tarantool + +RUN ln -s usr/local/bin/docker-entrypoint.sh /entrypoint.sh # backwards compat +ENTRYPOINT ["docker-entrypoint.sh"] + +HEALTHCHECK CMD tarantool_is_up + +EXPOSE 3301 +CMD [ "tarantool" ] diff --git a/versions/alpine_3.15_2 b/versions/alpine_3.15_2 new file mode 100644 index 0000000..71cb739 --- /dev/null +++ b/versions/alpine_3.15_2 @@ -0,0 +1 @@ +2.10.0-1-g370040ca1 diff --git a/versions/alpine_3.15_2.10 b/versions/alpine_3.15_2.10 new file mode 100644 index 0000000..71cb739 --- /dev/null +++ b/versions/alpine_3.15_2.10 @@ -0,0 +1 @@ +2.10.0-1-g370040ca1 diff --git a/versions/alpine_3.15_2.10.0 b/versions/alpine_3.15_2.10.0 new file mode 100644 index 0000000..71cb739 --- /dev/null +++ b/versions/alpine_3.15_2.10.0 @@ -0,0 +1 @@ +2.10.0-1-g370040ca1 From ef646a8d41510044bfb2f50927591dcb1cb7db5e Mon Sep 17 00:00:00 2001 From: Sergey Vorontsov Date: Wed, 25 May 2022 12:57:53 +0300 Subject: [PATCH 242/286] Add new ubuntu based dockerimage and fix docker-entrypoint_centos.sh (#231) * Add new ubuntu based dockerimage and fix docker-entrypoint_centos.sh * Add new ubuntu based dockerimage and fix docker-entrypoint_centos.sh(fix) * Add new ubuntu based dockerimage and fix docker-entrypoint_centos.sh(fix) * Add new ubuntu based dockerimage and fix docker-entrypoint_centos.sh(fix) * Add new ubuntu based dockerimage and fix docker-entrypoint_centos.sh(fix) * Add new ubuntu based dockerimage and fix docker-entrypoint_centos.sh(fix) * Add new ubuntu based dockerimage and fix docker-entrypoint_centos.sh * Add new ubuntu based dockerimage and fix docker-entrypoint_centos.sh * Add new ubuntu based dockerimage and fix docker-entrypoint_centos.sh --- dockerfiles/ubuntu_20.04 | 80 +++++++++++++++++++++++++++++++ files/docker-entrypoint_centos.sh | 2 +- files/test-rocks.lua | 15 ++++++ 3 files changed, 96 insertions(+), 1 deletion(-) create mode 100644 dockerfiles/ubuntu_20.04 create mode 100644 files/test-rocks.lua diff --git a/dockerfiles/ubuntu_20.04 b/dockerfiles/ubuntu_20.04 new file mode 100644 index 0000000..2c2d51c --- /dev/null +++ b/dockerfiles/ubuntu_20.04 @@ -0,0 +1,80 @@ +FROM ubuntu:20.04 + +RUN useradd --user-group --create-home --no-log-init --shell /bin/bash tarantool + +# An ARG instruction goes out of scope at the end of the build +# stage where it was defined. To use an arg in multiple stages, +# each stage must include the ARG instruction +ARG TNT_VER \ + GC64 + +ENV GC64=${GC64:-false} \ + TARANTOOL_VERSION=${TNT_VER:-2} \ + LUAROCK_VSHARD_VERSION=0.1.19 \ + LUAROCK_AVRO_SCHEMA_VERSION=3.0.6 \ + LUAROCK_EXPERATIOND_VERSION=1.1.1 \ + LUAROCK_QUEUE_VERSION=1.1.0 \ + LUAROCK_CONNPOOL_VERSION=1.1.1 \ + LUAROCK_HTTP_VERSION=1.2.0 \ + LUAROCK_MEMCACHED_VERSION=1.0.1 \ + LUAROCK_METRICS_VERSION=0.12.0 \ + LUAROCK_TARANTOOL_PG_VERSION=2.0.2 \ + LUAROCK_TARANTOOL_MYSQL_VERSION=2.1.0 \ + LUAROCK_TARANTOOL_MQTT_VERSION=1.5.1 \ + LUAROCK_TARANTOOL_GIS_VERSION=1.0.1 \ + LUAROCK_TARANTOOL_PROMETHEUS_VERSION=1.0.4 \ + LUAROCK_TARANTOOL_GPERFTOOLS_VERSION=1.0.1 + +RUN set -x \ + && apt update && apt -y --no-install-recommends --no-install-suggests install \ + libgoogle-perftools4 \ + unzip \ + libgeos-dev \ + libsasl2-dev \ + libssl-dev \ + libpq-dev \ + gis-devel \ + libproj-dev \ + gosu \ + curl \ + ca-certificates \ + && ln -snf /usr/share/zoneinfo/UTC /etc/localtime && echo UTC > /etc/timezone \ + && ln -s /usr/lib/x86_64-linux-gnu/libprofiler.so.0.4.18 /usr/lib/x86_64-linux-gnu/libprofiler.so \ + && curl -L https://tarantool.io/release/${TARANTOOL_VERSION}/installer.sh | bash \ + && apt -y install tarantool \ + && apt clean \ + && set -x \ + && tarantoolctl rocks install lua-term \ + && tarantoolctl rocks install avro-schema $LUAROCK_AVRO_SCHEMA_VERSION \ + && tarantoolctl rocks install expirationd $LUAROCK_EXPERATIOND_VERSION \ + && tarantoolctl rocks install queue $LUAROCK_QUEUE_VERSION \ + && tarantoolctl rocks install connpool $LUAROCK_CONNPOOL_VERSION \ + && tarantoolctl rocks install vshard $LUAROCK_VSHARD_VERSION \ + && tarantoolctl rocks install http $LUAROCK_HTTP_VERSION \ + && tarantoolctl rocks install pg $LUAROCK_TARANTOOL_PG_VERSION \ + && tarantoolctl rocks install mysql $LUAROCK_TARANTOOL_MYSQL_VERSION \ + && tarantoolctl rocks install memcached $LUAROCK_MEMCACHED_VERSION \ + && tarantoolctl rocks install metrics $LUAROCK_METRICS_VERSION \ + && tarantoolctl rocks install prometheus $LUAROCK_TARANTOOL_PROMETHEUS_VERSION \ + && tarantoolctl rocks install mqtt $LUAROCK_TARANTOOL_MQTT_VERSION \ + && tarantoolctl rocks install gis $LUAROCK_TARANTOOL_GIS_VERSION \ + && tarantoolctl rocks install gperftools $LUAROCK_TARANTOOL_GPERFTOOLS_VERSION \ + && apt purge -y unzip curl \ + && apt -y autoremove \ + && rm -rf /var/lib/apt/lists/ + +COPY files/tarantool-entrypoint.lua /usr/local/bin/ +COPY files/tarantool_set_config.lua /usr/local/bin/ +COPY files/docker-entrypoint_centos.sh /usr/local/bin/docker-entrypoint.sh +COPY files/console /usr/local/bin/ +COPY files/tarantool_is_up /usr/local/bin/ +COPY files/tarantool.default /usr/local/etc/default/tarantool + +RUN chown tarantool /etc/tarantool && ln -s /usr/local/bin/docker-entrypoint.sh /entrypoint.sh + +ENTRYPOINT ["docker-entrypoint.sh"] + +HEALTHCHECK CMD tarantool_is_up + +EXPOSE 3301 +CMD [ "tarantool" ] diff --git a/files/docker-entrypoint_centos.sh b/files/docker-entrypoint_centos.sh index 6d48fdd..b1bfad7 100755 --- a/files/docker-entrypoint_centos.sh +++ b/files/docker-entrypoint_centos.sh @@ -3,7 +3,7 @@ set -e # first arg is `-f` or `--some-option` # or first arg is `something.conf` -if [ "${1:0:1}" = '-' ]; then +if [ " -${1#?}" = " $1" ]; then set -- tarantool "$@" fi diff --git a/files/test-rocks.lua b/files/test-rocks.lua new file mode 100644 index 0000000..1a68bba --- /dev/null +++ b/files/test-rocks.lua @@ -0,0 +1,15 @@ +-- Test rocks +avroschema = require('avro_schema') +expirationd = require('expirationd') +queue = require('queue') +connpool = require('connpool') +vshard = require('vshard') +http_request = require("http.server") +pg = require('pg') +mysql = require('mysql') +memcached = require('memcached') +metrics = require('metrics') +prometheus = require('prometheus') +mqtt = require('mqtt') +gis = require('gis') +gperftools = require('gperftools') From c35c65adaf84edc75c9d0b29c32db410be326d08 Mon Sep 17 00:00:00 2001 From: artembo Date: Mon, 23 May 2022 12:45:21 +0300 Subject: [PATCH 243/286] Add mysql rock installation to alpine 3.15 --- dockerfiles/alpine_3.15 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dockerfiles/alpine_3.15 b/dockerfiles/alpine_3.15 index 7faffda..2b052bd 100644 --- a/dockerfiles/alpine_3.15 +++ b/dockerfiles/alpine_3.15 @@ -203,6 +203,8 @@ RUN set -x \ && ${ROCKS_INSTALLER} install http $LUAROCK_HTTP_VERSION \ && : "pg" \ && ${ROCKS_INSTALLER} install pg $LUAROCK_TARANTOOL_PG_VERSION \ + && : "mysql" \ + && ${ROCKS_INSTALLER} install mysql $LUAROCK_TARANTOOL_MYSQL_VERSION \ && : "memcached" \ && ${ROCKS_INSTALLER} install memcached $LUAROCK_MEMCACHED_VERSION \ && : "metrics" \ From 5d469f85f2d608f20175ddbe3889c5217c51aa90 Mon Sep 17 00:00:00 2001 From: artembo Date: Fri, 27 May 2022 03:39:45 +0300 Subject: [PATCH 244/286] Add Ubuntu and Centos images Due to the long build we decided to create the new images with Tarantool installed by a packet manager. Not to build from source like for Alpine linux. Closes tarantool/infra#100 tarantool/infra#101 Co-authored-by: Sergey Vorontsov --- README.md | 10 +- dockerfiles/centos_7 | 193 +++++++-------------------------------- dockerfiles/ubuntu_20.04 | 21 ++--- 3 files changed, 50 insertions(+), 174 deletions(-) diff --git a/README.md b/README.md index 9ecce50..5eb14ea 100644 --- a/README.md +++ b/README.md @@ -358,10 +358,12 @@ Rolling versions: Special builds: -| Docker tag | Dockerfile | -| ----------- | ------------------- | -| 1.x-centos7 | dockerfile/centos_7 | -| 2.x-centos7 | dockerfile/centos_7 | +| Docker tag | Dockerfile | +| ----------------- | ----------------------- | +| 2.10.0-centos7 | dockerfile/centos_7 | +| 2.10.0-ubuntu | dockerfile/ubuntu_20.04 | +| 1.x-centos7 | dockerfile/centos_7 | +| 2.x-centos7 | dockerfile/centos_7 | ## Release policy diff --git a/dockerfiles/centos_7 b/dockerfiles/centos_7 index c910ea6..f450493 100644 --- a/dockerfiles/centos_7 +++ b/dockerfiles/centos_7 @@ -1,18 +1,12 @@ ARG BASE_IMAGE -FROM ${BASE_IMAGE} -MAINTAINER mail@racktear.com +FROM ${BASE_IMAGE}centos:7 +LABEL org.opencontainers.image.authors="artembo@me.com; piligrim@rootnix.net" -RUN groupadd tarantool \ - && adduser -g tarantool tarantool +ARG TNT_VER \ + GC64 -# An ARG instruction goes out of scope at the end of the build -# stage where it was defined. To use an arg in multiple stages, -# each stage must include the ARG instruction -ARG TNT_VER -ENV TARANTOOL_VERSION=${TNT_VER} \ - TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ - TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ - LUAROCKS_URL=https://github.com/tarantool/luarocks/archive/6e6fe62d9409fe2103c0fd091cccb3da0451faf5.tar.gz \ +ENV GC64=${GC64:-false} \ + TARANTOOL_INSTALLER_URL=https://www.tarantool.io/release/${TNT_VER:-2}/installer.sh \ LUAROCK_VSHARD_VERSION=0.1.18 \ LUAROCK_AVRO_SCHEMA_VERSION=3.0.6 \ LUAROCK_EXPERATIOND_VERSION=1.1.1 \ @@ -22,125 +16,31 @@ ENV TARANTOOL_VERSION=${TNT_VER} \ LUAROCK_MEMCACHED_VERSION=1.0.1 \ LUAROCK_METRICS_VERSION=0.12.0 \ LUAROCK_TARANTOOL_PG_VERSION=2.0.2 \ - LUAROCK_TARANTOOL_MYSQL_VERSION=2.0.1 \ + LUAROCK_TARANTOOL_MYSQL_VERSION=2.1.0 \ LUAROCK_TARANTOOL_GIS_VERSION=1.0.0 \ LUAROCK_TARANTOOL_PROMETHEUS_VERSION=1.0.4 \ LUAROCK_TARANTOOL_GPERFTOOLS_VERSION=1.0.1 -RUN yum -y install epel-release && \ - yum -y update && \ - yum -y clean all - -RUN set -x \ - && yum -y install \ - libstdc++ \ - readline \ - openssl \ - lz4 \ - binutils \ - ncurses \ - libgomp \ - lua \ - tar \ - zip \ - zlib \ - unzip \ - libunwind \ - ca-certificates \ - && yum -y install \ - file \ - gcc-c++ \ - cmake3 \ - readline-devel \ - openssl-devel \ - zlib-devel \ - lz4-devel \ - binutils-devel \ - ncurses-devel \ - lua-devel \ - make \ - git \ - libunwind-devel \ - autoconf \ - automake \ - libtool \ - go \ - wget \ - && : "---------- libicu ----------" \ - && wget https://github.com/unicode-org/icu/releases/download/release-65-1/icu4c-65_1-src.tgz \ - && mkdir -p /usr/src/icu \ - && tar -xzf icu4c-65_1-src.tgz -C /usr/src/icu --strip-components=1 \ - && rm icu4c-65_1-src.tgz \ - && (cd /usr/src/icu/source; \ - chmod +x runConfigureICU configure install-sh; \ - ./runConfigureICU Linux/gcc; \ - make -j ; \ - make install; \ - echo '/usr/local/lib' > /etc/ld.so.conf.d/local.conf; \ - ldconfig ) \ - && : "---------- gperftools ----------" \ - && yum install -y gperftools-libs \ - && (GOPATH=/usr/src/go go get github.com/google/pprof; \ - cp /usr/src/go/bin/pprof /usr/local/bin) \ - && : "---------- tarantool ----------" \ - && mkdir -p /usr/src/tarantool \ - && git clone "$TARANTOOL_DOWNLOAD_URL" /usr/src/tarantool \ - && (cd /usr/src/tarantool; git checkout "$TARANTOOL_VERSION";) \ - && (cd /usr/src/tarantool; git submodule update --init --recursive;) \ - && (cd /usr/src/tarantool; \ - cmake3 -DCMAKE_BUILD_TYPE=RelWithDebInfo\ - -DENABLE_BUNDLED_LIBYAML:BOOL=ON\ - -DENABLE_BACKTRACE:BOOL=ON\ - -DENABLE_DIST:BOOL=ON\ - .) \ - && make -C /usr/src/tarantool -j\ - && make -C /usr/src/tarantool install \ - && make -C /usr/src/tarantool clean \ - && : "---------- luarocks ----------" \ - && wget -O luarocks.tar.gz "$LUAROCKS_URL" \ - && mkdir -p /usr/src/luarocks \ - && tar -xzf luarocks.tar.gz -C /usr/src/luarocks --strip-components=1 \ - && (cd /usr/src/luarocks; \ - ./configure; \ - make -j build; \ - make install) \ - && rm -r /usr/src/luarocks \ - && rm -rf /usr/src/tarantool \ - && rm -rf /usr/src/go \ - && rm -rf /usr/src/icu \ - && : "---------- remove build deps ----------" \ - && yum -y remove \ - file \ - gcc-c++ \ - cmake3 \ - readline-devel \ - openssl-devel \ - lz4-devel \ - zlib-devel \ - binutils-devel \ - ncurses-devel \ - make \ - git \ - libunwind-devel \ - autoconf \ - automake \ - libtool \ - go \ - wget \ - kernel-headers \ - golang-src \ - && rpm -qa | grep devel | xargs yum -y remove \ - && rm -rf /var/cache/yum - -RUN mkdir -p /usr/local/etc/luarocks \ - && mkdir -p /usr/local/etc/tarantool/rocks - COPY files/luarocks-config_centos.lua /usr/local/etc/luarocks/config-5.1.lua COPY files/luarocks-config.lua /usr/local/etc/tarantool/rocks/config-5.1.lua -RUN set -x \ - && yum -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm \ - && yum -y install \ +# Set yum repository for Postgresql 9.6 since this version +# has been removed from pgdg repository. +RUN echo $'[pg]\n\ +name=PostgreSQL 9.6 RHEL/CentOS $releasever - $basearch\n\ +baseurl=https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-$basearch\n\ +enabled=1\n\ +gpgcheck=1\n\ +gpgkey=https://download.postgresql.org/pub/repos/yum/RPM-GPG-KEY-PGDG-96\n\ +repo_gpgcheck = 1\n'\ +>> /etc/yum.repos.d/pg.repo \ + && groupadd tarantool \ + && adduser -g tarantool tarantool \ + && curl $TARANTOOL_INSTALLER_URL | bash \ + && : "---------- tarantool ----------" \ + && yum install -y \ + tarantool \ + tarantool-devel \ mariadb-libs \ postgresql96-libs \ cyrus-sasl \ @@ -149,7 +49,7 @@ RUN set -x \ geos \ unzip \ openssl-libs \ - && yum -y install \ + luarocks \ git \ cmake \ make \ @@ -161,49 +61,30 @@ RUN set -x \ proj-devel \ geos-devel \ openssl-devel \ + gperftools-libs \ + && ln -s /usr/lib64/libprofiler.so.0 /usr/lib64/libprofiler.so \ && mkdir -p /rocks \ - && : "---------- luarocks ----------" \ - && : "lua-term" \ && tarantoolctl rocks install lua-term \ - && : "ldoc" \ - && tarantoolctl rocks install ldoc \ - && : "vshard" \ && tarantoolctl rocks install vshard $LUAROCK_VSHARD_VERSION \ - && : "checks" \ && tarantoolctl rocks install checks $LUAROCK_CHECKS_VERSION \ - && : "avro" \ && tarantoolctl rocks install avro-schema $LUAROCK_AVRO_SCHEMA_VERSION \ - && : "expirationd" \ && tarantoolctl rocks install expirationd $LUAROCK_EXPERATIOND_VERSION \ - && : "queue" \ && tarantoolctl rocks install queue $LUAROCK_QUEUE_VERSION \ - && : "connpool" \ && tarantoolctl rocks install connpool $LUAROCK_CONNPOOL_VERSION \ - && : "http" \ && tarantoolctl rocks install http $LUAROCK_HTTP_VERSION \ - && : "pg" \ && tarantoolctl rocks install pg $LUAROCK_TARANTOOL_PG_VERSION \ - && : "mysql" \ && tarantoolctl rocks install mysql $LUAROCK_TARANTOOL_MYSQL_VERSION \ - && : "memcached" \ && tarantoolctl rocks install memcached $LUAROCK_MEMCACHED_VERSION \ - && : "metrics" \ && tarantoolctl rocks install metrics $LUAROCK_METRICS_VERSION \ - && : "prometheus" \ && tarantoolctl rocks install prometheus $LUAROCK_TARANTOOL_PROMETHEUS_VERSION \ - && : "gis" \ && tarantoolctl rocks install gis $LUAROCK_TARANTOOL_GIS_VERSION \ - && : "gperftools" \ && tarantoolctl rocks install gperftools $LUAROCK_TARANTOOL_GPERFTOOLS_VERSION \ && : "---------- remove build deps ----------" \ && rm -rf /rocks \ && yum -y remove \ git \ cmake \ - make \ - gcc-c++ \ postgresql96-devel \ - lua-devel \ cyrus-sasl-devel \ libev-devel \ wget \ @@ -211,12 +92,9 @@ RUN set -x \ geos-devel \ openssl-devel \ kernel-headers \ - golang-src \ - && rpm -qa | grep devel | xargs yum -y remove \ - && rm -rf /var/cache/yum - - -RUN set -x \ + cpp \ + perl \ + && rm -rf /var/cache/yum \ && : "---------- gosu ----------" \ && gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys \ B42F6819007F00F88E364FD4036A9C25BF357DD4 \ @@ -227,17 +105,15 @@ RUN set -x \ && gpg --verify /usr/local/bin/gosu.asc \ && rm /usr/local/bin/gosu.asc \ && rm -r /root/.gnupg/ \ - && chmod +x /usr/local/bin/gosu - - -RUN mkdir -p /var/lib/tarantool \ + && chmod +x /usr/local/bin/gosu \ + && mkdir -p /var/lib/tarantool \ && chown tarantool:tarantool /var/lib/tarantool \ && mkdir -p /opt/tarantool \ && chown tarantool:tarantool /opt/tarantool \ && mkdir -p /var/run/tarantool \ && chown tarantool:tarantool /var/run/tarantool \ - && mkdir /etc/tarantool \ - && chown tarantool:tarantool /etc/tarantool + && chown tarantool:tarantool /etc/tarantool \ + && ln -s usr/local/bin/docker-entrypoint.sh /entrypoint.sh VOLUME /var/lib/tarantool WORKDIR /opt/tarantool @@ -249,7 +125,6 @@ COPY files/console /usr/local/bin/ COPY files/tarantool_is_up /usr/local/bin/ COPY files/tarantool.default /usr/local/etc/default/tarantool -RUN ln -s usr/local/bin/docker-entrypoint.sh /entrypoint.sh # backwards compat ENTRYPOINT ["docker-entrypoint.sh"] HEALTHCHECK CMD tarantool_is_up diff --git a/dockerfiles/ubuntu_20.04 b/dockerfiles/ubuntu_20.04 index 2c2d51c..b388042 100644 --- a/dockerfiles/ubuntu_20.04 +++ b/dockerfiles/ubuntu_20.04 @@ -1,15 +1,12 @@ -FROM ubuntu:20.04 +ARG BASE_IMAGE +FROM ${BASE_IMAGE}ubuntu:20.04 +LABEL org.opencontainers.image.authors="artembo@me.com; piligrim@rootnix.net" -RUN useradd --user-group --create-home --no-log-init --shell /bin/bash tarantool - -# An ARG instruction goes out of scope at the end of the build -# stage where it was defined. To use an arg in multiple stages, -# each stage must include the ARG instruction ARG TNT_VER \ GC64 ENV GC64=${GC64:-false} \ - TARANTOOL_VERSION=${TNT_VER:-2} \ + TARANTOOL_URL=https://www.tarantool.io/release/${TNT_VER:-2}/installer.sh \ LUAROCK_VSHARD_VERSION=0.1.19 \ LUAROCK_AVRO_SCHEMA_VERSION=3.0.6 \ LUAROCK_EXPERATIOND_VERSION=1.1.1 \ @@ -25,10 +22,12 @@ ENV GC64=${GC64:-false} \ LUAROCK_TARANTOOL_PROMETHEUS_VERSION=1.0.4 \ LUAROCK_TARANTOOL_GPERFTOOLS_VERSION=1.0.1 -RUN set -x \ +RUN set -x \ + && useradd --user-group --create-home --no-log-init --shell /bin/bash tarantool \ && apt update && apt -y --no-install-recommends --no-install-suggests install \ libgoogle-perftools4 \ unzip \ + luarocks \ libgeos-dev \ libsasl2-dev \ libssl-dev \ @@ -39,8 +38,8 @@ RUN set -x \ curl \ ca-certificates \ && ln -snf /usr/share/zoneinfo/UTC /etc/localtime && echo UTC > /etc/timezone \ - && ln -s /usr/lib/x86_64-linux-gnu/libprofiler.so.0.4.18 /usr/lib/x86_64-linux-gnu/libprofiler.so \ - && curl -L https://tarantool.io/release/${TARANTOOL_VERSION}/installer.sh | bash \ + && ln -s /usr/lib/$(arch)-linux-gnu/libprofiler.so.0.4.18 /usr/lib/$(arch)-linux-gnu/libprofiler.so \ + && curl -L $TARANTOOL_URL | bash \ && apt -y install tarantool \ && apt clean \ && set -x \ @@ -59,7 +58,7 @@ RUN set -x \ && tarantoolctl rocks install mqtt $LUAROCK_TARANTOOL_MQTT_VERSION \ && tarantoolctl rocks install gis $LUAROCK_TARANTOOL_GIS_VERSION \ && tarantoolctl rocks install gperftools $LUAROCK_TARANTOOL_GPERFTOOLS_VERSION \ - && apt purge -y unzip curl \ + && apt purge -y unzip curl git gcc cmake \ && apt -y autoremove \ && rm -rf /var/lib/apt/lists/ From 2cc6c67b6832f24c3126ced0e3cb54923cee9082 Mon Sep 17 00:00:00 2001 From: artembo Date: Mon, 27 Jun 2022 02:27:06 +0300 Subject: [PATCH 245/286] Install gosu version 1.11 on centos 7 GOSU version 1.2 fails on start application with error: runtime: failed to create new OS thread (have 2 already; errno=22) Fix #235 --- dockerfiles/centos_7 | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/dockerfiles/centos_7 b/dockerfiles/centos_7 index f450493..15074cd 100644 --- a/dockerfiles/centos_7 +++ b/dockerfiles/centos_7 @@ -19,7 +19,8 @@ ENV GC64=${GC64:-false} \ LUAROCK_TARANTOOL_MYSQL_VERSION=2.1.0 \ LUAROCK_TARANTOOL_GIS_VERSION=1.0.0 \ LUAROCK_TARANTOOL_PROMETHEUS_VERSION=1.0.4 \ - LUAROCK_TARANTOOL_GPERFTOOLS_VERSION=1.0.1 + LUAROCK_TARANTOOL_GPERFTOOLS_VERSION=1.0.1 \ + GOSU_VERSION=1.11 COPY files/luarocks-config_centos.lua /usr/local/etc/luarocks/config-5.1.lua COPY files/luarocks-config.lua /usr/local/etc/tarantool/rocks/config-5.1.lua @@ -96,12 +97,9 @@ repo_gpgcheck = 1\n'\ perl \ && rm -rf /var/cache/yum \ && : "---------- gosu ----------" \ - && gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys \ - B42F6819007F00F88E364FD4036A9C25BF357DD4 \ - && curl -o /usr/local/bin/gosu -SL \ - "https://github.com/tianon/gosu/releases/download/1.2/gosu-amd64" \ - && curl -o /usr/local/bin/gosu.asc -SL \ - "https://github.com/tianon/gosu/releases/download/1.2/gosu-amd64.asc" \ + && gpg --keyserver hkps://keys.openpgp.org --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ + && curl -o /usr/local/bin/gosu -SL "https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-amd64" \ + && curl -o /usr/local/bin/gosu.asc -SL "https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-amd64.asc" \ && gpg --verify /usr/local/bin/gosu.asc \ && rm /usr/local/bin/gosu.asc \ && rm -r /root/.gnupg/ \ From 93ae09b132295661ee3f29ba5afccc8adad5f87f Mon Sep 17 00:00:00 2001 From: Nick Volynkin Date: Thu, 30 Jun 2022 15:33:12 +0700 Subject: [PATCH 246/286] Proofread and update the readme (#225) * Add info about new images based on Ubuntu 20.04. * Reflect recent changes in package naming. * General proofreading and formatting. Resolve #232 Co-authored-by: Patience Daur --- README.md | 445 +++++++++++++++++++++++++++++++++--------------------- 1 file changed, 273 insertions(+), 172 deletions(-) diff --git a/README.md b/README.md index 5eb14ea..954e7e8 100644 --- a/README.md +++ b/README.md @@ -1,146 +1,206 @@ -# What is Tarantool +# Tarantool Docker images + + + + +- [What is Tarantool](#what-is-tarantool) +- [Quick start](#quickstart) +- [What's on board](#whats-on-board) + - [Included modules](#included-modules) + - [Data directories](#data-directories) + - [Convenience tools](#convenience-tools) +- [Versions, tags, and release policy](#versions-tags-and-release-policy) +- [How to use these images](#how-to-use-these-images) + - [Start a Tarantool instance](#start-a-tarantool-instance) + - [Start a secure Tarantool instance](#start-a-secure-tarantool-instance) + - [Connect to a running Tarantool instance](#connect-to-a-running-tarantool-instance) + - [Start a master-master replica set](#start-a-master-master-replica-set) + - [Add application code with a volume mount](#add-application-code-with-a-volume-mount) + - [Build your own images](#build-your-own-images) +- [Environment variables](#environment-variables) + - [`TARANTOOL_USER_NAME`](#tarantool_user_name) + - [`TARANTOOL_USER_PASSWORD`](#tarantool_user_password) + - [`TARANTOOL_PORT`](#tarantool_port) + - [`TARANTOOL_PROMETHEUS_DEFAULT_METRICS_PORT`](#tarantool_prometheus_default_metrics_port) + - [`TARANTOOL_REPLICATION`](#tarantool_replication) + - [`TARANTOOL_MEMTX_MEMORY`](#tarantool_memtx_memory) + - [`TARANTOOL_SLAB_ALLOC_FACTOR`](#tarantool_slab_alloc_factor) + - [`TARANTOOL_MEMTX_MAX_TUPLE_SIZE`](#tarantool_memtx_max_tuple_size) + - [`TARANTOOL_MEMTX_MIN_TUPLE_SIZE`](#tarantool_memtx_min_tuple_size) + - [`TARANTOOL_CHECKPOINT_INTERVAL`](#tarantool_checkpoint_interval) + - [`TARANTOOL_FORCE_RECOVERY`](#tarantool_force_recovery) + - [`TARANTOOL_LOG_FORMAT`](#tarantool_log_format) + - [`TARANTOOL_LOG_LEVEL`](#tarantool_log_level) +- [Reporting problems and getting help](#reporting-problems-and-getting-help) +- [Contributing](#contributing) + - [How to contribute](#how-to-contribute) + - [How to check](#how-to-check) + - [Build pipelines](#build-pipelines) + - [Release policy](#release-policy) + - [Exceptional cases](#exceptional-cases) + - [How to build and push an image](#how-to-build-and-push-an-image) + + + +## What is Tarantool + +Tarantool is an in-memory computing platform that combines +a Lua application server and a database management system. +Read more about Tarantool at [tarantool.io](https://www.tarantool.io/en/developers/). + +## Quick start + +To try out Tarantool, run this command: -Tarantool is a Lua application server integrated with a database -management system. It has a "fiber" model which means that many -Tarantool applications can run simultaneously on a single thread, -while the Tarantool server itself can run multiple threads for -input-output and background maintenance. It incorporates the LuaJIT -- -"Just In Time" -- Lua compiler, Lua libraries for most common -applications, and the Tarantool Database Server which is an -established NoSQL DBMS. Thus Tarantool serves all the purposes that -have made node.js and Twisted popular, plus it supports data -persistence. +```console +$ docker run --rm -t -i tarantool/tarantool +``` -The database API allows for permanently storing Lua objects, managing -object collections, creating or dropping secondary keys, making -changes atomically, configuring and monitoring replication, performing -controlled fail-over, and executing Lua code triggered by database -events. Remote database instances are accessible transparently via a -remote-procedure-invocation API. +It will create a one-off Tarantool instance and open an interactive +console. +From there, you can either type `tutorial()` in the console or follow the +[documentation](https://www.tarantool.io/en/doc/latest/getting_started/getting_started_db/#using-a-docker-image). -For more information, visit [tarantool.io](https://tarantool.io). +## What's on board -# Quickstart +The `tarantool/tarantool` images contain the Tarantool executable +and a combination of [Lua modules](#included-modules) and utilities often used in production. +Designed as a building block for modern services, these modules and utilities are based on a few +design choices that set them apart from the systemd-controlled Tarantool. +We check all these extensions for compatibility with the Tarantool version included in the image. -If you just want to quickly try out tarantool, run this command: +The Docker images come in three flavors, based on three different images: `alpine:3.15`, `centos:7` +and `ubuntu:20.04`. Check them out: ```console -$ docker run --rm -t -i tarantool/tarantool +$ docker run --rm -t -i tarantool/tarantool:2.10.0 +$ docker run --rm -t -i tarantool/tarantool:2.10.0-centos7 +$ docker run --rm -t -i tarantool/tarantool:2.10.0-ubuntu ``` -This will create a one-off Tarantool instance and open an interactive -console. From there you can either type `tutorial()` or follow -[official documentation](https://tarantool.io/en/doc/1.10/). +The entrypoint script in each of these images uses +[environment variables](#environment-variables) +to set various configuration options, +such as replication sources, memory limits, and so on. +If specified, the environment variables override the settings provided in your code. +This way, you can set options using `docker compose` or +other orchestration and deployment tools. +There are also a few [convenience tools](#convenience-tools) that make use of the fact that there +is only one Tarantool instance running in the container. -# About this image +### Included modules -This image is a bundle containing Tarantool itself, and a combination -of lua modules and utilities often used in production. It is designed -to be a building block for modern services, and as such has made a few -design choices that set it apart from the systemd-controlled Tarantool. +The following Lua modules are included in the build: -First, if you take this image and pin a version, you may rely on the -fact that you won't get updates with incompatible modules. We only do -major module updates while changing the image version. +- [avro-schema](https://github.com/tarantool/avro-schema): Apache Avro scheme for your data. +- [connpool](https://github.com/tarantool/connpool): Keep a pool of connections to other Tarantool instances. +- [curl](https://github.com/tarantool/curl): HTTP client based on libcurl. +- [expirationd](https://github.com/tarantool/expirationd): Automatically delete tuples based on expiration time. +- [gis](https://github.com/tarantool/gis): Store and query geospatial data. +- [gperftools](https://github.com/tarantool/gperftools): Collect a CPU profile to find bottlenecks in your code. +- [http](https://github.com/tarantool/http): Embedded HTTP server with Flask-style routing support. +- [memcached](https://github.com/tarantool/memcached): Access Tarantool as if it was a memcached instance. +- [metrics](https://github.com/tarantool/metrics): Metric collection library for Tarantool. +- [mqtt](https://github.com/tarantool/mqtt): Client for MQTT message brokers. +- [mysql](https://github.com/tarantool/mysql): Query MySQL right from Tarantool. +- [pg](https://github.com/tarantool/pg): Query PostgreSQL right from Tarantool. +- [prometheus](https://github.com/tarantool/prometheus): Instrument code and export metrics to Prometheus monitoring. +- [queue](https://github.com/tarantool/queue): Priority queues with TTL and confirmations. +- [vshard](https://github.com/tarantool/vshard): Automatically distribute data across multiple instances. -Entry-point script provided by this image uses environment variables -to configure various "external" aspects of configuration, such as -replication sources, memory limits, etc... If specified, they override -settings provided in your code. This way you can use docker-compose or -other orchestration and deployment tools to set those options. -There are a few convenience tools that make use of the fact that there -is only one Tarantool instance running in the container. +If the module you need is not listed here, there is a good chance we can add it. +Open an issue [on our GitHub](https://github.com/tarantool/docker). +### Data directories -# What's on board +Mount these directories as volumes: -- [avro-schema](https://github.com/tarantool/avro-schema): Apache Avro scheme for your data -- [expirationd](https://github.com/tarantool/expirationd): Automatically delete tuples based on expiration time -- [queue](https://github.com/tarantool/queue): Priority queues with TTL and confirmations -- [connpool](https://github.com/tarantool/connpool): Keep a pool of connections to other Tarantool instances -- [vshard](https://github.com/tarantool/vshard): Automatically distribute data across multiple instances -- [http](https://github.com/tarantool/http): Embedded HTTP server with flask-style routing support -- [curl](https://github.com/tarantool/curl): HTTP client based on libcurl -- [pg](https://github.com/tarantool/pg): Query PostgreSQL right from Tarantool -- [mysql](https://github.com/tarantool/mysql): Query MySql right from Tarantool -- [memcached](https://github.com/tarantool/memcached): Access Tarantool as if it was a Memcached instance -- [metrics](https://github.com/tarantool/metrics): Metric collection library for Tarantool -- [prometheus](https://github.com/tarantool/prometheus): Instrument code and export metrics to Prometheus monitoring -- [mqtt](https://github.com/tarantool/mqtt): Client for MQTT message brokers -- [gis](https://github.com/tarantool/gis): store and query geospatial data -- [gperftools](https://github.com/tarantool/gperftools): collect CPU profile to find bottlenecks in your code +- `/var/lib/tarantool` contains operational data + (snapshots, xlogs and vinyl runs). -If the module you need is not listed here, there is a good chance we may add it. Open an issue [on our GitHub](https://github.com/tarantool/docker). +- `/opt/tarantool` is the directory for Lua application code. -# Data directories +### Convenience tools -- `/var/lib/tarantool` is a volume containing operational data - (snapshots, xlogs and vinyl runs) +- `console`: Execute without arguments to open an administrative + console to a running Tarantool instance. -- `/opt/tarantool` is a place where users should put their lua - application code +- `tarantool_is_up`: Returns `0` if Tarantool has been initialized and + is operating normally. -# Convenience utilities +- `tarantool_set_config.lua`: Allows you to dynamically change certain + settings without the need to recreate containers. -- `console`: execute it without any arguments to open administrative - console to a running Tarantool instance +## Versions, tags, and release policy -- `tarantool_is_up`: returns 0 if Tarantool has been initialized and - is operating normally +The images are built and published on Docker Hub +for each Tarantool release as well as for some beta +and release candidate versions. -- `tarantool_set_config.lua`: allows you to dynamically change certain - settings without the need to recreate containers. +There are three variants built from different base images: + +* Alpine 3.15, the "default" build with tags having no mention of base image, like `latest`, `1`, `2`, `1.10`,`1.10.z`, `2.y`, `2.y.z` and others. +* CentOS 7 with tags like `1-centos7`, `2-centos7`, and so on. +* Ubuntu 20.04 with tags like `1-ubuntu22.04`, `2-ubuntu22.04`, and so on. -# How to use this image +## How to use these images -## Start a Tarantool instance +### Start a Tarantool instance ```console -$ docker run --name mytarantool -p3301:3301 -d tarantool/tarantool +$ docker run \ + --name mytarantool \ + -p 3301:3301 -d \ + tarantool/tarantool ``` This will start an instance of Tarantool and expose it on -port 3301. Note, that by default there is no password protection, +port 3301. Note that by default there is no password protection, so don't expose this instance to the outside world. -In this case, when there is no lua code provided, the entry point -script initializes database using a sane set of defaults. Some of them -can be tuned with environment variables (see below). +In this case, as there is no Lua code provided, the entrypoint +script initializes the database using a reasonable set of defaults. Some of them +can be tweaked with environment variables (see below). -## Start a secure Tarantool instance +### Start a secure Tarantool instance ```console -$ docker run --name mytarantool -p3301:3301 -e TARANTOOL_USER_NAME=myusername -e TARANTOOL_USER_PASSWORD=mysecretpassword -d tarantool/tarantool +$ docker run \ + --name mytarantool \ + -p 3301:3301 \ + -e TARANTOOL_USER_NAME=myusername \ + -e TARANTOOL_USER_PASSWORD=mysecretpassword -d \ + tarantool/tarantool ``` -This starts an instance of Tarantool, disables guest login and -creates user named `myusername` with admin privileges and password +This starts an instance of Tarantool, disables guest login, and +creates a user named `myusername` with admin privileges and the password `mysecretpassword`. -As with the previous example, database is initialized automatically. +As in the previous example, the database is initialized automatically. -## Connect to a running Tarantool instance +### Connect to a running Tarantool instance ```console $ docker exec -t -i mytarantool console ``` This will open an interactive admin console on the running instance -named `mytarantool`. You may safely detach from it anytime, the server +named `mytarantool`. You can safely detach from it anytime, the server will continue running. This `console` doesn't require authentication, because it uses a local -unix socket in the container to connect to Tarantool. But it requires +Unix socket in the container to connect to Tarantool. However, it requires you to have direct access to the container. -If you need a remote console via TCP/IP, use `tarantoolctl` utility +If you need to access a remote console via TCP/IP, use the `tarantoolctl` utility as explained [here](https://www.tarantool.io/en/doc/latest/reference/tarantoolctl/). -## Start a master-master replica set +### Start a master-master replica set -You may start a replica set with docker alone, but it's more +You can start a replica set with Docker alone, but it's more convenient to use [docker-compose](https://docs.docker.com/compose/). Here's a simplified `docker-compose.yml` for starting a master-master replica set: @@ -150,7 +210,7 @@ version: '2' services: tarantool1: - image: tarantool/tarantool:1.10.2 + image: tarantool/tarantool:latest environment: TARANTOOL_REPLICATION: "tarantool1,tarantool2" networks: @@ -159,7 +219,7 @@ services: - "3301:3301" tarantool2: - image: tarantool/tarantool:1.10.2 + image: tarantool/tarantool:latest environment: TARANTOOL_REPLICATION: "tarantool1,tarantool2" networks: @@ -175,41 +235,57 @@ networks: Start it like this: ``` console -$ docker-compose up +$ docker compose up ``` -## Adding application code with a volume mount +### Add application code with a volume mount The simplest way to provide application code is to mount your code directory to `/opt/tarantool`: ```console -$ docker run --name mytarantool -p3301:3301 -d -v /path/to/my/app:/opt/tarantool tarantool/tarantool tarantool /opt/tarantool/app.lua +$ docker run \ + --name mytarantool \ + -p 3301:3301 -d \ + -v /path/to/my/app:/opt/tarantool \ + tarantool/tarantool \ + tarantool /opt/tarantool/app.lua ``` -Where `/path/to/my/app` is a host directory containing lua code. Note -that for your code to be actually run, you must execute the main script -explicitly. Hence `tarantool /opt/tarantool/app.lua`, assuming that your -app entry point is called `app.lua`. +Here, `/path/to/my/app` is the host directory containing Lua code +and `app.lua` is the entry point of your application. +Note that for your code to run, you must execute the main script explicitly, +which is done in the last line. +### Build your own images -## Adding application code using container inheritance +To pack and distribute an image with your code, +create your own `Dockerfile`: -If you want to pack and distribute an image with your code, you may -create your own Dockerfile as follows: - -```bash -FROM tarantool/tarantool:1.10.2 +```dockerfile +FROM tarantool/tarantool:2.10.0 COPY app.lua /opt/tarantool CMD ["tarantool", "/opt/tarantool/app.lua"] ``` -Please pay attention to the format of `CMD`: unless it is specified in -square brackets, the "wrapper" entry point that our Docker image -provides will not be called. It will lead to inability to configure +Then build it with: + +```console +$ docker build -t company/appname:tag . +``` + +Please pay attention to the format of `CMD`. Unless it is specified in +square brackets, the `wrapper` entrypoint that our Docker image +provides will not be called. In this case, you will not be able to configure your instance using environment variables. -## Environment Variables +We recommend building from an image with a precise tag, +that is, `2.10.0` or `2.10.0-centos7`, not +`2.10` or `latest`. +This way you will have more control over the updates of +Tarantool and other dependencies of your application. + +## Environment variables When you run this image, you can adjust some of Tarantool settings. Most of them either control memory/disk limits or specify external @@ -217,41 +293,43 @@ connectivity parameters. If you need to fine-tune specific settings not described here, you can always inherit this container and call `box.cfg{}` yourself. -See -[official documentation on box.cfg](https://tarantool.org/doc/reference/configuration/index.html#box-cfg-params) for +See the +[documentation on `box.cfg`](https://www.tarantool.io/en/doc/latest/reference/configuration/#box-cfg-params) for details. ### `TARANTOOL_USER_NAME` Setting this variable allows you to pick the name of the user that is -utilized for remote connections. By default, it is 'guest'. Please -note that since guest user in Tarantool can't have a password, it is +utilized for remote connections. By default, it is `guest`. Please +note that since the `guest` user in Tarantool can't have a password, it is highly recommended that you change it. ### `TARANTOOL_USER_PASSWORD` For security reasons, it is recommended that you never leave this variable unset. This environment variable sets the user's password for -Tarantool. In the above example, it is set to "mysecretpassword". +Tarantool. In the above example, it is set to `mysecretpassword`. ### `TARANTOOL_PORT` Optional. Specifying this variable will tell Tarantool to listen for -incoming connections on a specific port. Default is 3301. +incoming connections on a specific port. Default is `3301`. ### `TARANTOOL_PROMETHEUS_DEFAULT_METRICS_PORT` -Optional. If specified tarantool will start http server on given port and expose prometheus `metrics` endpoint with common metrics (fibers, memory, network, replication, etc... ) +Optional. If specified, Tarantool will start an HTTP server on the provided port +and expose the Prometheus `metrics` endpoint with common metrics +(fibers, memory, network, replication, etc.). ### `TARANTOOL_REPLICATION` Optional. Comma-separated list of URIs to treat as replication -sources. Upon the start, Tarantool will attempt to connect to -those instances, fetch the data snapshot and start replicating -transaction logs. In other words, it will become a slave. For the +sources. Upon start, Tarantool will attempt to connect to +those instances, fetch the data snapshot, and start replicating +transaction logs. In other words, it will become a slave. For a multi-master configuration, other participating instances of -Tarantool should be started with the same TARANTOOL_REPLICATION. -(NB: applicable only to >=1.7) +Tarantool should be started with the same `TARANTOOL_REPLICATION`. +(NB: Applicable only to versions later than 1.7.) Example: @@ -260,61 +338,71 @@ Example: ### `TARANTOOL_MEMTX_MEMORY` Optional. Specifies how much memory Tarantool allocates to -actually store tuples, in bytes. When the limit is reached, INSERT -or UPDATE requests begin failing. Default is 268435456 (256 +actually store tuples, in bytes. When the limit is reached, `INSERT` +or `UPDATE` requests begin failing. Default is `268435456` (256 megabytes). ### `TARANTOOL_SLAB_ALLOC_FACTOR` Optional. Used as the multiplier for computing the sizes of memory chunks that tuples are stored in. A lower value may result in less -wasted memory depending on the total amount of memory available -and the distribution of item sizes. Default is 1.05. +wasted memory, depending on the total amount of memory available +and the distribution of item sizes. Default is `1.05`. ### `TARANTOOL_MEMTX_MAX_TUPLE_SIZE` Optional. Size of the largest allocation unit in bytes. It can be increased if it is necessary to store large tuples. Default is -1048576. +`1048576`. ### `TARANTOOL_MEMTX_MIN_TUPLE_SIZE` Optional. Size of the smallest allocation unit, in bytes. It can be -decreased if most of the tuples are very small. Default is 16. +decreased if most of the tuples are very small. Default is `16`. ### `TARANTOOL_CHECKPOINT_INTERVAL` -Optional. Specifies how often snapshots will be made, in seconds. -Default is 3600 (every 1 hour). +Optional. Specifies how often snapshots are made, in seconds. +Default is `3600` (every 1 hour). ### `TARANTOOL_FORCE_RECOVERY` -Optional. When set to "true" Tarantool tries to continue if there is an error while reading a snapshot file or a write-ahead log file. Skips invalid records, reads as much data as possible, print a warning in console and start the database. +Optional. When set to `true`, Tarantool tries to continue if there is an error while +reading a snapshot file or a write-ahead log file. +Skips invalid records, reads as much data as possible, +print a warning in console and start the database. ### `TARANTOOL_LOG_FORMAT` -Optional. There are two possible log formats - 'plain' (default) or 'json' (with more detail and with json labels). -More details can be found in [log module reference](https://www.tarantool.io/en/doc/latest/reference/configuration/#confval-log_format) +Optional. There are two possible log formats: + +* 'plain' — the default one. +* 'json' — with more details and with JSON labels. + +More details can be found in the +[log module reference](https://www.tarantool.io/en/doc/latest/reference/configuration/#confval-log_format). ### `TARANTOOL_LOG_LEVEL` -Optional. Default value is 5 (that means INFO). More details can be found in [logging log levels configuration](https://www.tarantool.io/en/doc/latest/reference/configuration/#cfg-logging-log-level) +Optional. Default value is 5 (that means INFO). +More details can be found in +[log level configuration](https://www.tarantool.io/en/doc/latest/reference/configuration/#cfg-logging-log-level). + +## Contributing -# Reporting problems and getting help +### Reporting problems and getting help You can report problems and request features [on our GitHub](https://github.com/tarantool/docker). -Alternatively you may get help on our [Telegram channel](https://t.me/tarantool). - -# Contributing +Alternatively, you may get help on our [Telegram channel](https://t.me/tarantool). -## How to contribute +### How to contribute -Open a pull request to the master branch. -A maintaner is responsible for merging the PR. +Open a pull request to the `master` branch. +A maintainer is responsible for merging the PR. -## How to check +### How to check Say, we have updated 'dockerfiles/alpine_3.9' and want to check it: @@ -324,37 +412,43 @@ $ docker run -it tarantool/tarantool:2 ...perform a test... ``` -## Build pipelines - -Fixed versions: - -| Docker tag | Dockerfile | -| ----------------- | --------------------- | -| 1.10.0 .. 1.10.3 | dockerfile/alpine_3.5 | -| 1.10.4 .. 1.10.13 | dockerfile/alpine_3.9 | -| 2.1.0 .. 2.1.2 | dockerfile/alpine_3.5 | -| 2.1.3 | dockerfile/alpine_3.9 | -| 2.2.0 .. 2.2.1 | dockerfile/alpine_3.5 | -| 2.2.2 .. 2.2.3 | dockerfile/alpine_3.9 | -| 2.3.0 | dockerfile/alpine_3.5 | -| 2.3.1 .. 2.3.3 | dockerfile/alpine_3.9 | -| 2.4.0 .. 2.4.3 | dockerfile/alpine_3.9 | -| 2.5.0 .. 2.5.3 | dockerfile/alpine_3.9 | -| 2.6.0 .. 2.6.3 | dockerfile/alpine_3.9 | -| 2.7.0 .. 2.7.3 | dockerfile/alpine_3.9 | -| 2.8.0 .. 2.8.4 | dockerfile/alpine_3.9 | -| 2.9.0 | dockerfile/alpine_3.9 | -| 2.10.0-beta1 | dockerfile/alpine_3.9 | -| 2.10.0-beta2 | dockerfile/alpine_3.9 | -| 2.10.0-rc1 | dockerfile/alpine_3.9 | +### Build pipelines + +Fixed release versions: + +| Docker tag | FROM | Dockerfile | +|--------------------|--------------|-------------------------| +| 2.10.0 | alpine:3.15 | dockerfile/alpine_3.15 | +| 2.10.0-centos7 | centos:7 | dockerfile/centos_7 | +| 2.10.0-ubuntu20.04 | ubuntu:20.04 | dockerfile/ubuntu_20.04 | +| 2.10.0-rc1 | alpine:3.9 | dockerfile/alpine_3.9 | +| 2.10.0-beta2 | alpine:3.9 | dockerfile/alpine_3.9 | +| 2.10.0-beta1 | alpine:3.9 | dockerfile/alpine_3.9 | +| 2.8.0 .. 2.8.4 | alpine:3.9 | dockerfile/alpine_3.9 | +| 2.7.0 .. 2.7.3 | alpine:3.9 | dockerfile/alpine_3.9 | +| 2.6.0 .. 2.6.3 | alpine:3.9 | dockerfile/alpine_3.9 | +| 2.5.0 .. 2.5.3 | alpine:3.9 | dockerfile/alpine_3.9 | +| 2.4.0 .. 2.4.3 | alpine:3.9 | dockerfile/alpine_3.9 | +| 2.3.1 .. 2.3.3 | alpine:3.9 | dockerfile/alpine_3.9 | +| 2.3.0 | alpine:3.5 | dockerfile/alpine_3.5 | +| 2.2.2 .. 2.2.3 | alpine:3.9 | dockerfile/alpine_3.9 | +| 2.2.0 .. 2.2.1 | alpine:3.5 | dockerfile/alpine_3.5 | +| 2.1.3 | alpine:3.9 | dockerfile/alpine_3.9 | +| 2.1.0 .. 2.1.2 | alpine:3.9 | dockerfile/alpine_3.5 | +| 1.10.13 | alpine:3.9 | dockerfile/alpine_3.9 | +| 1.10.4 .. 1.10.12 | alpine:3.9 | dockerfile/alpine_3.9 | +| 1.10.0 .. 1.10.3 | alpine:3.5 | dockerfile/alpine_3.5 | Rolling versions: -| Docker tag | Dockerfile | -| ---------- | --------------------- | -| 1 | dockerfile/alpine_3.9 | -| 2.1 .. 2.8 | dockerfile/alpine_3.9 | -| 2, latest | dockerfile/alpine_3.9 | +| Docker tag | Dockerfile | +|-----------|------------------------| +| 2, latest | dockerfile/alpine_3.15 | +| 2-centos7 | dockerfile/centos_7 | +| 1 | dockerfile/alpine_3.15 | +| 1 | dockerfile/alpine_3.15 | +| 2.1 .. 2.8 | dockerfile/alpine_3.9 | +| 2.1 .. 2.8 | dockerfile/alpine_3.9 | Special builds: @@ -365,24 +459,31 @@ Special builds: | 1.x-centos7 | dockerfile/centos_7 | | 2.x-centos7 | dockerfile/centos_7 | -## Release policy +### Release policy All images are pushed to [Docker Hub](docker_hub_tags). Fixed version tags (`x.y.z`) are frozen: we never update them. -Example of minor versions timeline: +Example of versions timeline for Tarantool since 2.10 +(see the [release policy](https://www.tarantool.io/en/doc/latest/release/policy/)): + +- `2.10.0-beta1` — Beta + - `2.10.0-rc1` — Release candidate + - `2.10.0` — Release (stable) + +Example of minor versions timeline for Tarantool up to 2.8: - `x.y.0` - Alpha - `x.y.1` - Beta - `x.y.2` - Stable - `x.y.3` - Stable -Rolling versions are updated to the last stable fixed version tags: +Rolling versions are updated to the latest release (stable) versions: -- `x.y` == `x.y.` (`==` means 'points to the same image') -- `1` == `1..2` -- `2` == `2..2` +- `x.y` == `x.y.latest-z` (`==` means 'points to the same image') +- `1` == `1.10.latest-z` +- `2` == `2.latest-y.z` - `latest` == `2` Special stable builds (CentOS) are updated with the same policy as rolling versions: @@ -405,7 +506,7 @@ decide on demand and define the policy later. TBD: How to notify users about the exceptional updates? -## How to push an image (for maintainers) +### How to build and push an image Example: From 6c31132b6c4a271118ff10ddf43ec3236a874fd1 Mon Sep 17 00:00:00 2001 From: Sergey Vorontsov Date: Mon, 18 Jul 2022 11:19:06 +0300 Subject: [PATCH 247/286] fix enabling prometheus metrics plugin (#239) * Fix error with env variable TARANTOOL_PROMETHEUS_DEFAULT_METRICS_PORT wich applies metrics rocks for getting metrics for prometheus Fixes #237 --- files/tarantool-entrypoint.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/tarantool-entrypoint.lua b/files/tarantool-entrypoint.lua index ba6f907..ca32426 100755 --- a/files/tarantool-entrypoint.lua +++ b/files/tarantool-entrypoint.lua @@ -273,7 +273,7 @@ local function wrapper_cfg(override) local metrics_port = tonumber(os.getenv('TARANTOOL_PROMETHEUS_DEFAULT_METRICS_PORT')) or 0 if metrics_port > 0 then - require('metrics.default_metrics.tarantool').enable() + require('metrics').enable_default_metrics() local prometheus = require('metrics.plugins.prometheus') local httpd = require('http.server').new('0.0.0.0', metrics_port) httpd:route( { path = '/metrics' }, prometheus.collect_http) From 01470f7034a5121601cf080380e8344e47c2ecde Mon Sep 17 00:00:00 2001 From: Sergey Vorontsov Date: Thu, 11 Aug 2022 13:44:51 +0300 Subject: [PATCH 248/286] Update version of rocks in main(alpine), centos and ubuntu docker files - vshard to 0.1.20 version - queue to 1.2.0 version - http to 1.3.0 version - metrics to 0.14.0 version - gis to 1.0.1 version - mysql to 2.1.1 version --- dockerfiles/alpine_3.15 | 12 ++++++------ dockerfiles/centos_7 | 12 ++++++------ dockerfiles/ubuntu_20.04 | 10 +++++----- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/dockerfiles/alpine_3.15 b/dockerfiles/alpine_3.15 index 2b052bd..ca997ce 100644 --- a/dockerfiles/alpine_3.15 +++ b/dockerfiles/alpine_3.15 @@ -17,18 +17,18 @@ ENV TARANTOOL_VERSION=${TNT_VER} \ GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ GPERFTOOLS_TAG=gperftools-2.9.1 \ LUAROCKS_URL=https://github.com/tarantool/luarocks/archive/6e6fe62d9409fe2103c0fd091cccb3da0451faf5.tar.gz \ - LUAROCK_VSHARD_VERSION=0.1.18 \ + LUAROCK_VSHARD_VERSION=0.1.20 \ LUAROCK_AVRO_SCHEMA_VERSION=3.0.6 \ LUAROCK_EXPERATIOND_VERSION=1.1.1 \ - LUAROCK_QUEUE_VERSION=1.1.0 \ + LUAROCK_QUEUE_VERSION=1.2.0 \ LUAROCK_CONNPOOL_VERSION=1.1.1 \ - LUAROCK_HTTP_VERSION=1.2.0 \ + LUAROCK_HTTP_VERSION=1.3.0 \ LUAROCK_MEMCACHED_VERSION=1.0.1 \ - LUAROCK_METRICS_VERSION=0.12.0 \ + LUAROCK_METRICS_VERSION=0.14.0 \ LUAROCK_TARANTOOL_PG_VERSION=2.0.2 \ - LUAROCK_TARANTOOL_MYSQL_VERSION=2.1.0 \ + LUAROCK_TARANTOOL_MYSQL_VERSION=2.1.1 \ LUAROCK_TARANTOOL_MQTT_VERSION=1.5.1 \ - LUAROCK_TARANTOOL_GIS_VERSION=1.0.0 \ + LUAROCK_TARANTOOL_GIS_VERSION=1.0.1 \ LUAROCK_TARANTOOL_PROMETHEUS_VERSION=1.0.4 \ LUAROCK_TARANTOOL_GPERFTOOLS_VERSION=1.0.1 diff --git a/dockerfiles/centos_7 b/dockerfiles/centos_7 index 15074cd..4cf3d5f 100644 --- a/dockerfiles/centos_7 +++ b/dockerfiles/centos_7 @@ -7,17 +7,17 @@ ARG TNT_VER \ ENV GC64=${GC64:-false} \ TARANTOOL_INSTALLER_URL=https://www.tarantool.io/release/${TNT_VER:-2}/installer.sh \ - LUAROCK_VSHARD_VERSION=0.1.18 \ + LUAROCK_VSHARD_VERSION=0.1.20 \ LUAROCK_AVRO_SCHEMA_VERSION=3.0.6 \ LUAROCK_EXPERATIOND_VERSION=1.1.1 \ - LUAROCK_QUEUE_VERSION=1.1.0 \ + LUAROCK_QUEUE_VERSION=1.2.0 \ LUAROCK_CONNPOOL_VERSION=1.1.1 \ - LUAROCK_HTTP_VERSION=1.2.0 \ + LUAROCK_HTTP_VERSION=1.3.0 \ LUAROCK_MEMCACHED_VERSION=1.0.1 \ - LUAROCK_METRICS_VERSION=0.12.0 \ + LUAROCK_METRICS_VERSION=0.14.0 \ LUAROCK_TARANTOOL_PG_VERSION=2.0.2 \ - LUAROCK_TARANTOOL_MYSQL_VERSION=2.1.0 \ - LUAROCK_TARANTOOL_GIS_VERSION=1.0.0 \ + LUAROCK_TARANTOOL_MYSQL_VERSION=2.1.1 \ + LUAROCK_TARANTOOL_GIS_VERSION=1.0.1 \ LUAROCK_TARANTOOL_PROMETHEUS_VERSION=1.0.4 \ LUAROCK_TARANTOOL_GPERFTOOLS_VERSION=1.0.1 \ GOSU_VERSION=1.11 diff --git a/dockerfiles/ubuntu_20.04 b/dockerfiles/ubuntu_20.04 index b388042..cb305b9 100644 --- a/dockerfiles/ubuntu_20.04 +++ b/dockerfiles/ubuntu_20.04 @@ -7,16 +7,16 @@ ARG TNT_VER \ ENV GC64=${GC64:-false} \ TARANTOOL_URL=https://www.tarantool.io/release/${TNT_VER:-2}/installer.sh \ - LUAROCK_VSHARD_VERSION=0.1.19 \ + LUAROCK_VSHARD_VERSION=0.1.20 \ LUAROCK_AVRO_SCHEMA_VERSION=3.0.6 \ LUAROCK_EXPERATIOND_VERSION=1.1.1 \ - LUAROCK_QUEUE_VERSION=1.1.0 \ + LUAROCK_QUEUE_VERSION=1.2.0 \ LUAROCK_CONNPOOL_VERSION=1.1.1 \ - LUAROCK_HTTP_VERSION=1.2.0 \ + LUAROCK_HTTP_VERSION=1.3.0 \ LUAROCK_MEMCACHED_VERSION=1.0.1 \ - LUAROCK_METRICS_VERSION=0.12.0 \ + LUAROCK_METRICS_VERSION=0.14.0 \ LUAROCK_TARANTOOL_PG_VERSION=2.0.2 \ - LUAROCK_TARANTOOL_MYSQL_VERSION=2.1.0 \ + LUAROCK_TARANTOOL_MYSQL_VERSION=2.1.1 \ LUAROCK_TARANTOOL_MQTT_VERSION=1.5.1 \ LUAROCK_TARANTOOL_GIS_VERSION=1.0.1 \ LUAROCK_TARANTOOL_PROMETHEUS_VERSION=1.0.4 \ From 74e087e2e87b61e8c4c4f26923396ed6706564d5 Mon Sep 17 00:00:00 2001 From: Sergey Vorontsov Date: Tue, 23 Aug 2022 19:28:45 +0300 Subject: [PATCH 249/286] Remove unused variable BASE_IMAGE * Variable BASE_IMAGE doesn't use in current building images. * In docker files field FROM fixed for all version OS. --- .gitlab.mk | 1 - dockerfiles/alpine_3.15 | 3 +-- dockerfiles/alpine_3.5 | 3 +-- dockerfiles/alpine_3.9 | 3 +-- dockerfiles/centos_7 | 3 +-- dockerfiles/ubuntu_20.04 | 3 +-- 6 files changed, 5 insertions(+), 11 deletions(-) diff --git a/.gitlab.mk b/.gitlab.mk index 4a6fd5c..76b2ae9 100644 --- a/.gitlab.mk +++ b/.gitlab.mk @@ -15,7 +15,6 @@ build: --build-arg LUAJIT_DISABLE_SYSPROF=${LUAJIT_DISABLE_SYSPROF} \ --build-arg LUAJIT_ENABLE_GC64=${LUAJIT_ENABLE_GC64} \ --build-arg NPROC=${NPROC} \ - --build-arg BASE_IMAGE="${ARCH}${OS}:${DIST}" \ --progress=plain \ -t ${IMAGE}:${TAG} -f dockerfiles/${OS}_${DIST} . docker run --rm --name tarantool_${TAG} -p ${PORT}:${PORT} -d ${IMAGE}:${TAG} diff --git a/dockerfiles/alpine_3.15 b/dockerfiles/alpine_3.15 index ca997ce..8ad3cca 100644 --- a/dockerfiles/alpine_3.15 +++ b/dockerfiles/alpine_3.15 @@ -1,5 +1,4 @@ -ARG BASE_IMAGE -FROM ${BASE_IMAGE} +FROM alpine:3.15 LABEL org.opencontainers.image.authors="artembo@me.com; piligrim@rootnix.net" RUN addgroup -S tarantool \ diff --git a/dockerfiles/alpine_3.5 b/dockerfiles/alpine_3.5 index 53b3491..192d2de 100644 --- a/dockerfiles/alpine_3.5 +++ b/dockerfiles/alpine_3.5 @@ -1,5 +1,4 @@ -ARG BASE_IMAGE -FROM ${BASE_IMAGE} +FROM alpine:3.5 MAINTAINER mail@racktear.com RUN addgroup -S tarantool \ diff --git a/dockerfiles/alpine_3.9 b/dockerfiles/alpine_3.9 index 491128a..3204336 100644 --- a/dockerfiles/alpine_3.9 +++ b/dockerfiles/alpine_3.9 @@ -1,5 +1,4 @@ -ARG BASE_IMAGE -FROM ${BASE_IMAGE} +FROM alpine:3.9 MAINTAINER mail@racktear.com RUN addgroup -S tarantool \ diff --git a/dockerfiles/centos_7 b/dockerfiles/centos_7 index 4cf3d5f..c503cd4 100644 --- a/dockerfiles/centos_7 +++ b/dockerfiles/centos_7 @@ -1,5 +1,4 @@ -ARG BASE_IMAGE -FROM ${BASE_IMAGE}centos:7 +FROM centos:7 LABEL org.opencontainers.image.authors="artembo@me.com; piligrim@rootnix.net" ARG TNT_VER \ diff --git a/dockerfiles/ubuntu_20.04 b/dockerfiles/ubuntu_20.04 index cb305b9..768a395 100644 --- a/dockerfiles/ubuntu_20.04 +++ b/dockerfiles/ubuntu_20.04 @@ -1,5 +1,4 @@ -ARG BASE_IMAGE -FROM ${BASE_IMAGE}ubuntu:20.04 +FROM ubuntu:20.04 LABEL org.opencontainers.image.authors="artembo@me.com; piligrim@rootnix.net" ARG TNT_VER \ From 35e18dfbf1c003cf7c17740f16dceb8417f3432b Mon Sep 17 00:00:00 2001 From: Sergey Vorontsov Date: Tue, 23 Aug 2022 19:40:48 +0300 Subject: [PATCH 250/286] Replace variable LUAJIT_ENABLE_GC64 to GC64 for building images * In alpine images used to LUAJIT_ENABLE_GC64 for enable GC64 now just GC64. * In centos and ubuntu images didn't GC64 aplied, fixed. Default value GC64 set in .gitlab.mk to OFF and can be changed to ON, for centos and ubuntu tarantool install from script wich use value GC64 true or false that's why in docker files for ubuntu centos present if clause for changing OFF to false or ON to true. Default value GC64 set in .gitlab.mk to OFF and can be changed, for centos and ubuntu. --- .gitlab.mk | 4 ++-- dockerfiles/alpine_3.15 | 4 ++-- dockerfiles/alpine_3.9 | 4 ++-- dockerfiles/centos_7 | 1 + dockerfiles/ubuntu_20.04 | 1 + 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.gitlab.mk b/.gitlab.mk index 76b2ae9..8267373 100644 --- a/.gitlab.mk +++ b/.gitlab.mk @@ -3,7 +3,7 @@ ROCKS_INSTALLER?='tarantoolctl rocks' ENABLE_BUNDLED_LIBYAML?='ON' IMAGE?=tarantool/tarantool LUAJIT_DISABLE_SYSPROF?=OFF -LUAJIT_ENABLE_GC64?=OFF +GC64?=OFF NPROC?=4 build: @@ -13,7 +13,7 @@ build: --build-arg ENABLE_BUNDLED_LIBYAML=${ENABLE_BUNDLED_LIBYAML} \ --build-arg TNT_VER=${TNT_VER} \ --build-arg LUAJIT_DISABLE_SYSPROF=${LUAJIT_DISABLE_SYSPROF} \ - --build-arg LUAJIT_ENABLE_GC64=${LUAJIT_ENABLE_GC64} \ + --build-arg GC64=${GC64} \ --build-arg NPROC=${NPROC} \ --progress=plain \ -t ${IMAGE}:${TAG} -f dockerfiles/${OS}_${DIST} . diff --git a/dockerfiles/alpine_3.15 b/dockerfiles/alpine_3.15 index 8ad3cca..6e56208 100644 --- a/dockerfiles/alpine_3.15 +++ b/dockerfiles/alpine_3.15 @@ -35,7 +35,7 @@ COPY files/gperftools_alpine.diff / ARG ENABLE_BUNDLED_LIBYAML \ LUAJIT_DISABLE_SYSPROF \ - LUAJIT_ENABLE_GC64 + GC64 RUN set -x \ && apk add --no-cache --virtual .run-deps.1 \ @@ -111,7 +111,7 @@ RUN set -x \ -DENABLE_BUNDLED_LIBYAML:BOOL=${ENABLE_BUNDLED_LIBYAML}\ -DENABLE_BACKTRACE:BOOL=ON\ -DLUAJIT_DISABLE_SYSPROF:BOOL=${LUAJIT_DISABLE_SYSPROF} \ - -DLUAJIT_ENABLE_GC64:BOOL=${LUAJIT_ENABLE_GC64} \ + -DLUAJIT_ENABLE_GC64:BOOL=${GC64} \ -DENABLE_DIST:BOOL=ON\ .) \ && make -C /usr/src/tarantool -j ${NPROC} \ diff --git a/dockerfiles/alpine_3.9 b/dockerfiles/alpine_3.9 index 3204336..94989d0 100644 --- a/dockerfiles/alpine_3.9 +++ b/dockerfiles/alpine_3.9 @@ -35,7 +35,7 @@ COPY files/gperftools_alpine.diff / ARG ENABLE_BUNDLED_LIBYAML \ LUAJIT_DISABLE_SYSPROF \ - LUAJIT_ENABLE_GC64 + GC64 RUN set -x \ && apk add --no-cache --virtual .run-deps.1 \ @@ -121,7 +121,7 @@ RUN set -x \ -DENABLE_BUNDLED_LIBYAML:BOOL=${ENABLE_BUNDLED_LIBYAML}\ -DENABLE_BACKTRACE:BOOL=ON\ -DLUAJIT_DISABLE_SYSPROF:BOOL=${LUAJIT_DISABLE_SYSPROF} \ - -DLUAJIT_ENABLE_GC64:BOOL=${LUAJIT_ENABLE_GC64} \ + -DLUAJIT_ENABLE_GC64:BOOL=${GC64} \ -DENABLE_DIST:BOOL=ON\ .) \ && make -C /usr/src/tarantool -j ${NPROC} \ diff --git a/dockerfiles/centos_7 b/dockerfiles/centos_7 index c503cd4..5848f44 100644 --- a/dockerfiles/centos_7 +++ b/dockerfiles/centos_7 @@ -36,6 +36,7 @@ repo_gpgcheck = 1\n'\ >> /etc/yum.repos.d/pg.repo \ && groupadd tarantool \ && adduser -g tarantool tarantool \ + && if [[ $LUAJIT_ENABLE_GC64 -eq 'OFF' ]]; then export GC64=false; else export GC64=true; fi\ && curl $TARANTOOL_INSTALLER_URL | bash \ && : "---------- tarantool ----------" \ && yum install -y \ diff --git a/dockerfiles/ubuntu_20.04 b/dockerfiles/ubuntu_20.04 index 768a395..f1798ec 100644 --- a/dockerfiles/ubuntu_20.04 +++ b/dockerfiles/ubuntu_20.04 @@ -38,6 +38,7 @@ RUN set -x \ ca-certificates \ && ln -snf /usr/share/zoneinfo/UTC /etc/localtime && echo UTC > /etc/timezone \ && ln -s /usr/lib/$(arch)-linux-gnu/libprofiler.so.0.4.18 /usr/lib/$(arch)-linux-gnu/libprofiler.so \ + && if [[ $LUAJIT_ENABLE_GC64 -eq 'OFF' ]]; then export GC64=false; else export GC64=true; fi\ && curl -L $TARANTOOL_URL | bash \ && apt -y install tarantool \ && apt clean \ From e460483dd5d76b0f2c8c3c438c208c3af2dc204e Mon Sep 17 00:00:00 2001 From: Sergey Vorontsov Date: Wed, 24 Aug 2022 19:35:17 +0300 Subject: [PATCH 251/286] Update docker for centos and ubuntu * update version files, now posible install various version on ubuntu and centos * fix problem with gosu in centos images on arm64 arch * replace installing tarantool from script --- dockerfiles/centos_7 | 52 +++++++++++++++++++++++++++++------- dockerfiles/ubuntu_20.04 | 22 ++++++++++----- versions/centos_7_2.10.1 | 1 + versions/ubuntu_20.04_2.10.1 | 1 + 4 files changed, 60 insertions(+), 16 deletions(-) create mode 100644 versions/centos_7_2.10.1 create mode 100644 versions/ubuntu_20.04_2.10.1 diff --git a/dockerfiles/centos_7 b/dockerfiles/centos_7 index 5848f44..68dd6be 100644 --- a/dockerfiles/centos_7 +++ b/dockerfiles/centos_7 @@ -5,7 +5,7 @@ ARG TNT_VER \ GC64 ENV GC64=${GC64:-false} \ - TARANTOOL_INSTALLER_URL=https://www.tarantool.io/release/${TNT_VER:-2}/installer.sh \ + TARANTOOL_VERSION=${TNT_VER} \ LUAROCK_VSHARD_VERSION=0.1.20 \ LUAROCK_AVRO_SCHEMA_VERSION=3.0.6 \ LUAROCK_EXPERATIOND_VERSION=1.1.1 \ @@ -19,7 +19,7 @@ ENV GC64=${GC64:-false} \ LUAROCK_TARANTOOL_GIS_VERSION=1.0.1 \ LUAROCK_TARANTOOL_PROMETHEUS_VERSION=1.0.4 \ LUAROCK_TARANTOOL_GPERFTOOLS_VERSION=1.0.1 \ - GOSU_VERSION=1.11 + GOSU_VERSION=1.14 COPY files/luarocks-config_centos.lua /usr/local/etc/luarocks/config-5.1.lua COPY files/luarocks-config.lua /usr/local/etc/tarantool/rocks/config-5.1.lua @@ -36,12 +36,42 @@ repo_gpgcheck = 1\n'\ >> /etc/yum.repos.d/pg.repo \ && groupadd tarantool \ && adduser -g tarantool tarantool \ - && if [[ $LUAJIT_ENABLE_GC64 -eq 'OFF' ]]; then export GC64=false; else export GC64=true; fi\ - && curl $TARANTOOL_INSTALLER_URL | bash \ - && : "---------- tarantool ----------" \ - && yum install -y \ - tarantool \ - tarantool-devel \ + && yum install -y epel-release \ + && if [ "$GC64" = "OFF" ]; then export gc64=""; else export gc64="-gc64"; fi \ + && echo -e "[tarantool_2] \n\ +name=EnterpriseLinux-7 - Tarantool\n\ +baseurl=https://download.tarantool.org/tarantool/release/series-2${gc64}/el/7/$(uname -m)/\n\ +gpgkey=https://download.tarantool.org/tarantool/release/series-2${gc64}/gpgkey\n\ +repo_gpgcheck=1\n\ +gpgcheck=0\n\ +enabled=1\n\ +priority=1\n\ +\n\ +[tarantool_2-source]\n\ +name=EnterpriseLinux-7 - Tarantool Sources\n\ +baseurl=https://download.tarantool.org/tarantool/release/series-2${gc64}/el/7/SRPMS\n\ +gpgkey=https://download.tarantool.org/tarantool/release/series-2${gc64}/gpgkey\n\ +repo_gpgcheck=1\n\ +gpgcheck=0\n\ +\n\ +[tarantool-modules]\n\ +name=EnterpriseLinux-7 - Tarantool Modules\n\ +baseurl=https://download.tarantool.org/tarantool/modules/el/7/$(uname -m)/\n\ +gpgkey=https://download.tarantool.org/tarantool/modules/gpgkey\n\ +repo_gpgcheck=1\n\ +gpgcheck=0\n\ +enabled=1\n\ +priority=1\n\ +\n\ +[tarantool_modules-source]\n\ +name=EnterpriseLinux-7 - Tarantool Module Sources\n\ +baseurl=https://download.tarantool.org/tarantool/modules/el/7/SRPMS\n\ +gpgkey=https://download.tarantool.org/tarantool/modules/gpgkey\n\ +repo_gpgcheck=1\n\ +gpgcheck=0\n" > /etc/yum.repos.d/tarantool_2.repo \ + && yum makecache -y --disablerepo='*' --enablerepo='tarantool_2' --enablerepo='epel' \ + && yum -y install tarantool-${TARANTOOL_VERSION} \ + tarantool-devel-${TARANTOOL_VERSION} \ mariadb-libs \ postgresql96-libs \ cyrus-sasl \ @@ -98,8 +128,10 @@ repo_gpgcheck = 1\n'\ && rm -rf /var/cache/yum \ && : "---------- gosu ----------" \ && gpg --keyserver hkps://keys.openpgp.org --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ - && curl -o /usr/local/bin/gosu -SL "https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-amd64" \ - && curl -o /usr/local/bin/gosu.asc -SL "https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-amd64.asc" \ + && if [ $(uname -m) = 'x86_64' ]; then GOSU_ARCH='amd64'; fi \ + && if [ $(uname -m) = 'aarch64' ]; then GOSU_ARCH='arm64'; fi \ + && curl -o /usr/local/bin/gosu -SL "https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-${GOSU_ARCH}" \ + && curl -o /usr/local/bin/gosu.asc -SL "https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-${GOSU_ARCH}.asc" \ && gpg --verify /usr/local/bin/gosu.asc \ && rm /usr/local/bin/gosu.asc \ && rm -r /root/.gnupg/ \ diff --git a/dockerfiles/ubuntu_20.04 b/dockerfiles/ubuntu_20.04 index f1798ec..3c3a51d 100644 --- a/dockerfiles/ubuntu_20.04 +++ b/dockerfiles/ubuntu_20.04 @@ -4,8 +4,8 @@ LABEL org.opencontainers.image.authors="artembo@me.com; piligrim@rootnix.net" ARG TNT_VER \ GC64 -ENV GC64=${GC64:-false} \ - TARANTOOL_URL=https://www.tarantool.io/release/${TNT_VER:-2}/installer.sh \ +ENV GC64=${GC64:-OFF} \ + TARANTOOL_VERSION=${TNT_VER} \ LUAROCK_VSHARD_VERSION=0.1.20 \ LUAROCK_AVRO_SCHEMA_VERSION=3.0.6 \ LUAROCK_EXPERATIOND_VERSION=1.1.1 \ @@ -25,6 +25,7 @@ RUN set -x \ && useradd --user-group --create-home --no-log-init --shell /bin/bash tarantool \ && apt update && apt -y --no-install-recommends --no-install-suggests install \ libgoogle-perftools4 \ + lsb-release \ unzip \ luarocks \ libgeos-dev \ @@ -35,14 +36,23 @@ RUN set -x \ libproj-dev \ gosu \ curl \ + gnupg2 \ ca-certificates \ + apt-transport-https \ && ln -snf /usr/share/zoneinfo/UTC /etc/localtime && echo UTC > /etc/timezone \ && ln -s /usr/lib/$(arch)-linux-gnu/libprofiler.so.0.4.18 /usr/lib/$(arch)-linux-gnu/libprofiler.so \ - && if [[ $LUAJIT_ENABLE_GC64 -eq 'OFF' ]]; then export GC64=false; else export GC64=true; fi\ - && curl -L $TARANTOOL_URL | bash \ - && apt -y install tarantool \ + && if [ "$GC64" = "OFF" ]; then export gc64=""; else export gc64="-gc64"; fi \ + && curl -L https://download.tarantool.org/tarantool/release/series-2/gpgkey | apt-key add - \ + && curl -L https://download.tarantool.org/tarantool/modules/gpgkey | apt-key add - \ + && echo "deb https://download.tarantool.org/tarantool/release/series-2${gc64}/ubuntu/ $(lsb_release -s -c) main" >> /etc/apt/sources.list.d/tarantool_2.list \ + && echo "deb-src https://download.tarantool.org/tarantool/release/series-2${gc64}/ubuntu/ $(lsb_release -s -c) main" >> /etc/apt/sources.list.d/tarantool_2.list \ + && echo "deb https://download.tarantool.org/tarantool/modules/ubuntu/ $(lsb_release -s -c) main" >> /etc/apt/sources.list.d/tarantool_2.list \ + && echo "deb-src https://download.tarantool.org/tarantool/modules/ubuntu/ $(lsb_release -s -c) main" >> /etc/apt/sources.list.d/tarantool_2.list \ + && apt update \ + && apt show -a tarantool \ + && apt -y install tarantool=${TNT_VER} \ + && apt -y install tarantool-dev=${TNT_VER} \ && apt clean \ - && set -x \ && tarantoolctl rocks install lua-term \ && tarantoolctl rocks install avro-schema $LUAROCK_AVRO_SCHEMA_VERSION \ && tarantoolctl rocks install expirationd $LUAROCK_EXPERATIOND_VERSION \ diff --git a/versions/centos_7_2.10.1 b/versions/centos_7_2.10.1 new file mode 100644 index 0000000..2bc1e93 --- /dev/null +++ b/versions/centos_7_2.10.1 @@ -0,0 +1 @@ + 2.10.1-1.el7 diff --git a/versions/ubuntu_20.04_2.10.1 b/versions/ubuntu_20.04_2.10.1 new file mode 100644 index 0000000..54385ab --- /dev/null +++ b/versions/ubuntu_20.04_2.10.1 @@ -0,0 +1 @@ +2.10.1.g482d91c66-1 From 46a72cfc547bd930c6062467b5e2518201a23358 Mon Sep 17 00:00:00 2001 From: Sergey Vorontsov Date: Mon, 5 Sep 2022 13:50:47 +0300 Subject: [PATCH 252/286] Bump tarantool version to 2.10.2 Bump version of tarantool to 2.10.2. Remove old unused version. --- dockerfiles/alpine_3.15 | 4 +++- versions/alpine_3.15_2 | 1 - versions/alpine_3.15_2.10 | 1 - versions/alpine_3.15_2.10.2 | 2 ++ versions/centos_7_2.10.1 | 1 - versions/centos_7_2.10.2 | 1 + versions/ubuntu_20.04_2.10.1 | 1 - versions/ubuntu_20.04_2.10.2 | 1 + 8 files changed, 7 insertions(+), 5 deletions(-) delete mode 100644 versions/alpine_3.15_2 delete mode 100644 versions/alpine_3.15_2.10 create mode 100644 versions/alpine_3.15_2.10.2 delete mode 100644 versions/centos_7_2.10.1 create mode 100644 versions/centos_7_2.10.2 delete mode 100644 versions/ubuntu_20.04_2.10.1 create mode 100644 versions/ubuntu_20.04_2.10.2 diff --git a/dockerfiles/alpine_3.15 b/dockerfiles/alpine_3.15 index 6e56208..207260a 100644 --- a/dockerfiles/alpine_3.15 +++ b/dockerfiles/alpine_3.15 @@ -157,6 +157,8 @@ RUN set -x \ musl-dev \ cyrus-sasl-dev \ libev-dev \ + libucontext \ + libucontext-dev \ libressl-dev \ wget \ unzip \ @@ -221,7 +223,7 @@ RUN set -x \ # gh-170: needed for luarocks RUN apk update \ - && apk add wget git + && apk add wget git libucontext RUN mkdir -p /var/lib/tarantool \ && chown tarantool:tarantool /var/lib/tarantool \ diff --git a/versions/alpine_3.15_2 b/versions/alpine_3.15_2 deleted file mode 100644 index 71cb739..0000000 --- a/versions/alpine_3.15_2 +++ /dev/null @@ -1 +0,0 @@ -2.10.0-1-g370040ca1 diff --git a/versions/alpine_3.15_2.10 b/versions/alpine_3.15_2.10 deleted file mode 100644 index 71cb739..0000000 --- a/versions/alpine_3.15_2.10 +++ /dev/null @@ -1 +0,0 @@ -2.10.0-1-g370040ca1 diff --git a/versions/alpine_3.15_2.10.2 b/versions/alpine_3.15_2.10.2 new file mode 100644 index 0000000..b2eccf2 --- /dev/null +++ b/versions/alpine_3.15_2.10.2 @@ -0,0 +1,2 @@ +2.10.2-5-g399bea26a + diff --git a/versions/centos_7_2.10.1 b/versions/centos_7_2.10.1 deleted file mode 100644 index 2bc1e93..0000000 --- a/versions/centos_7_2.10.1 +++ /dev/null @@ -1 +0,0 @@ - 2.10.1-1.el7 diff --git a/versions/centos_7_2.10.2 b/versions/centos_7_2.10.2 new file mode 100644 index 0000000..7e8aa6a --- /dev/null +++ b/versions/centos_7_2.10.2 @@ -0,0 +1 @@ +2.10.2-1.el7 diff --git a/versions/ubuntu_20.04_2.10.1 b/versions/ubuntu_20.04_2.10.1 deleted file mode 100644 index 54385ab..0000000 --- a/versions/ubuntu_20.04_2.10.1 +++ /dev/null @@ -1 +0,0 @@ -2.10.1.g482d91c66-1 diff --git a/versions/ubuntu_20.04_2.10.2 b/versions/ubuntu_20.04_2.10.2 new file mode 100644 index 0000000..e9f3a8c --- /dev/null +++ b/versions/ubuntu_20.04_2.10.2 @@ -0,0 +1 @@ +2.10.2.gb924f0b4a-1 From 841e9dccc806e8111b42d6dafccec83c1e102925 Mon Sep 17 00:00:00 2001 From: Anna Balaeva Date: Mon, 3 Oct 2022 16:23:25 +0300 Subject: [PATCH 253/286] Bump tarantool version to 2.10.3 (#247) --- .gitignore | 1 + versions/alpine_3.15_2.10.3 | 1 + versions/centos_7_2.10.3 | 1 + versions/ubuntu_20.04_2.10.3 | 1 + 4 files changed, 4 insertions(+) create mode 100644 .gitignore create mode 100644 versions/alpine_3.15_2.10.3 create mode 100644 versions/centos_7_2.10.3 create mode 100644 versions/ubuntu_20.04_2.10.3 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..723ef36 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.idea \ No newline at end of file diff --git a/versions/alpine_3.15_2.10.3 b/versions/alpine_3.15_2.10.3 new file mode 100644 index 0000000..a08d627 --- /dev/null +++ b/versions/alpine_3.15_2.10.3 @@ -0,0 +1 @@ +2.10.3-4-g13a839e85 diff --git a/versions/centos_7_2.10.3 b/versions/centos_7_2.10.3 new file mode 100644 index 0000000..64b68c7 --- /dev/null +++ b/versions/centos_7_2.10.3 @@ -0,0 +1 @@ +2.10.3-1.el7 \ No newline at end of file diff --git a/versions/ubuntu_20.04_2.10.3 b/versions/ubuntu_20.04_2.10.3 new file mode 100644 index 0000000..611af53 --- /dev/null +++ b/versions/ubuntu_20.04_2.10.3 @@ -0,0 +1 @@ +2.10.3.g8aca8a19a-1 \ No newline at end of file From 42a1009bc17d14b5029765f1ed790352e18b75c1 Mon Sep 17 00:00:00 2001 From: Sergey Vorontsov Date: Mon, 14 Nov 2022 13:53:15 +0300 Subject: [PATCH 254/286] Bump tarantool to 2.10.4 * Bump tarantool version to 2.10.4 * Update gperftools version to 2.10 --- dockerfiles/alpine_3.15 | 3 ++- versions/alpine_3.15_2.10.4 | 1 + versions/centos_7_2.10.4 | 1 + versions/ubuntu_20.04_2.10.4 | 1 + 4 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 versions/alpine_3.15_2.10.4 create mode 100644 versions/centos_7_2.10.4 create mode 100644 versions/ubuntu_20.04_2.10.4 diff --git a/dockerfiles/alpine_3.15 b/dockerfiles/alpine_3.15 index 207260a..d64e44a 100644 --- a/dockerfiles/alpine_3.15 +++ b/dockerfiles/alpine_3.15 @@ -14,7 +14,7 @@ ENV TARANTOOL_VERSION=${TNT_VER} \ TARANTOOL_DOWNLOAD_URL=https://github.com/tarantool/tarantool.git \ TARANTOOL_INSTALL_LUADIR=/usr/local/share/tarantool \ GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ - GPERFTOOLS_TAG=gperftools-2.9.1 \ + GPERFTOOLS_TAG=gperftools-2.10 \ LUAROCKS_URL=https://github.com/tarantool/luarocks/archive/6e6fe62d9409fe2103c0fd091cccb3da0451faf5.tar.gz \ LUAROCK_VSHARD_VERSION=0.1.20 \ LUAROCK_AVRO_SCHEMA_VERSION=3.0.6 \ @@ -54,6 +54,7 @@ RUN set -x \ libunwind \ icu \ ca-certificates \ + libexecinfo-dev \ && apk add --no-cache --virtual .build-deps.1 \ gcc \ g++ \ diff --git a/versions/alpine_3.15_2.10.4 b/versions/alpine_3.15_2.10.4 new file mode 100644 index 0000000..5bda9d0 --- /dev/null +++ b/versions/alpine_3.15_2.10.4 @@ -0,0 +1 @@ +2.10.4-0-g816000e10 diff --git a/versions/centos_7_2.10.4 b/versions/centos_7_2.10.4 new file mode 100644 index 0000000..f5ad1fa --- /dev/null +++ b/versions/centos_7_2.10.4 @@ -0,0 +1 @@ +2.10.4-1.el7 diff --git a/versions/ubuntu_20.04_2.10.4 b/versions/ubuntu_20.04_2.10.4 new file mode 100644 index 0000000..5a4a6c6 --- /dev/null +++ b/versions/ubuntu_20.04_2.10.4 @@ -0,0 +1 @@ +2.10.4.g816000e10-1 From 07712931f5f873889ffe32c42ba2f32fc937f472 Mon Sep 17 00:00:00 2001 From: Sergey Vorontsov Date: Tue, 7 Feb 2023 23:28:21 +0300 Subject: [PATCH 255/286] Install missing tzdata package for alpine 3.15 Closes tarantool/tarantool#8238 --- dockerfiles/alpine_3.15 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dockerfiles/alpine_3.15 b/dockerfiles/alpine_3.15 index d64e44a..7ff2901 100644 --- a/dockerfiles/alpine_3.15 +++ b/dockerfiles/alpine_3.15 @@ -222,9 +222,9 @@ RUN set -x \ && : "---------- remove build deps ----------" \ && apk del .build-deps.2 -# gh-170: needed for luarocks +# gh-170: needed for luarocks and etc RUN apk update \ - && apk add wget git libucontext + && apk add wget git libucontext tzdata RUN mkdir -p /var/lib/tarantool \ && chown tarantool:tarantool /var/lib/tarantool \ From ae3abbb0b89117de8565b6460d51649f2e0f1c1b Mon Sep 17 00:00:00 2001 From: Yaroslav Lobankov Date: Fri, 17 Feb 2023 15:28:43 +0400 Subject: [PATCH 256/286] Create separate folders for version files --- .gitlab.mk | 2 +- versions/{ => 1}/alpine_3.5_1.10.0 | 0 versions/{ => 1}/alpine_3.5_1.10.1 | 0 versions/{ => 1}/alpine_3.5_1.10.2 | 0 versions/{ => 1}/alpine_3.5_1.10.3 | 0 versions/{ => 1}/alpine_3.9_1.10.10 | 0 versions/{ => 1}/alpine_3.9_1.10.11 | 0 versions/{ => 1}/alpine_3.9_1.10.12 | 0 versions/{ => 1}/alpine_3.9_1.10.13 | 0 versions/{ => 1}/alpine_3.9_1.10.4 | 0 versions/{ => 1}/alpine_3.9_1.10.5 | 0 versions/{ => 1}/alpine_3.9_1.10.6 | 0 versions/{ => 1}/alpine_3.9_1.10.7 | 0 versions/{ => 1}/alpine_3.9_1.10.8 | 0 versions/{ => 1}/alpine_3.9_1.10.9 | 0 versions/{ => 1}/alpine_3.9_1.x | 0 versions/{ => 1}/centos_7_1.x | 0 versions/{ => 2}/alpine_3.15_2.10.0 | 0 versions/{ => 2}/alpine_3.15_2.10.2 | 0 versions/{ => 2}/alpine_3.15_2.10.3 | 0 versions/{ => 2}/alpine_3.15_2.10.4 | 0 versions/{ => 2}/alpine_3.5_2.1.0 | 0 versions/{ => 2}/alpine_3.5_2.1.1 | 0 versions/{ => 2}/alpine_3.5_2.1.2 | 0 versions/{ => 2}/alpine_3.5_2.2.0 | 0 versions/{ => 2}/alpine_3.5_2.2.1 | 0 versions/{ => 2}/alpine_3.5_2.3.0 | 0 versions/{ => 2}/alpine_3.9_2.1 | 0 versions/{ => 2}/alpine_3.9_2.1.3 | 0 versions/{ => 2}/alpine_3.9_2.10.0-beta1 | 0 versions/{ => 2}/alpine_3.9_2.10.0-beta2 | 0 versions/{ => 2}/alpine_3.9_2.10.0-rc1 | 0 versions/{ => 2}/alpine_3.9_2.2 | 0 versions/{ => 2}/alpine_3.9_2.2.2 | 0 versions/{ => 2}/alpine_3.9_2.2.3 | 0 versions/{ => 2}/alpine_3.9_2.3 | 0 versions/{ => 2}/alpine_3.9_2.3.1 | 0 versions/{ => 2}/alpine_3.9_2.3.2 | 0 versions/{ => 2}/alpine_3.9_2.3.3 | 0 versions/{ => 2}/alpine_3.9_2.4 | 0 versions/{ => 2}/alpine_3.9_2.4.0 | 0 versions/{ => 2}/alpine_3.9_2.4.1 | 0 versions/{ => 2}/alpine_3.9_2.4.2 | 0 versions/{ => 2}/alpine_3.9_2.4.3 | 0 versions/{ => 2}/alpine_3.9_2.5 | 0 versions/{ => 2}/alpine_3.9_2.5.0 | 0 versions/{ => 2}/alpine_3.9_2.5.1 | 0 versions/{ => 2}/alpine_3.9_2.5.2 | 0 versions/{ => 2}/alpine_3.9_2.5.3 | 0 versions/{ => 2}/alpine_3.9_2.6 | 0 versions/{ => 2}/alpine_3.9_2.6.0 | 0 versions/{ => 2}/alpine_3.9_2.6.1 | 0 versions/{ => 2}/alpine_3.9_2.6.2 | 0 versions/{ => 2}/alpine_3.9_2.6.3 | 0 versions/{ => 2}/alpine_3.9_2.7 | 0 versions/{ => 2}/alpine_3.9_2.7.0 | 0 versions/{ => 2}/alpine_3.9_2.7.1 | 0 versions/{ => 2}/alpine_3.9_2.7.2 | 0 versions/{ => 2}/alpine_3.9_2.7.3 | 0 versions/{ => 2}/alpine_3.9_2.8 | 0 versions/{ => 2}/alpine_3.9_2.8.0 | 0 versions/{ => 2}/alpine_3.9_2.8.1 | 0 versions/{ => 2}/alpine_3.9_2.8.2 | 0 versions/{ => 2}/alpine_3.9_2.8.3 | 0 versions/{ => 2}/alpine_3.9_2.8.4 | 0 versions/{ => 2}/alpine_3.9_2.9.0 | 0 versions/{ => 2}/alpine_3.9_2.x | 0 versions/{ => 2}/centos_7_2.10.2 | 0 versions/{ => 2}/centos_7_2.10.3 | 0 versions/{ => 2}/centos_7_2.10.4 | 0 versions/{ => 2}/centos_7_2.x | 0 versions/{ => 2}/ubuntu_20.04_2.10.2 | 0 versions/{ => 2}/ubuntu_20.04_2.10.3 | 0 versions/{ => 2}/ubuntu_20.04_2.10.4 | 0 74 files changed, 1 insertion(+), 1 deletion(-) rename versions/{ => 1}/alpine_3.5_1.10.0 (100%) rename versions/{ => 1}/alpine_3.5_1.10.1 (100%) rename versions/{ => 1}/alpine_3.5_1.10.2 (100%) rename versions/{ => 1}/alpine_3.5_1.10.3 (100%) rename versions/{ => 1}/alpine_3.9_1.10.10 (100%) rename versions/{ => 1}/alpine_3.9_1.10.11 (100%) rename versions/{ => 1}/alpine_3.9_1.10.12 (100%) rename versions/{ => 1}/alpine_3.9_1.10.13 (100%) rename versions/{ => 1}/alpine_3.9_1.10.4 (100%) rename versions/{ => 1}/alpine_3.9_1.10.5 (100%) rename versions/{ => 1}/alpine_3.9_1.10.6 (100%) rename versions/{ => 1}/alpine_3.9_1.10.7 (100%) rename versions/{ => 1}/alpine_3.9_1.10.8 (100%) rename versions/{ => 1}/alpine_3.9_1.10.9 (100%) rename versions/{ => 1}/alpine_3.9_1.x (100%) rename versions/{ => 1}/centos_7_1.x (100%) rename versions/{ => 2}/alpine_3.15_2.10.0 (100%) rename versions/{ => 2}/alpine_3.15_2.10.2 (100%) rename versions/{ => 2}/alpine_3.15_2.10.3 (100%) rename versions/{ => 2}/alpine_3.15_2.10.4 (100%) rename versions/{ => 2}/alpine_3.5_2.1.0 (100%) rename versions/{ => 2}/alpine_3.5_2.1.1 (100%) rename versions/{ => 2}/alpine_3.5_2.1.2 (100%) rename versions/{ => 2}/alpine_3.5_2.2.0 (100%) rename versions/{ => 2}/alpine_3.5_2.2.1 (100%) rename versions/{ => 2}/alpine_3.5_2.3.0 (100%) rename versions/{ => 2}/alpine_3.9_2.1 (100%) rename versions/{ => 2}/alpine_3.9_2.1.3 (100%) rename versions/{ => 2}/alpine_3.9_2.10.0-beta1 (100%) rename versions/{ => 2}/alpine_3.9_2.10.0-beta2 (100%) rename versions/{ => 2}/alpine_3.9_2.10.0-rc1 (100%) rename versions/{ => 2}/alpine_3.9_2.2 (100%) rename versions/{ => 2}/alpine_3.9_2.2.2 (100%) rename versions/{ => 2}/alpine_3.9_2.2.3 (100%) rename versions/{ => 2}/alpine_3.9_2.3 (100%) rename versions/{ => 2}/alpine_3.9_2.3.1 (100%) rename versions/{ => 2}/alpine_3.9_2.3.2 (100%) rename versions/{ => 2}/alpine_3.9_2.3.3 (100%) rename versions/{ => 2}/alpine_3.9_2.4 (100%) rename versions/{ => 2}/alpine_3.9_2.4.0 (100%) rename versions/{ => 2}/alpine_3.9_2.4.1 (100%) rename versions/{ => 2}/alpine_3.9_2.4.2 (100%) rename versions/{ => 2}/alpine_3.9_2.4.3 (100%) rename versions/{ => 2}/alpine_3.9_2.5 (100%) rename versions/{ => 2}/alpine_3.9_2.5.0 (100%) rename versions/{ => 2}/alpine_3.9_2.5.1 (100%) rename versions/{ => 2}/alpine_3.9_2.5.2 (100%) rename versions/{ => 2}/alpine_3.9_2.5.3 (100%) rename versions/{ => 2}/alpine_3.9_2.6 (100%) rename versions/{ => 2}/alpine_3.9_2.6.0 (100%) rename versions/{ => 2}/alpine_3.9_2.6.1 (100%) rename versions/{ => 2}/alpine_3.9_2.6.2 (100%) rename versions/{ => 2}/alpine_3.9_2.6.3 (100%) rename versions/{ => 2}/alpine_3.9_2.7 (100%) rename versions/{ => 2}/alpine_3.9_2.7.0 (100%) rename versions/{ => 2}/alpine_3.9_2.7.1 (100%) rename versions/{ => 2}/alpine_3.9_2.7.2 (100%) rename versions/{ => 2}/alpine_3.9_2.7.3 (100%) rename versions/{ => 2}/alpine_3.9_2.8 (100%) rename versions/{ => 2}/alpine_3.9_2.8.0 (100%) rename versions/{ => 2}/alpine_3.9_2.8.1 (100%) rename versions/{ => 2}/alpine_3.9_2.8.2 (100%) rename versions/{ => 2}/alpine_3.9_2.8.3 (100%) rename versions/{ => 2}/alpine_3.9_2.8.4 (100%) rename versions/{ => 2}/alpine_3.9_2.9.0 (100%) rename versions/{ => 2}/alpine_3.9_2.x (100%) rename versions/{ => 2}/centos_7_2.10.2 (100%) rename versions/{ => 2}/centos_7_2.10.3 (100%) rename versions/{ => 2}/centos_7_2.10.4 (100%) rename versions/{ => 2}/centos_7_2.x (100%) rename versions/{ => 2}/ubuntu_20.04_2.10.2 (100%) rename versions/{ => 2}/ubuntu_20.04_2.10.3 (100%) rename versions/{ => 2}/ubuntu_20.04_2.10.4 (100%) diff --git a/.gitlab.mk b/.gitlab.mk index 8267373..502721f 100644 --- a/.gitlab.mk +++ b/.gitlab.mk @@ -1,4 +1,4 @@ -TNT_VER=$(shell cat versions/${OS}_${DIST}_${VER}) +TNT_VER=$(shell cat versions/$${VER:0:1}/${OS}_${DIST}_${VER}) ROCKS_INSTALLER?='tarantoolctl rocks' ENABLE_BUNDLED_LIBYAML?='ON' IMAGE?=tarantool/tarantool diff --git a/versions/alpine_3.5_1.10.0 b/versions/1/alpine_3.5_1.10.0 similarity index 100% rename from versions/alpine_3.5_1.10.0 rename to versions/1/alpine_3.5_1.10.0 diff --git a/versions/alpine_3.5_1.10.1 b/versions/1/alpine_3.5_1.10.1 similarity index 100% rename from versions/alpine_3.5_1.10.1 rename to versions/1/alpine_3.5_1.10.1 diff --git a/versions/alpine_3.5_1.10.2 b/versions/1/alpine_3.5_1.10.2 similarity index 100% rename from versions/alpine_3.5_1.10.2 rename to versions/1/alpine_3.5_1.10.2 diff --git a/versions/alpine_3.5_1.10.3 b/versions/1/alpine_3.5_1.10.3 similarity index 100% rename from versions/alpine_3.5_1.10.3 rename to versions/1/alpine_3.5_1.10.3 diff --git a/versions/alpine_3.9_1.10.10 b/versions/1/alpine_3.9_1.10.10 similarity index 100% rename from versions/alpine_3.9_1.10.10 rename to versions/1/alpine_3.9_1.10.10 diff --git a/versions/alpine_3.9_1.10.11 b/versions/1/alpine_3.9_1.10.11 similarity index 100% rename from versions/alpine_3.9_1.10.11 rename to versions/1/alpine_3.9_1.10.11 diff --git a/versions/alpine_3.9_1.10.12 b/versions/1/alpine_3.9_1.10.12 similarity index 100% rename from versions/alpine_3.9_1.10.12 rename to versions/1/alpine_3.9_1.10.12 diff --git a/versions/alpine_3.9_1.10.13 b/versions/1/alpine_3.9_1.10.13 similarity index 100% rename from versions/alpine_3.9_1.10.13 rename to versions/1/alpine_3.9_1.10.13 diff --git a/versions/alpine_3.9_1.10.4 b/versions/1/alpine_3.9_1.10.4 similarity index 100% rename from versions/alpine_3.9_1.10.4 rename to versions/1/alpine_3.9_1.10.4 diff --git a/versions/alpine_3.9_1.10.5 b/versions/1/alpine_3.9_1.10.5 similarity index 100% rename from versions/alpine_3.9_1.10.5 rename to versions/1/alpine_3.9_1.10.5 diff --git a/versions/alpine_3.9_1.10.6 b/versions/1/alpine_3.9_1.10.6 similarity index 100% rename from versions/alpine_3.9_1.10.6 rename to versions/1/alpine_3.9_1.10.6 diff --git a/versions/alpine_3.9_1.10.7 b/versions/1/alpine_3.9_1.10.7 similarity index 100% rename from versions/alpine_3.9_1.10.7 rename to versions/1/alpine_3.9_1.10.7 diff --git a/versions/alpine_3.9_1.10.8 b/versions/1/alpine_3.9_1.10.8 similarity index 100% rename from versions/alpine_3.9_1.10.8 rename to versions/1/alpine_3.9_1.10.8 diff --git a/versions/alpine_3.9_1.10.9 b/versions/1/alpine_3.9_1.10.9 similarity index 100% rename from versions/alpine_3.9_1.10.9 rename to versions/1/alpine_3.9_1.10.9 diff --git a/versions/alpine_3.9_1.x b/versions/1/alpine_3.9_1.x similarity index 100% rename from versions/alpine_3.9_1.x rename to versions/1/alpine_3.9_1.x diff --git a/versions/centos_7_1.x b/versions/1/centos_7_1.x similarity index 100% rename from versions/centos_7_1.x rename to versions/1/centos_7_1.x diff --git a/versions/alpine_3.15_2.10.0 b/versions/2/alpine_3.15_2.10.0 similarity index 100% rename from versions/alpine_3.15_2.10.0 rename to versions/2/alpine_3.15_2.10.0 diff --git a/versions/alpine_3.15_2.10.2 b/versions/2/alpine_3.15_2.10.2 similarity index 100% rename from versions/alpine_3.15_2.10.2 rename to versions/2/alpine_3.15_2.10.2 diff --git a/versions/alpine_3.15_2.10.3 b/versions/2/alpine_3.15_2.10.3 similarity index 100% rename from versions/alpine_3.15_2.10.3 rename to versions/2/alpine_3.15_2.10.3 diff --git a/versions/alpine_3.15_2.10.4 b/versions/2/alpine_3.15_2.10.4 similarity index 100% rename from versions/alpine_3.15_2.10.4 rename to versions/2/alpine_3.15_2.10.4 diff --git a/versions/alpine_3.5_2.1.0 b/versions/2/alpine_3.5_2.1.0 similarity index 100% rename from versions/alpine_3.5_2.1.0 rename to versions/2/alpine_3.5_2.1.0 diff --git a/versions/alpine_3.5_2.1.1 b/versions/2/alpine_3.5_2.1.1 similarity index 100% rename from versions/alpine_3.5_2.1.1 rename to versions/2/alpine_3.5_2.1.1 diff --git a/versions/alpine_3.5_2.1.2 b/versions/2/alpine_3.5_2.1.2 similarity index 100% rename from versions/alpine_3.5_2.1.2 rename to versions/2/alpine_3.5_2.1.2 diff --git a/versions/alpine_3.5_2.2.0 b/versions/2/alpine_3.5_2.2.0 similarity index 100% rename from versions/alpine_3.5_2.2.0 rename to versions/2/alpine_3.5_2.2.0 diff --git a/versions/alpine_3.5_2.2.1 b/versions/2/alpine_3.5_2.2.1 similarity index 100% rename from versions/alpine_3.5_2.2.1 rename to versions/2/alpine_3.5_2.2.1 diff --git a/versions/alpine_3.5_2.3.0 b/versions/2/alpine_3.5_2.3.0 similarity index 100% rename from versions/alpine_3.5_2.3.0 rename to versions/2/alpine_3.5_2.3.0 diff --git a/versions/alpine_3.9_2.1 b/versions/2/alpine_3.9_2.1 similarity index 100% rename from versions/alpine_3.9_2.1 rename to versions/2/alpine_3.9_2.1 diff --git a/versions/alpine_3.9_2.1.3 b/versions/2/alpine_3.9_2.1.3 similarity index 100% rename from versions/alpine_3.9_2.1.3 rename to versions/2/alpine_3.9_2.1.3 diff --git a/versions/alpine_3.9_2.10.0-beta1 b/versions/2/alpine_3.9_2.10.0-beta1 similarity index 100% rename from versions/alpine_3.9_2.10.0-beta1 rename to versions/2/alpine_3.9_2.10.0-beta1 diff --git a/versions/alpine_3.9_2.10.0-beta2 b/versions/2/alpine_3.9_2.10.0-beta2 similarity index 100% rename from versions/alpine_3.9_2.10.0-beta2 rename to versions/2/alpine_3.9_2.10.0-beta2 diff --git a/versions/alpine_3.9_2.10.0-rc1 b/versions/2/alpine_3.9_2.10.0-rc1 similarity index 100% rename from versions/alpine_3.9_2.10.0-rc1 rename to versions/2/alpine_3.9_2.10.0-rc1 diff --git a/versions/alpine_3.9_2.2 b/versions/2/alpine_3.9_2.2 similarity index 100% rename from versions/alpine_3.9_2.2 rename to versions/2/alpine_3.9_2.2 diff --git a/versions/alpine_3.9_2.2.2 b/versions/2/alpine_3.9_2.2.2 similarity index 100% rename from versions/alpine_3.9_2.2.2 rename to versions/2/alpine_3.9_2.2.2 diff --git a/versions/alpine_3.9_2.2.3 b/versions/2/alpine_3.9_2.2.3 similarity index 100% rename from versions/alpine_3.9_2.2.3 rename to versions/2/alpine_3.9_2.2.3 diff --git a/versions/alpine_3.9_2.3 b/versions/2/alpine_3.9_2.3 similarity index 100% rename from versions/alpine_3.9_2.3 rename to versions/2/alpine_3.9_2.3 diff --git a/versions/alpine_3.9_2.3.1 b/versions/2/alpine_3.9_2.3.1 similarity index 100% rename from versions/alpine_3.9_2.3.1 rename to versions/2/alpine_3.9_2.3.1 diff --git a/versions/alpine_3.9_2.3.2 b/versions/2/alpine_3.9_2.3.2 similarity index 100% rename from versions/alpine_3.9_2.3.2 rename to versions/2/alpine_3.9_2.3.2 diff --git a/versions/alpine_3.9_2.3.3 b/versions/2/alpine_3.9_2.3.3 similarity index 100% rename from versions/alpine_3.9_2.3.3 rename to versions/2/alpine_3.9_2.3.3 diff --git a/versions/alpine_3.9_2.4 b/versions/2/alpine_3.9_2.4 similarity index 100% rename from versions/alpine_3.9_2.4 rename to versions/2/alpine_3.9_2.4 diff --git a/versions/alpine_3.9_2.4.0 b/versions/2/alpine_3.9_2.4.0 similarity index 100% rename from versions/alpine_3.9_2.4.0 rename to versions/2/alpine_3.9_2.4.0 diff --git a/versions/alpine_3.9_2.4.1 b/versions/2/alpine_3.9_2.4.1 similarity index 100% rename from versions/alpine_3.9_2.4.1 rename to versions/2/alpine_3.9_2.4.1 diff --git a/versions/alpine_3.9_2.4.2 b/versions/2/alpine_3.9_2.4.2 similarity index 100% rename from versions/alpine_3.9_2.4.2 rename to versions/2/alpine_3.9_2.4.2 diff --git a/versions/alpine_3.9_2.4.3 b/versions/2/alpine_3.9_2.4.3 similarity index 100% rename from versions/alpine_3.9_2.4.3 rename to versions/2/alpine_3.9_2.4.3 diff --git a/versions/alpine_3.9_2.5 b/versions/2/alpine_3.9_2.5 similarity index 100% rename from versions/alpine_3.9_2.5 rename to versions/2/alpine_3.9_2.5 diff --git a/versions/alpine_3.9_2.5.0 b/versions/2/alpine_3.9_2.5.0 similarity index 100% rename from versions/alpine_3.9_2.5.0 rename to versions/2/alpine_3.9_2.5.0 diff --git a/versions/alpine_3.9_2.5.1 b/versions/2/alpine_3.9_2.5.1 similarity index 100% rename from versions/alpine_3.9_2.5.1 rename to versions/2/alpine_3.9_2.5.1 diff --git a/versions/alpine_3.9_2.5.2 b/versions/2/alpine_3.9_2.5.2 similarity index 100% rename from versions/alpine_3.9_2.5.2 rename to versions/2/alpine_3.9_2.5.2 diff --git a/versions/alpine_3.9_2.5.3 b/versions/2/alpine_3.9_2.5.3 similarity index 100% rename from versions/alpine_3.9_2.5.3 rename to versions/2/alpine_3.9_2.5.3 diff --git a/versions/alpine_3.9_2.6 b/versions/2/alpine_3.9_2.6 similarity index 100% rename from versions/alpine_3.9_2.6 rename to versions/2/alpine_3.9_2.6 diff --git a/versions/alpine_3.9_2.6.0 b/versions/2/alpine_3.9_2.6.0 similarity index 100% rename from versions/alpine_3.9_2.6.0 rename to versions/2/alpine_3.9_2.6.0 diff --git a/versions/alpine_3.9_2.6.1 b/versions/2/alpine_3.9_2.6.1 similarity index 100% rename from versions/alpine_3.9_2.6.1 rename to versions/2/alpine_3.9_2.6.1 diff --git a/versions/alpine_3.9_2.6.2 b/versions/2/alpine_3.9_2.6.2 similarity index 100% rename from versions/alpine_3.9_2.6.2 rename to versions/2/alpine_3.9_2.6.2 diff --git a/versions/alpine_3.9_2.6.3 b/versions/2/alpine_3.9_2.6.3 similarity index 100% rename from versions/alpine_3.9_2.6.3 rename to versions/2/alpine_3.9_2.6.3 diff --git a/versions/alpine_3.9_2.7 b/versions/2/alpine_3.9_2.7 similarity index 100% rename from versions/alpine_3.9_2.7 rename to versions/2/alpine_3.9_2.7 diff --git a/versions/alpine_3.9_2.7.0 b/versions/2/alpine_3.9_2.7.0 similarity index 100% rename from versions/alpine_3.9_2.7.0 rename to versions/2/alpine_3.9_2.7.0 diff --git a/versions/alpine_3.9_2.7.1 b/versions/2/alpine_3.9_2.7.1 similarity index 100% rename from versions/alpine_3.9_2.7.1 rename to versions/2/alpine_3.9_2.7.1 diff --git a/versions/alpine_3.9_2.7.2 b/versions/2/alpine_3.9_2.7.2 similarity index 100% rename from versions/alpine_3.9_2.7.2 rename to versions/2/alpine_3.9_2.7.2 diff --git a/versions/alpine_3.9_2.7.3 b/versions/2/alpine_3.9_2.7.3 similarity index 100% rename from versions/alpine_3.9_2.7.3 rename to versions/2/alpine_3.9_2.7.3 diff --git a/versions/alpine_3.9_2.8 b/versions/2/alpine_3.9_2.8 similarity index 100% rename from versions/alpine_3.9_2.8 rename to versions/2/alpine_3.9_2.8 diff --git a/versions/alpine_3.9_2.8.0 b/versions/2/alpine_3.9_2.8.0 similarity index 100% rename from versions/alpine_3.9_2.8.0 rename to versions/2/alpine_3.9_2.8.0 diff --git a/versions/alpine_3.9_2.8.1 b/versions/2/alpine_3.9_2.8.1 similarity index 100% rename from versions/alpine_3.9_2.8.1 rename to versions/2/alpine_3.9_2.8.1 diff --git a/versions/alpine_3.9_2.8.2 b/versions/2/alpine_3.9_2.8.2 similarity index 100% rename from versions/alpine_3.9_2.8.2 rename to versions/2/alpine_3.9_2.8.2 diff --git a/versions/alpine_3.9_2.8.3 b/versions/2/alpine_3.9_2.8.3 similarity index 100% rename from versions/alpine_3.9_2.8.3 rename to versions/2/alpine_3.9_2.8.3 diff --git a/versions/alpine_3.9_2.8.4 b/versions/2/alpine_3.9_2.8.4 similarity index 100% rename from versions/alpine_3.9_2.8.4 rename to versions/2/alpine_3.9_2.8.4 diff --git a/versions/alpine_3.9_2.9.0 b/versions/2/alpine_3.9_2.9.0 similarity index 100% rename from versions/alpine_3.9_2.9.0 rename to versions/2/alpine_3.9_2.9.0 diff --git a/versions/alpine_3.9_2.x b/versions/2/alpine_3.9_2.x similarity index 100% rename from versions/alpine_3.9_2.x rename to versions/2/alpine_3.9_2.x diff --git a/versions/centos_7_2.10.2 b/versions/2/centos_7_2.10.2 similarity index 100% rename from versions/centos_7_2.10.2 rename to versions/2/centos_7_2.10.2 diff --git a/versions/centos_7_2.10.3 b/versions/2/centos_7_2.10.3 similarity index 100% rename from versions/centos_7_2.10.3 rename to versions/2/centos_7_2.10.3 diff --git a/versions/centos_7_2.10.4 b/versions/2/centos_7_2.10.4 similarity index 100% rename from versions/centos_7_2.10.4 rename to versions/2/centos_7_2.10.4 diff --git a/versions/centos_7_2.x b/versions/2/centos_7_2.x similarity index 100% rename from versions/centos_7_2.x rename to versions/2/centos_7_2.x diff --git a/versions/ubuntu_20.04_2.10.2 b/versions/2/ubuntu_20.04_2.10.2 similarity index 100% rename from versions/ubuntu_20.04_2.10.2 rename to versions/2/ubuntu_20.04_2.10.2 diff --git a/versions/ubuntu_20.04_2.10.3 b/versions/2/ubuntu_20.04_2.10.3 similarity index 100% rename from versions/ubuntu_20.04_2.10.3 rename to versions/2/ubuntu_20.04_2.10.3 diff --git a/versions/ubuntu_20.04_2.10.4 b/versions/2/ubuntu_20.04_2.10.4 similarity index 100% rename from versions/ubuntu_20.04_2.10.4 rename to versions/2/ubuntu_20.04_2.10.4 From 22b9e2f1670eff349fa5a7fa17172a0c6c61e83a Mon Sep 17 00:00:00 2001 From: Yaroslav Lobankov Date: Fri, 17 Feb 2023 15:43:09 +0400 Subject: [PATCH 257/286] Add missing alpine_3.15_1.10.14 version file --- versions/1/alpine_3.15_1.10.14 | 1 + 1 file changed, 1 insertion(+) create mode 100644 versions/1/alpine_3.15_1.10.14 diff --git a/versions/1/alpine_3.15_1.10.14 b/versions/1/alpine_3.15_1.10.14 new file mode 100644 index 0000000..9c3b4e6 --- /dev/null +++ b/versions/1/alpine_3.15_1.10.14 @@ -0,0 +1 @@ +1.10.14-0-g95447943d From ea1f9bb0764c2d4eeb403630ab8fc971f4f535ff Mon Sep 17 00:00:00 2001 From: Yaroslav Lobankov Date: Fri, 17 Feb 2023 15:44:05 +0400 Subject: [PATCH 258/286] Add alpine_3.15_1.x instead of alpine_3.9_1.x --- versions/1/alpine_3.15_1.x | 1 + versions/1/alpine_3.9_1.x | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 versions/1/alpine_3.15_1.x delete mode 100644 versions/1/alpine_3.9_1.x diff --git a/versions/1/alpine_3.15_1.x b/versions/1/alpine_3.15_1.x new file mode 100644 index 0000000..9c3b4e6 --- /dev/null +++ b/versions/1/alpine_3.15_1.x @@ -0,0 +1 @@ +1.10.14-0-g95447943d diff --git a/versions/1/alpine_3.9_1.x b/versions/1/alpine_3.9_1.x deleted file mode 100644 index a62d73a..0000000 --- a/versions/1/alpine_3.9_1.x +++ /dev/null @@ -1 +0,0 @@ -1.10.13-0-g1d2c5aad5 From cb453e5d6d1c0f5ea67bb006abab8e60cab3e91d Mon Sep 17 00:00:00 2001 From: Yaroslav Lobankov Date: Fri, 17 Feb 2023 15:59:25 +0400 Subject: [PATCH 259/286] Make versions/1/centos_7_1.x up-to-date --- versions/1/centos_7_1.x | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/1/centos_7_1.x b/versions/1/centos_7_1.x index a296e63..9c3b4e6 100644 --- a/versions/1/centos_7_1.x +++ b/versions/1/centos_7_1.x @@ -1 +1 @@ -1.10.12-0-g7f88f54fe +1.10.14-0-g95447943d From 5e3fce8d860b90bf5b27750c45da9185aa9ca524 Mon Sep 17 00:00:00 2001 From: Yaroslav Lobankov Date: Fri, 17 Feb 2023 15:56:02 +0400 Subject: [PATCH 260/286] Add alpine_3.15_2.x instead of alpine_3.9_2.x --- versions/2/alpine_3.15_2.x | 1 + versions/2/alpine_3.9_2.x | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 versions/2/alpine_3.15_2.x delete mode 100644 versions/2/alpine_3.9_2.x diff --git a/versions/2/alpine_3.15_2.x b/versions/2/alpine_3.15_2.x new file mode 100644 index 0000000..5bda9d0 --- /dev/null +++ b/versions/2/alpine_3.15_2.x @@ -0,0 +1 @@ +2.10.4-0-g816000e10 diff --git a/versions/2/alpine_3.9_2.x b/versions/2/alpine_3.9_2.x deleted file mode 100644 index 9181f8d..0000000 --- a/versions/2/alpine_3.9_2.x +++ /dev/null @@ -1 +0,0 @@ -2.8.4-0-g47e6bd362 From 5ce3bfddd699079e1692f3ce03ec3f9dba2600e2 Mon Sep 17 00:00:00 2001 From: Yaroslav Lobankov Date: Fri, 17 Feb 2023 16:25:43 +0400 Subject: [PATCH 261/286] Make versions/2/centos_7_2.x up-to-date --- versions/2/centos_7_2.x | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/2/centos_7_2.x b/versions/2/centos_7_2.x index b97ffcf..f5ad1fa 100644 --- a/versions/2/centos_7_2.x +++ b/versions/2/centos_7_2.x @@ -1 +1 @@ -2.8.3-0-g01023dbc2 +2.10.4-1.el7 From 75dbe7abd0327ec4c09b97a35c4dc24fbfa3a630 Mon Sep 17 00:00:00 2001 From: Yaroslav Lobankov Date: Fri, 17 Feb 2023 16:28:33 +0400 Subject: [PATCH 262/286] Fix wrong versions in alpine_3.15_2.10.N files --- versions/2/alpine_3.15_2.10.0 | 2 +- versions/2/alpine_3.15_2.10.2 | 2 +- versions/2/alpine_3.15_2.10.3 | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/versions/2/alpine_3.15_2.10.0 b/versions/2/alpine_3.15_2.10.0 index 71cb739..69ed7ea 100644 --- a/versions/2/alpine_3.15_2.10.0 +++ b/versions/2/alpine_3.15_2.10.0 @@ -1 +1 @@ -2.10.0-1-g370040ca1 +2.10.0-0-g0a5ce0b9c diff --git a/versions/2/alpine_3.15_2.10.2 b/versions/2/alpine_3.15_2.10.2 index b2eccf2..df0c67a 100644 --- a/versions/2/alpine_3.15_2.10.2 +++ b/versions/2/alpine_3.15_2.10.2 @@ -1,2 +1,2 @@ -2.10.2-5-g399bea26a +2.10.2-0-gb924f0b4a diff --git a/versions/2/alpine_3.15_2.10.3 b/versions/2/alpine_3.15_2.10.3 index a08d627..19cbb9e 100644 --- a/versions/2/alpine_3.15_2.10.3 +++ b/versions/2/alpine_3.15_2.10.3 @@ -1 +1 @@ -2.10.3-4-g13a839e85 +2.10.3-0-g8aca8a19a From 810cc23fe213d721755353828be828c77d2effa3 Mon Sep 17 00:00:00 2001 From: Yaroslav Lobankov Date: Fri, 17 Feb 2023 18:29:00 +0400 Subject: [PATCH 263/286] Add missing centos_7_2.10.0 version file --- versions/2/centos_7_2.10.0 | 1 + 1 file changed, 1 insertion(+) create mode 100644 versions/2/centos_7_2.10.0 diff --git a/versions/2/centos_7_2.10.0 b/versions/2/centos_7_2.10.0 new file mode 100644 index 0000000..56452f1 --- /dev/null +++ b/versions/2/centos_7_2.10.0 @@ -0,0 +1 @@ +2.10.0-1.el7 From 0e7c3d136acee5aa0ff5d927b6ea6ae21bc44b49 Mon Sep 17 00:00:00 2001 From: Yaroslav Lobankov Date: Fri, 17 Feb 2023 18:33:17 +0400 Subject: [PATCH 264/286] Add missing ubuntu_20.04_2.10.0 version file --- versions/2/ubuntu_20.04_2.10.0 | 1 + 1 file changed, 1 insertion(+) create mode 100644 versions/2/ubuntu_20.04_2.10.0 diff --git a/versions/2/ubuntu_20.04_2.10.0 b/versions/2/ubuntu_20.04_2.10.0 new file mode 100644 index 0000000..7cd57c6 --- /dev/null +++ b/versions/2/ubuntu_20.04_2.10.0 @@ -0,0 +1 @@ +2.10.0.g0a5ce0b9c-1 From 47249d5904e1b936d04e0be1cda61f4eaf056c24 Mon Sep 17 00:00:00 2001 From: Yaroslav Lobankov Date: Fri, 17 Feb 2023 18:35:15 +0400 Subject: [PATCH 265/286] Remove ancient .gitlab-ci.yml file --- .gitlab-ci.yml | 607 ------------------------------------------------- 1 file changed, 607 deletions(-) delete mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index aef21ab..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,607 +0,0 @@ -stages: - - build - -variables: - REGISTRY: registry.gitlab.com - IMAGE: ${REGISTRY}/${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME} - CHECK_GIT: git diff origin/master --name-only - -before_script: - # Enable GitLab registry - - docker login -u gitlab-ci-token -p ${CI_BUILD_TOKEN} ${REGISTRY} - -.build_template: &build_definition - stage: build - tags: - - deploy_test - interruptible: true - script: - - > - if [ ${CI_COMMIT_REF_NAME} = master ] || \ - ${CHECK_GIT} | grep "^versions/${OS}_${DIST}_${VER}$" || \ - ${CHECK_GIT} | grep "^dockerfiles/${OS}_${DIST}_${DOCKERFILE_NAME_SUFFIX}$" || \ - ${CHECK_GIT} | grep "^files/" || \ - ${CHECK_GIT} | grep "^.gitlab-ci.yml$" || \ - ${CHECK_GIT} | grep "^.gitlab.mk$" - then - make -f .gitlab.mk build - fi; - -# ############## -# ALPINE 3.5/3.9 -# ############## - -# Tarantool branch 1.10 - -'alpine 3.5 1.10.0': - <<: *build_definition - when: manual - variables: - OS: 'alpine' - DIST: '3.5' - TAG: '1.10.0' - VER: '1.10.0' - PORT: 5101 - ENABLE_BUNDLED_LIBYAML: 'OFF' - -'alpine 3.5 1.10.1': - <<: *build_definition - when: manual - variables: - OS: 'alpine' - DIST: '3.5' - TAG: '1.10.1' - VER: '1.10.1' - PORT: 5101 - ENABLE_BUNDLED_LIBYAML: 'OFF' - -'alpine 3.5 1.10.2': - <<: *build_definition - when: manual - variables: - OS: 'alpine' - DIST: '3.5' - TAG: '1.10.2' - VER: '1.10.2' - PORT: 5102 - ENABLE_BUNDLED_LIBYAML: 'OFF' - -'alpine 3.5 1.10.3': - <<: *build_definition - when: manual - variables: - OS: 'alpine' - DIST: '3.5' - TAG: '1.10.3' - VER: '1.10.3' - PORT: 5103 - ENABLE_BUNDLED_LIBYAML: 'OFF' - -'alpine 3.9 1.10.4': - <<: *build_definition - when: manual - variables: - OS: 'alpine' - DIST: '3.9' - TAG: '1.10.4' - VER: '1.10.4' - PORT: 5104 - ROCKS_INSTALLER: 'luarocks' - ENABLE_BUNDLED_LIBYAML: 'OFF' - -'alpine 3.9 1.10.5': - <<: *build_definition - when: manual - variables: - OS: 'alpine' - DIST: '3.9' - TAG: '1.10.5' - VER: '1.10.5' - PORT: 5105 - ROCKS_INSTALLER: 'luarocks' - ENABLE_BUNDLED_LIBYAML: 'OFF' - -'alpine 3.9 1.10.6': - <<: *build_definition - when: manual - variables: - OS: 'alpine' - DIST: '3.9' - TAG: '1.10.6' - VER: '1.10.6' - PORT: 5106 - ROCKS_INSTALLER: 'luarocks' - ENABLE_BUNDLED_LIBYAML: 'OFF' - -'alpine 3.9 1.10.7': - <<: *build_definition - when: manual - variables: - OS: 'alpine' - DIST: '3.9' - TAG: '1.10.7' - VER: '1.10.7' - PORT: 5107 - ROCKS_INSTALLER: 'luarocks' - -'alpine 3.9 1.10.8': - <<: *build_definition - when: manual - variables: - OS: 'alpine' - DIST: '3.9' - TAG: '1.10.8' - VER: '1.10.8' - PORT: 5108 - ROCKS_INSTALLER: 'luarocks' - -'alpine 3.9 1.10.9': - <<: *build_definition - when: manual - variables: - OS: 'alpine' - DIST: '3.9' - TAG: '1.10.9' - VER: '1.10.9' - PORT: 5109 - ROCKS_INSTALLER: 'luarocks' - -'alpine 3.9 1.10.10': - <<: *build_definition - when: manual - variables: - OS: 'alpine' - DIST: '3.9' - TAG: '1.10.10' - VER: '1.10.10' - PORT: 5110 - ROCKS_INSTALLER: 'luarocks' - -'alpine 3.9 1.x': - <<: *build_definition - variables: - OS: 'alpine' - DIST: '3.9' - TAG: '1' - VER: '1.x' - PORT: 5100 - ROCKS_INSTALLER: 'luarocks' - -# Tarantool branch 2.1 - -'alpine 3.5 2.1.0': - <<: *build_definition - when: manual - variables: - OS: 'alpine' - DIST: '3.5' - TAG: '2.1.0' - VER: '2.1.0' - PORT: 5211 - ENABLE_BUNDLED_LIBYAML: 'OFF' - -'alpine 3.5 2.1.1': - <<: *build_definition - when: manual - variables: - OS: 'alpine' - DIST: '3.5' - TAG: '2.1.1' - VER: '2.1.1' - PORT: 5211 - ENABLE_BUNDLED_LIBYAML: 'OFF' - -'alpine 3.5 2.1.2': - <<: *build_definition - when: manual - variables: - OS: 'alpine' - DIST: '3.5' - TAG: '2.1.2' - VER: '2.1.2' - PORT: 5212 - ENABLE_BUNDLED_LIBYAML: 'OFF' - -'alpine 3.9 2.1.3': - <<: *build_definition - when: manual - variables: - OS: 'alpine' - DIST: '3.9' - TAG: '2.1.3' - VER: '2.1.3' - PORT: 5213 - ROCKS_INSTALLER: 'luarocks' - ENABLE_BUNDLED_LIBYAML: 'OFF' - -'alpine 3.9 2.1': - <<: *build_definition - when: manual - variables: - OS: 'alpine' - DIST: '3.9' - TAG: '2.1' - VER: '2.1' - PORT: 5210 - ROCKS_INSTALLER: 'luarocks' - ENABLE_BUNDLED_LIBYAML: 'OFF' - -# Tarantool branch 2.2 - -'alpine 3.5 2.2.0': - <<: *build_definition - when: manual - variables: - OS: 'alpine' - DIST: '3.5' - TAG: '2.2.0' - VER: '2.2.0' - PORT: 5220 - ENABLE_BUNDLED_LIBYAML: 'OFF' - -'alpine 3.5 2.2.1': - <<: *build_definition - when: manual - variables: - OS: 'alpine' - DIST: '3.5' - TAG: '2.2.1' - VER: '2.2.1' - PORT: 5221 - -'alpine 3.9 2.2.2': - <<: *build_definition - when: manual - variables: - OS: 'alpine' - DIST: '3.9' - TAG: '2.2.2' - VER: '2.2.2' - PORT: 5222 - -'alpine 3.9 2.2.3': - <<: *build_definition - when: manual - variables: - OS: 'alpine' - DIST: '3.9' - TAG: '2.2.3' - VER: '2.2.3' - PORT: 5223 - -'alpine 3.9 2.2': - <<: *build_definition - when: manual - variables: - OS: 'alpine' - DIST: '3.9' - TAG: '2.2' - VER: '2.2' - PORT: 5220 - -# Tarantool branch 2.3 - -'alpine 3.5 2.3.0': - <<: *build_definition - when: manual - variables: - OS: 'alpine' - DIST: '3.5' - TAG: '2.3.0' - VER: '2.3.0' - PORT: 5231 - -'alpine 3.9 2.3.1': - <<: *build_definition - when: manual - variables: - OS: 'alpine' - DIST: '3.9' - TAG: '2.3.1' - VER: '2.3.1' - PORT: 5231 - -'alpine 3.9 2.3.2': - <<: *build_definition - when: manual - variables: - OS: 'alpine' - DIST: '3.9' - TAG: '2.3.2' - VER: '2.3.2' - PORT: 5231 - -'alpine 3.9 2.3.3': - <<: *build_definition - when: manual - variables: - OS: 'alpine' - DIST: '3.9' - TAG: '2.3.3' - VER: '2.3.3' - PORT: 5233 - -'alpine 3.9 2.3': - <<: *build_definition - when: manual - variables: - OS: 'alpine' - DIST: '3.9' - TAG: '2.3' - VER: '2.3' - PORT: 5230 - -# Tarantool branch 2.4 - -'alpine 3.9 2.4.0': - <<: *build_definition - when: manual - variables: - OS: 'alpine' - DIST: '3.9' - TAG: '2.4.0' - VER: '2.4.0' - PORT: 5241 - -'alpine 3.9 2.4.1': - <<: *build_definition - when: manual - variables: - OS: 'alpine' - DIST: '3.9' - TAG: '2.4.1' - VER: '2.4.1' - PORT: 5241 - -'alpine 3.9 2.4.2': - <<: *build_definition - when: manual - variables: - OS: 'alpine' - DIST: '3.9' - TAG: '2.4.2' - VER: '2.4.2' - PORT: 5242 - -'alpine 3.9 2.4.3': - <<: *build_definition - when: manual - variables: - OS: 'alpine' - DIST: '3.9' - TAG: '2.4.3' - VER: '2.4.3' - PORT: 5243 - -'alpine 3.9 2.4': - <<: *build_definition - when: manual - variables: - OS: 'alpine' - DIST: '3.9' - TAG: '2.4' - VER: '2.4' - PORT: 5240 - -# Tarantool branch 2.5 - -'alpine 3.9 2.5.0': - <<: *build_definition - when: manual - variables: - OS: 'alpine' - DIST: '3.9' - TAG: '2.5.0' - VER: '2.5.0' - PORT: 5251 - -'alpine 3.9 2.5.1': - <<: *build_definition - when: manual - variables: - OS: 'alpine' - DIST: '3.9' - TAG: '2.5.1' - VER: '2.5.1' - PORT: 5252 - -'alpine 3.9 2.5.2': - <<: *build_definition - when: manual - variables: - OS: 'alpine' - DIST: '3.9' - TAG: '2.5.2' - VER: '2.5.2' - PORT: 5253 - -'alpine 3.9 2.5.3': - <<: *build_definition - when: manual - variables: - OS: 'alpine' - DIST: '3.9' - TAG: '2.5.3' - VER: '2.5.3' - PORT: 5254 - -'alpine 3.9 2.5': - <<: *build_definition - when: manual - variables: - OS: 'alpine' - DIST: '3.9' - TAG: '2.5' - VER: '2.5' - PORT: 5250 - -# Tarantool branch 2.6 - -'alpine 3.9 2.6.0': - <<: *build_definition - when: manual - variables: - OS: 'alpine' - DIST: '3.9' - TAG: '2.6.0' - VER: '2.6.0' - PORT: 5260 - -'alpine 3.9 2.6.1': - <<: *build_definition - when: manual - variables: - OS: 'alpine' - DIST: '3.9' - TAG: '2.6.1' - VER: '2.6.1' - PORT: 5261 - -'alpine 3.9 2.6.2': - <<: *build_definition - when: manual - variables: - OS: 'alpine' - DIST: '3.9' - TAG: '2.6.2' - VER: '2.6.2' - PORT: 5262 - -'alpine 3.9 2.6.3': - <<: *build_definition - when: manual - variables: - OS: 'alpine' - DIST: '3.9' - TAG: '2.6.3' - VER: '2.6.3' - PORT: 5263 - -'alpine 3.9 2.6': - <<: *build_definition - variables: - OS: 'alpine' - DIST: '3.9' - TAG: '2.6' - VER: '2.6' - PORT: 5269 - -# Tarantool branch 2.7 - -'alpine 3.9 2.7.0': - <<: *build_definition - when: manual - variables: - OS: 'alpine' - DIST: '3.9' - TAG: '2.7.0' - VER: '2.7.0' - PORT: 5270 - -'alpine 3.9 2.7.1': - <<: *build_definition - when: manual - variables: - OS: 'alpine' - DIST: '3.9' - TAG: '2.7.1' - VER: '2.7.1' - PORT: 5271 - -'alpine 3.9 2.7.2': - <<: *build_definition - when: manual - variables: - OS: 'alpine' - DIST: '3.9' - TAG: '2.7.2' - VER: '2.7.2' - PORT: 5272 - -'alpine 3.9 2.7': - <<: *build_definition - variables: - OS: 'alpine' - DIST: '3.9' - TAG: '2.7' - VER: '2.7' - PORT: 5279 - -# Tarantool branch 2.8 - -'alpine 3.9 2.8.0': - <<: *build_definition - when: manual - variables: - OS: 'alpine' - DIST: '3.9' - TAG: '2.8.0' - VER: '2.8.0' - PORT: 5270 - -'alpine 3.9 2.8.1': - <<: *build_definition - when: manual - variables: - OS: 'alpine' - DIST: '3.9' - TAG: '2.8.1' - VER: '2.8.1' - PORT: 5281 - -'alpine 3.9 2.8': - <<: *build_definition - variables: - OS: 'alpine' - DIST: '3.9' - TAG: '2.8' - VER: '2.8' - PORT: 5289 - -# Tarantool branch master - -'alpine 3.9 2.9.0': - <<: *build_definition - when: manual - variables: - OS: 'alpine' - DIST: '3.9' - TAG: '2.9.0' - VER: '2.9.0' - PORT: 5290 - -'alpine 3.9 2.x': - <<: *build_definition - variables: - OS: 'alpine' - DIST: '3.9' - TAG: '2' - VER: '2.x' - PORT: 5200 - TAG_LATEST: 'latest' - -# ######## -# CentOS 7 -# ######## - -# Tarantool branch 1.10 - -'centos 7 1.x': - <<: *build_definition - variables: - OS: 'centos' - DIST: '7' - TAG: '1.x-centos7' - VER: '1.x' - PORT: 7100 - -# Tarantool branch master - -'centos 7 2.x': - <<: *build_definition - variables: - OS: 'centos' - DIST: '7' - TAG: '2.x-centos7' - VER: '2.x' - PORT: 7200 From e75f71655e42f99180ed24f815bf70722568ba2d Mon Sep 17 00:00:00 2001 From: Yaroslav Lobankov Date: Fri, 17 Feb 2023 18:37:48 +0400 Subject: [PATCH 266/286] Rename .gitlab.mk into .github.mk --- .gitlab.mk => .github.mk | 2 +- README.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) rename .gitlab.mk => .github.mk (96%) diff --git a/.gitlab.mk b/.github.mk similarity index 96% rename from .gitlab.mk rename to .github.mk index 502721f..332d827 100644 --- a/.gitlab.mk +++ b/.github.mk @@ -20,7 +20,7 @@ build: docker run --rm --name tarantool_${TAG} -p ${PORT}:${PORT} -d ${IMAGE}:${TAG} docker exec -t tarantool_${TAG} tarantool_is_up docker stop tarantool_${TAG} - if [ -n "${GITLAB_CI}" ] ; then \ + if [ -n "${GITHUB_CI}" ] ; then \ docker push ${IMAGE}:${TAG} ; \ if [ -n "${TAG_LATEST}" ] ; then \ docker tag ${IMAGE}:${TAG} ${IMAGE}:${TAG_LATEST} ; \ diff --git a/README.md b/README.md index 954e7e8..f4e10d3 100644 --- a/README.md +++ b/README.md @@ -407,7 +407,7 @@ A maintainer is responsible for merging the PR. Say, we have updated 'dockerfiles/alpine_3.9' and want to check it: ```sh -$ TAG=2 OS=alpine DIST=3.9 VER=2.x PORT=5200 make -f .gitlab.mk build +$ TAG=2 OS=alpine DIST=3.9 VER=2.x PORT=5200 make -f .github.mk build $ docker run -it tarantool/tarantool:2 ...perform a test... ``` @@ -513,6 +513,6 @@ Example: ```console $ export TAG=2 $ export OS=alpine DIST=3.9 VER=2.x # double check the values! -$ PORT=5200 make -f .gitlab.mk build +$ PORT=5200 make -f .github.mk build $ docker push tarantool/tarantool:${TAG} ``` From 80cc01ecd565e2b70e118b375a9dd883b86ac6b2 Mon Sep 17 00:00:00 2001 From: Yaroslav Lobankov Date: Sat, 18 Feb 2023 01:11:28 +0400 Subject: [PATCH 267/286] Fix tarantool building on Centos 7 PostgreSQL 9.6 repo has expired and packages `postgresql96-libs` and `postgresql96-devel` are not available anymore. But it looks like we can install them from the standard repo with version 9.2. Not sure that it's important which version is used. So removing irrelevant `postgresql96` stuff and using the standard repo. --- dockerfiles/centos_7 | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/dockerfiles/centos_7 b/dockerfiles/centos_7 index 68dd6be..cdae20f 100644 --- a/dockerfiles/centos_7 +++ b/dockerfiles/centos_7 @@ -24,17 +24,7 @@ ENV GC64=${GC64:-false} \ COPY files/luarocks-config_centos.lua /usr/local/etc/luarocks/config-5.1.lua COPY files/luarocks-config.lua /usr/local/etc/tarantool/rocks/config-5.1.lua -# Set yum repository for Postgresql 9.6 since this version -# has been removed from pgdg repository. -RUN echo $'[pg]\n\ -name=PostgreSQL 9.6 RHEL/CentOS $releasever - $basearch\n\ -baseurl=https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-$basearch\n\ -enabled=1\n\ -gpgcheck=1\n\ -gpgkey=https://download.postgresql.org/pub/repos/yum/RPM-GPG-KEY-PGDG-96\n\ -repo_gpgcheck = 1\n'\ ->> /etc/yum.repos.d/pg.repo \ - && groupadd tarantool \ +RUN groupadd tarantool \ && adduser -g tarantool tarantool \ && yum install -y epel-release \ && if [ "$GC64" = "OFF" ]; then export gc64=""; else export gc64="-gc64"; fi \ @@ -73,7 +63,7 @@ gpgcheck=0\n" > /etc/yum.repos.d/tarantool_2.repo \ && yum -y install tarantool-${TARANTOOL_VERSION} \ tarantool-devel-${TARANTOOL_VERSION} \ mariadb-libs \ - postgresql96-libs \ + postgresql-libs \ cyrus-sasl \ libev \ proj \ @@ -85,7 +75,7 @@ gpgcheck=0\n" > /etc/yum.repos.d/tarantool_2.repo \ cmake \ make \ gcc-c++ \ - postgresql96-devel \ + postgresql-devel \ cyrus-sasl-devel \ libev-devel \ wget \ @@ -115,7 +105,7 @@ gpgcheck=0\n" > /etc/yum.repos.d/tarantool_2.repo \ && yum -y remove \ git \ cmake \ - postgresql96-devel \ + postgresql-devel \ cyrus-sasl-devel \ libev-devel \ wget \ From cd13bcc7dd37eb9d8b33f1e9970c66f60fcac320 Mon Sep 17 00:00:00 2001 From: Yaroslav Lobankov Date: Wed, 22 Feb 2023 09:26:23 +0300 Subject: [PATCH 268/286] Add 1.10.15, 2.10.5, 2.11.0-rc1 versions --- versions/1/alpine_3.15_1.10.15 | 1 + versions/1/alpine_3.15_1.x | 2 +- versions/1/centos_7_1.x | 2 +- versions/2/alpine_3.15_2.10.5 | 1 + versions/2/alpine_3.15_2.11.0-rc1 | 1 + versions/2/alpine_3.15_2.x | 2 +- versions/2/centos_7_2.10.5 | 1 + versions/2/centos_7_2.11.0-rc1 | 1 + versions/2/centos_7_2.x | 2 +- versions/2/ubuntu_20.04_2.10.5 | 1 + versions/2/ubuntu_20.04_2.11.0-rc1 | 1 + 11 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 versions/1/alpine_3.15_1.10.15 create mode 100644 versions/2/alpine_3.15_2.10.5 create mode 100644 versions/2/alpine_3.15_2.11.0-rc1 create mode 100644 versions/2/centos_7_2.10.5 create mode 100644 versions/2/centos_7_2.11.0-rc1 create mode 100644 versions/2/ubuntu_20.04_2.10.5 create mode 100644 versions/2/ubuntu_20.04_2.11.0-rc1 diff --git a/versions/1/alpine_3.15_1.10.15 b/versions/1/alpine_3.15_1.10.15 new file mode 100644 index 0000000..af3e9c9 --- /dev/null +++ b/versions/1/alpine_3.15_1.10.15 @@ -0,0 +1 @@ +1.10.15-0-ge14d0b4ea diff --git a/versions/1/alpine_3.15_1.x b/versions/1/alpine_3.15_1.x index 9c3b4e6..af3e9c9 100644 --- a/versions/1/alpine_3.15_1.x +++ b/versions/1/alpine_3.15_1.x @@ -1 +1 @@ -1.10.14-0-g95447943d +1.10.15-0-ge14d0b4ea diff --git a/versions/1/centos_7_1.x b/versions/1/centos_7_1.x index 9c3b4e6..af3e9c9 100644 --- a/versions/1/centos_7_1.x +++ b/versions/1/centos_7_1.x @@ -1 +1 @@ -1.10.14-0-g95447943d +1.10.15-0-ge14d0b4ea diff --git a/versions/2/alpine_3.15_2.10.5 b/versions/2/alpine_3.15_2.10.5 new file mode 100644 index 0000000..76899fb --- /dev/null +++ b/versions/2/alpine_3.15_2.10.5 @@ -0,0 +1 @@ +2.10.5-0-g87d07d15e diff --git a/versions/2/alpine_3.15_2.11.0-rc1 b/versions/2/alpine_3.15_2.11.0-rc1 new file mode 100644 index 0000000..3f7c0b2 --- /dev/null +++ b/versions/2/alpine_3.15_2.11.0-rc1 @@ -0,0 +1 @@ +2.11.0-rc1-0-ga989cd41b diff --git a/versions/2/alpine_3.15_2.x b/versions/2/alpine_3.15_2.x index 5bda9d0..76899fb 100644 --- a/versions/2/alpine_3.15_2.x +++ b/versions/2/alpine_3.15_2.x @@ -1 +1 @@ -2.10.4-0-g816000e10 +2.10.5-0-g87d07d15e diff --git a/versions/2/centos_7_2.10.5 b/versions/2/centos_7_2.10.5 new file mode 100644 index 0000000..164f74e --- /dev/null +++ b/versions/2/centos_7_2.10.5 @@ -0,0 +1 @@ +2.10.5-1.el7 diff --git a/versions/2/centos_7_2.11.0-rc1 b/versions/2/centos_7_2.11.0-rc1 new file mode 100644 index 0000000..53db131 --- /dev/null +++ b/versions/2/centos_7_2.11.0-rc1 @@ -0,0 +1 @@ +2.11.0~rc1-1.el7 diff --git a/versions/2/centos_7_2.x b/versions/2/centos_7_2.x index f5ad1fa..164f74e 100644 --- a/versions/2/centos_7_2.x +++ b/versions/2/centos_7_2.x @@ -1 +1 @@ -2.10.4-1.el7 +2.10.5-1.el7 diff --git a/versions/2/ubuntu_20.04_2.10.5 b/versions/2/ubuntu_20.04_2.10.5 new file mode 100644 index 0000000..dfeee87 --- /dev/null +++ b/versions/2/ubuntu_20.04_2.10.5 @@ -0,0 +1 @@ +2.10.5.g87d07d15e-1 diff --git a/versions/2/ubuntu_20.04_2.11.0-rc1 b/versions/2/ubuntu_20.04_2.11.0-rc1 new file mode 100644 index 0000000..22b0a0d --- /dev/null +++ b/versions/2/ubuntu_20.04_2.11.0-rc1 @@ -0,0 +1 @@ +2.11.0~rc1-1 From 3e6801b83e95672aed6b5118185188a5e095230d Mon Sep 17 00:00:00 2001 From: Yaroslav Lobankov Date: Wed, 22 Feb 2023 13:10:09 +0300 Subject: [PATCH 269/286] Bump rock versions - vshard 0.1.20 -> 0.1.22 - experationd 1.1.1 -> 1.3.1 - queue 1.2.0 -> 1.2.2 - http 1.3.0 -> 1.4.0 - memcached 1.0.1 -> 1.1.0 - metrics 0.14.0 -> 0.16.0 - mysql 2.1.1 -> 2.1.3 --- dockerfiles/alpine_3.15 | 14 +++++++------- dockerfiles/centos_7 | 14 +++++++------- dockerfiles/ubuntu_20.04 | 14 +++++++------- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/dockerfiles/alpine_3.15 b/dockerfiles/alpine_3.15 index 7ff2901..b67c898 100644 --- a/dockerfiles/alpine_3.15 +++ b/dockerfiles/alpine_3.15 @@ -16,16 +16,16 @@ ENV TARANTOOL_VERSION=${TNT_VER} \ GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ GPERFTOOLS_TAG=gperftools-2.10 \ LUAROCKS_URL=https://github.com/tarantool/luarocks/archive/6e6fe62d9409fe2103c0fd091cccb3da0451faf5.tar.gz \ - LUAROCK_VSHARD_VERSION=0.1.20 \ + LUAROCK_VSHARD_VERSION=0.1.22 \ LUAROCK_AVRO_SCHEMA_VERSION=3.0.6 \ - LUAROCK_EXPERATIOND_VERSION=1.1.1 \ - LUAROCK_QUEUE_VERSION=1.2.0 \ + LUAROCK_EXPERATIOND_VERSION=1.3.1 \ + LUAROCK_QUEUE_VERSION=1.2.2 \ LUAROCK_CONNPOOL_VERSION=1.1.1 \ - LUAROCK_HTTP_VERSION=1.3.0 \ - LUAROCK_MEMCACHED_VERSION=1.0.1 \ - LUAROCK_METRICS_VERSION=0.14.0 \ + LUAROCK_HTTP_VERSION=1.4.0 \ + LUAROCK_MEMCACHED_VERSION=1.1.0 \ + LUAROCK_METRICS_VERSION=0.16.0 \ LUAROCK_TARANTOOL_PG_VERSION=2.0.2 \ - LUAROCK_TARANTOOL_MYSQL_VERSION=2.1.1 \ + LUAROCK_TARANTOOL_MYSQL_VERSION=2.1.3 \ LUAROCK_TARANTOOL_MQTT_VERSION=1.5.1 \ LUAROCK_TARANTOOL_GIS_VERSION=1.0.1 \ LUAROCK_TARANTOOL_PROMETHEUS_VERSION=1.0.4 \ diff --git a/dockerfiles/centos_7 b/dockerfiles/centos_7 index cdae20f..b9ba25c 100644 --- a/dockerfiles/centos_7 +++ b/dockerfiles/centos_7 @@ -6,16 +6,16 @@ ARG TNT_VER \ ENV GC64=${GC64:-false} \ TARANTOOL_VERSION=${TNT_VER} \ - LUAROCK_VSHARD_VERSION=0.1.20 \ + LUAROCK_VSHARD_VERSION=0.1.22 \ LUAROCK_AVRO_SCHEMA_VERSION=3.0.6 \ - LUAROCK_EXPERATIOND_VERSION=1.1.1 \ - LUAROCK_QUEUE_VERSION=1.2.0 \ + LUAROCK_EXPERATIOND_VERSION=1.3.1 \ + LUAROCK_QUEUE_VERSION=1.2.2 \ LUAROCK_CONNPOOL_VERSION=1.1.1 \ - LUAROCK_HTTP_VERSION=1.3.0 \ - LUAROCK_MEMCACHED_VERSION=1.0.1 \ - LUAROCK_METRICS_VERSION=0.14.0 \ + LUAROCK_HTTP_VERSION=1.4.0 \ + LUAROCK_MEMCACHED_VERSION=1.1.0 \ + LUAROCK_METRICS_VERSION=0.16.0 \ LUAROCK_TARANTOOL_PG_VERSION=2.0.2 \ - LUAROCK_TARANTOOL_MYSQL_VERSION=2.1.1 \ + LUAROCK_TARANTOOL_MYSQL_VERSION=2.1.3 \ LUAROCK_TARANTOOL_GIS_VERSION=1.0.1 \ LUAROCK_TARANTOOL_PROMETHEUS_VERSION=1.0.4 \ LUAROCK_TARANTOOL_GPERFTOOLS_VERSION=1.0.1 \ diff --git a/dockerfiles/ubuntu_20.04 b/dockerfiles/ubuntu_20.04 index 3c3a51d..96a7e7b 100644 --- a/dockerfiles/ubuntu_20.04 +++ b/dockerfiles/ubuntu_20.04 @@ -6,16 +6,16 @@ ARG TNT_VER \ ENV GC64=${GC64:-OFF} \ TARANTOOL_VERSION=${TNT_VER} \ - LUAROCK_VSHARD_VERSION=0.1.20 \ + LUAROCK_VSHARD_VERSION=0.1.22 \ LUAROCK_AVRO_SCHEMA_VERSION=3.0.6 \ - LUAROCK_EXPERATIOND_VERSION=1.1.1 \ - LUAROCK_QUEUE_VERSION=1.2.0 \ + LUAROCK_EXPERATIOND_VERSION=1.3.1 \ + LUAROCK_QUEUE_VERSION=1.2.2 \ LUAROCK_CONNPOOL_VERSION=1.1.1 \ - LUAROCK_HTTP_VERSION=1.3.0 \ - LUAROCK_MEMCACHED_VERSION=1.0.1 \ - LUAROCK_METRICS_VERSION=0.14.0 \ + LUAROCK_HTTP_VERSION=1.4.0 \ + LUAROCK_MEMCACHED_VERSION=1.1.0 \ + LUAROCK_METRICS_VERSION=0.16.0 \ LUAROCK_TARANTOOL_PG_VERSION=2.0.2 \ - LUAROCK_TARANTOOL_MYSQL_VERSION=2.1.1 \ + LUAROCK_TARANTOOL_MYSQL_VERSION=2.1.3 \ LUAROCK_TARANTOOL_MQTT_VERSION=1.5.1 \ LUAROCK_TARANTOOL_GIS_VERSION=1.0.1 \ LUAROCK_TARANTOOL_PROMETHEUS_VERSION=1.0.4 \ From 66bdbb9a55fbf89128626155c71bc845ac02bb9c Mon Sep 17 00:00:00 2001 From: Sergey Vorontsov Date: Tue, 28 Feb 2023 18:47:25 +0300 Subject: [PATCH 270/286] Use `/bin/bash` instead of `/bin/sh` for `make` On Linux the `make` program uses `/bin/sh` instead of `/bin/bash` by default and substring expansion like this `${VER:0:1}` doesn't work. Now it is fixed. --- .github.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/.github.mk b/.github.mk index 332d827..7b4c339 100644 --- a/.github.mk +++ b/.github.mk @@ -1,3 +1,4 @@ +SHELL := /bin/bash TNT_VER=$(shell cat versions/$${VER:0:1}/${OS}_${DIST}_${VER}) ROCKS_INSTALLER?='tarantoolctl rocks' ENABLE_BUNDLED_LIBYAML?='ON' From 05fd83017137a951024a2f0414d87a651c0bdc5a Mon Sep 17 00:00:00 2001 From: Sergey Vorontsov Date: Fri, 10 Mar 2023 13:59:27 +0300 Subject: [PATCH 271/286] Bump version tarantool to 2.11.0-rc2 --- versions/2/alpine_3.15_2.11.0-rc2 | 1 + versions/2/centos_7_2.11.0-rc2 | 1 + versions/2/ubuntu_20.04_2.11.0-rc2 | 1 + 3 files changed, 3 insertions(+) create mode 100644 versions/2/alpine_3.15_2.11.0-rc2 create mode 100644 versions/2/centos_7_2.11.0-rc2 create mode 100644 versions/2/ubuntu_20.04_2.11.0-rc2 diff --git a/versions/2/alpine_3.15_2.11.0-rc2 b/versions/2/alpine_3.15_2.11.0-rc2 new file mode 100644 index 0000000..5335564 --- /dev/null +++ b/versions/2/alpine_3.15_2.11.0-rc2 @@ -0,0 +1 @@ +2.11.0-rc2-0-g2ae0c94a2 diff --git a/versions/2/centos_7_2.11.0-rc2 b/versions/2/centos_7_2.11.0-rc2 new file mode 100644 index 0000000..53401ae --- /dev/null +++ b/versions/2/centos_7_2.11.0-rc2 @@ -0,0 +1 @@ +2.11.0~rc2-1.el7 diff --git a/versions/2/ubuntu_20.04_2.11.0-rc2 b/versions/2/ubuntu_20.04_2.11.0-rc2 new file mode 100644 index 0000000..2079ddf --- /dev/null +++ b/versions/2/ubuntu_20.04_2.11.0-rc2 @@ -0,0 +1 @@ +2.11.0~rc2-1 From 847c362bda754f12d2728b8c97e5671b4e6093b3 Mon Sep 17 00:00:00 2001 From: Sergey Vorontsov Date: Wed, 15 Mar 2023 13:09:24 +0300 Subject: [PATCH 272/286] Remove mqtt rock from ubuntu docker image Mqtt rock was removed because it can't be installed in ubuntu arm image due to tarantool/mqtt#46. --- dockerfiles/ubuntu_20.04 | 2 -- 1 file changed, 2 deletions(-) diff --git a/dockerfiles/ubuntu_20.04 b/dockerfiles/ubuntu_20.04 index 96a7e7b..ce770f7 100644 --- a/dockerfiles/ubuntu_20.04 +++ b/dockerfiles/ubuntu_20.04 @@ -16,7 +16,6 @@ ENV GC64=${GC64:-OFF} \ LUAROCK_METRICS_VERSION=0.16.0 \ LUAROCK_TARANTOOL_PG_VERSION=2.0.2 \ LUAROCK_TARANTOOL_MYSQL_VERSION=2.1.3 \ - LUAROCK_TARANTOOL_MQTT_VERSION=1.5.1 \ LUAROCK_TARANTOOL_GIS_VERSION=1.0.1 \ LUAROCK_TARANTOOL_PROMETHEUS_VERSION=1.0.4 \ LUAROCK_TARANTOOL_GPERFTOOLS_VERSION=1.0.1 @@ -65,7 +64,6 @@ RUN set -x \ && tarantoolctl rocks install memcached $LUAROCK_MEMCACHED_VERSION \ && tarantoolctl rocks install metrics $LUAROCK_METRICS_VERSION \ && tarantoolctl rocks install prometheus $LUAROCK_TARANTOOL_PROMETHEUS_VERSION \ - && tarantoolctl rocks install mqtt $LUAROCK_TARANTOOL_MQTT_VERSION \ && tarantoolctl rocks install gis $LUAROCK_TARANTOOL_GIS_VERSION \ && tarantoolctl rocks install gperftools $LUAROCK_TARANTOOL_GPERFTOOLS_VERSION \ && apt purge -y unzip curl git gcc cmake \ From 4932d4d0f21724ba6cefb5d4b13e81b89a114eda Mon Sep 17 00:00:00 2001 From: Sergey Vorontsov Date: Wed, 29 Mar 2023 13:55:38 +0300 Subject: [PATCH 273/286] Bump version tarantool to 2.10.6 --- versions/2/alpine_3.15_2.10.6 | 1 + versions/2/alpine_3.15_2.x | 2 +- versions/2/centos_7_2.10.6 | 1 + versions/2/centos_7_2.x | 2 +- versions/2/ubuntu_20.04_2.10.6 | 1 + 5 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 versions/2/alpine_3.15_2.10.6 create mode 100644 versions/2/centos_7_2.10.6 create mode 100644 versions/2/ubuntu_20.04_2.10.6 diff --git a/versions/2/alpine_3.15_2.10.6 b/versions/2/alpine_3.15_2.10.6 new file mode 100644 index 0000000..b9845a5 --- /dev/null +++ b/versions/2/alpine_3.15_2.10.6 @@ -0,0 +1 @@ +2.10.6-0-g3990f976b diff --git a/versions/2/alpine_3.15_2.x b/versions/2/alpine_3.15_2.x index 76899fb..b9845a5 100644 --- a/versions/2/alpine_3.15_2.x +++ b/versions/2/alpine_3.15_2.x @@ -1 +1 @@ -2.10.5-0-g87d07d15e +2.10.6-0-g3990f976b diff --git a/versions/2/centos_7_2.10.6 b/versions/2/centos_7_2.10.6 new file mode 100644 index 0000000..4247b6e --- /dev/null +++ b/versions/2/centos_7_2.10.6 @@ -0,0 +1 @@ +2.10.6-1.el7 diff --git a/versions/2/centos_7_2.x b/versions/2/centos_7_2.x index 164f74e..4247b6e 100644 --- a/versions/2/centos_7_2.x +++ b/versions/2/centos_7_2.x @@ -1 +1 @@ -2.10.5-1.el7 +2.10.6-1.el7 diff --git a/versions/2/ubuntu_20.04_2.10.6 b/versions/2/ubuntu_20.04_2.10.6 new file mode 100644 index 0000000..b535a26 --- /dev/null +++ b/versions/2/ubuntu_20.04_2.10.6 @@ -0,0 +1 @@ +2.10.6.g3990f976b-1 From 2c809e8e7ef4ccfd8c7a41ea42df9da6ddff5cce Mon Sep 17 00:00:00 2001 From: Sergey Vorontsov Date: Fri, 26 May 2023 13:28:31 +0300 Subject: [PATCH 274/286] Bump rock versions - vshard 0.1.22 -> 0.1.24 - avro schema 3.0.6 -> 3.1.0 - queue 1.2.2 -> 1.3.0 - memcached 1.1.0 -> 1.1.1 - metrics 0.16.0 -> 1.0.0 --- dockerfiles/alpine_3.15 | 10 +++++----- dockerfiles/centos_7 | 10 +++++----- dockerfiles/ubuntu_20.04 | 10 +++++----- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/dockerfiles/alpine_3.15 b/dockerfiles/alpine_3.15 index b67c898..336ca3c 100644 --- a/dockerfiles/alpine_3.15 +++ b/dockerfiles/alpine_3.15 @@ -16,14 +16,14 @@ ENV TARANTOOL_VERSION=${TNT_VER} \ GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ GPERFTOOLS_TAG=gperftools-2.10 \ LUAROCKS_URL=https://github.com/tarantool/luarocks/archive/6e6fe62d9409fe2103c0fd091cccb3da0451faf5.tar.gz \ - LUAROCK_VSHARD_VERSION=0.1.22 \ - LUAROCK_AVRO_SCHEMA_VERSION=3.0.6 \ + LUAROCK_VSHARD_VERSION=0.1.24 \ + LUAROCK_AVRO_SCHEMA_VERSION=3.1.0 \ LUAROCK_EXPERATIOND_VERSION=1.3.1 \ - LUAROCK_QUEUE_VERSION=1.2.2 \ + LUAROCK_QUEUE_VERSION=1.3.0 \ LUAROCK_CONNPOOL_VERSION=1.1.1 \ LUAROCK_HTTP_VERSION=1.4.0 \ - LUAROCK_MEMCACHED_VERSION=1.1.0 \ - LUAROCK_METRICS_VERSION=0.16.0 \ + LUAROCK_MEMCACHED_VERSION=1.1.1 \ + LUAROCK_METRICS_VERSION=1.0.0 \ LUAROCK_TARANTOOL_PG_VERSION=2.0.2 \ LUAROCK_TARANTOOL_MYSQL_VERSION=2.1.3 \ LUAROCK_TARANTOOL_MQTT_VERSION=1.5.1 \ diff --git a/dockerfiles/centos_7 b/dockerfiles/centos_7 index b9ba25c..92c8712 100644 --- a/dockerfiles/centos_7 +++ b/dockerfiles/centos_7 @@ -6,14 +6,14 @@ ARG TNT_VER \ ENV GC64=${GC64:-false} \ TARANTOOL_VERSION=${TNT_VER} \ - LUAROCK_VSHARD_VERSION=0.1.22 \ - LUAROCK_AVRO_SCHEMA_VERSION=3.0.6 \ + LUAROCK_VSHARD_VERSION=0.1.24 \ + LUAROCK_AVRO_SCHEMA_VERSION=3.1.0 \ LUAROCK_EXPERATIOND_VERSION=1.3.1 \ - LUAROCK_QUEUE_VERSION=1.2.2 \ + LUAROCK_QUEUE_VERSION=1.3.0 \ LUAROCK_CONNPOOL_VERSION=1.1.1 \ LUAROCK_HTTP_VERSION=1.4.0 \ - LUAROCK_MEMCACHED_VERSION=1.1.0 \ - LUAROCK_METRICS_VERSION=0.16.0 \ + LUAROCK_MEMCACHED_VERSION=1.1.1 \ + LUAROCK_METRICS_VERSION=1.0.0 \ LUAROCK_TARANTOOL_PG_VERSION=2.0.2 \ LUAROCK_TARANTOOL_MYSQL_VERSION=2.1.3 \ LUAROCK_TARANTOOL_GIS_VERSION=1.0.1 \ diff --git a/dockerfiles/ubuntu_20.04 b/dockerfiles/ubuntu_20.04 index ce770f7..fd105ca 100644 --- a/dockerfiles/ubuntu_20.04 +++ b/dockerfiles/ubuntu_20.04 @@ -6,14 +6,14 @@ ARG TNT_VER \ ENV GC64=${GC64:-OFF} \ TARANTOOL_VERSION=${TNT_VER} \ - LUAROCK_VSHARD_VERSION=0.1.22 \ - LUAROCK_AVRO_SCHEMA_VERSION=3.0.6 \ + LUAROCK_VSHARD_VERSION=0.1.24 \ + LUAROCK_AVRO_SCHEMA_VERSION=3.1.0 \ LUAROCK_EXPERATIOND_VERSION=1.3.1 \ - LUAROCK_QUEUE_VERSION=1.2.2 \ + LUAROCK_QUEUE_VERSION=1.3.0 \ LUAROCK_CONNPOOL_VERSION=1.1.1 \ LUAROCK_HTTP_VERSION=1.4.0 \ - LUAROCK_MEMCACHED_VERSION=1.1.0 \ - LUAROCK_METRICS_VERSION=0.16.0 \ + LUAROCK_MEMCACHED_VERSION=1.1.1 \ + LUAROCK_METRICS_VERSION=1.0.0 \ LUAROCK_TARANTOOL_PG_VERSION=2.0.2 \ LUAROCK_TARANTOOL_MYSQL_VERSION=2.1.3 \ LUAROCK_TARANTOOL_GIS_VERSION=1.0.1 \ From 8c1fa910681b63ca695caa039675bc633c641fd9 Mon Sep 17 00:00:00 2001 From: Sergey Vorontsov Date: Fri, 26 May 2023 13:32:36 +0300 Subject: [PATCH 275/286] Add tarantool version 2.10.7 --- versions/2/alpine_3.15_2.10.7 | 1 + versions/2/centos_7_2.10.7 | 1 + versions/2/ubuntu_20.04_2.10.7 | 1 + 3 files changed, 3 insertions(+) create mode 100644 versions/2/alpine_3.15_2.10.7 create mode 100644 versions/2/centos_7_2.10.7 create mode 100644 versions/2/ubuntu_20.04_2.10.7 diff --git a/versions/2/alpine_3.15_2.10.7 b/versions/2/alpine_3.15_2.10.7 new file mode 100644 index 0000000..51e053d --- /dev/null +++ b/versions/2/alpine_3.15_2.10.7 @@ -0,0 +1 @@ +2.10.7-0-g60f7e1858 diff --git a/versions/2/centos_7_2.10.7 b/versions/2/centos_7_2.10.7 new file mode 100644 index 0000000..eab62a0 --- /dev/null +++ b/versions/2/centos_7_2.10.7 @@ -0,0 +1 @@ +2.10.7-1.el7 diff --git a/versions/2/ubuntu_20.04_2.10.7 b/versions/2/ubuntu_20.04_2.10.7 new file mode 100644 index 0000000..9c95510 --- /dev/null +++ b/versions/2/ubuntu_20.04_2.10.7 @@ -0,0 +1 @@ +2.10.7.g60f7e1858-1 From 4662eb007209c828f4ee15631b910a772f0fdb8f Mon Sep 17 00:00:00 2001 From: Sergey Vorontsov Date: Fri, 26 May 2023 13:33:59 +0300 Subject: [PATCH 276/286] Add tarantool version 2.11.0 --- versions/2/alpine_3.15_2.11.0 | 1 + versions/2/alpine_3.15_2.x | 2 +- versions/2/centos_7_2.11.0 | 1 + versions/2/centos_7_2.x | 2 +- versions/2/ubuntu_20.04_2.11.0 | 1 + 5 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 versions/2/alpine_3.15_2.11.0 create mode 100644 versions/2/centos_7_2.11.0 create mode 100644 versions/2/ubuntu_20.04_2.11.0 diff --git a/versions/2/alpine_3.15_2.11.0 b/versions/2/alpine_3.15_2.11.0 new file mode 100644 index 0000000..4fa19c5 --- /dev/null +++ b/versions/2/alpine_3.15_2.11.0 @@ -0,0 +1 @@ +2.11.0-0-g247a9a418 diff --git a/versions/2/alpine_3.15_2.x b/versions/2/alpine_3.15_2.x index b9845a5..4fa19c5 100644 --- a/versions/2/alpine_3.15_2.x +++ b/versions/2/alpine_3.15_2.x @@ -1 +1 @@ -2.10.6-0-g3990f976b +2.11.0-0-g247a9a418 diff --git a/versions/2/centos_7_2.11.0 b/versions/2/centos_7_2.11.0 new file mode 100644 index 0000000..567fc1f --- /dev/null +++ b/versions/2/centos_7_2.11.0 @@ -0,0 +1 @@ +2.11.0-1.el7 diff --git a/versions/2/centos_7_2.x b/versions/2/centos_7_2.x index 4247b6e..567fc1f 100644 --- a/versions/2/centos_7_2.x +++ b/versions/2/centos_7_2.x @@ -1 +1 @@ -2.10.6-1.el7 +2.11.0-1.el7 diff --git a/versions/2/ubuntu_20.04_2.11.0 b/versions/2/ubuntu_20.04_2.11.0 new file mode 100644 index 0000000..7291e2d --- /dev/null +++ b/versions/2/ubuntu_20.04_2.11.0 @@ -0,0 +1 @@ +2.11.0.g247a9a418-1 From 8ca26726ffd89b1f14453b6bc394ef45d7debb86 Mon Sep 17 00:00:00 2001 From: Sergey Vorontsov Date: Thu, 6 Jul 2023 19:25:48 +0300 Subject: [PATCH 277/286] Add missing curl to Alpine Docker image Part of #262 --- dockerfiles/alpine_3.15 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dockerfiles/alpine_3.15 b/dockerfiles/alpine_3.15 index 336ca3c..a206fb6 100644 --- a/dockerfiles/alpine_3.15 +++ b/dockerfiles/alpine_3.15 @@ -224,7 +224,7 @@ RUN set -x \ # gh-170: needed for luarocks and etc RUN apk update \ - && apk add wget git libucontext tzdata + && apk add wget curl git libucontext tzdata RUN mkdir -p /var/lib/tarantool \ && chown tarantool:tarantool /var/lib/tarantool \ From b19dcd3a04307ac3f2cc8e04fcf260a2d82e942c Mon Sep 17 00:00:00 2001 From: Sergey Vorontsov Date: Thu, 6 Jul 2023 19:31:34 +0300 Subject: [PATCH 278/286] Retain wget in CentOS Docker image Part of #262 --- dockerfiles/centos_7 | 1 - 1 file changed, 1 deletion(-) diff --git a/dockerfiles/centos_7 b/dockerfiles/centos_7 index 92c8712..8b13c7a 100644 --- a/dockerfiles/centos_7 +++ b/dockerfiles/centos_7 @@ -108,7 +108,6 @@ gpgcheck=0\n" > /etc/yum.repos.d/tarantool_2.repo \ postgresql-devel \ cyrus-sasl-devel \ libev-devel \ - wget \ proj-devel \ geos-devel \ openssl-devel \ From 9e866cd5d9dd443802dbcd53e7641ca9dc50bf0b Mon Sep 17 00:00:00 2001 From: Sergey Vorontsov Date: Thu, 6 Jul 2023 19:34:05 +0300 Subject: [PATCH 279/286] Add missing wget and retain curl in Ubuntu Docker image Resolve #262 --- dockerfiles/ubuntu_20.04 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dockerfiles/ubuntu_20.04 b/dockerfiles/ubuntu_20.04 index fd105ca..1766ded 100644 --- a/dockerfiles/ubuntu_20.04 +++ b/dockerfiles/ubuntu_20.04 @@ -35,6 +35,7 @@ RUN set -x \ libproj-dev \ gosu \ curl \ + wget \ gnupg2 \ ca-certificates \ apt-transport-https \ @@ -66,7 +67,7 @@ RUN set -x \ && tarantoolctl rocks install prometheus $LUAROCK_TARANTOOL_PROMETHEUS_VERSION \ && tarantoolctl rocks install gis $LUAROCK_TARANTOOL_GIS_VERSION \ && tarantoolctl rocks install gperftools $LUAROCK_TARANTOOL_GPERFTOOLS_VERSION \ - && apt purge -y unzip curl git gcc cmake \ + && apt purge -y unzip git gcc cmake \ && apt -y autoremove \ && rm -rf /var/lib/apt/lists/ From b64b045151174e07b07acfb714cb364ed29864f9 Mon Sep 17 00:00:00 2001 From: Sergey Vorontsov Date: Thu, 24 Aug 2023 14:09:06 +0300 Subject: [PATCH 280/286] Add tarantool version 2.11.1 --- versions/2/alpine_3.15_2.11.1 | 1 + versions/2/alpine_3.15_2.x | 2 +- versions/2/centos_7_2.11.1 | 1 + versions/2/centos_7_2.x | 2 +- versions/2/ubuntu_20.04_2.11.1 | 1 + 5 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 versions/2/alpine_3.15_2.11.1 create mode 100644 versions/2/centos_7_2.11.1 create mode 100644 versions/2/ubuntu_20.04_2.11.1 diff --git a/versions/2/alpine_3.15_2.11.1 b/versions/2/alpine_3.15_2.11.1 new file mode 100644 index 0000000..2b24542 --- /dev/null +++ b/versions/2/alpine_3.15_2.11.1 @@ -0,0 +1 @@ +2.11.1-0-g96877bd35 diff --git a/versions/2/alpine_3.15_2.x b/versions/2/alpine_3.15_2.x index 4fa19c5..2b24542 100644 --- a/versions/2/alpine_3.15_2.x +++ b/versions/2/alpine_3.15_2.x @@ -1 +1 @@ -2.11.0-0-g247a9a418 +2.11.1-0-g96877bd35 diff --git a/versions/2/centos_7_2.11.1 b/versions/2/centos_7_2.11.1 new file mode 100644 index 0000000..1856aa4 --- /dev/null +++ b/versions/2/centos_7_2.11.1 @@ -0,0 +1 @@ +2.11.1-1.el7 diff --git a/versions/2/centos_7_2.x b/versions/2/centos_7_2.x index 567fc1f..1856aa4 100644 --- a/versions/2/centos_7_2.x +++ b/versions/2/centos_7_2.x @@ -1 +1 @@ -2.11.0-1.el7 +2.11.1-1.el7 diff --git a/versions/2/ubuntu_20.04_2.11.1 b/versions/2/ubuntu_20.04_2.11.1 new file mode 100644 index 0000000..1718ea6 --- /dev/null +++ b/versions/2/ubuntu_20.04_2.11.1 @@ -0,0 +1 @@ +2.11.1.g96877bd353-1 From 191b32e51f6ab9790adf10ccc15e4cd15c13e146 Mon Sep 17 00:00:00 2001 From: andreyaksenov Date: Mon, 25 Sep 2023 13:01:42 +0300 Subject: [PATCH 281/286] Replaced tarantoolctl with tt. Part of https://github.com/tarantool/doc/issues/3730 --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f4e10d3..fb5a181 100644 --- a/README.md +++ b/README.md @@ -195,8 +195,8 @@ This `console` doesn't require authentication, because it uses a local Unix socket in the container to connect to Tarantool. However, it requires you to have direct access to the container. -If you need to access a remote console via TCP/IP, use the `tarantoolctl` utility -as explained [here](https://www.tarantool.io/en/doc/latest/reference/tarantoolctl/). +If you need to access a remote console via TCP/IP, use the `tt` utility +as explained [here](https://www.tarantool.io/en/doc/latest/reference/tooling/tt_cli/). ### Start a master-master replica set From 1a4d7858bec5557916d0bf58198af93690a326b5 Mon Sep 17 00:00:00 2001 From: Yaroslav Lobankov Date: Fri, 8 Dec 2023 17:35:43 +0400 Subject: [PATCH 282/286] Add tarantool version 2.10.8 --- versions/2/alpine_3.15_2.10.8 | 1 + versions/2/centos_7_2.10.8 | 1 + versions/2/ubuntu_20.04_2.10.8 | 1 + 3 files changed, 3 insertions(+) create mode 100644 versions/2/alpine_3.15_2.10.8 create mode 100644 versions/2/centos_7_2.10.8 create mode 100644 versions/2/ubuntu_20.04_2.10.8 diff --git a/versions/2/alpine_3.15_2.10.8 b/versions/2/alpine_3.15_2.10.8 new file mode 100644 index 0000000..2d13b98 --- /dev/null +++ b/versions/2/alpine_3.15_2.10.8 @@ -0,0 +1 @@ +2.10.8-0-g4472d9247 diff --git a/versions/2/centos_7_2.10.8 b/versions/2/centos_7_2.10.8 new file mode 100644 index 0000000..7cf05ac --- /dev/null +++ b/versions/2/centos_7_2.10.8 @@ -0,0 +1 @@ +2.10.8-1.el7 diff --git a/versions/2/ubuntu_20.04_2.10.8 b/versions/2/ubuntu_20.04_2.10.8 new file mode 100644 index 0000000..7303c62 --- /dev/null +++ b/versions/2/ubuntu_20.04_2.10.8 @@ -0,0 +1 @@ +2.10.8.g4472d9247-1 From f9dfd59a192bbb45d254bfae145f1216b33b1b2d Mon Sep 17 00:00:00 2001 From: Yaroslav Lobankov Date: Fri, 8 Dec 2023 17:27:57 +0400 Subject: [PATCH 283/286] Add tarantool version 2.11.2 --- versions/2/alpine_3.15_2.10.2 | 1 - versions/2/alpine_3.15_2.11.2 | 1 + versions/2/alpine_3.15_2.x | 2 +- versions/2/centos_7_2.11.2 | 1 + versions/2/centos_7_2.x | 2 +- versions/2/ubuntu_20.04_2.11.2 | 1 + 6 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 versions/2/alpine_3.15_2.11.2 create mode 100644 versions/2/centos_7_2.11.2 create mode 100644 versions/2/ubuntu_20.04_2.11.2 diff --git a/versions/2/alpine_3.15_2.10.2 b/versions/2/alpine_3.15_2.10.2 index df0c67a..a5f0bfe 100644 --- a/versions/2/alpine_3.15_2.10.2 +++ b/versions/2/alpine_3.15_2.10.2 @@ -1,2 +1 @@ 2.10.2-0-gb924f0b4a - diff --git a/versions/2/alpine_3.15_2.11.2 b/versions/2/alpine_3.15_2.11.2 new file mode 100644 index 0000000..c7d0d6f --- /dev/null +++ b/versions/2/alpine_3.15_2.11.2 @@ -0,0 +1 @@ +2.11.2-0-g1bac2d257 diff --git a/versions/2/alpine_3.15_2.x b/versions/2/alpine_3.15_2.x index 2b24542..c7d0d6f 100644 --- a/versions/2/alpine_3.15_2.x +++ b/versions/2/alpine_3.15_2.x @@ -1 +1 @@ -2.11.1-0-g96877bd35 +2.11.2-0-g1bac2d257 diff --git a/versions/2/centos_7_2.11.2 b/versions/2/centos_7_2.11.2 new file mode 100644 index 0000000..14fc809 --- /dev/null +++ b/versions/2/centos_7_2.11.2 @@ -0,0 +1 @@ +2.11.2-1.el7 diff --git a/versions/2/centos_7_2.x b/versions/2/centos_7_2.x index 1856aa4..14fc809 100644 --- a/versions/2/centos_7_2.x +++ b/versions/2/centos_7_2.x @@ -1 +1 @@ -2.11.1-1.el7 +2.11.2-1.el7 diff --git a/versions/2/ubuntu_20.04_2.11.2 b/versions/2/ubuntu_20.04_2.11.2 new file mode 100644 index 0000000..862c72a --- /dev/null +++ b/versions/2/ubuntu_20.04_2.11.2 @@ -0,0 +1 @@ +2.11.2.g1bac2d257b-1 From b2c7efad3483aaa731fce9084b7816b185cf0ebe Mon Sep 17 00:00:00 2001 From: Sergey Vorontsov Date: Thu, 21 Dec 2023 16:47:01 +0300 Subject: [PATCH 284/286] Remove deprecated `prometheus` rock This rock is considered as deprecated and replaced by `metrics`. --- dockerfiles/alpine_3.15 | 3 --- dockerfiles/centos_7 | 2 -- dockerfiles/ubuntu_20.04 | 2 -- 3 files changed, 7 deletions(-) diff --git a/dockerfiles/alpine_3.15 b/dockerfiles/alpine_3.15 index a206fb6..c36b98f 100644 --- a/dockerfiles/alpine_3.15 +++ b/dockerfiles/alpine_3.15 @@ -28,7 +28,6 @@ ENV TARANTOOL_VERSION=${TNT_VER} \ LUAROCK_TARANTOOL_MYSQL_VERSION=2.1.3 \ LUAROCK_TARANTOOL_MQTT_VERSION=1.5.1 \ LUAROCK_TARANTOOL_GIS_VERSION=1.0.1 \ - LUAROCK_TARANTOOL_PROMETHEUS_VERSION=1.0.4 \ LUAROCK_TARANTOOL_GPERFTOOLS_VERSION=1.0.1 COPY files/gperftools_alpine.diff / @@ -211,8 +210,6 @@ RUN set -x \ && ${ROCKS_INSTALLER} install memcached $LUAROCK_MEMCACHED_VERSION \ && : "metrics" \ && ${ROCKS_INSTALLER} install metrics $LUAROCK_METRICS_VERSION \ - && : "prometheus" \ - && ${ROCKS_INSTALLER} install prometheus $LUAROCK_TARANTOOL_PROMETHEUS_VERSION \ && : "mqtt" \ && ${ROCKS_INSTALLER} install mqtt $LUAROCK_TARANTOOL_MQTT_VERSION \ && : "gis" \ diff --git a/dockerfiles/centos_7 b/dockerfiles/centos_7 index 8b13c7a..b63f552 100644 --- a/dockerfiles/centos_7 +++ b/dockerfiles/centos_7 @@ -17,7 +17,6 @@ ENV GC64=${GC64:-false} \ LUAROCK_TARANTOOL_PG_VERSION=2.0.2 \ LUAROCK_TARANTOOL_MYSQL_VERSION=2.1.3 \ LUAROCK_TARANTOOL_GIS_VERSION=1.0.1 \ - LUAROCK_TARANTOOL_PROMETHEUS_VERSION=1.0.4 \ LUAROCK_TARANTOOL_GPERFTOOLS_VERSION=1.0.1 \ GOSU_VERSION=1.14 @@ -97,7 +96,6 @@ gpgcheck=0\n" > /etc/yum.repos.d/tarantool_2.repo \ && tarantoolctl rocks install mysql $LUAROCK_TARANTOOL_MYSQL_VERSION \ && tarantoolctl rocks install memcached $LUAROCK_MEMCACHED_VERSION \ && tarantoolctl rocks install metrics $LUAROCK_METRICS_VERSION \ - && tarantoolctl rocks install prometheus $LUAROCK_TARANTOOL_PROMETHEUS_VERSION \ && tarantoolctl rocks install gis $LUAROCK_TARANTOOL_GIS_VERSION \ && tarantoolctl rocks install gperftools $LUAROCK_TARANTOOL_GPERFTOOLS_VERSION \ && : "---------- remove build deps ----------" \ diff --git a/dockerfiles/ubuntu_20.04 b/dockerfiles/ubuntu_20.04 index 1766ded..f04a7dc 100644 --- a/dockerfiles/ubuntu_20.04 +++ b/dockerfiles/ubuntu_20.04 @@ -17,7 +17,6 @@ ENV GC64=${GC64:-OFF} \ LUAROCK_TARANTOOL_PG_VERSION=2.0.2 \ LUAROCK_TARANTOOL_MYSQL_VERSION=2.1.3 \ LUAROCK_TARANTOOL_GIS_VERSION=1.0.1 \ - LUAROCK_TARANTOOL_PROMETHEUS_VERSION=1.0.4 \ LUAROCK_TARANTOOL_GPERFTOOLS_VERSION=1.0.1 RUN set -x \ @@ -64,7 +63,6 @@ RUN set -x \ && tarantoolctl rocks install mysql $LUAROCK_TARANTOOL_MYSQL_VERSION \ && tarantoolctl rocks install memcached $LUAROCK_MEMCACHED_VERSION \ && tarantoolctl rocks install metrics $LUAROCK_METRICS_VERSION \ - && tarantoolctl rocks install prometheus $LUAROCK_TARANTOOL_PROMETHEUS_VERSION \ && tarantoolctl rocks install gis $LUAROCK_TARANTOOL_GIS_VERSION \ && tarantoolctl rocks install gperftools $LUAROCK_TARANTOOL_GPERFTOOLS_VERSION \ && apt purge -y unzip git gcc cmake \ From c650d7cab4298d6c10eb7d2741751b7a5f5bc542 Mon Sep 17 00:00:00 2001 From: Sergey Vorontsov Date: Thu, 21 Dec 2023 16:57:05 +0300 Subject: [PATCH 285/286] Bump rock versions - vshard 0.1.24 -> 0.1.25 - experationd 1.3.1 -> 1.5.0 - queue 1.3.0 -> 1.3.3 - http 1.4.0 -> 1.5.0 --- dockerfiles/alpine_3.15 | 8 ++++---- dockerfiles/centos_7 | 8 ++++---- dockerfiles/ubuntu_20.04 | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/dockerfiles/alpine_3.15 b/dockerfiles/alpine_3.15 index c36b98f..8e717e6 100644 --- a/dockerfiles/alpine_3.15 +++ b/dockerfiles/alpine_3.15 @@ -16,12 +16,12 @@ ENV TARANTOOL_VERSION=${TNT_VER} \ GPERFTOOLS_REPO=https://github.com/gperftools/gperftools.git \ GPERFTOOLS_TAG=gperftools-2.10 \ LUAROCKS_URL=https://github.com/tarantool/luarocks/archive/6e6fe62d9409fe2103c0fd091cccb3da0451faf5.tar.gz \ - LUAROCK_VSHARD_VERSION=0.1.24 \ + LUAROCK_VSHARD_VERSION=0.1.25 \ LUAROCK_AVRO_SCHEMA_VERSION=3.1.0 \ - LUAROCK_EXPERATIOND_VERSION=1.3.1 \ - LUAROCK_QUEUE_VERSION=1.3.0 \ + LUAROCK_EXPERATIOND_VERSION=1.5.0 \ + LUAROCK_QUEUE_VERSION=1.3.3 \ LUAROCK_CONNPOOL_VERSION=1.1.1 \ - LUAROCK_HTTP_VERSION=1.4.0 \ + LUAROCK_HTTP_VERSION=1.5.0 \ LUAROCK_MEMCACHED_VERSION=1.1.1 \ LUAROCK_METRICS_VERSION=1.0.0 \ LUAROCK_TARANTOOL_PG_VERSION=2.0.2 \ diff --git a/dockerfiles/centos_7 b/dockerfiles/centos_7 index b63f552..2d663cf 100644 --- a/dockerfiles/centos_7 +++ b/dockerfiles/centos_7 @@ -6,12 +6,12 @@ ARG TNT_VER \ ENV GC64=${GC64:-false} \ TARANTOOL_VERSION=${TNT_VER} \ - LUAROCK_VSHARD_VERSION=0.1.24 \ + LUAROCK_VSHARD_VERSION=0.1.25 \ LUAROCK_AVRO_SCHEMA_VERSION=3.1.0 \ - LUAROCK_EXPERATIOND_VERSION=1.3.1 \ - LUAROCK_QUEUE_VERSION=1.3.0 \ + LUAROCK_EXPERATIOND_VERSION=1.5.0 \ + LUAROCK_QUEUE_VERSION=1.3.3 \ LUAROCK_CONNPOOL_VERSION=1.1.1 \ - LUAROCK_HTTP_VERSION=1.4.0 \ + LUAROCK_HTTP_VERSION=1.5.0 \ LUAROCK_MEMCACHED_VERSION=1.1.1 \ LUAROCK_METRICS_VERSION=1.0.0 \ LUAROCK_TARANTOOL_PG_VERSION=2.0.2 \ diff --git a/dockerfiles/ubuntu_20.04 b/dockerfiles/ubuntu_20.04 index f04a7dc..0ffc8b9 100644 --- a/dockerfiles/ubuntu_20.04 +++ b/dockerfiles/ubuntu_20.04 @@ -6,12 +6,12 @@ ARG TNT_VER \ ENV GC64=${GC64:-OFF} \ TARANTOOL_VERSION=${TNT_VER} \ - LUAROCK_VSHARD_VERSION=0.1.24 \ + LUAROCK_VSHARD_VERSION=0.1.25 \ LUAROCK_AVRO_SCHEMA_VERSION=3.1.0 \ - LUAROCK_EXPERATIOND_VERSION=1.3.1 \ - LUAROCK_QUEUE_VERSION=1.3.0 \ + LUAROCK_EXPERATIOND_VERSION=1.5.0 \ + LUAROCK_QUEUE_VERSION=1.3.3 \ LUAROCK_CONNPOOL_VERSION=1.1.1 \ - LUAROCK_HTTP_VERSION=1.4.0 \ + LUAROCK_HTTP_VERSION=1.5.0 \ LUAROCK_MEMCACHED_VERSION=1.1.1 \ LUAROCK_METRICS_VERSION=1.0.0 \ LUAROCK_TARANTOOL_PG_VERSION=2.0.2 \ From 79bf2d18727ad30fadbb40aa491f1acb0a39d9b5 Mon Sep 17 00:00:00 2001 From: Sergey Vorontsov Date: Fri, 22 Dec 2023 12:23:31 +0300 Subject: [PATCH 286/286] Use ROCKS_INSTALLER in centos_7 and ubuntu_20.04 Dockerfiles Add facility to set an alternative rocks installer in centos_7 and ubuntu_20.04 Dockerfiles. --- dockerfiles/centos_7 | 31 ++++++++++++++++--------------- dockerfiles/ubuntu_20.04 | 29 +++++++++++++++-------------- 2 files changed, 31 insertions(+), 29 deletions(-) diff --git a/dockerfiles/centos_7 b/dockerfiles/centos_7 index 2d663cf..d7de56b 100644 --- a/dockerfiles/centos_7 +++ b/dockerfiles/centos_7 @@ -2,7 +2,8 @@ FROM centos:7 LABEL org.opencontainers.image.authors="artembo@me.com; piligrim@rootnix.net" ARG TNT_VER \ - GC64 + GC64 \ + ROCKS_INSTALLER ENV GC64=${GC64:-false} \ TARANTOOL_VERSION=${TNT_VER} \ @@ -84,20 +85,20 @@ gpgcheck=0\n" > /etc/yum.repos.d/tarantool_2.repo \ gperftools-libs \ && ln -s /usr/lib64/libprofiler.so.0 /usr/lib64/libprofiler.so \ && mkdir -p /rocks \ - && tarantoolctl rocks install lua-term \ - && tarantoolctl rocks install vshard $LUAROCK_VSHARD_VERSION \ - && tarantoolctl rocks install checks $LUAROCK_CHECKS_VERSION \ - && tarantoolctl rocks install avro-schema $LUAROCK_AVRO_SCHEMA_VERSION \ - && tarantoolctl rocks install expirationd $LUAROCK_EXPERATIOND_VERSION \ - && tarantoolctl rocks install queue $LUAROCK_QUEUE_VERSION \ - && tarantoolctl rocks install connpool $LUAROCK_CONNPOOL_VERSION \ - && tarantoolctl rocks install http $LUAROCK_HTTP_VERSION \ - && tarantoolctl rocks install pg $LUAROCK_TARANTOOL_PG_VERSION \ - && tarantoolctl rocks install mysql $LUAROCK_TARANTOOL_MYSQL_VERSION \ - && tarantoolctl rocks install memcached $LUAROCK_MEMCACHED_VERSION \ - && tarantoolctl rocks install metrics $LUAROCK_METRICS_VERSION \ - && tarantoolctl rocks install gis $LUAROCK_TARANTOOL_GIS_VERSION \ - && tarantoolctl rocks install gperftools $LUAROCK_TARANTOOL_GPERFTOOLS_VERSION \ + && ${ROCKS_INSTALLER} install lua-term \ + && ${ROCKS_INSTALLER} install vshard $LUAROCK_VSHARD_VERSION \ + && ${ROCKS_INSTALLER} install checks $LUAROCK_CHECKS_VERSION \ + && ${ROCKS_INSTALLER} install avro-schema $LUAROCK_AVRO_SCHEMA_VERSION \ + && ${ROCKS_INSTALLER} install expirationd $LUAROCK_EXPERATIOND_VERSION \ + && ${ROCKS_INSTALLER} install queue $LUAROCK_QUEUE_VERSION \ + && ${ROCKS_INSTALLER} install connpool $LUAROCK_CONNPOOL_VERSION \ + && ${ROCKS_INSTALLER} install http $LUAROCK_HTTP_VERSION \ + && ${ROCKS_INSTALLER} install pg $LUAROCK_TARANTOOL_PG_VERSION \ + && ${ROCKS_INSTALLER} install mysql $LUAROCK_TARANTOOL_MYSQL_VERSION \ + && ${ROCKS_INSTALLER} install memcached $LUAROCK_MEMCACHED_VERSION \ + && ${ROCKS_INSTALLER} install metrics $LUAROCK_METRICS_VERSION \ + && ${ROCKS_INSTALLER} install gis $LUAROCK_TARANTOOL_GIS_VERSION \ + && ${ROCKS_INSTALLER} install gperftools $LUAROCK_TARANTOOL_GPERFTOOLS_VERSION \ && : "---------- remove build deps ----------" \ && rm -rf /rocks \ && yum -y remove \ diff --git a/dockerfiles/ubuntu_20.04 b/dockerfiles/ubuntu_20.04 index 0ffc8b9..36ec589 100644 --- a/dockerfiles/ubuntu_20.04 +++ b/dockerfiles/ubuntu_20.04 @@ -2,7 +2,8 @@ FROM ubuntu:20.04 LABEL org.opencontainers.image.authors="artembo@me.com; piligrim@rootnix.net" ARG TNT_VER \ - GC64 + GC64 \ + ROCKS_INSTALLER ENV GC64=${GC64:-OFF} \ TARANTOOL_VERSION=${TNT_VER} \ @@ -52,19 +53,19 @@ RUN set -x \ && apt -y install tarantool=${TNT_VER} \ && apt -y install tarantool-dev=${TNT_VER} \ && apt clean \ - && tarantoolctl rocks install lua-term \ - && tarantoolctl rocks install avro-schema $LUAROCK_AVRO_SCHEMA_VERSION \ - && tarantoolctl rocks install expirationd $LUAROCK_EXPERATIOND_VERSION \ - && tarantoolctl rocks install queue $LUAROCK_QUEUE_VERSION \ - && tarantoolctl rocks install connpool $LUAROCK_CONNPOOL_VERSION \ - && tarantoolctl rocks install vshard $LUAROCK_VSHARD_VERSION \ - && tarantoolctl rocks install http $LUAROCK_HTTP_VERSION \ - && tarantoolctl rocks install pg $LUAROCK_TARANTOOL_PG_VERSION \ - && tarantoolctl rocks install mysql $LUAROCK_TARANTOOL_MYSQL_VERSION \ - && tarantoolctl rocks install memcached $LUAROCK_MEMCACHED_VERSION \ - && tarantoolctl rocks install metrics $LUAROCK_METRICS_VERSION \ - && tarantoolctl rocks install gis $LUAROCK_TARANTOOL_GIS_VERSION \ - && tarantoolctl rocks install gperftools $LUAROCK_TARANTOOL_GPERFTOOLS_VERSION \ + && ${ROCKS_INSTALLER} install lua-term \ + && ${ROCKS_INSTALLER} install avro-schema $LUAROCK_AVRO_SCHEMA_VERSION \ + && ${ROCKS_INSTALLER} install expirationd $LUAROCK_EXPERATIOND_VERSION \ + && ${ROCKS_INSTALLER} install queue $LUAROCK_QUEUE_VERSION \ + && ${ROCKS_INSTALLER} install connpool $LUAROCK_CONNPOOL_VERSION \ + && ${ROCKS_INSTALLER} install vshard $LUAROCK_VSHARD_VERSION \ + && ${ROCKS_INSTALLER} install http $LUAROCK_HTTP_VERSION \ + && ${ROCKS_INSTALLER} install pg $LUAROCK_TARANTOOL_PG_VERSION \ + && ${ROCKS_INSTALLER} install mysql $LUAROCK_TARANTOOL_MYSQL_VERSION \ + && ${ROCKS_INSTALLER} install memcached $LUAROCK_MEMCACHED_VERSION \ + && ${ROCKS_INSTALLER} install metrics $LUAROCK_METRICS_VERSION \ + && ${ROCKS_INSTALLER} install gis $LUAROCK_TARANTOOL_GIS_VERSION \ + && ${ROCKS_INSTALLER} install gperftools $LUAROCK_TARANTOOL_GPERFTOOLS_VERSION \ && apt purge -y unzip git gcc cmake \ && apt -y autoremove \ && rm -rf /var/lib/apt/lists/