From 73ec2f10101c0bc02e8759ac4dbfcf5134a43af0 Mon Sep 17 00:00:00 2001 From: Valentin Lab Date: Wed, 28 Nov 2018 12:12:36 +0100 Subject: [PATCH] fix: [docker-host] remove installation of docker-compose as it is not anymore used. Since ``compose`` is now inside a docker with all its dependencies, (including ``docker-compose``), we do not need to install it on the host. --- precise/host/hooks/install.d/70-0k.sh | 100 ++------------------------ 1 file changed, 4 insertions(+), 96 deletions(-) diff --git a/precise/host/hooks/install.d/70-0k.sh b/precise/host/hooks/install.d/70-0k.sh index e013b3e..f83880f 100755 --- a/precise/host/hooks/install.d/70-0k.sh +++ b/precise/host/hooks/install.d/70-0k.sh @@ -171,108 +171,14 @@ sed -ri 's/^#(net\.ipv4\.ip_forward=1)$/\1/g' /etc/sysctl.conf sysctl -w net.ipv4.ip_forward=1 -## -## docker-compose -## - -if type -p docker-compose >/dev/null; then - #echo "Found docker-compose..." >&2 - if ! CURRENT_VERSION_TEXT="$(docker-compose --version 2>/dev/null)"; then - echo "'docker-compose' failed ! Please check your docker-compose binary." - echo "Failed install." - docker-compose --version - exit 1 - fi - VALID_VERSION_TEXT="docker-compose version 1.21.2, build " - if ! [[ "$CURRENT_VERSION_TEXT" == "$VALID_VERSION_TEXT"* ]]; then - echo "Invalid version of docker-compose: we need exactly:" - echo "version text: $VALID_VERSION_TEXT" - echo "current version: $CURRENT_VERSION_TEXT" - echo "Failed install." - exit 1 - fi -else - if ! [ -d /opt/apps/docker-compose ]; then - ( - mkdir -p /opt/apps - cd /opt/apps - git clone https://github.com/docker/compose.git docker-compose && - cd docker-compose && - git checkout 0898c783ad2e0d01bd55b47fcb9eb7183edc1015 ## version pinning - ) - fi - - mkdir -p /opt/venv - if ! type -p virtualenv >/dev/null; then - pip install virtualenv==13.1.2 - fi - if ! [ -d /opt/venv/docker-compose ]; then - virtualenv /opt/venv/docker-compose/ - fi - - set +eux - . /opt/venv/docker-compose/bin/activate - set -eux - - ## XXXvlab: docker version 3.5.0 is bugged on its requirement list: - ## error: Setup script exited with error in docker setup command: 'tests_require' must be a string or list of strings containing valid project/version requirement specifiers; Expected ',' or end-of-list in pytest==2.9.1; python_version == '3.3' at ; python_version == '3.3' - - pip install $(cat </dev/null 2>&1; then - pip install requests==2.17.3 --upgrade - fi - deactivate - - mkdir -p /etc/compose - if ! grep "^. /opt/venv/docker-compose/bin/activate$" /etc/compose/local.conf >/dev/null 2>&1; then - cat <> /etc/compose/local.conf -. /opt/venv/docker-compose/bin/activate -EOF - fi -fi - - ## ## Installation of compose ## - -apt-get install kal-shlib-common kal-shlib-pretty kal-shlib-charm kal-shlib-array -y --force-yes /dev/null 2>&1; then + mkdir /etc/compose -p + touch /etc/compose/local.conf echo "DEFAULT_COMPOSE_FILE=/etc/compose/compose.yml" >> /etc/compose/local.conf fi