ibumarskov | b521006 | 2018-08-22 16:18:15 +0400 | [diff] [blame] | 1 | {# Collection of common macroses shared across openstack services #} |
| 2 | |
| 3 | {%- macro MACRO_INSTALL_KEYSTONE() %} |
ibumarskov | 330bc12 | 2018-08-23 13:02:04 +0400 | [diff] [blame] | 4 | - description: Execute salt orchestration state to configure all needed |
| 5 | prerequisites like creating SSH public key ant etc. |
| 6 | cmd: salt-run state.orchestrate keystone.orchestrate.deploy |
| 7 | node_name: {{ HOSTNAME_CFG01 }} |
| 8 | retry: {count: 1, delay: 5} |
| 9 | skip_fail: false |
| 10 | |
ibumarskov | b521006 | 2018-08-22 16:18:15 +0400 | [diff] [blame] | 11 | - description: Install keystone service on primary node |
| 12 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 13 | -C 'I@keystone:server and *01*' state.sls keystone.server |
| 14 | node_name: {{ HOSTNAME_CFG01 }} |
| 15 | retry: {count: 2, delay: 15} |
| 16 | skip_fail: false |
| 17 | |
| 18 | - description: Install keystone service on other nodes |
| 19 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 20 | -C 'I@keystone:server' state.sls keystone.server |
| 21 | node_name: {{ HOSTNAME_CFG01 }} |
| 22 | retry: {count: 2, delay: 15} |
| 23 | skip_fail: false |
| 24 | |
| 25 | - description: Restart apache due to PROD-10477 |
| 26 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl*' |
| 27 | cmd.run "systemctl restart apache2" |
| 28 | node_name: {{ HOSTNAME_CFG01 }} |
| 29 | retry: {count: 1, delay: 15} |
| 30 | skip_fail: false |
| 31 | |
| 32 | - description: Check apache status to PROD-10477 |
| 33 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl*' |
| 34 | cmd.run "systemctl status apache2" |
| 35 | node_name: {{ HOSTNAME_CFG01 }} |
| 36 | retry: {count: 1, delay: 15} |
| 37 | skip_fail: false |
| 38 | |
| 39 | - description: Populate keystone services/tenants/admins |
| 40 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 41 | -C 'I@keystone:client' state.sls keystone.client |
| 42 | node_name: {{ HOSTNAME_CFG01 }} |
| 43 | retry: {count: 2, delay: 5} |
| 44 | skip_fail: false |
| 45 | |
| 46 | - description: Check keystone service-list |
| 47 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 48 | -C 'I@keystone:server' cmd.run '. /root/keystonercv3; openstack service list' |
| 49 | node_name: {{ HOSTNAME_CFG01 }} |
| 50 | retry: {count: 1, delay: 5} |
| 51 | skip_fail: false |
| 52 | {%- endmacro %} |
| 53 | |
| 54 | {%- macro MACRO_INSTALL_GLANCE() %} |
| 55 | - description: Install glance service on primary node |
| 56 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 57 | -C 'I@glance:server and *01*' state.sls glance.server |
| 58 | node_name: {{ HOSTNAME_CFG01 }} |
| 59 | retry: {count: 1, delay: 5} |
| 60 | skip_fail: false |
| 61 | |
| 62 | - description: Install glance service on other nodes |
| 63 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 64 | -C 'I@glance:server' state.sls glance.server |
| 65 | node_name: {{ HOSTNAME_CFG01 }} |
| 66 | retry: {count: 1, delay: 5} |
| 67 | skip_fail: false |
| 68 | |
| 69 | - description: Update Fernet tokens |
| 70 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 71 | -C 'I@keystone:server' state.sls keystone.server |
| 72 | node_name: {{ HOSTNAME_CFG01 }} |
| 73 | retry: {count: 1, delay: 5} |
| 74 | skip_fail: false |
| 75 | |
| 76 | - description: Check glance image-list |
| 77 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 78 | -C 'I@keystone:server' cmd.run '. /root/keystonerc; glance image-list' |
| 79 | node_name: {{ HOSTNAME_CFG01 }} |
| 80 | retry: {count: 1, delay: 5} |
| 81 | skip_fail: false |
| 82 | {%- endmacro %} |
| 83 | |
| 84 | {%- macro MACRO_INSTALL_NOVA() %} |
| 85 | - description: Install nova service on primary node |
| 86 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 87 | -C "I@nova:controller and *01*" state.sls nova.controller |
| 88 | node_name: {{ HOSTNAME_CFG01 }} |
| 89 | retry: {count: 1, delay: 5} |
| 90 | skip_fail: false |
| 91 | |
| 92 | - description: Install nova service on other nodes |
| 93 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 94 | -C "I@nova:controller" state.sls nova.controller |
| 95 | node_name: {{ HOSTNAME_CFG01 }} |
| 96 | retry: {count: 1, delay: 5} |
| 97 | skip_fail: false |
| 98 | |
| 99 | - description: Check nova service-list |
| 100 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 101 | -C "I@keystone:server" cmd.run ". /root/keystonercv3; nova |
| 102 | --debug service-list" |
| 103 | node_name: {{ HOSTNAME_CFG01 }} |
| 104 | retry: {count: 1, delay: 5} |
| 105 | skip_fail: false |
| 106 | |
| 107 | - description: Check nova list |
| 108 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 109 | -C "I@keystone:server" cmd.run ". /root/keystonercv3; nova --debug list" |
| 110 | node_name: {{ HOSTNAME_CFG01 }} |
| 111 | retry: {count: 1, delay: 5} |
| 112 | skip_fail: false |
| 113 | {%- endmacro %} |
| 114 | |
| 115 | {%- macro MACRO_INSTALL_CINDER() %} |
| 116 | - description: Install cinder on primary node |
| 117 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 118 | -C "I@cinder:controller and *01*" state.sls cinder |
| 119 | node_name: {{ HOSTNAME_CFG01 }} |
| 120 | retry: {count: 1, delay: 5} |
| 121 | skip_fail: false |
| 122 | |
| 123 | - description: Install cinder on other nodes |
| 124 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 125 | -C "I@cinder:controller" state.sls cinder |
| 126 | node_name: {{ HOSTNAME_CFG01 }} |
| 127 | retry: {count: 1, delay: 5} |
| 128 | skip_fail: false |
| 129 | |
| 130 | - description: Check cinder list |
| 131 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 132 | -C 'I@keystone:server' cmd.run '. /root/keystonerc; cinder list' |
| 133 | node_name: {{ HOSTNAME_CFG01 }} |
| 134 | retry: {count: 1, delay: 5} |
| 135 | skip_fail: false |
| 136 | {%- endmacro %} |
| 137 | |
| 138 | {%- macro MACRO_INSTALL_NEUTRON() %} |
| 139 | - description: Install neutron service on primary node |
| 140 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 141 | -C "I@neutron:server and *01*" state.sls neutron.server |
| 142 | node_name: {{ HOSTNAME_CFG01 }} |
| 143 | retry: {count: 1, delay: 5} |
| 144 | skip_fail: false |
| 145 | |
| 146 | - description: Install neutron service on other nodes |
| 147 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 148 | -C "I@neutron:server" state.sls neutron.server |
| 149 | node_name: {{ HOSTNAME_CFG01 }} |
| 150 | retry: {count: 1, delay: 5} |
| 151 | skip_fail: false |
| 152 | |
| 153 | - description: Install neutron on gtw node |
| 154 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 155 | -C 'I@neutron:gateway' state.sls neutron |
| 156 | node_name: {{ HOSTNAME_CFG01 }} |
| 157 | retry: {count: 1, delay: 5} |
| 158 | skip_fail: false |
| 159 | |
| 160 | - description: Check neutron agent-list |
| 161 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 162 | -C 'I@keystone:server' cmd.run '. /root/keystonerc; neutron agent-list' |
| 163 | node_name: {{ HOSTNAME_CFG01 }} |
| 164 | retry: {count: 1, delay: 5} |
| 165 | skip_fail: false |
| 166 | {%- endmacro %} |
| 167 | |
| 168 | {%- macro MACRO_INSTALL_HEAT() %} |
| 169 | - description: Install heat service on primary node |
| 170 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 171 | -C "I@heat:server and *01*" state.sls heat.server |
| 172 | node_name: {{ HOSTNAME_CFG01 }} |
| 173 | retry: {count: 1, delay: 5} |
| 174 | skip_fail: false |
| 175 | |
| 176 | - description: Install heat service on other nodes |
| 177 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 178 | -C "I@heat:server" state.sls heat.server |
| 179 | node_name: {{ HOSTNAME_CFG01 }} |
| 180 | retry: {count: 1, delay: 5} |
| 181 | skip_fail: false |
| 182 | |
| 183 | - description: Check heat service |
| 184 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 185 | -C 'I@keystone:server' cmd.run '. /root/keystonercv3; openstack orchestration resource type list' |
| 186 | node_name: {{ HOSTNAME_CFG01 }} |
| 187 | retry: {count: 5, delay: 10} |
| 188 | skip_fail: false |
| 189 | {%- endmacro %} |
| 190 | |
| 191 | {%- macro MACRO_INSTALL_HORIZON() %} |
| 192 | - description: Deploy horizon dashboard |
| 193 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 194 | -C 'I@horizon:server' state.sls horizon |
| 195 | node_name: {{ HOSTNAME_CFG01 }} |
| 196 | retry: {count: 1, delay: 5} |
| 197 | skip_fail: true |
| 198 | |
| 199 | - description: Deploy nginx proxy |
| 200 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 201 | -C 'I@nginx:server' state.sls nginx |
| 202 | node_name: {{ HOSTNAME_CFG01 }} |
| 203 | retry: {count: 1, delay: 5} |
| 204 | skip_fail: true |
| 205 | {%- endmacro %} |
| 206 | |
| 207 | {%- macro MACRO_INSTALL_DESIGNATE() %} |
| 208 | # Note: deploy backend for designate firstly |
| 209 | - description: Install designate on primary node |
| 210 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 211 | -C "I@designate:server and *01*" state.sls designate.server |
| 212 | node_name: {{ HOSTNAME_CFG01 }} |
| 213 | retry: {count: 5, delay: 10} |
| 214 | skip_fail: false |
| 215 | |
| 216 | - description: Install designate on other nodes |
| 217 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 218 | -C "I@designate:server" state.sls designate |
| 219 | node_name: {{ HOSTNAME_CFG01 }} |
| 220 | retry: {count: 5, delay: 10} |
| 221 | skip_fail: false |
| 222 | {%- endmacro %} |
| 223 | |
| 224 | {%- macro MACRO_INSTALL_CEILOMETER() %} |
| 225 | # TO DO |
| 226 | {%- endmacro %} |
| 227 | |
| 228 | {%- macro MACRO_INSTALL_BARBICAN() %} |
| 229 | # TO DO |
| 230 | {%- endmacro %} |
| 231 | |
| 232 | {%- macro MACRO_INSTALL_IRONIC() %} |
| 233 | # TO DO |
| 234 | {%- endmacro %} |
| 235 | |
| 236 | {%- macro MACRO_INSTALL_MANILA() %} |
| 237 | # TO DO |
| 238 | {%- endmacro %} |
| 239 | |
| 240 | {%- macro MACRO_INSTALL_OCTAVIA_API() %} |
| 241 | # TO DO |
| 242 | {%- endmacro %} |
| 243 | |
| 244 | {%- macro MACRO_INSTALL_DOGTAG() %} |
| 245 | # TO DO |
| 246 | {%- endmacro %} |
| 247 | |
| 248 | {%- macro MACRO_INSTALL_GNOCCHI() %} |
| 249 | # TO DO |
| 250 | {%- endmacro %} |
| 251 | |
| 252 | {%- macro MACRO_INSTALL_AODH() %} |
| 253 | # TO DO |
| 254 | {%- endmacro %} |