723857185342a198e54b4d3d02d4e28f3009a2b2
[it/test.git] / XTesting / XTesting-demo / install-dependencies.sh
1 #! /bin/bash -x
2
3 # openssh
4 apt install -y openssh-server
5 systemctl status ssh
6 ufw allow ssh
7
8 # docker
9 apt-get remove docker docker-engine docker.io containerd runc
10 apt-get update
11 apt-get install -y \
12     ca-certificates \
13     curl \
14     gnupg \
15     lsb-release
16
17 mkdir -p /etc/apt/keyrings
18
19 curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
20 echo \
21   "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
22   $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
23
24
25 apt-get update
26 apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin
27 systemctl enable docker
28 systemctl start docker
29
30 # XTesting dependencies
31 apt update && apt install git -y
32 [ -z "$VIRTUAL_ENV" ] && apt install python3-pip -y && pip3 install ansible
33 ansible-galaxy install collivier.xtesting
34 ansible-galaxy collection install ansible.posix community.general community.grafana \
35   community.kubernetes community.docker community.postgresql