| {# Collection of common macroses shared across openstack services #} |
| |
| {%- macro MACRO_INSTALL_KEYSTONE(USE_ORCHESTRATE=true) %} |
| {%- if USE_ORCHESTRATE %} |
| - description: | |
| Execute salt orchestration state to configure all needed |
| prerequisites like creating SSH public key ant etc. |
| Workaround for PROD-22488, use for PROD-22535. |
| cmd: salt-run state.orchestrate keystone.orchestrate.deploy |
| node_name: {{ HOSTNAME_CFG01 }} |
| retry: {count: 1, delay: 5} |
| skip_fail: false |
| {%- endif %} |
| |
| - description: Install keystone service on primary node |
| cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| -C 'I@keystone:server and *01*' state.sls keystone.server |
| node_name: {{ HOSTNAME_CFG01 }} |
| retry: {count: 2, delay: 15} |
| skip_fail: false |
| |
| - description: Install keystone service on other nodes |
| cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| -C 'I@keystone:server' state.sls keystone.server |
| node_name: {{ HOSTNAME_CFG01 }} |
| retry: {count: 2, delay: 15} |
| skip_fail: false |
| |
| - description: Restart apache due to PROD-10477 |
| cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl*' |
| cmd.run "service apache2 restart" |
| node_name: {{ HOSTNAME_CFG01 }} |
| retry: {count: 1, delay: 15} |
| skip_fail: false |
| |
| - description: Check apache status to PROD-10477 |
| cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl*' |
| cmd.run "service apache2 status" |
| node_name: {{ HOSTNAME_CFG01 }} |
| retry: {count: 1, delay: 15} |
| skip_fail: false |
| |
| - description: Mount glusterfs.client volumes (resuires created 'keystone' system user) |
| cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| -C 'I@keystone:server' state.sls glusterfs.client -b 1 |
| node_name: {{ HOSTNAME_CFG01 }} |
| retry: {count: 1, delay: 5} |
| skip_fail: false |
| |
| - description: Update fernet keys for keystone server on the mounted glusterfs volume |
| cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| -C 'I@keystone:server' state.sls keystone.server -b 1 |
| node_name: {{ HOSTNAME_CFG01 }} |
| retry: {count: 1, delay: 5} |
| skip_fail: false |
| |
| - description: Populate keystone services/tenants/admins |
| cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| -C 'I@keystone:client' state.sls keystone.client |
| node_name: {{ HOSTNAME_CFG01 }} |
| retry: {count: 2, delay: 5} |
| skip_fail: false |
| |
| - description: Check keystone service-list |
| cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| -C "I@keystone:server" cmd.run ". /root/keystonercv3; |
| openstack service list" |
| node_name: {{ HOSTNAME_CFG01 }} |
| retry: {count: 1, delay: 5} |
| skip_fail: false |
| {%- endmacro %} |
| |
| {%- macro MACRO_INSTALL_GLANCE() %} |
| - description: Install glance service on primary node |
| cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| -C 'I@glance:server and *01*' state.sls glance.server |
| node_name: {{ HOSTNAME_CFG01 }} |
| retry: {count: 1, delay: 5} |
| skip_fail: false |
| |
| - description: Install glance service on other nodes |
| cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| -C 'I@glance:server' state.sls glance.server |
| node_name: {{ HOSTNAME_CFG01 }} |
| retry: {count: 1, delay: 5} |
| skip_fail: false |
| |
| - description: Mount glusterfs.client volumes (resuires created 'glusterfs' system user) |
| cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| -C 'I@glance:server' state.sls glusterfs.client -b 1 |
| node_name: {{ HOSTNAME_CFG01 }} |
| retry: {count: 1, delay: 5} |
| skip_fail: false |
| |
| #- description: Setup glance.client |
| # cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| # -C 'I@glance:client' state.sls glance.client |
| # node_name: {{ HOSTNAME_CFG01 }} |
| # retry: {count: 1, delay: 5} |
| # skip_fail: false |
| |
| - description: Check glance image-list |
| cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| -C "I@keystone:server" cmd.run ". /root/keystonercv3; |
| openstack image list" |
| node_name: {{ HOSTNAME_CFG01 }} |
| retry: {count: 1, delay: 5} |
| skip_fail: false |
| {%- endmacro %} |
| |
| {%- macro MACRO_INSTALL_NOVA() %} |
| - description: Install nova service on primary node |
| cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| -C "I@nova:controller and *01*" state.sls nova.controller |
| node_name: {{ HOSTNAME_CFG01 }} |
| retry: {count: 1, delay: 5} |
| skip_fail: false |
| |
| - description: Install nova service on other nodes |
| cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| -C "I@nova:controller" state.sls nova.controller |
| node_name: {{ HOSTNAME_CFG01 }} |
| retry: {count: 1, delay: 5} |
| skip_fail: false |
| |
| - description: Check nova service-list |
| cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| -C "I@keystone:server" cmd.run ". /root/keystonercv3; |
| openstack compute service list" |
| node_name: {{ HOSTNAME_CFG01 }} |
| retry: {count: 1, delay: 5} |
| skip_fail: false |
| |
| - description: Check nova list |
| cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| -C "I@keystone:server" cmd.run ". /root/keystonercv3; |
| openstack server list" |
| node_name: {{ HOSTNAME_CFG01 }} |
| retry: {count: 1, delay: 5} |
| skip_fail: false |
| {%- endmacro %} |
| |
| {%- macro MACRO_INSTALL_CINDER(INSTALL_VOLUME=false) %} |
| - description: Install cinder on primary node |
| cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| -C "I@cinder:controller and *01*" state.sls cinder |
| node_name: {{ HOSTNAME_CFG01 }} |
| retry: {count: 1, delay: 5} |
| skip_fail: false |
| |
| - description: Install cinder on other nodes |
| cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| -C "I@cinder:controller" state.sls cinder |
| node_name: {{ HOSTNAME_CFG01 }} |
| retry: {count: 1, delay: 5} |
| skip_fail: false |
| |
| - description: Check cinder list |
| cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| -C "I@keystone:server" cmd.run ". /root/keystonercv3; |
| openstack volume list" |
| node_name: {{ HOSTNAME_CFG01 }} |
| retry: {count: 1, delay: 5} |
| skip_fail: false |
| |
| {%- if INSTALL_VOLUME %} |
| - description: Install cinder volume |
| cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| -C 'I@cinder:volume' state.sls cinder |
| node_name: {{ HOSTNAME_CFG01 }} |
| retry: {count: 1, delay: 5} |
| skip_fail: false |
| {%- endif %} |
| |
| {%- endmacro %} |
| |
| {%- macro MACRO_INSTALL_NEUTRON(INSTALL_GATEWAY=true) %} |
| - description: Install neutron service on primary node |
| cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| -C "I@neutron:server and *01*" state.sls neutron.server |
| node_name: {{ HOSTNAME_CFG01 }} |
| retry: {count: 1, delay: 5} |
| skip_fail: false |
| |
| - description: Install neutron service on other nodes |
| cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| -C "I@neutron:server" state.sls neutron.server |
| node_name: {{ HOSTNAME_CFG01 }} |
| retry: {count: 1, delay: 5} |
| skip_fail: false |
| |
| {%- if INSTALL_GATEWAY %} |
| - description: Install neutron on gtw node |
| cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| -C 'I@neutron:gateway' state.sls neutron |
| node_name: {{ HOSTNAME_CFG01 }} |
| retry: {count: 1, delay: 5} |
| skip_fail: false |
| |
| - description: Check neutron agent-list |
| cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| -C 'I@keystone:server' cmd.run '. /root/keystonercv3; neutron agent-list' |
| node_name: {{ HOSTNAME_CFG01 }} |
| retry: {count: 1, delay: 5} |
| skip_fail: false |
| {%- endif %} |
| |
| {%- endmacro %} |
| |
| {%- macro MACRO_INSTALL_HEAT() %} |
| - description: Install heat service on primary node |
| cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| -C "I@heat:server and *01*" state.sls heat.server |
| node_name: {{ HOSTNAME_CFG01 }} |
| retry: {count: 1, delay: 5} |
| skip_fail: false |
| |
| - description: Install heat service on other nodes |
| cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| -C "I@heat:server" state.sls heat.server |
| node_name: {{ HOSTNAME_CFG01 }} |
| retry: {count: 1, delay: 5} |
| skip_fail: false |
| |
| - description: Check heat service |
| cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| -C 'I@keystone:server' cmd.run '. /root/keystonercv3; |
| openstack orchestration resource type list' |
| node_name: {{ HOSTNAME_CFG01 }} |
| retry: {count: 5, delay: 10} |
| skip_fail: false |
| {%- endmacro %} |
| |
| {%- macro MACRO_INSTALL_HORIZON() %} |
| - description: Deploy horizon dashboard |
| cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| -C 'I@horizon:server' state.sls horizon |
| node_name: {{ HOSTNAME_CFG01 }} |
| retry: {count: 1, delay: 5} |
| skip_fail: true |
| |
| - description: Deploy nginx proxy |
| cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| -C 'I@nginx:server' state.sls nginx |
| node_name: {{ HOSTNAME_CFG01 }} |
| retry: {count: 1, delay: 5} |
| skip_fail: true |
| {%- endmacro %} |
| |
| {%- macro MACRO_INSTALL_DESIGNATE() %} |
| # Note: deploy backend for designate firstly |
| - description: Install designate on primary node |
| cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| -C "I@designate:server and *01*" state.sls designate.server |
| node_name: {{ HOSTNAME_CFG01 }} |
| retry: {count: 5, delay: 10} |
| skip_fail: false |
| |
| - description: Install designate on other nodes |
| cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| -C "I@designate:server" state.sls designate |
| node_name: {{ HOSTNAME_CFG01 }} |
| retry: {count: 5, delay: 10} |
| skip_fail: false |
| {%- endmacro %} |
| |
| {%- macro MACRO_INSTALL_CEILOMETER() %} |
| # TO DO |
| {%- endmacro %} |
| |
| {%- macro MACRO_INSTALL_BARBICAN() %} |
| # TO DO |
| {%- endmacro %} |
| |
| {%- macro MACRO_INSTALL_IRONIC() %} |
| # TO DO |
| {%- endmacro %} |
| |
| {%- macro MACRO_INSTALL_MANILA() %} |
| # TO DO |
| {%- endmacro %} |
| |
| {%- macro MACRO_INSTALL_OCTAVIA_API() %} |
| # TO DO |
| {%- endmacro %} |
| |
| {%- macro MACRO_INSTALL_DOGTAG() %} |
| # TO DO |
| {%- endmacro %} |
| |
| {%- macro MACRO_INSTALL_GNOCCHI() %} |
| # TO DO |
| {%- endmacro %} |
| |
| {%- macro MACRO_INSTALL_AODH() %} |
| # TO DO |
| {%- endmacro %} |
| |
| {%- macro MACRO_INSTALL_COMPUTE() %} |
| # Install compute node |
| - description: Apply formulas for compute node |
| cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' state.apply |
| node_name: {{ HOSTNAME_CFG01 }} |
| retry: {count: 1, delay: 5} |
| skip_fail: true |
| |
| - description: Re-apply(as in doc) formulas for compute node |
| cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' state.apply |
| node_name: {{ HOSTNAME_CFG01 }} |
| retry: {count: 1, delay: 5} |
| skip_fail: false |
| |
| - description: Check IP on computes |
| cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' cmd.run |
| 'ip a' |
| node_name: {{ HOSTNAME_CFG01 }} |
| retry: {count: 10, delay: 30} |
| skip_fail: false |
| {%- endmacro %} |