-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathinstallation.sh
67 lines (48 loc) · 2.79 KB
/
installation.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/bin/bash
echo ".........----------------#################._.-.-INSTALL-.-._.#################----------------........."
echo ".........----------------#################._.-.-MAVEN-.-._.#################----------------........."
sudo apt update -y
sudo apt install maven -y
mvn -version
echo ".........----------------#################._.-.-Docker-.-._.#################----------------........."
sudo apt-get update -y
sudo apt install apt-transport-https ca-certificates curl software-properties-common -y
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 bionic stable" -y
sudo apt update -y
apt-cache policy docker-ce -y
sudo apt install docker-ce -y
sudo chmod 777 /var/run/docker.sock
echo ".........----------------#################._.-.-Sonarqube-.-._.#################----------------........."
sudo docker run -d --name sonarqube -p 9000:9000 sonarqube
echo ".........----------------#################._.-.-Kubectl-.-._.#################----------------........."
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
chmod +x kubectl
sudo mv kubectl /usr/local/bin/
kubectl version --client
echo ".........----------------#################._.-.-Trivy-.-._.#################----------------........."
sudo apt-get install wget apt-transport-https gnupg lsb-release
wget -qO - https://aquasecurity.github.io/trivy-repo/deb/public.key | sudo apt-key add -
echo deb https://aquasecurity.github.io/trivy-repo/deb $(lsb_release -sc) main | sudo tee -a /etc/apt/sources.list.d/trivy.list
sudo apt-get update
sudo apt-get install trivy
echo ".........----------------#################._.-.-Jenkins-.-._.#################----------------........."
curl -fsSL https://pkg.jenkins.io/debian-stable/jenkins.io-2023.key | sudo tee \
/usr/share/keyrings/jenkins-keyring.asc > /dev/null
echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] \
https://pkg.jenkins.io/debian-stable binary/ | sudo tee \
/etc/apt/sources.list.d/jenkins.list > /dev/null
sudo apt update
sudo apt install -y openjdk-11-jdk
wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add -
sudo sh -c 'echo deb https://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
sudo apt update
sudo apt install -y jenkins
sudo systemctl start jenkins
sudo systemctl enable jenkins
sudo cat /var/lib/jenkins/secrets/initialAdminPassword
echo ".........----------------#################._.-.-KubeSec-.-._.#################----------------........."
curl -LO "https://github.com/controlplaneio/kubesec/releases/latest/download/kubesec-linux-amd64"
chmod +x kubesec-linux-amd64
sudo mv kubesec-linux-amd64 /usr/local/bin/kubesec
kubesec version