forked from AntoDevOps-Github/Devops-Clarification
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRemarks
52 lines (39 loc) · 1.68 KB
/
Remarks
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
sudo yum -y install docker
sudo systemctl start docker
sudo systemctl enable docker
sudo groupadd docker
sudo usermod -aG docker jenkins
sudo systemctl restart jenkins
sudo systemctl restart docker
--------------------------------webserver-----------------
adduser deploy
echo "deploy:jenkins" | chpasswd
groupadd docker
usermod -a -G docker deploy
echo "deploy ALL=(ALL) NOPASSWD: /usr/bin/docker run *" >> /etc/sudoers
echo "deploy ALL=(ALL) NOPASSWD: /usr/bin/docker pull *" >> /etc/sudoers
/usr/bin/yum -y install docker
/usr/bin/systemctl enable docker
/usr/bin/systemctl start docker
yum -y install sshpass // install only in jeniks server
*****************************************************************************************************
https://docs.ansible.com/ansible/modules_by_category.html
https://docs.ansible.com/ansible/latest/reference_appendices/YAMLSyntax.html
*********************************************************************************************
*************JENKINS SLAVE***************
sudo yum -y install git java-1.8.0-openjdk
sudo useradd -d /var/lib/jenkins jenkins
ssh-keygen
cat /home/user/.ssh/id_rsa.pub
sudo mkdir /var/lib/jenkins/.ssh
sudo vi /var/lib/jenkins/.ssh/authorized_keys
sudo chown -R jenkins:jenkins /var/lib/jenkins/.ssh
cat /home/user/.ssh/id_rsa //copy this key
go to Jenis // Manage Jenkins // Manage Nodes // new node// node name / select permanent Agent/ ok
Remote root directory - /var/lib/jenkins
Launch method - Launch slave agents via SSH
Host - slave system IP
credentials - add - kind - SSH Usename with Private Key.
username jenkins
privatekey- past the id_rsa key // save
Host key verication - Manually trusted key verication strategy