-
Notifications
You must be signed in to change notification settings - Fork 20
/
servers.yaml
67 lines (61 loc) · 2.1 KB
/
servers.yaml
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
---
global_shell_commands:
- { shell: 'setenforce 0 || true'}
- { shell: 'swapoff -a'}
- { shell: 'systemctl stop firewalld && systemctl disable firewalld'}
- { shell: 'echo -e "192.168.56.101 kubernetes\n192.168.56.101 kube-master\n192.168.56.102 kube-node-01\n192.168.56.103 kube-node-02">>/etc/hosts'}
- { shell: 'echo PATH=/opt/puppetlabs/bin:$PATH >> ~/.bash_profile'}
- { shell: 'sudo rpm -Uvh https://yum.puppet.com/puppet7/puppet7-release-el-7.noarch.rpm || true'}
- { shell: 'yum install -y puppet'}
- { shell: 'yum install -y git git-core zlib zlib-devel gcc-c++ patch readline readline-devel libyaml-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison curl sqlite-devel'}
- { shell: 'sudo /opt/puppetlabs/puppet/bin/gem install r10k -v 3.15.2'}
- { shell: 'cp /home/vagrant/share/Puppetfile /tmp && cd /tmp && /opt/puppetlabs/puppet/bin/r10k puppetfile install --verbose' }
- { shell: 'cp /home/vagrant/share/modules/* -R /tmp/modules || true'}
servers:
- box: bento/centos-7
cpu: 2
ip: "192.168.56.101"
name: kube-master
forward_ports:
- { guest: 22, host: 9999, id: "ssh" }
ram: 4096
shell_commands: []
- box: bento/centos-7
cpu: 2
ip: "192.168.56.210"
name: kube-replica-master-01
forward_ports: []
ram: 4096
shell_commands: []
- box: bento/centos-7
cpu: 2
ip: "192.168.56.220"
name: kube-replica-master-02
forward_ports: []
ram: 4096
shell_commands: []
- box: bento/centos-7
cpu: 2
ip: "192.168.56.102"
name: kube-node-01
forward_ports: []
ram: 4096
shell_commands: []
- box: bento/centos-7
cpu: 2
ip: "192.168.56.103"
name: kube-node-02
forward_ports: []
ram: 4096
shell_commands: []
- box: bento/centos-7
cpu: 1
ip: "192.168.56.214"
name: lb
forward_ports: []
ram: 512
shell_commands:
- { shell: 'yum install vim docker -y' }
- { shell: 'systemctl start docker'}
- { shell: 'cd /vagrant/lb && docker build -t puppet/nginx .'}
- { shell: 'docker run -d --name nginx --net=host puppet/nginx' }