blob: 3aa53f971a6527d854a9cbae562b8e06123ab513 [file] [log] [blame]
Tatyana Leontovichb0b68d92018-01-11 13:27:08 +02001{% from 'virtual-pike-ovs-dpdk/underlay.yaml' import HOSTNAME_CFG01 with context %}
2{% from 'virtual-pike-ovs-dpdk/underlay.yaml' import HOSTNAME_CTL01 with context %}
3{% from 'virtual-pike-ovs-dpdk/underlay.yaml' import HOSTNAME_CTL02 with context %}
4{% from 'virtual-pike-ovs-dpdk/underlay.yaml' import HOSTNAME_CTL03 with context %}
Tatyana Leontovich56005da2017-12-11 13:16:51 +02005{% from 'shared-salt.yaml' import IPV4_NET_EXTERNAL_PREFIX with context %}
6{% from 'shared-salt.yaml' import IPV4_NET_TENANT_PREFIX with context %}
7
Tatyana Leontovich0eb5ca32018-07-13 22:05:17 +03008{% set DOMAIN_NAME = os_env('DOMAIN_NAME', 'virtual-pike-ovs-dpdk') %}
9{% import 'shared-backup-restore.yaml' as BACKUP with context %}
10{% import 'shared-salt.yaml' as SHARED with context %}
Dennis Dmitriev4034db02018-08-26 21:50:13 +030011{% import 'shared-openstack.yaml' as SHARED_OPENSTACK with context %}
Tatyana Leontovich0eb5ca32018-07-13 22:05:17 +030012
Tatyana Leontovich56005da2017-12-11 13:16:51 +020013# Install OpenStack control services
14
sgudz62df2fc2018-10-09 12:26:19 +030015{{ SHARED_OPENSTACK.MACRO_INSTALL_KEYSTONE() }}
Tatyana Leontovich56005da2017-12-11 13:16:51 +020016
Dennis Dmitriev4034db02018-08-26 21:50:13 +030017{{ SHARED_OPENSTACK.MACRO_INSTALL_GLANCE() }}
Tatyana Leontovich56005da2017-12-11 13:16:51 +020018
Dennis Dmitriev4034db02018-08-26 21:50:13 +030019{{ SHARED_OPENSTACK.MACRO_INSTALL_NOVA() }}
Tatyana Leontovich56005da2017-12-11 13:16:51 +020020
Dennis Dmitriev4034db02018-08-26 21:50:13 +030021{{ SHARED_OPENSTACK.MACRO_INSTALL_CINDER() }}
Tatyana Leontovich56005da2017-12-11 13:16:51 +020022
Dennis Dmitriev4034db02018-08-26 21:50:13 +030023{{ SHARED_OPENSTACK.MACRO_INSTALL_NEUTRON() }}
Tatyana Leontovich56005da2017-12-11 13:16:51 +020024
Dennis Dmitriev4034db02018-08-26 21:50:13 +030025{{ SHARED_OPENSTACK.MACRO_INSTALL_HEAT() }}
Tatyana Leontovich56005da2017-12-11 13:16:51 +020026
27- description: Deploy horizon dashboard
28 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
29 -C 'I@horizon:server' state.sls horizon
30 node_name: {{ HOSTNAME_CFG01 }}
31 retry: {count: 1, delay: 5}
32 skip_fail: true
33
34- description: Deploy nginx proxy
35 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
36 -C 'I@nginx:server' state.sls nginx
37 node_name: {{ HOSTNAME_CFG01 }}
38 retry: {count: 1, delay: 5}
39 skip_fail: true
40
41
42# Install compute node
43
44- description: Apply formulas for compute node
45 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' state.apply
46 node_name: {{ HOSTNAME_CFG01 }}
47 retry: {count: 1, delay: 5}
48 skip_fail: true
49
50- description: Re-apply(as in doc) formulas for compute node
51 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' state.apply
52 node_name: {{ HOSTNAME_CFG01 }}
53 retry: {count: 1, delay: 5}
Oleksii Butenko9f2601c2018-02-08 15:13:21 +020054 skip_fail: false
Tatyana Leontovich56005da2017-12-11 13:16:51 +020055
56- description: Check IP on computes
57 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' cmd.run
58 'ip a'
59 node_name: {{ HOSTNAME_CFG01 }}
60 retry: {count: 10, delay: 30}
61 skip_fail: false
62
63
64 # Upload cirros image
65
66- description: Upload cirros image on ctl01
67 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
68 'wget http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-i386-disk.img'
69 node_name: {{ HOSTNAME_CFG01 }}
70 retry: {count: 2, delay: 30}
71 skip_fail: false
72
Tatyana Leontovichb0b68d92018-01-11 13:27:08 +020073- description: Register image in glance
74 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
75 '. /root/keystonercv3; glance --timeout 120 image-create --name cirros --visibility public --disk-format qcow2 --container-format bare --progress < /root/cirros-0.3.4-i386-disk.img'
76 node_name: {{ HOSTNAME_CFG01 }}
77 retry: {count: 1, delay: 30}
78 skip_fail: false
79
Tatyana Leontovich56005da2017-12-11 13:16:51 +020080- description: Create net04_external
81 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
82 '. /root/keystonercv3; neutron net-create net04_ext --router:external True --provider:physical_network physnet1 --provider:network_type flat'
83 node_name: {{ HOSTNAME_CFG01 }}
84 retry: {count: 1, delay: 30}
85 skip_fail: false
86
87- description: Create subnet_external
88 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
89 '. /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'
90 node_name: {{ HOSTNAME_CFG01 }}
91 retry: {count: 1, delay: 30}
92 skip_fail: false
93
94- description: Create net04
95 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
Tatyana Leontovichb0b68d92018-01-11 13:27:08 +020096 '. /root/keystonercv3; neutron net-create net04 --provider:network_type gre'
Tatyana Leontovich56005da2017-12-11 13:16:51 +020097 node_name: {{ HOSTNAME_CFG01 }}
98 retry: {count: 1, delay: 30}
99 skip_fail: false
100
101- description: Create subnet_net04
102 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
103 '. /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'
104 node_name: {{ HOSTNAME_CFG01 }}
105 retry: {count: 1, delay: 30}
106 skip_fail: false
107
108- description: Create router
109 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
Tatyana Leontovichb0b68d92018-01-11 13:27:08 +0200110 '. /root/keystonercv3; neutron router-create net04_router01 --ha False'
Tatyana Leontovich56005da2017-12-11 13:16:51 +0200111 node_name: {{ HOSTNAME_CFG01 }}
112 retry: {count: 1, delay: 30}
113 skip_fail: false
114
115- description: Set geteway
116 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
117 '. /root/keystonercv3; neutron router-gateway-set net04_router01 net04_ext'
118 node_name: {{ HOSTNAME_CFG01 }}
119 retry: {count: 1, delay: 30}
120 skip_fail: false
121
122- description: Add interface
123 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
124 '. /root/keystonercv3; neutron router-interface-add net04_router01 net04__subnet'
125 node_name: {{ HOSTNAME_CFG01 }}
126 retry: {count: 1, delay: 30}
127 skip_fail: false
128
Tatyana Leontovichb0b68d92018-01-11 13:27:08 +0200129# Configure cinder-volume salt-call
130- description: Set disks 01
131 cmd: salt-call cmd.run 'echo -e "nn\np\n\n\n\nw" | fdisk /dev/vdb'
132 node_name: {{ HOSTNAME_CTL01 }}
Tatyana Leontovich56005da2017-12-11 13:16:51 +0200133 retry: {count: 1, delay: 30}
134 skip_fail: false
135
Tatyana Leontovichb0b68d92018-01-11 13:27:08 +0200136- description: Set disks 02
137 cmd: salt-call cmd.run 'echo -e "nn\np\n\n\n\nw" | fdisk /dev/vdb'
138 node_name: {{ HOSTNAME_CTL02 }}
Tatyana Leontovich56005da2017-12-11 13:16:51 +0200139 retry: {count: 1, delay: 30}
140 skip_fail: false
141
Tatyana Leontovichb0b68d92018-01-11 13:27:08 +0200142- description: Set disks 03
143 cmd: salt-call cmd.run 'echo -e "nn\np\n\n\n\nw" | fdisk /dev/vdb'
144 node_name: {{ HOSTNAME_CTL03 }}
Tatyana Leontovich56005da2017-12-11 13:16:51 +0200145 retry: {count: 1, delay: 30}
146 skip_fail: false
147
Tatyana Leontovichb0b68d92018-01-11 13:27:08 +0200148- description: Create partitions 01
149 cmd: salt-call cmd.run 'pvcreate /dev/vdb1'
150 node_name: {{ HOSTNAME_CTL01 }}
Tatyana Leontovich56005da2017-12-11 13:16:51 +0200151 retry: {count: 1, delay: 30}
152 skip_fail: false
153
Tatyana Leontovichb0b68d92018-01-11 13:27:08 +0200154- description: Create partitions 02
155 cmd: salt-call cmd.run 'pvcreate /dev/vdb1'
156 node_name: {{ HOSTNAME_CTL02 }}
Tatyana Leontovich56005da2017-12-11 13:16:51 +0200157 retry: {count: 1, delay: 30}
158 skip_fail: false
159
Tatyana Leontovichb0b68d92018-01-11 13:27:08 +0200160- description: Create partitions 03
161 cmd: salt-call cmd.run 'pvcreate /dev/vdb1'
162 node_name: {{ HOSTNAME_CTL03 }}
Tatyana Leontovich56005da2017-12-11 13:16:51 +0200163 retry: {count: 1, delay: 30}
164 skip_fail: false
Tatyana Leontovich0eb5ca32018-07-13 22:05:17 +0300165
166{{ SHARED.INSTALL_DOCKER_ON_GTW() }}
167{{ BACKUP.MACRO_WR_NGINX_MASTER() }}
168{{ BACKUP.MACRO_BACKUP_BACKUPNINJA() }}
sgudz62df2fc2018-10-09 12:26:19 +0300169{{ BACKUP.MACRO_BACKUP_XTRABACKUP() }}