2 # Licensed to the Apache Software Foundation (ASF) under one
3 # or more contributor license agreements. See the NOTICE file
4 # distributed with this work for additional information
5 # regarding copyright ownership. The ASF licenses this file
6 # to you under the Apache License, Version 2.0 (the
7 # "License"); you may not use this file except in compliance
8 # with the License. You may obtain a copy of the License at
10 # http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
24 DPKG_LOCK="/var/lib/dpkg/lock-frontend"
25 DOCKER_VERSION="5:20.10.20~3-0~ubuntu-bionic"
26 DOCKER_COMPOSE_URL="https://github.com/docker/compose/releases/download"
27 DOCKER_COMPOSE_VERSION="1.29.2"
29 # Wait for other apt process to finish by checking the dpkg lock file.
31 while sudo lsof ${DPKG_LOCK} > /dev/null 2>&1 ; do
32 echo "DPKG file locked: ${DPKG_LOCK}."
33 echo " Waiting for another pkg instalaltion process to finish ..."
35 if [[ ${try} -gt 60 ]] ; then
36 echo "ERROR: Max number of re-tries reached, exiting..."
43 sudo apt-get install -y --no-install-recommends \
47 curl -sSL https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
48 sudo add-apt-repository "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main"
49 curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
50 sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
52 set +e && sudo apt-get purge -y google-cloud-sdk lxc-docker && set -e
53 sudo apt-get install -y --no-install-recommends \
57 docker-ce=${DOCKER_VERSION} \
58 docker-ce-cli=${DOCKER_VERSION} \
60 google-chrome-stable \
73 # Get correct docker-compose version required for geode-AcceptanceTest
74 sudo curl -L "${DOCKER_COMPOSE_URL}/${DOCKER_COMPOSE_VERSION}/docker-compose-$(uname -s)-$(uname -m)" \
75 -o /usr/local/bin/docker-compose
76 sudo chmod +x /usr/local/bin/docker-compose
78 sudo cp -R /etc/alternatives /etc/keep-alternatives
80 sudo apt-get install -y --no-install-recommends \
84 sudo rm -rf /etc/alternatives
85 sudo mv /etc/keep-alternatives /etc/alternatives
87 docker pull ${GEODE_DOCKER_IMAGE}
88 sudo curl -Lo /usr/local/bin/dunit-progress https://github.com/jdeppe-pivotal/progress-util/releases/download/0.2/progress.linux
89 sudo chmod +x /usr/local/bin/dunit-progress
90 wget --no-verbose -O /tmp/chromedriver_linux64.zip https://chromedriver.storage.googleapis.com/${CHROME_DRIVER_VERSION}/chromedriver_linux64.zip
91 sudo sudo rm -rf /opt/selenium/chromedriver
92 sudo unzip /tmp/chromedriver_linux64.zip -d /opt/selenium
93 rm /tmp/chromedriver_linux64.zip
94 sudo mv /opt/selenium/chromedriver /opt/selenium/chromedriver-${CHROME_DRIVER_VERSION}
95 sudo chmod 755 /opt/selenium/chromedriver-${CHROME_DRIVER_VERSION}
96 sudo ln -fs /opt/selenium/chromedriver-${CHROME_DRIVER_VERSION} /usr/bin/chromedriver
99 sudo rm -rf /var/lib/apt/lists/*