INFRA: Update the slack options for projects
[infra/cicd.git] / jjb / geode / apache-geode-slave / slave_setup.sh
1 #!/usr/bin/env bash
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
9 #
10 #     http://www.apache.org/licenses/LICENSE-2.0
11 #
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.
17
18 set -o nounset
19 set -o errexit
20 set -o pipefail
21 set -o xtrace
22
23 sudo apt-get update
24 sudo apt-get install -y --no-install-recommends \
25   apt-transport-https \
26   lsb-release
27
28 curl -sSL https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
29 sudo add-apt-repository "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main"
30 sudo apt-get update
31 set +e && sudo apt-get purge -y google-cloud-sdk lxc-docker && set -e
32 sudo apt-get install -y --no-install-recommends \
33     aptitude \
34     ca-certificates \
35     cgroupfs-mount \
36     docker-compose \
37     docker-ce \
38     git \
39     google-chrome-stable \
40     htop \
41     jq \
42     less \
43     lsof \
44     net-tools \
45     python3 \
46     python3-pip \
47     rsync \
48     tmux \
49     unzip \
50     vim
51
52 sudo cp -R /etc/alternatives /etc/keep-alternatives
53 sudo apt-get install -y --no-install-recommends \
54     openjdk-8-jdk \
55     openjdk-11-jdk
56 sudo rm -rf /etc/alternatives
57 sudo mv /etc/keep-alternatives /etc/alternatives
58
59 docker pull ${GEODE_DOCKER_IMAGE}
60 sudo curl -Lo /usr/local/bin/dunit-progress https://github.com/jdeppe-pivotal/progress-util/releases/download/0.2/progress.linux
61 sudo chmod +x /usr/local/bin/dunit-progress
62 wget --no-verbose -O /tmp/chromedriver_linux64.zip https://chromedriver.storage.googleapis.com/${CHROME_DRIVER_VERSION}/chromedriver_linux64.zip
63 sudo sudo rm -rf /opt/selenium/chromedriver
64 sudo unzip /tmp/chromedriver_linux64.zip -d /opt/selenium
65 rm /tmp/chromedriver_linux64.zip
66 sudo mv /opt/selenium/chromedriver /opt/selenium/chromedriver-${CHROME_DRIVER_VERSION}
67 sudo chmod 755 /opt/selenium/chromedriver-${CHROME_DRIVER_VERSION}
68 sudo ln -fs /opt/selenium/chromedriver-${CHROME_DRIVER_VERSION} /usr/bin/chromedriver
69
70 sudo apt-get clean
71 sudo rm -rf /var/lib/apt/lists/*