forked from antweiss/cicd-workshop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup_cicd_ws.sh
executable file
·38 lines (25 loc) · 1.05 KB
/
setup_cicd_ws.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#! /bin/bash -f
sudo apt-get update
#Install packages to allow apt to use a repository over HTTPS:
sudo apt-get install -y apt-transport-https \
ca-certificates \
curl \
software-properties-common
#Add Docker’s official GPG key:
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 && sudo apt-get install -y docker-ce
#install compose
sudo curl -L https://github.com/docker/compose/releases/download/1.19.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
#install kubectl
curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.9.0/bin/linux/amd64/kubectl
#Make the kubectl binary executable.
chmod +x ./kubectl
#Move the binary in to your PATH.
sudo mv ./kubectl /usr/bin/kubectl
echo "source <(kubectl completion bash)" >> ~/.bashrc
sudo adduser $USER docker