forked from RAHAMSHAIK007/febbatch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jenkins-assignment
54 lines (40 loc) · 1.28 KB
/
jenkins-assignment
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
MASTER & SLAVE:
EXECUTE THE BELOW COMMANDS ON ALL SERVERS:
1. amazon-linux-extras install java-openjdk11 -y
2. useradd jenkins
3. passwd jenkins
4. visudo : 100 th line
5. vim /etc/ssh/sshd_config : 63 rd line (no=yes)
6. systemctl restart sshd
7. systemctl status sshd
8. hostnamectl set-hostname name
9. su - jenkins
10. hostname -i
=====================================================
CONNECTING TO JENKINS SLAVES:
9. ssh-keygen
10. ssh-copy-id jenkins@172.31.63.151
11. ssh 'jenkins@172.31.63.151'
12. ctrl + d
13. ssh-copy-id jenkins@172.31.51.183
14. ssh 'jenkins@172.31.51.183'
15. ctrl + d
=====================================================
create 1 master 3 slaves & create 3 jobs:
job-1: (slave-1) (free style)
integration of git
op: /tmp/user-1/builds/
parameters: choice parameters (client, env)
vars: build number, job name, jenkins url, commit id
job-2: (slave-2) (free style)
create files/linux commnads/ (lscpu:file1, lsmem:file2 userlist: file3 move to dir1)
op: /tmp/user-2/builds/
vars: build number, job name, jenkins url
job-3: (slave-3) (pipeline)
integration of git
op: /tmp/user-3/builds/
parameters: choice parameters (client, env)
vars: build number, job name, jenkins url, commit id
conditions:
job-1 -- > job2 & job3 automatic run
dont give manual build