From 04cd17f9963f88461c07181598fbd7f7980e4183 Mon Sep 17 00:00:00 2001 From: Ivan Dneprov Date: Tue, 13 Feb 2024 12:05:16 +0300 Subject: [PATCH 01/12] Use ubuntu 20.04 Use ubuntu 20.04 in cartridge-base Dockerfile as a default os version instead of centos 7 --- src/main/resources/Dockerfile | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/src/main/resources/Dockerfile b/src/main/resources/Dockerfile index 31ae023..10717f5 100644 --- a/src/main/resources/Dockerfile +++ b/src/main/resources/Dockerfile @@ -1,17 +1,25 @@ -ARG TARANTOOL_VERSION=2.11.2-centos7 +ARG TARANTOOL_VERSION=2.11.2-ubuntu20.04 FROM tarantool/tarantool:${TARANTOOL_VERSION} AS cartridge-base # system preparations because docker mount directory as a root -ARG TARANTOOL_SERVER_USER="root" -ARG TARANTOOL_SERVER_GROUP="root" -USER $TARANTOOL_SERVER_USER:$TARANTOOL_SERVER_GROUP -RUN groupadd $TARANTOOL_SERVER_GROUP && useradd -m -s /bin/bash $TARANTOOL_SERVER_USER || true +#ARG TARANTOOL_SERVER_USER="root" +#ARG TARANTOOL_SERVER_GROUP="root" +#USER $TARANTOOL_SERVER_USER:$TARANTOOL_SERVER_GROUP +#RUN groupadd $TARANTOOL_SERVER_GROUP && useradd -m -s /bin/bash $TARANTOOL_SERVER_USER || true # install dependencies # a yum bug requires setting ulimit, see https://bugzilla.redhat.com/show_bug.cgi?id=1537564 -RUN ulimit -n 1024 && \ - yum -y install cmake make gcc gcc-c++ git unzip cartridge-cli && \ - yum clean all +RUN echo "test" +RUN touch /etc/apt/sources.list +RUN echo "deb http://mirror.yandex.ru/ubuntu focal main restricted\ndeb http://mirror.yandex.ru/ubuntu focal-updates main restricted\ndeb http://mirror.yandex.ru/ubuntu focal universe\ndeb http://mirror.yandex.ru/ubuntu focal-updates universe\ndeb http://mirror.yandex.ru/ubuntu focal multiverse\ndeb http://mirror.yandex.ru/ubuntu focal-updates multiverse\ndeb http://mirror.yandex.ru/ubuntu focal-backports main restricted universe multiverse\ndeb http://mirror.yandex.ru/ubuntu focal-security main restricted\ndeb http://mirror.yandex.ru/ubuntu focal-security universe\ndeb http://mirror.yandex.ru/ubuntu focal-security multiverse" > /etc/apt/sources.list +RUN apt-get -y update +RUN apt-get -y install build-essential +RUN apt-get -y install cmake +RUN apt-get -y install make +RUN apt-get -y install gcc +RUN apt-get -y install git +RUN apt-get -y install unzip +RUN apt-get -y install cartridge-cli RUN cartridge version # build and run @@ -31,10 +39,12 @@ ENV TARANTOOL_DATADIR=$TARANTOOL_DATADIR ENV TARANTOOL_LOGDIR=$TARANTOOL_LOGDIR ENV TARANTOOL_INSTANCES_FILE=$TARANTOOL_INSTANCES_FILE ENV TARANTOOL_CLUSTER_COOKIE=$TARANTOOL_CLUSTER_COOKIE +ENV CMAKE_DUMMY_WEBUI="YES" COPY $CARTRIDGE_SRC_DIR $TARANTOOL_WORKDIR WORKDIR $TARANTOOL_WORKDIR -RUN rm -rf .rocks && cartridge build --verbose +RUN rm -rf .rocks +RUN cartridge build --verbose RUN echo 'if [ -z "$TARANTOOL_CLUSTER_COOKIE" ]; then unset TARANTOOL_CLUSTER_COOKIE ; fi ; \ sleep $START_DELAY && cartridge start --run-dir=$TARANTOOL_RUNDIR --data-dir=$TARANTOOL_DATADIR \ From eeef68d95a7697ea072284d97065a443b6e15c18 Mon Sep 17 00:00:00 2001 From: Ivan Dneprov Date: Tue, 13 Feb 2024 14:22:27 +0300 Subject: [PATCH 02/12] fix --- .github/workflows/tests.yml | 4 ++-- pom.xml | 2 +- .../org/testcontainers/containers/TarantoolContainer.java | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0f93c4e..f547252 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -32,7 +32,7 @@ jobs: env: TARANTOOL_SERVER_USER: root TARANTOOL_SERVER_GROUP: root - TARANTOOL_VERSION: "2.11.2-centos7" + TARANTOOL_VERSION: "2.11.2-ubuntu20.04" run: ./mvnw -B test -P integration -Djacoco.destFile=target/jacoco-cartridge-container.exec --file pom.xml - name: Upload jacoco exec results @@ -73,7 +73,7 @@ jobs: timeout-minutes: 25 strategy: matrix: - tarantool-version: [ "1.x-centos7", "2.11.2-centos7", "3.0.1" ] + tarantool-version: [ "1.x-centos7", "2.11.2-ubuntu20.04", "3.0.1" ] fail-fast: false steps: - uses: actions/checkout@v4 diff --git a/pom.xml b/pom.xml index d754592..dd65812 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ io.tarantool testcontainers-java-tarantool jar - 2.0.0-SNAPSHOT + 2.0.0-SNAPSHOT-u TestContainers for Tarantool Dockerized Tarantool and Tarantool Cartridge containers for testing under Testcontainers. diff --git a/src/main/java/org/testcontainers/containers/TarantoolContainer.java b/src/main/java/org/testcontainers/containers/TarantoolContainer.java index 98d48a6..7190ae4 100644 --- a/src/main/java/org/testcontainers/containers/TarantoolContainer.java +++ b/src/main/java/org/testcontainers/containers/TarantoolContainer.java @@ -18,7 +18,7 @@ public class TarantoolContainer extends GenericContainer implements TarantoolContainerOperations { public static final String TARANTOOL_IMAGE = "tarantool/tarantool"; - public static final String DEFAULT_IMAGE_VERSION = "2.11.2-centos7"; + public static final String DEFAULT_IMAGE_VERSION = "2.11.2-ubuntu20.04"; public static final String DEFAULT_TARANTOOL_BASE_IMAGE = String.format("%s:%s", TARANTOOL_IMAGE, DEFAULT_IMAGE_VERSION); From c93d58d912674aadc48c0dc90f817ace8adc4214 Mon Sep 17 00:00:00 2001 From: Ivan Dneprov Date: Tue, 13 Feb 2024 14:30:25 +0300 Subject: [PATCH 03/12] Update changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 08e6971..2d85644 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## [Unreleased] +## [1.3.1] - 2024-02-13 + +- Change `TARANTOOL_VERSION` default value from `2.11.2-centos7` to `2.11.2-ubuntu20.04` and update Dockerfile + ## [1.3.0] - 2024-02-02 - Change `TARANTOOL_VERSION` semantic. Now it's expected to be a full tag, not prefix of centos version. From 5755568a1572843149e32fa98ed82e6ab884cfb8 Mon Sep 17 00:00:00 2001 From: Ivan Dneprov Date: Tue, 13 Feb 2024 14:44:39 +0300 Subject: [PATCH 04/12] Fix by @dkasimovskiy comments --- src/main/resources/Dockerfile | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/src/main/resources/Dockerfile b/src/main/resources/Dockerfile index 10717f5..6272507 100644 --- a/src/main/resources/Dockerfile +++ b/src/main/resources/Dockerfile @@ -1,26 +1,17 @@ ARG TARANTOOL_VERSION=2.11.2-ubuntu20.04 FROM tarantool/tarantool:${TARANTOOL_VERSION} AS cartridge-base -# system preparations because docker mount directory as a root -#ARG TARANTOOL_SERVER_USER="root" -#ARG TARANTOOL_SERVER_GROUP="root" -#USER $TARANTOOL_SERVER_USER:$TARANTOOL_SERVER_GROUP -#RUN groupadd $TARANTOOL_SERVER_GROUP && useradd -m -s /bin/bash $TARANTOOL_SERVER_USER || true - # install dependencies # a yum bug requires setting ulimit, see https://bugzilla.redhat.com/show_bug.cgi?id=1537564 -RUN echo "test" -RUN touch /etc/apt/sources.list -RUN echo "deb http://mirror.yandex.ru/ubuntu focal main restricted\ndeb http://mirror.yandex.ru/ubuntu focal-updates main restricted\ndeb http://mirror.yandex.ru/ubuntu focal universe\ndeb http://mirror.yandex.ru/ubuntu focal-updates universe\ndeb http://mirror.yandex.ru/ubuntu focal multiverse\ndeb http://mirror.yandex.ru/ubuntu focal-updates multiverse\ndeb http://mirror.yandex.ru/ubuntu focal-backports main restricted universe multiverse\ndeb http://mirror.yandex.ru/ubuntu focal-security main restricted\ndeb http://mirror.yandex.ru/ubuntu focal-security universe\ndeb http://mirror.yandex.ru/ubuntu focal-security multiverse" > /etc/apt/sources.list -RUN apt-get -y update -RUN apt-get -y install build-essential -RUN apt-get -y install cmake -RUN apt-get -y install make -RUN apt-get -y install gcc -RUN apt-get -y install git -RUN apt-get -y install unzip -RUN apt-get -y install cartridge-cli -RUN cartridge version +RUN apt-get -y update && \ + apt-get -y install build-essential && \ + apt-get -y install cmake && \ + apt-get -y install make && \ + apt-get -y install gcc && \ + apt-get -y install git && \ + apt-get -y install unzip && \ + apt-get -y install cartridge-cli && \ + cartridge version # build and run FROM cartridge-base AS cartridge-app @@ -43,8 +34,7 @@ ENV CMAKE_DUMMY_WEBUI="YES" COPY $CARTRIDGE_SRC_DIR $TARANTOOL_WORKDIR WORKDIR $TARANTOOL_WORKDIR -RUN rm -rf .rocks -RUN cartridge build --verbose +RUN rm -rf .rocks && cartridge build --verbose RUN echo 'if [ -z "$TARANTOOL_CLUSTER_COOKIE" ]; then unset TARANTOOL_CLUSTER_COOKIE ; fi ; \ sleep $START_DELAY && cartridge start --run-dir=$TARANTOOL_RUNDIR --data-dir=$TARANTOOL_DATADIR \ From 4e2f424fcc0305b6e06f1bfd2f5a28e9b183125e Mon Sep 17 00:00:00 2001 From: Ivan Dneprov <43577565+iDneprov@users.noreply.github.com> Date: Tue, 13 Feb 2024 15:00:23 +0300 Subject: [PATCH 05/12] Apply suggestions from code review Co-authored-by: Dmitry Kasimovskiy <98410443+dkasimovskiy@users.noreply.github.com> --- src/main/resources/Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/resources/Dockerfile b/src/main/resources/Dockerfile index 6272507..e3b6f25 100644 --- a/src/main/resources/Dockerfile +++ b/src/main/resources/Dockerfile @@ -10,8 +10,10 @@ RUN apt-get -y update && \ apt-get -y install gcc && \ apt-get -y install git && \ apt-get -y install unzip && \ - apt-get -y install cartridge-cli && \ - cartridge version +RUN apt-get -y update && \ + apt-get -y install build-essential cmake make gcc git unzip cartridge-cli && \ + apt-get -y clean +RUN cartridge version # build and run FROM cartridge-base AS cartridge-app From 9b030d017862f831cd8c56bf5d156b43cbe730e1 Mon Sep 17 00:00:00 2001 From: Ivan Dneprov Date: Tue, 13 Feb 2024 15:00:56 +0300 Subject: [PATCH 06/12] Fix by @dkasimovskiy comments --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index dd65812..d754592 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ io.tarantool testcontainers-java-tarantool jar - 2.0.0-SNAPSHOT-u + 2.0.0-SNAPSHOT TestContainers for Tarantool Dockerized Tarantool and Tarantool Cartridge containers for testing under Testcontainers. From 3bb8b5af67bc6c3aac2308d76380d00bea6ebe01 Mon Sep 17 00:00:00 2001 From: Ivan Dneprov Date: Tue, 13 Feb 2024 15:09:43 +0300 Subject: [PATCH 07/12] Fix by @dkasimovskiy comments --- src/main/resources/Dockerfile | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/main/resources/Dockerfile b/src/main/resources/Dockerfile index e3b6f25..fc39080 100644 --- a/src/main/resources/Dockerfile +++ b/src/main/resources/Dockerfile @@ -3,13 +3,6 @@ FROM tarantool/tarantool:${TARANTOOL_VERSION} AS cartridge-base # install dependencies # a yum bug requires setting ulimit, see https://bugzilla.redhat.com/show_bug.cgi?id=1537564 -RUN apt-get -y update && \ - apt-get -y install build-essential && \ - apt-get -y install cmake && \ - apt-get -y install make && \ - apt-get -y install gcc && \ - apt-get -y install git && \ - apt-get -y install unzip && \ RUN apt-get -y update && \ apt-get -y install build-essential cmake make gcc git unzip cartridge-cli && \ apt-get -y clean From d437871b2494ea02c2a1fcd494fe93e49b86fbdc Mon Sep 17 00:00:00 2001 From: Ivan Dneprov Date: Tue, 13 Feb 2024 15:47:57 +0300 Subject: [PATCH 08/12] Fix by @ArtDu comments --- CHANGELOG.md | 1 + src/main/resources/Dockerfile | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d85644..a4882a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ## [1.3.1] - 2024-02-13 - Change `TARANTOOL_VERSION` default value from `2.11.2-centos7` to `2.11.2-ubuntu20.04` and update Dockerfile + Because of issues with cartridge build on centos 7 ## [1.3.0] - 2024-02-02 diff --git a/src/main/resources/Dockerfile b/src/main/resources/Dockerfile index fc39080..931326e 100644 --- a/src/main/resources/Dockerfile +++ b/src/main/resources/Dockerfile @@ -1,8 +1,12 @@ ARG TARANTOOL_VERSION=2.11.2-ubuntu20.04 FROM tarantool/tarantool:${TARANTOOL_VERSION} AS cartridge-base +ARG TARANTOOL_SERVER_USER="root" +ARG TARANTOOL_SERVER_GROUP="root" +USER $TARANTOOL_SERVER_USER:$TARANTOOL_SERVER_GROUP +RUN groupadd $TARANTOOL_SERVER_GROUP && useradd -m -s /bin/bash $TARANTOOL_SERVER_USER || true + # install dependencies -# a yum bug requires setting ulimit, see https://bugzilla.redhat.com/show_bug.cgi?id=1537564 RUN apt-get -y update && \ apt-get -y install build-essential cmake make gcc git unzip cartridge-cli && \ apt-get -y clean From 436ccca6c15ea0f9d83b6d17eb8189452e7c6979 Mon Sep 17 00:00:00 2001 From: Ivan Dneprov Date: Tue, 13 Feb 2024 16:10:12 +0300 Subject: [PATCH 09/12] Fix by @ArtDu comments --- src/main/resources/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/resources/Dockerfile b/src/main/resources/Dockerfile index 931326e..f928e09 100644 --- a/src/main/resources/Dockerfile +++ b/src/main/resources/Dockerfile @@ -7,7 +7,8 @@ USER $TARANTOOL_SERVER_USER:$TARANTOOL_SERVER_GROUP RUN groupadd $TARANTOOL_SERVER_GROUP && useradd -m -s /bin/bash $TARANTOOL_SERVER_USER || true # install dependencies -RUN apt-get -y update && \ +RUN ulimit -n 1024 && \ + apt-get -y update && \ apt-get -y install build-essential cmake make gcc git unzip cartridge-cli && \ apt-get -y clean RUN cartridge version From 7b4e4cfbb53b5afec297412a32af38702bede121 Mon Sep 17 00:00:00 2001 From: Ivan Dneprov <43577565+iDneprov@users.noreply.github.com> Date: Tue, 13 Feb 2024 16:15:12 +0300 Subject: [PATCH 10/12] Update CHANGELOG.md Co-authored-by: Artyom Dubinin --- CHANGELOG.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a4882a6..edcfe76 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,8 +4,7 @@ ## [1.3.1] - 2024-02-13 -- Change `TARANTOOL_VERSION` default value from `2.11.2-centos7` to `2.11.2-ubuntu20.04` and update Dockerfile - Because of issues with cartridge build on centos 7 +- Change `TARANTOOL_VERSION` default value from `2.11.2-centos7` to `2.11.2-ubuntu20.04`. It ruins rocks building due to certificat issues on centos. ## [1.3.0] - 2024-02-02 From 71eb85b56a839951c4fa64247f67591347a595b1 Mon Sep 17 00:00:00 2001 From: Artyom Dubinin Date: Tue, 13 Feb 2024 16:23:18 +0300 Subject: [PATCH 11/12] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index edcfe76..7fa1912 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ ## [1.3.1] - 2024-02-13 -- Change `TARANTOOL_VERSION` default value from `2.11.2-centos7` to `2.11.2-ubuntu20.04`. It ruins rocks building due to certificat issues on centos. +- Change `TARANTOOL_VERSION` default value from `2.11.2-centos7` to `2.11.2-ubuntu20.04`. It ruins rocks building due to certificate issues on centos. ## [1.3.0] - 2024-02-02 From bc543095690b7009f669a13c50fe0f31f7743247 Mon Sep 17 00:00:00 2001 From: Ivan Dneprov Date: Tue, 13 Feb 2024 16:36:41 +0300 Subject: [PATCH 12/12] Fix by @ArtDu comments --- .github/workflows/tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f547252..4be9fc5 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -103,6 +103,7 @@ jobs: needs: - tests-cartridge-container - tests-ee + - tests-tarantool-container runs-on: ubuntu-latest steps: - uses: actions/checkout@v4