Geode: Updates for AcceptanceTest
[infra/cicd.git] / jjb / geode / apache-geode-slave / slave_setup.sh
index 3a114b265409ffe4ae075634a94ea04b938e4b0d..78588689a42d9db1c4440c336cbb7aa47673186a 100755 (executable)
@@ -19,7 +19,12 @@ set -o nounset
 set -o errexit
 set -o pipefail
 set -o xtrace
+
+# Global variables
 DPKG_LOCK="/var/lib/dpkg/lock-frontend"
+DOCKER_VERSION="5:20.10.20~3-0~ubuntu-bionic"
+DOCKER_COMPOSE_URL="https://github.com/docker/compose/releases/download"
+DOCKER_COMPOSE_VERSION="1.29.2"
 
 # Wait for other apt process to finish by checking the dpkg lock file.
 try=0
@@ -41,14 +46,16 @@ sudo apt-get install -y --no-install-recommends \
 
 curl -sSL https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
 sudo add-apt-repository "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main"
+curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
+sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
 sudo apt-get update
 set +e && sudo apt-get purge -y google-cloud-sdk lxc-docker && set -e
 sudo apt-get install -y --no-install-recommends \
     aptitude \
     ca-certificates \
     cgroupfs-mount \
-    docker-compose \
-    docker-ce \
+    docker-ce=${DOCKER_VERSION} \
+    docker-ce-cli=${DOCKER_VERSION} \
     git \
     google-chrome-stable \
     htop \
@@ -63,6 +70,11 @@ sudo apt-get install -y --no-install-recommends \
     unzip \
     vim
 
+# Get correct docker-compose version required for geode-AcceptanceTest
+sudo curl -L "${DOCKER_COMPOSE_URL}/${DOCKER_COMPOSE_VERSION}/docker-compose-$(uname -s)-$(uname -m)" \
+          -o /usr/local/bin/docker-compose
+sudo chmod +x /usr/local/bin/docker-compose
+
 sudo cp -R /etc/alternatives /etc/keep-alternatives
 sudo apt-get update
 sudo apt-get install -y --no-install-recommends \