blob: 18f18eeb91c1ed4d05c12885206d7390a28a3337 [file] [log] [blame]
Tatyana Leontovichb0b68d92018-01-11 13:27:08 +02001{% from 'virtual-mcp-pike-dvr-ceph-rgw/underlay.yaml' import HOSTNAME_CFG01 with context %}
2{% from 'virtual-mcp-pike-dvr-ceph-rgw/underlay.yaml' import HOSTNAME_CTL01 with context %}
3{% from 'virtual-mcp-pike-dvr-ceph-rgw/underlay.yaml' import HOSTNAME_CTL02 with context %}
4{% from 'virtual-mcp-pike-dvr-ceph-rgw/underlay.yaml' import HOSTNAME_CTL03 with context %}
5{% from 'virtual-mcp-pike-dvr-ceph-rgw/underlay.yaml' import HOSTNAME_GTW01 with context %}
Tatyana Leontovich56005da2017-12-11 13:16:51 +02006{% from 'shared-salt.yaml' import IPV4_NET_EXTERNAL_PREFIX with context %}
7{% from 'shared-salt.yaml' import IPV4_NET_TENANT_PREFIX with context %}
8
Oleksii Butenko5cd0a162018-06-14 18:18:10 +03009{% import 'shared-salt.yaml' as SHARED with context %}
Dennis Dmitriev4034db02018-08-26 21:50:13 +030010{% import 'shared-openstack.yaml' as SHARED_OPENSTACK with context %}
Oleksii Butenko5cd0a162018-06-14 18:18:10 +030011
Tatyana Leontovich8015f022018-07-04 11:57:51 +030012{% import 'shared-backup-restore.yaml' as BACKUP with context %}
13
Tatyana Leontovich56005da2017-12-11 13:16:51 +020014# Install OpenStack control services
15
Dennis Dmitriev4034db02018-08-26 21:50:13 +030016{{ SHARED_OPENSTACK.MACRO_INSTALL_KEYSTONE(USE_ORCHESTRATE=false) }}
Tatyana Leontovich56005da2017-12-11 13:16:51 +020017
Dennis Dmitriev4034db02018-08-26 21:50:13 +030018{{ SHARED_OPENSTACK.MACRO_INSTALL_GLANCE() }}
Tatyana Leontovich56005da2017-12-11 13:16:51 +020019
Dennis Dmitriev4034db02018-08-26 21:50:13 +030020{{ SHARED_OPENSTACK.MACRO_INSTALL_NOVA() }}
Tatyana Leontovich56005da2017-12-11 13:16:51 +020021
Dennis Dmitriev4034db02018-08-26 21:50:13 +030022{{ SHARED_OPENSTACK.MACRO_INSTALL_CINDER() }}
Tatyana Leontovich56005da2017-12-11 13:16:51 +020023
Dennis Dmitriev4034db02018-08-26 21:50:13 +030024{{ SHARED_OPENSTACK.MACRO_INSTALL_NEUTRON() }}
Tatyana Leontovich56005da2017-12-11 13:16:51 +020025
Dennis Dmitriev4034db02018-08-26 21:50:13 +030026{{ SHARED_OPENSTACK.MACRO_INSTALL_HEAT() }}
Tatyana Leontovich56005da2017-12-11 13:16:51 +020027
28- description: Deploy horizon dashboard
29 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
30 -C 'I@horizon:server' state.sls horizon
31 node_name: {{ HOSTNAME_CFG01 }}
32 retry: {count: 1, delay: 5}
33 skip_fail: true
34
35- description: Deploy nginx proxy
36 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
37 -C 'I@nginx:server' state.sls nginx
38 node_name: {{ HOSTNAME_CFG01 }}
39 retry: {count: 1, delay: 5}
40 skip_fail: true
41
42
43# Install compute node
44
45- description: Apply formulas for compute node
46 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' state.apply
47 node_name: {{ HOSTNAME_CFG01 }}
48 retry: {count: 1, delay: 5}
49 skip_fail: true
50
51- description: Re-apply(as in doc) formulas for compute node
52 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' state.apply
53 node_name: {{ HOSTNAME_CFG01 }}
54 retry: {count: 1, delay: 5}
Oleksii Butenko9f2601c2018-02-08 15:13:21 +020055 skip_fail: false
Tatyana Leontovich56005da2017-12-11 13:16:51 +020056
57- description: Check IP on computes
58 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' cmd.run
59 'ip a'
60 node_name: {{ HOSTNAME_CFG01 }}
61 retry: {count: 10, delay: 30}
62 skip_fail: false
63
Tatyanka Leontovichcc4568c2018-09-26 10:47:16 +000064- description: Create net04_external
65 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
66 '. /root/keystonercv3; neutron net-create net04_ext --router:external True --provider:physical_network physnet1 --provider:network_type flat'
67 node_name: {{ HOSTNAME_CFG01 }}
68 retry: {count: 1, delay: 30}
69 skip_fail: false
70
71- description: Create subnet_external
72 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
73 '. /root/keystonercv3; neutron subnet-create net04_ext {{ IPV4_NET_EXTERNAL_PREFIX }}.0/24 --name net04_ext__subnet --disable-dhcp --allocation-pool start={{ IPV4_NET_EXTERNAL_PREFIX }}.150,end={{ IPV4_NET_EXTERNAL_PREFIX }}.180 --gateway {{ IPV4_NET_EXTERNAL_PREFIX }}.1'
74 node_name: {{ HOSTNAME_CFG01 }}
75 retry: {count: 1, delay: 30}
76 skip_fail: false
77
78- description: Create net04
79 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
80 '. /root/keystonercv3; neutron net-create net04'
81 node_name: {{ HOSTNAME_CFG01 }}
82 retry: {count: 1, delay: 30}
83 skip_fail: false
84
85- description: Create subnet_net04
86 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
87 '. /root/keystonercv3; neutron subnet-create net04 {{ IPV4_NET_TENANT_PREFIX }}.0/24 --name net04__subnet --allocation-pool start={{ IPV4_NET_TENANT_PREFIX }}.120,end={{ IPV4_NET_TENANT_PREFIX }}.240'
88 node_name: {{ HOSTNAME_CFG01 }}
89 retry: {count: 1, delay: 30}
90 skip_fail: false
91
92- description: Create router
93 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
94 '. /root/keystonercv3; neutron router-create net04_router01'
95 node_name: {{ HOSTNAME_CFG01 }}
96 retry: {count: 1, delay: 30}
97 skip_fail: false
98
99- description: Set geteway
100 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
101 '. /root/keystonercv3; neutron router-gateway-set net04_router01 net04_ext'
102 node_name: {{ HOSTNAME_CFG01 }}
103 retry: {count: 1, delay: 30}
104 skip_fail: false
105
106- description: Add interface
107 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
108 '. /root/keystonercv3; neutron router-interface-add net04_router01 net04__subnet'
109 node_name: {{ HOSTNAME_CFG01 }}
110 retry: {count: 1, delay: 30}
111 skip_fail: false
112
113- description: sync time
114 cmd: salt --hard-crash --state-output=mixed --state-verbose=False '*' cmd.run
115 'service ntp stop; ntpd -gq; service ntp start'
116 node_name: {{ HOSTNAME_CFG01 }}
117 retry: {count: 1, delay: 30}
118 skip_fail: false
119
Tatyana Leontovich92063ef2018-07-04 14:28:09 +0300120{{ BACKUP.MACRO_WR_NGINX_MASTER() }}
Tatyana Leontovich8015f022018-07-04 11:57:51 +0300121{{ BACKUP.MACRO_BACKUP_BACKUPNINJA() }}
122{{ BACKUP.MACRO_BACKUP_XTRABACKUP() }}