blob: 40a81f2bafc68c7bd482154f32446c38d3dd89a8 [file] [log] [blame]
{# Collection of common macroses shared across openstack services #}
{%- macro MACRO_INSTALL_KEYSTONE() %}
- 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 "systemctl restart apache2"
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 "systemctl status apache2"
node_name: {{ HOSTNAME_CFG01 }}
retry: {count: 1, delay: 15}
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: Update Fernet tokens
cmd: salt --hard-crash --state-output=mixed --state-verbose=False
-C 'I@keystone:server' state.sls keystone.server
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/keystonerc; glance 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; nova
--debug 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; nova --debug list"
node_name: {{ HOSTNAME_CFG01 }}
retry: {count: 1, delay: 5}
skip_fail: false
{%- endmacro %}
{%- macro MACRO_INSTALL_CINDER() %}
- 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/keystonerc; cinder list'
node_name: {{ HOSTNAME_CFG01 }}
retry: {count: 1, delay: 5}
skip_fail: false
{%- endmacro %}
{%- macro MACRO_INSTALL_NEUTRON() %}
- 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
- 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/keystonerc; neutron agent-list'
node_name: {{ HOSTNAME_CFG01 }}
retry: {count: 1, delay: 5}
skip_fail: false
{%- 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 %}