blob: 5b352893575802ae64c91df978a3adeea082fb7f [file] [log] [blame]
Artem Panchenko0594cd72017-06-12 13:25:26 +03001{% from 'virtual-mcp11-k8s-contrail/underlay.yaml' import HOSTNAME_CFG01 with context %}
2
Victor Ryzhenkind93a4482018-04-09 15:20:42 +04003- description: Install etcd
Artem Panchenko0594cd72017-06-12 13:25:26 +03004 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
Victor Ryzhenkind93a4482018-04-09 15:20:42 +04005 -C 'I@etcd:server' state.sls etcd.server.service
Artem Panchenko0594cd72017-06-12 13:25:26 +03006 node_name: {{ HOSTNAME_CFG01 }}
7 retry: {count: 1, delay: 5}
8 skip_fail: false
9
Victor Ryzhenkind93a4482018-04-09 15:20:42 +040010- description: Check the etcd health
Artem Panchenko0594cd72017-06-12 13:25:26 +030011 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
Victor Ryzhenkind93a4482018-04-09 15:20:42 +040012 -C 'I@etcd:server' cmd.run '. /var/lib/etcd/configenv && etcdctl cluster-health'
Artem Panchenko0594cd72017-06-12 13:25:26 +030013 node_name: {{ HOSTNAME_CFG01 }}
Victor Ryzhenkind93a4482018-04-09 15:20:42 +040014 retry: {count: 1, delay: 5}
Artem Panchenko0594cd72017-06-12 13:25:26 +030015 skip_fail: false
16
Victor Ryzhenkind93a4482018-04-09 15:20:42 +040017 # Opencontrail Control Plane
Artem Panchenko0594cd72017-06-12 13:25:26 +030018
19- description: Install Opencontrail db on ctl01
20 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
21 -C 'I@opencontrail:database and *01*' state.sls opencontrail.database
22 node_name: {{ HOSTNAME_CFG01 }}
23 retry: {count: 2, delay: 20}
24 skip_fail: false
25
26- description: Install Opencontrail db on all nodes
27 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
28 -C 'I@opencontrail:database' state.sls opencontrail.database
29 node_name: {{ HOSTNAME_CFG01 }}
30 retry: {count: 2, delay: 20}
31 skip_fail: false
32
33- description: Install Opencontrail control on ctl01
34 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
35 -C 'I@opencontrail:control and *01*' state.sls opencontrail exclude=opencontrail.client
36 node_name: {{ HOSTNAME_CFG01 }}
37 retry: {count: 1, delay: 5}
38 skip_fail: false
39
40- description: Install Opencontrail control on all nodes
41 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
42 -C 'I@opencontrail:control' state.sls opencontrail exclude=opencontrail.client
43 node_name: {{ HOSTNAME_CFG01 }}
44 retry: {count: 1, delay: 5}
45 skip_fail: false
46
47- description: Install Opencontrail on collector
48 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
49 -C 'I@opencontrail:collector' state.sls opencontrail exclude=opencontrail.client
50 node_name: {{ HOSTNAME_CFG01 }}
51 retry: {count: 1, delay: 5}
52 skip_fail: false
53
Sergii Golovatiukf648ad42017-06-23 13:39:11 +020054# OpenContrail vrouters
Artem Panchenko0594cd72017-06-12 13:25:26 +030055- description: Install Opencontrail client
56 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
Victor Ryzhenkind93a4482018-04-09 15:20:42 +040057 -C 'I@opencontrail:database:id:1' state.sls opencontrail.client
Artem Panchenko0594cd72017-06-12 13:25:26 +030058 node_name: {{ HOSTNAME_CFG01 }}
59 retry: {count: 1, delay: 5}
60 skip_fail: false
61
Artem Panchenko0594cd72017-06-12 13:25:26 +030062- description: Install Opencontrail on computes
63 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
Victor Ryzhenkind93a4482018-04-09 15:20:42 +040064 -C 'I@opencontrail:compute' state.sls opencontrail exclude=opencontrail.client
Artem Panchenko0594cd72017-06-12 13:25:26 +030065 node_name: {{ HOSTNAME_CFG01 }}
Victor Ryzhenkin43c0d0e2017-07-07 19:53:25 +040066 retry: {count: 2, delay: 5}
Artem Panchenko0594cd72017-06-12 13:25:26 +030067 skip_fail: false
68
Victor Ryzhenkind93a4482018-04-09 15:20:42 +040069- description: Wake up vhost0
Sergii Golovatiukf648ad42017-06-23 13:39:11 +020070 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
Victor Ryzhenkind93a4482018-04-09 15:20:42 +040071 -C 'I@nova:compute' cmd.run 'exec 0>&-; exec 1>&-; exec 2>&-;
72 nohup bash -c "ip link | grep vhost && echo no_reboot || sleep 5 && reboot & "' && sleep 30
Sergii Golovatiukf648ad42017-06-23 13:39:11 +020073 node_name: {{ HOSTNAME_CFG01 }}
74 retry: {count: 1, delay: 5}
75 skip_fail: false
76
Victor Ryzhenkind93a4482018-04-09 15:20:42 +040077- description: Wait for salt-minions wake up after restart
78 cmd: salt --timeout=15 --hard-crash --state-output=mixed --state-verbose=False '*' test.ping
79 node_name: {{ HOSTNAME_CFG01 }}
80 retry: {count: 25, delay: 30}
81 skip_fail: false
82
83- description: Install Opencontrail client on computes
84 cmd: sleep 15 && salt --timeout=60 --hard-crash --state-output=mixed --state-verbose=False
85 -C 'I@opencontrail:compute' state.sls 'opencontrail.client'
86 node_name: {{ HOSTNAME_CFG01 }}
87 retry: {count: 1, delay: 5}
88 skip_fail: false
89
90- description: Install Opencontrail on computes #2
91 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
92 -C 'I@opencontrail:compute' state.sls opencontrail
93 node_name: {{ HOSTNAME_CFG01 }}
94 retry: {count: 2, delay: 5}
95 skip_fail: false
96
Sergii Golovatiukf648ad42017-06-23 13:39:11 +020097# Kubernetes
Sergii Golovatiukf648ad42017-06-23 13:39:11 +020098- description: Install Kubernetes Addons
99 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
100 -C 'I@kubernetes:master' state.sls kubernetes.master.kube-addons
101 node_name: {{ HOSTNAME_CFG01 }}
102 retry: {count: 1, delay: 5}
103 skip_fail: true
104
105- description: Install Kubernetes components
106 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
107 -C 'I@kubernetes:pool' state.sls kubernetes.pool
108 node_name: {{ HOSTNAME_CFG01 }}
Victor Ryzhenkind93a4482018-04-09 15:20:42 +0400109 retry: {count: 5, delay: 60}
Victor Ryzhenkin43c0d0e2017-07-07 19:53:25 +0400110 skip_fail: false
111
Sergii Golovatiukf648ad42017-06-23 13:39:11 +0200112- description: Run Kubernetes master without setup
113 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
114 -C 'I@kubernetes:master' state.sls kubernetes exclude=kubernetes.master.setup
115 node_name: {{ HOSTNAME_CFG01 }}
Victor Ryzhenkind93a4482018-04-09 15:20:42 +0400116 retry: {count: 3, delay: 5}
Sergii Golovatiukf648ad42017-06-23 13:39:11 +0200117 skip_fail: true
118
119- description: Run Kubernetes master setup
120 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
121 -C 'I@kubernetes:master and *01*' state.sls kubernetes.master.setup
122 node_name: {{ HOSTNAME_CFG01 }}
123 retry: {count: 1, delay: 5}
124 skip_fail: true
125
126- description: Restart Kubelet
127 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
128 -C 'I@kubernetes:pool' service.restart 'kubelet'
129 node_name: {{ HOSTNAME_CFG01 }}
130 retry: {count: 1, delay: 5}
131 skip_fail: true
132
Victor Ryzhenkind93a4482018-04-09 15:20:42 +0400133- description: Renew hosts file on a whole cluster
134 cmd: salt --hard-crash --state-output=mixed --state-verbose=False -C '*' state.sls linux.network.host;
Artem Panchenko0594cd72017-06-12 13:25:26 +0300135 node_name: {{ HOSTNAME_CFG01 }}
136 retry: {count: 1, delay: 5}
Victor Ryzhenkind93a4482018-04-09 15:20:42 +0400137 skip_fail: false