blob: 1387114567d666eeaf5d2f8048148372c1317caa [file] [log] [blame]
Tatyana Leontovichb0b68d92018-01-11 13:27:08 +02001{% from 'virtual-mcp-pike-ovs-ceph/underlay.yaml' import HOSTNAME_CFG01 with context %}
2{% from 'virtual-mcp-pike-ovs-ceph/underlay.yaml' import HOSTNAME_CTL01 with context %}
3{% from 'virtual-mcp-pike-ovs-ceph/underlay.yaml' import HOSTNAME_CTL02 with context %}
4{% from 'virtual-mcp-pike-ovs-ceph/underlay.yaml' import HOSTNAME_CTL03 with context %}
5{% from 'virtual-mcp-pike-ovs-ceph/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 Leontovich56005da2017-12-11 13:16:51 +020012# Install OpenStack control services
13
Dennis Dmitriev4034db02018-08-26 21:50:13 +030014{{ SHARED_OPENSTACK.MACRO_INSTALL_KEYSTONE(USE_ORCHESTRATE=false) }}
Tatyana Leontovich56005da2017-12-11 13:16:51 +020015
Dennis Dmitriev4034db02018-08-26 21:50:13 +030016{{ SHARED_OPENSTACK.MACRO_INSTALL_GLANCE() }}
Tatyana Leontovich56005da2017-12-11 13:16:51 +020017
Dennis Dmitriev4034db02018-08-26 21:50:13 +030018{{ SHARED_OPENSTACK.MACRO_INSTALL_NOVA() }}
Tatyana Leontovich56005da2017-12-11 13:16:51 +020019
Dennis Dmitriev4034db02018-08-26 21:50:13 +030020{{ SHARED_OPENSTACK.MACRO_INSTALL_CINDER() }}
Tatyana Leontovich56005da2017-12-11 13:16:51 +020021
Dennis Dmitriev4034db02018-08-26 21:50:13 +030022{{ SHARED_OPENSTACK.MACRO_INSTALL_NEUTRON() }}
Tatyana Leontovich56005da2017-12-11 13:16:51 +020023
Dennis Dmitriev4034db02018-08-26 21:50:13 +030024{{ SHARED_OPENSTACK.MACRO_INSTALL_HEAT() }}
Tatyana Leontovich56005da2017-12-11 13:16:51 +020025
26- description: Deploy horizon dashboard
27 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
28 -C 'I@horizon:server' state.sls horizon
29 node_name: {{ HOSTNAME_CFG01 }}
30 retry: {count: 1, delay: 5}
31 skip_fail: true
32
33- description: Deploy nginx proxy
34 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
35 -C 'I@nginx:server' state.sls nginx
36 node_name: {{ HOSTNAME_CFG01 }}
37 retry: {count: 1, delay: 5}
38 skip_fail: true
39
40
41# Install compute node
42
43- description: Apply formulas for compute node
44 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' state.apply
45 node_name: {{ HOSTNAME_CFG01 }}
46 retry: {count: 1, delay: 5}
47 skip_fail: true
48
49- description: Re-apply(as in doc) formulas for compute node
50 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' state.apply
51 node_name: {{ HOSTNAME_CFG01 }}
52 retry: {count: 1, delay: 5}
Oleksii Butenko9f2601c2018-02-08 15:13:21 +020053 skip_fail: false
Tatyana Leontovich56005da2017-12-11 13:16:51 +020054
55- description: Check IP on computes
56 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' cmd.run
57 'ip a'
58 node_name: {{ HOSTNAME_CFG01 }}
59 retry: {count: 10, delay: 30}
60 skip_fail: false
61
62
63 # Upload cirros image
64
Tatyana Leontovich56005da2017-12-11 13:16:51 +020065- description: Create net04_external
66 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
67 '. /root/keystonercv3; neutron net-create net04_ext --router:external True --provider:physical_network physnet1 --provider:network_type flat'
68 node_name: {{ HOSTNAME_CFG01 }}
69 retry: {count: 1, delay: 30}
70 skip_fail: false
71
72- description: Create subnet_external
73 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
74 '. /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'
75 node_name: {{ HOSTNAME_CFG01 }}
76 retry: {count: 1, delay: 30}
77 skip_fail: false
78
79- description: Create net04
80 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
81 '. /root/keystonercv3; neutron net-create net04'
82 node_name: {{ HOSTNAME_CFG01 }}
83 retry: {count: 1, delay: 30}
84 skip_fail: false
85
86- description: Create subnet_net04
87 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
88 '. /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'
89 node_name: {{ HOSTNAME_CFG01 }}
90 retry: {count: 1, delay: 30}
91 skip_fail: false
92
93- description: Create router
94 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
95 '. /root/keystonercv3; neutron router-create net04_router01'
96 node_name: {{ HOSTNAME_CFG01 }}
97 retry: {count: 1, delay: 30}
98 skip_fail: false
99
100- description: Set geteway
101 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
102 '. /root/keystonercv3; neutron router-gateway-set net04_router01 net04_ext'
103 node_name: {{ HOSTNAME_CFG01 }}
104 retry: {count: 1, delay: 30}
105 skip_fail: false
106
107- description: Add interface
108 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
109 '. /root/keystonercv3; neutron router-interface-add net04_router01 net04__subnet'
110 node_name: {{ HOSTNAME_CFG01 }}
111 retry: {count: 1, delay: 30}
112 skip_fail: false
113
Tatyana Leontovich56005da2017-12-11 13:16:51 +0200114- description: sync time
115 cmd: salt --hard-crash --state-output=mixed --state-verbose=False '*' cmd.run
116 'service ntp stop; ntpd -gq; service ntp start'
117 node_name: {{ HOSTNAME_CFG01 }}
118 retry: {count: 1, delay: 30}
119 skip_fail: false