-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathinstallation-steps
More file actions
181 lines (134 loc) · 5.07 KB
/
installation-steps
File metadata and controls
181 lines (134 loc) · 5.07 KB
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
Install cloudSDK
---------------------
https://cloud.google.com/sdk/docs/install#deb
vi /etc/sudoers
jenkins ALL=(ALL) NOPASSWD: ALL
sudo su - jenkins
1) sudo apt-get install apt-transport-https ca-certificates gnupg
2) echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
3) curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key --keyring /usr/share/keyrings/cloud.google.gpg add -
4) sudo apt-get update && sudo apt-get install google-cloud-cli
5) sudo apt-get install google-cloud-cli-app-engine-java
6) gcloud init
7) sudo apt-get update && sudo apt-get install google-cloud-cli=123.0.0-0
8) sudo apt-get install google-cloud-sdk-gke-gcloud-auth-plugin
9) https://cloud.google.com/blog/products/containers-kubernetes/kubectl-auth-changes-in-gke
TO authenticate GCR please follow the below document
------------------------------------------------------
https://cloud.google.com/container-registry/docs/advanced-authentication
###Install kubectl in ubuntu####
----------------------------------
sudo apt-get install kubectl
sudo chown -R jenkins:jenkins /var/lib/jenkins
sudo chmod 666 /var/run/docker.sock
---------------------------------------------------------------------------------------------------------------------------
GCR configurations :
---------------------
https://cloud.google.com/container-registry/docs/advanced-authentication
root@master:~# history
vi /etc/sudoers
jenkins ALL=(ALL) NOPASSWD: ALL
sudo su - jenkins
sudo chown -R jenkins:jenkins /var/lib/jenkins
sudo chmod 666 /var/run/docker.sock
sudo usermod -a -G docker jenkins
sudo usermod -a -G docker ubuntu
gcloud auth login
vi cred.json
ls
gcloud auth activate-service-account demo14@able-decorator-354310.iam.gserviceaccount.com --key-file=cred.json
gcloud auth configure-docker
ls
cat cred.json
--------------------------------------------------------------------------------------------------------------------------
Install jenkins
-------------------
To install Jenkins on Ubuntu, follow below set of commands:
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-get update
sudo apt-get install jenkins -y
sudo service jenkins start
sudo service jenkins status
follow this document to install jenkins
https://www.liquidweb.com/kb/installing-jenkins-on-ubuntu-16-04/
If you’re facing with above jenkins installation. Please follow below link
https://serverfault.com/questions/1034893/installing-jenkins-on-ubuntu-tells-me-package-jenkins-has-no-installation-can
Install Sonarqube
------------------
cd /opt
sudo curl -O https://binaries.sonarsource.com/Distribution/sonarqube/sonarqube-8.3.0.34182.zip
sudo apt-get install unzip
sudo unzip sonarqube-8.3.0.34182.zip -d /opt/
sudo mv /opt/sonarqube-8.3.0.34182/ /opt/sonarqube
cd /opt/sonarqube/
sudo groupadd sonar
sudo useradd -c "SonarQube - User" -d /opt/sonarqube/ -g sonar sonar
sudo chown sonar:sonar /opt/sonarqube/ -R
sudo vim /opt/sonarqube/conf/sonar.properties
####Un-comment these lines and modify them as necessary.
sonar.jdbc.username=admin
sonar.jdbc.password=admin
vim /etc/systemd/system/sonarqube.service
####Add this content into the “sonarqube.service” file.
[Unit]
Description=SonarQube service
After=syslog.target network.target
[Service]
Type=forking
ExecStart=/opt/sonarqube/bin/linux-x86-64/sonar.sh start
ExecStop=/opt/sonarqube/bin/linux-x86-64/sonar.sh stop
User=sonar
Group=sonar
Restart=always
LimitNOFILE=65536
LimitNPROC=4096
[Install]
WantedBy=multi-user.target
systemctl daemon-reload
systemctl enable sonarqube.service
systemctl start sonarqube.service
systemctl status -l sonarqube.service
Install nexus
------------------
1) wget http://download.sonatype.com/nexus/3/nexus-3.22.0-02-unix.tar.gz
2) sudo tar -xvf nexus-3.22.0-02-unix.tar.gz
3) mv nexus-3.22.0-02 /opt/
4) mv sonatype-work/ /opt/
5) cd /opt
6) mv nexus-3.22.0-02/ nexus
7) ###Create a user called Nexus####
sudo adduser nexus
8) Give permission to Nexus user
sudo chown -R nexus:nexus /opt/nexus
sudo chown -R nexus:nexus /opt/sonatype-work
9) sudo vim /opt/nexus/bin/nexus.rc
run_as_user="nexus"
10)Modify memory settings
sudo vim /opt/nexus/bin/nexus.vmoptions
change to 512m
11) Configure Nexus to run as a service
sudo vim /etc/systemd/system/nexus.service
Copy the below content.
[Unit]
Description=nexus service
After=network.target
[Service]
Type=forking
LimitNOFILE=65536
User=nexus
Group=nexus
ExecStart=/opt/nexus/bin/nexus start
ExecStop=/opt/nexus/bin/nexus stop
User=nexus
Restart=on-abort
[Install]
WantedBy=multi-user.target
Now Start Nexus
sudo systemctl enable nexus
sudo systemctl start nexus
sudo systemctl status nexus
tail -f /opt/sonatype-work/nexus3/log/nexus.log
https://epma.medium.com/install-sonatype-nexus-3-on-ubuntu-20-04-lts-562f8ba20b98