blob: 5972d88448f23a0328c97207f8b44389cdf61b68 [file] [log] [blame]
Tatyana Leontovichb7404592017-04-07 11:52:28 +03001{% from 'mcp-fuel-aio.jinja' import HOSTNAME_CFG01 with context %}
2
3# Install support services
4- description: Create and distribute SSL certificates for services using salt state
5 cmd: salt --hard-crash --state-output=mixed --state-verbose=False '*' state.sls salt
6 node_name: {{ HOSTNAME_CFG01 }}
7 retry: {count: 1, delay: 10}
8 skip_fail: true
9
10- description: Install keepalived
11 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
12 -C 'I@keepalived:cluster' state.sls keepalived -b 1
13 node_name: {{ HOSTNAME_CFG01 }}
14 retry: {count: 1, delay: 10}
15 skip_fail: true
16
17- description: Check the VIP
18 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
19 -C 'I@keepalived:cluster' cmd.run 'ip a | grep 172.16.10.2' | grep -B1 172.16.10.2
20 node_name: {{ HOSTNAME_CFG01 }}
21 retry: {count: 1, delay: 5}
22 skip_fail: false
23
24
25- description: Install haproxy
26 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
27 -C 'I@haproxy:proxy' state.sls haproxy
28 node_name: {{ HOSTNAME_CFG01 }}
29 retry: {count: 1, delay: 5}
30 skip_fail: false
31
32- description: Install haproxy.service
33 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
34 -C 'I@haproxy:proxy' service.status haproxy
35 node_name: {{ HOSTNAME_CFG01 }}
36 retry: {count: 1, delay: 5}
37 skip_fail: false
38
39- description: Install docker
40 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
41 -C 'I@docker:host' state.sls docker.host
42 node_name: {{ HOSTNAME_CFG01 }}
43 retry: {count: 1, delay: 5}
44 skip_fail: false
45
46- description: Check docker
47 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
48 -C 'I@docker:host' cmd.run 'docker ps'
49 node_name: {{ HOSTNAME_CFG01 }}
50 retry: {count: 1, delay: 5}
51 skip_fail: false
52
53- description: Install etcd
54 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
55 -C 'I@etcd:server' state.sls etcd.server.service
56 node_name: {{ HOSTNAME_CFG01 }}
57 retry: {count: 1, delay: 5}
58 skip_fail: false
59
60- description: Check the etcd health
61 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
62 -C 'I@etcd:server' cmd.run '. /var/lib/etcd/configenv && etcdctl cluster-health'
63 node_name: {{ HOSTNAME_CFG01 }}
64 retry: {count: 1, delay: 5}
65 skip_fail: false
66
67- description: Install Kubernetes and Calico
68 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
69 -C 'I@kubernetes:master' state.sls kubernetes.master.kube-addons;
70 salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@kubernetes:pool' state.sls kubernetes.pool;
71 salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@kubernetes:pool' cmd.run 'calicoctl node status';
72 node_name: {{ HOSTNAME_CFG01 }}
73 retry: {count: 1, delay: 5}
74 skip_fail: false
75
76- description: Setup NAT for Calico
77 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
78 -C 'I@etcd:server' --subset 1 state.sls etcd.server.setup
79 node_name: {{ HOSTNAME_CFG01 }}
80 retry: {count: 1, delay: 5}
81 skip_fail: false
82
83- description: Run whole master to check consistency
84 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
85 -C 'I@kubernetes:master' state.sls kubernetes exclude=kubernetes.master.setup
86 node_name: {{ HOSTNAME_CFG01 }}
87 retry: {count: 1, delay: 5}
88 skip_fail: true
89
90
91- description: Register addons
92 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
93 -C 'I@kubernetes:master' --subset 1 state.sls kubernetes.master.setup
94 node_name: {{ HOSTNAME_CFG01 }}
95 retry: {count: 1, delay: 5}
96 skip_fail: false