From 85449f36dc8afd6e932087dffa6108c5b0a84295 Mon Sep 17 00:00:00 2001 From: drosofff Date: Wed, 19 Dec 2018 22:40:07 +0100 Subject: [PATCH 01/10] simple switch test to xenial --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 4800d87e..6b5dec2d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: python python: 2.7 -dist: trusty +dist: xenial sudo: required env: From 371f1bf00652a3fe860b58963676b66446b41ee0 Mon Sep 17 00:00:00 2001 From: Christophe Antoniewski Date: Sun, 23 Dec 2018 02:11:59 +0000 Subject: [PATCH 02/10] Dockerfile.galaxykickstart-base build docker image on top of artbio/ansible-galaxy-os-xenial --- Dockerfile.galaxykickstart-base | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/Dockerfile.galaxykickstart-base b/Dockerfile.galaxykickstart-base index 3e62f6a3..7f62b627 100644 --- a/Dockerfile.galaxykickstart-base +++ b/Dockerfile.galaxykickstart-base @@ -1,7 +1,6 @@ -FROM artbio/ansible-galaxy-os +LABEL maintainer_2="Christophe Antoniewski " -LABEL multi.maintainer_1="Marius van den Beek " \ - multi.maintainer_2="Christophe Antoniewski " +FROM ansible-galaxy-os-xenial RUN DEBIAN_FRONTEND=noninteractive apt-get update && \ \ @@ -9,9 +8,11 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update && \ echo "===> Allow start of services" && \ echo "exit 0" > /usr/sbin/policy-rc.d && \ \ - apt-get install -y --no-install-recommends \ + apt-get install -qq --no-install-recommends \ apt-transport-https software-properties-common +RUN apt-get install sudo -o Dpkg::Options::="--force-confold" + ONBUILD RUN DEBIAN_FRONTEND=noninteractive apt-get update && \ echo "===> Updating TLS certificates..." && \ apt-get install -y openssl ca-certificates @@ -19,10 +20,11 @@ ONBUILD RUN DEBIAN_FRONTEND=noninteractive apt-get update && \ COPY . /setup WORKDIR /setup +RUN sed -i -e 's/^# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && locale-gen + ENV LC_ALL=en_US.UTF-8 \ -LANG=en_US.UTF-8 + LANG=en_US.UTF-8 -RUN locale-gen en_US.UTF-8 && dpkg-reconfigure locales # work around for AUFS bug # as per https://github.com/docker/docker/issues/783#issuecomment-56013588 RUN mkdir /etc/ssl/private-copy /var/lib/postgresql-copy && \ @@ -31,14 +33,17 @@ RUN mkdir /etc/ssl/private-copy /var/lib/postgresql-copy && \ rm -R /var/lib/postgresql /etc/ssl/private/ && \ mv /var/lib/postgresql-copy /var/lib/postgresql && \ mv /etc/ssl/private-copy /etc/ssl/private && \ - chmod 0700 /var/lib/postgresql /etc/ssl/private && \ + chmod -R 0700 /var/lib/postgresql /etc/ssl/private && \ chown -R 1550:1550 /var/lib/postgresql /var/run/postgresql \ /var/log/postgresql /etc/ssl/private /etc/postgresql -RUN echo $(ansible --version) +RUN echo 'root ALL=(ALL:ALL) ALL' >> /etc/sudoers && echo 'postgres ALL=(ALL:ALL) ALL' >> /etc/sudoers +RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers +# Warning: The following requirements pull down requires an ansible-galaxy-os compatible with ubuntu-xenial and postgresql 9.5 +# see for instance https://github.com/ARTbio/ansible-galaxy-os/tree/ubuntu-xenial, if not already merged RUN ansible-galaxy install -r requirements_roles.yml -p roles -f && \ - ansible-playbook -i inventory_files/docker -c local galaxy.yml +RUN ansible-playbook -i inventory_files/docker -c local galaxy.yml ENV NGINX_GALAXY_LOCATION="" \ GALAXY_CONFIG_ADMIN_USERS="admin@galaxy.org" \ @@ -46,7 +51,6 @@ NAT_MASQUERADE=false ONBUILD WORKDIR /setup ONBUILD COPY . /setup - ADD startup.sh /startup.sh RUN chmod +x /startup.sh From 14d6b852851910e20486e536a6edcde4f7aed788 Mon Sep 17 00:00:00 2001 From: Christophe Antoniewski Date: Sun, 23 Dec 2018 02:24:59 +0000 Subject: [PATCH 03/10] adjust name of the docker layer artbio/ansible-galaxy-os:1604 and point requirement ansible-galaxy-os to ubuntu-xenial branch --- Dockerfile.galaxykickstart-base | 2 +- requirements_roles.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile.galaxykickstart-base b/Dockerfile.galaxykickstart-base index 7f62b627..9970e229 100644 --- a/Dockerfile.galaxykickstart-base +++ b/Dockerfile.galaxykickstart-base @@ -1,6 +1,6 @@ LABEL maintainer_2="Christophe Antoniewski " -FROM ansible-galaxy-os-xenial +FROM ARTbio/ansible-galaxy-os:1604 RUN DEBIAN_FRONTEND=noninteractive apt-get update && \ \ diff --git a/requirements_roles.yml b/requirements_roles.yml index a2889e9a..abf9e935 100644 --- a/requirements_roles.yml +++ b/requirements_roles.yml @@ -1,6 +1,6 @@ - src: https://github.com/ARTbio/ansible-galaxy-os.git name: galaxyprojectdotorg.galaxy-os - version: galaxykickstart + version: ubuntu-xenial - src: https://github.com/ARTbio/ensure_postgresql_up.git name: ensure_postgresql_up From 552fe7a1a1c503d977861c650499188b0b02b984 Mon Sep 17 00:00:00 2001 From: Christophe Antoniewski Date: Sun, 23 Dec 2018 02:30:55 +0000 Subject: [PATCH 04/10] fix name of the upstream container artbio/ansible-galaxy-os:1604 --- Dockerfile.galaxykickstart-base | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile.galaxykickstart-base b/Dockerfile.galaxykickstart-base index 9970e229..ddc367ae 100644 --- a/Dockerfile.galaxykickstart-base +++ b/Dockerfile.galaxykickstart-base @@ -1,6 +1,6 @@ LABEL maintainer_2="Christophe Antoniewski " -FROM ARTbio/ansible-galaxy-os:1604 +FROM artbio/ansible-galaxy-os:1604 RUN DEBIAN_FRONTEND=noninteractive apt-get update && \ \ From 60a76f9221155904e5dbb1564e9b060f36bda372 Mon Sep 17 00:00:00 2001 From: Christophe Antoniewski Date: Sun, 23 Dec 2018 02:34:56 +0000 Subject: [PATCH 05/10] the first line of the Dockerfile must contain the from tag --- Dockerfile.galaxykickstart-base | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile.galaxykickstart-base b/Dockerfile.galaxykickstart-base index ddc367ae..58e9fb63 100644 --- a/Dockerfile.galaxykickstart-base +++ b/Dockerfile.galaxykickstart-base @@ -1,7 +1,7 @@ -LABEL maintainer_2="Christophe Antoniewski " - FROM artbio/ansible-galaxy-os:1604 +LABEL maintainer_2="Christophe Antoniewski " + RUN DEBIAN_FRONTEND=noninteractive apt-get update && \ \ \ From d3ef2deebf73e6618f8ad150d7e6995ef00f5972 Mon Sep 17 00:00:00 2001 From: Christophe Antoniewski Date: Sun, 23 Dec 2018 02:41:00 +0000 Subject: [PATCH 06/10] fix a continued line wit RUN removal --- Dockerfile.galaxykickstart-base | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile.galaxykickstart-base b/Dockerfile.galaxykickstart-base index 58e9fb63..6ff01480 100644 --- a/Dockerfile.galaxykickstart-base +++ b/Dockerfile.galaxykickstart-base @@ -43,7 +43,7 @@ RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers # Warning: The following requirements pull down requires an ansible-galaxy-os compatible with ubuntu-xenial and postgresql 9.5 # see for instance https://github.com/ARTbio/ansible-galaxy-os/tree/ubuntu-xenial, if not already merged RUN ansible-galaxy install -r requirements_roles.yml -p roles -f && \ -RUN ansible-playbook -i inventory_files/docker -c local galaxy.yml + ansible-playbook -i inventory_files/docker -c local galaxy.yml ENV NGINX_GALAXY_LOCATION="" \ GALAXY_CONFIG_ADMIN_USERS="admin@galaxy.org" \ From 11365e6f8ea002888e76b9acb9c770563d357c08 Mon Sep 17 00:00:00 2001 From: drosofff Date: Tue, 25 Dec 2018 23:18:45 +0100 Subject: [PATCH 07/10] fix ansible version requirement in the playbook --- galaxy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/galaxy.yml b/galaxy.yml index c91be809..c4d80f5a 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -8,8 +8,8 @@ - include_tasks: roles/handlers/galaxy.yml pre_tasks: - - fail: msg="Installed ansible version {{ ansible_version.full }}, but ansible version >= 2.4 required" - when: ansible_version.full | version_compare('2.4.0.0', '<') + - fail: msg="Installed ansible version {{ ansible_version.full }}, but ansible version >= 2.7 required" + when: ansible_version.full is version_compare('2.7', '<') tags: - always From 3af9369787a1eb8aef5dc8f709e1269c60dcc7b0 Mon Sep 17 00:00:00 2001 From: drosofff Date: Sat, 29 Dec 2018 16:49:10 +0100 Subject: [PATCH 08/10] test nginx_location bug in 18.09 galaxy release --- group_vars/all | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/group_vars/all b/group_vars/all index 43e090e5..eb949ed0 100644 --- a/group_vars/all +++ b/group_vars/all @@ -18,7 +18,7 @@ galaxy_config_dir: "{{ galaxy_server_dir }}/config" galaxy_database: /home/galaxy_database galaxy_db: postgresql://{{ galaxy_user_name }}:{{ galaxy_user_name }}@localhost:5432/galaxy?client_encoding=utf8 galaxy_git_repo: https://github.com/galaxyproject/galaxy.git -galaxy_changeset_id: release_18.05 +galaxy_changeset_id: release_18.09 galaxy_reports_config_file: "{{ galaxy_config_dir }}/reports.yml.sample" # Change this to "{{ galaxy_config_dir }}/reports.ini.sample" for galaxy < 17.09 galaxy_admin: admin@galaxy.org galaxy_admin_pw: admin From 4034e059a737f1a7327de2ce777e88deb43cb5b4 Mon Sep 17 00:00:00 2001 From: drosofff Date: Wed, 2 Jan 2019 13:45:11 +0100 Subject: [PATCH 09/10] revert to release_18.05 for PR --- group_vars/all | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/group_vars/all b/group_vars/all index eb949ed0..43e090e5 100644 --- a/group_vars/all +++ b/group_vars/all @@ -18,7 +18,7 @@ galaxy_config_dir: "{{ galaxy_server_dir }}/config" galaxy_database: /home/galaxy_database galaxy_db: postgresql://{{ galaxy_user_name }}:{{ galaxy_user_name }}@localhost:5432/galaxy?client_encoding=utf8 galaxy_git_repo: https://github.com/galaxyproject/galaxy.git -galaxy_changeset_id: release_18.09 +galaxy_changeset_id: release_18.05 galaxy_reports_config_file: "{{ galaxy_config_dir }}/reports.yml.sample" # Change this to "{{ galaxy_config_dir }}/reports.ini.sample" for galaxy < 17.09 galaxy_admin: admin@galaxy.org galaxy_admin_pw: admin From c8a168b876467d4eacbda4e18af75ef64f5784b3 Mon Sep 17 00:00:00 2001 From: Christophe Antoniewski Date: Sat, 5 Jan 2019 02:16:29 +0000 Subject: [PATCH 10/10] lint before_install_docker.sh script and shorten sleep in script_docker.sh script --- travis_scripts/before_install_docker.sh | 6 +++--- travis_scripts/script_docker.sh | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/travis_scripts/before_install_docker.sh b/travis_scripts/before_install_docker.sh index 9bc9176a..0ae4439b 100644 --- a/travis_scripts/before_install_docker.sh +++ b/travis_scripts/before_install_docker.sh @@ -2,16 +2,16 @@ set -e docker --version docker info -ansible-galaxy install -r requirements_roles.yml -p roles +ansible-galaxy install -r requirements_roles.yml -p roles -f sudo groupadd -r $GALAXY_TRAVIS_USER -g $GALAXY_GID -sudo useradd -u $GALAXY_UID -r -g $GALAXY_TRAVIS_USER -d $GALAXY_HOME -p travis_testing\ +sudo useradd -u $GALAXY_UID -r -g $GALAXY_TRAVIS_USER -d $GALAXY_HOME -p travis_testing \ -c "Galaxy user" $GALAXY_TRAVIS_USER sudo mkdir $GALAXY_HOME sudo chown -R $GALAXY_TRAVIS_USER:$GALAXY_TRAVIS_USER $GALAXY_HOME docker build -t galaxy_kickstart -f Dockerfile.galaxykickstart-base . sudo mkdir /export && sudo chown $GALAXY_UID:$GALAXY_GID /export sudo mkdir /export2 && sudo chown $GALAXY_UID:$GALAXY_GID /export2 -export CID1=`docker run -d --privileged=true -p 80:80 -p 21:21\ +export CID1=`docker run -d --privileged=true -p 80:80 -p 21:21 \ -e NAT_MASQUERADE=true \ -e NGINX_GALAXY_LOCATION=/subdir \ -v /tmp/:/tmp/ \ diff --git a/travis_scripts/script_docker.sh b/travis_scripts/script_docker.sh index 8343ab83..92ec4fa8 100755 --- a/travis_scripts/script_docker.sh +++ b/travis_scripts/script_docker.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -e echo -e "sleeping 120s, zzzzzz" -sleep 180s +sleep 120s docker logs $CID1 echo -e "Testing CID1 $CID1" curl http://localhost:80/subdir/api/version| grep version_major