| dis | 2b2d863 | 2016-12-08 17:56:57 +0200 | [diff] [blame^] | 1 | {% from 'mk22-lab-dvr-defaults.jinja' import DOMAIN_NAME %} | 
|  | 2 | {% from 'mk22-lab-dvr-defaults.jinja' import HOSTNAME_CFG01 %} | 
|  | 3 |  | 
|  | 4 | # Install OpenStack control services | 
|  | 5 |  | 
|  | 6 | - description: Install keystone service | 
|  | 7 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False | 
|  | 8 | -C 'I@keystone:server' state.sls keystone.server -b 1 | 
|  | 9 | node_name: {{ HOSTNAME_CFG01 }} | 
|  | 10 | retry: {count: 3, delay: 5} | 
|  | 11 | skip_fail: false | 
|  | 12 |  | 
|  | 13 | - description: Populate keystone services/tenants/admins | 
|  | 14 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False | 
|  | 15 | -C 'I@keystone:client' state.sls keystone.client | 
|  | 16 | node_name: {{ HOSTNAME_CFG01 }} | 
|  | 17 | retry: {count: 3, delay: 5} | 
|  | 18 | skip_fail: false | 
|  | 19 |  | 
|  | 20 | - description: Check keystone service-list | 
|  | 21 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False | 
|  | 22 | -C 'I@keystone:server' cmd.run '. /root/keystonerc; keystone service-list' | 
|  | 23 | node_name: {{ HOSTNAME_CFG01 }} | 
|  | 24 | retry: {count: 3, delay: 5} | 
|  | 25 | skip_fail: false | 
|  | 26 |  | 
|  | 27 |  | 
|  | 28 | - description: Install glance on all controllers | 
|  | 29 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False | 
|  | 30 | -C 'I@glance:server' state.sls glance -b 1 | 
|  | 31 | node_name: {{ HOSTNAME_CFG01 }} | 
|  | 32 | retry: {count: 3, delay: 5} | 
|  | 33 | skip_fail: false | 
|  | 34 |  | 
|  | 35 | - description: Configure glusterfs.client on all controllers | 
|  | 36 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False | 
|  | 37 | -C 'I@glance:server' state.sls glusterfs.client | 
|  | 38 | node_name: {{ HOSTNAME_CFG01 }} | 
|  | 39 | retry: {count: 3, delay: 5} | 
|  | 40 | skip_fail: false | 
|  | 41 |  | 
|  | 42 | - description: Update fernet tokens for keystone server | 
|  | 43 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False | 
|  | 44 | -C 'I@keystone:server' state.sls keystone.server -b 1 | 
|  | 45 | node_name: {{ HOSTNAME_CFG01 }} | 
|  | 46 | retry: {count: 3, delay: 5} | 
|  | 47 | skip_fail: false | 
|  | 48 |  | 
|  | 49 | - description: Check glance image-list | 
|  | 50 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False | 
|  | 51 | -C 'I@keystone:server' cmd.run '. /root/keystonerc; glance image-list' | 
|  | 52 | node_name: {{ HOSTNAME_CFG01 }} | 
|  | 53 | retry: {count: 3, delay: 5} | 
|  | 54 | skip_fail: false | 
|  | 55 |  | 
|  | 56 |  | 
|  | 57 | - description: Install nova on all controllers | 
|  | 58 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False | 
|  | 59 | -C 'I@nova:controller' state.sls nova -b 1 | 
|  | 60 | node_name: {{ HOSTNAME_CFG01 }} | 
|  | 61 | retry: {count: 3, delay: 5} | 
|  | 62 | skip_fail: false | 
|  | 63 |  | 
|  | 64 | - description: Check nova service-list | 
|  | 65 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False | 
|  | 66 | -C 'I@keystone:server' cmd.run '. /root/keystonerc; nova service-list' | 
|  | 67 | node_name: {{ HOSTNAME_CFG01 }} | 
|  | 68 | retry: {count: 3, delay: 5} | 
|  | 69 | skip_fail: false | 
|  | 70 |  | 
|  | 71 |  | 
|  | 72 | - description: Install cinder | 
|  | 73 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False | 
|  | 74 | -C 'I@cinder:controller' state.sls cinder -b 1 | 
|  | 75 | node_name: {{ HOSTNAME_CFG01 }} | 
|  | 76 | retry: {count: 3, delay: 5} | 
|  | 77 | skip_fail: false | 
|  | 78 |  | 
|  | 79 | - description: Check cinder list | 
|  | 80 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False | 
|  | 81 | -C 'I@keystone:server' cmd.run '. /root/keystonerc; cinder list' | 
|  | 82 | node_name: {{ HOSTNAME_CFG01 }} | 
|  | 83 | retry: {count: 3, delay: 5} | 
|  | 84 | skip_fail: false | 
|  | 85 |  | 
|  | 86 |  | 
|  | 87 | - description: Install neutron service | 
|  | 88 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False | 
|  | 89 | -C 'I@neutron:server' state.sls neutron -b 1 | 
|  | 90 | node_name: {{ HOSTNAME_CFG01 }} | 
|  | 91 | retry: {count: 3, delay: 5} | 
|  | 92 | skip_fail: false | 
|  | 93 |  | 
|  | 94 | - description: Check neutron agent-list | 
|  | 95 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False | 
|  | 96 | -C 'I@keystone:server' cmd.run '. /root/keystonerc; neutron agent-list' | 
|  | 97 | node_name: {{ HOSTNAME_CFG01 }} | 
|  | 98 | retry: {count: 3, delay: 5} | 
|  | 99 | skip_fail: false | 
|  | 100 |  | 
|  | 101 |  | 
|  | 102 | - description: Install heat service | 
|  | 103 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False | 
|  | 104 | -C 'I@heat:server' state.sls heat -b 1 | 
|  | 105 | node_name: {{ HOSTNAME_CFG01 }} | 
|  | 106 | retry: {count: 3, delay: 5} | 
|  | 107 | skip_fail: false | 
|  | 108 |  | 
|  | 109 | - description: Check heat service | 
|  | 110 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False | 
|  | 111 | -C 'I@keystone:server' cmd.run '. /root/keystonerc; heat resource-type-list' | 
|  | 112 | node_name: {{ HOSTNAME_CFG01 }} | 
|  | 113 | retry: {count: 3, delay: 5} | 
|  | 114 | skip_fail: false | 
|  | 115 |  | 
|  | 116 |  | 
|  | 117 | - description: Deploy horizon dashboard | 
|  | 118 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False | 
|  | 119 | -C 'I@horizon:server' state.sls horizon | 
|  | 120 | node_name: {{ HOSTNAME_CFG01 }} | 
|  | 121 | retry: {count: 3, delay: 5} | 
|  | 122 | skip_fail: true | 
|  | 123 |  | 
|  | 124 | - description: Deploy nginx proxy | 
|  | 125 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False | 
|  | 126 | -C 'I@nginx:server' state.sls nginx | 
|  | 127 | node_name: {{ HOSTNAME_CFG01 }} | 
|  | 128 | retry: {count: 3, delay: 5} | 
|  | 129 | skip_fail: true | 
|  | 130 |  | 
|  | 131 |  | 
|  | 132 | # Install contrail on controllers | 
|  | 133 |  | 
|  | 134 | - description: Install contrail database on controllers | 
|  | 135 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False | 
|  | 136 | -C 'I@opencontrail:database' state.sls opencontrail.database -b 1 | 
|  | 137 | #cmd: salt --hard-crash --state-output=mixed --state-verbose=False | 
|  | 138 | #    'ctl*' state.sls opencontrail.database -b 1 | 
|  | 139 | node_name: {{ HOSTNAME_CFG01 }} | 
|  | 140 | retry: {count: 3, delay: 5} | 
|  | 141 | skip_fail: false | 
|  | 142 |  | 
|  | 143 | - description: Check cassandra status on ctl01 | 
|  | 144 | cmd: salt -C 'I@opencontrail:database' | 
|  | 145 | cmd.run 'nodetool status;nodetool compactionstats;nodetool describecluster;' -b 1 | 
|  | 146 | #cmd: salt 'ctl*' | 
|  | 147 | #    cmd.run 'nodetool status;nodetool compactionstats;nodetool describecluster;' -b 1 | 
|  | 148 | node_name: {{ HOSTNAME_CFG01 }} | 
|  | 149 | retry: {count: 3, delay: 5} | 
|  | 150 | skip_fail: false | 
|  | 151 |  | 
|  | 152 | - description: Install opencontrail control services | 
|  | 153 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False | 
|  | 154 | -C 'I@opencontrail:control' state.sls opencontrail -b 1 | 
|  | 155 | node_name: {{ HOSTNAME_CFG01 }} | 
|  | 156 | retry: {count: 3, delay: 5} | 
|  | 157 | skip_fail: false | 
|  | 158 |  | 
|  | 159 |  | 
|  | 160 | - description: Add contrail bgp router on ctl01 | 
|  | 161 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False | 
|  | 162 | -C 'I@opencontrail:control:id:1' cmd.run | 
|  | 163 | '/usr/share/contrail-utils/provision_control.py --oper add --api_server_ip 172.16.10.254 | 
|  | 164 | --api_server_port 8082 --host_name ctl01 --host_ip 172.16.10.101 --router_asn | 
|  | 165 | 64512 --admin_user admin --admin_password workshop --admin_tenant_name admin' | 
|  | 166 | node_name: {{ HOSTNAME_CFG01 }} | 
|  | 167 | retry: {count: 3, delay: 5} | 
|  | 168 | skip_fail: false | 
|  | 169 |  | 
|  | 170 | - description: Add contrail bgp router on ctl02 | 
|  | 171 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False | 
|  | 172 | -C 'I@opencontrail:control:id:1' cmd.run | 
|  | 173 | '/usr/share/contrail-utils/provision_control.py --oper add --api_server_ip 172.16.10.254 | 
|  | 174 | --api_server_port 8082 --host_name ctl02 --host_ip 172.16.10.102 --router_asn | 
|  | 175 | 64512 --admin_user admin --admin_password workshop --admin_tenant_name admin' | 
|  | 176 | node_name: {{ HOSTNAME_CFG01 }} | 
|  | 177 | retry: {count: 3, delay: 5} | 
|  | 178 | skip_fail: false | 
|  | 179 |  | 
|  | 180 | - description: Add contrail bgp router on ctl03 | 
|  | 181 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False | 
|  | 182 | -C 'I@opencontrail:control:id:1' cmd.run | 
|  | 183 | '/usr/share/contrail-utils/provision_control.py --oper add --api_server_ip 172.16.10.254 | 
|  | 184 | --api_server_port 8082 --host_name ctl03 --host_ip 172.16.10.103 --router_asn | 
|  | 185 | 64512 --admin_user admin --admin_password workshop --admin_tenant_name admin' | 
|  | 186 | node_name: {{ HOSTNAME_CFG01 }} | 
|  | 187 | retry: {count: 3, delay: 5} | 
|  | 188 | skip_fail: false | 
|  | 189 |  | 
|  | 190 | - description: Check contrail status | 
|  | 191 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False | 
|  | 192 | -C 'I@opencontrail:control' cmd.run 'contrail-status' | 
|  | 193 | node_name: {{ HOSTNAME_CFG01 }} | 
|  | 194 | retry: {count: 3, delay: 5} | 
|  | 195 | skip_fail: false | 
|  | 196 |  | 
|  | 197 | - description: Test neutron and nova with contrail | 
|  | 198 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False | 
|  | 199 | -C 'I@keystone:server' cmd.run '. /root/keystonerc; neutron net-list; nova net-list' | 
|  | 200 | node_name: {{ HOSTNAME_CFG01 }} | 
|  | 201 | retry: {count: 3, delay: 5} | 
|  | 202 | skip_fail: false | 
|  | 203 |  | 
|  | 204 |  | 
|  | 205 | # Install compute node | 
|  | 206 |  | 
|  | 207 | - description: Apply formulas for compute node | 
|  | 208 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' state.apply | 
|  | 209 | node_name: {{ HOSTNAME_CFG01 }} | 
|  | 210 | retry: {count: 3, delay: 5} | 
|  | 211 | skip_fail: true | 
|  | 212 |  | 
|  | 213 | - description: Re-apply(as in doc) formulas for compute node | 
|  | 214 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' state.apply | 
|  | 215 | node_name: {{ HOSTNAME_CFG01 }} | 
|  | 216 | retry: {count: 3, delay: 5} | 
|  | 217 | skip_fail: true | 
|  | 218 |  | 
|  | 219 | - description: Add vrouter for cmp01 | 
|  | 220 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False | 
|  | 221 | -C 'I@opencontrail:control:id:1' cmd.run | 
|  | 222 | '/usr/share/contrail-utils/provision_vrouter.py --oper add --host_name cmp01 --host_ip | 
|  | 223 | 172.16.10.105 --api_server_ip 172.16.10.254 --api_server_port 8082 --admin_user | 
|  | 224 | admin --admin_password workshop --admin_tenant_name admin' | 
|  | 225 | node_name: {{ HOSTNAME_CFG01 }} | 
|  | 226 | retry: {count: 3, delay: 5} | 
|  | 227 | skip_fail: false | 
|  | 228 |  | 
|  | 229 | - description: Reboot compute nodes | 
|  | 230 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' system.reboot; | 
|  | 231 | sleep 30 | 
|  | 232 | node_name: {{ HOSTNAME_CFG01 }} | 
|  | 233 | retry: {count: 3, delay: 5} | 
|  | 234 | skip_fail: false | 
|  | 235 |  | 
|  | 236 | - description: Check IP on computes | 
|  | 237 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' cmd.run | 
|  | 238 | 'ip a' | 
|  | 239 | node_name: {{ HOSTNAME_CFG01 }} | 
|  | 240 | retry: {count: 10, delay: 30} | 
|  | 241 | skip_fail: false | 
|  | 242 |  | 
|  | 243 | - description: Check contrail status on computes | 
|  | 244 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' cmd.run | 
|  | 245 | 'contrail-status' | 
|  | 246 | node_name: {{ HOSTNAME_CFG01 }} | 
|  | 247 | retry: {count: 3, delay: 5} | 
|  | 248 | skip_fail: false |