forked from pandian3k/Devops-Clarification
-
Notifications
You must be signed in to change notification settings - Fork 4
/
cicd deploy in docker.txt
62 lines (44 loc) · 1.37 KB
/
cicd deploy in docker.txt
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
cf86a96c3794977924763c5558aef1f8b8dfd27c
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
cred
webserver
deploy # webser username
jenkins # webserver password
webserver_login
webserver login
dockerhub
dockerpandian
password # docker hub password
docker_hub_login
dockerhublogin
producation server IP
add it in Jenkins configuration
selecet Environment variables //
Nme: prod_ip
value: public ip of producation server
create a project in jenkins// select multibranch
branch sources // select github
credentials // click add and select Jenkins//
username --> GIT login ID
Password give the API token created in git
ID -> github_key
Description-> github key
owner -> github login ID
Repository -> select deckerdeploy
--------------------------------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