blob: 25ec2f08bb05fb110d0b0cec97af77b0c1354048 [file] [log] [blame]
Tatyana Leontovich460f7df2017-11-13 15:45:06 +02001{% from 'virtual-mcp-ocata-ovs-ceph/underlay.yaml' import HOSTNAME_CFG01 with context %}
2
Tatyana Leontovichd6cc3cb2017-12-06 13:01:13 +02003
Tatyana Leontovich460f7df2017-11-13 15:45:06 +02004# Install ceph mons
5- description: Update grains
6 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
7 -C 'I@ceph:common' state.sls salt.minion.grains
8 node_name: {{ HOSTNAME_CFG01 }}
9 retry: {count: 1, delay: 10}
10 skip_fail: false
11
12- description: Generate keyrings
13 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
14 -C 'I@ceph:mon:keyring:mon or I@ceph:common:keyring:admin' state.sls ceph.mon
15 node_name: {{ HOSTNAME_CFG01 }}
16 retry: {count: 1, delay: 10}
17 skip_fail: false
18
19- description: Sync grains on ceph mon nodes
20 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
Tatyana Leontovicha754ce52017-11-13 16:46:43 +020021 -C 'I@ceph:mon' saltutil.sync_grains
Tatyana Leontovich460f7df2017-11-13 15:45:06 +020022 node_name: {{ HOSTNAME_CFG01 }}
23 retry: {count: 1, delay: 10}
24 skip_fail: false
25
26- description: Update mine on ceph mons
27 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
Tatyana Leontovicha754ce52017-11-13 16:46:43 +020028 -C 'I@ceph:mon:keyring:mon or I@ceph:common:keyring:admin' mine.update
Tatyana Leontovich460f7df2017-11-13 15:45:06 +020029 node_name: {{ HOSTNAME_CFG01 }}
30 retry: {count: 1, delay: 10}
31 skip_fail: false
32
33- description: Install ceph mon
34 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
35 -C 'I@ceph:mon' state.sls ceph.mon
36 node_name: {{ HOSTNAME_CFG01 }}
37 retry: {count: 1, delay: 5}
38 skip_fail: false
39
Tatyana Leontovicha754ce52017-11-13 16:46:43 +020040- description: Install ceph mgr if defined(needed only for Luminious)
Tatyana Leontovich460f7df2017-11-13 15:45:06 +020041 cmd: |
Dennis Dmitriev281221b2018-02-13 16:40:48 +020042 if salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@ceph:mgr' match.pillar 'ceph:mgr' ; then
43 salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@ceph:mgr' state.sls ceph.mgr
Tatyana Leontovich460f7df2017-11-13 15:45:06 +020044 fi
45 node_name: {{ HOSTNAME_CFG01 }}
46 retry: {count: 2, delay: 5}
47 skip_fail: false
48
49- description: Install ceph osd
50 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
51 -C 'I@ceph:osd' state.sls ceph.osd
52 node_name: {{ HOSTNAME_CFG01 }}
53 retry: {count: 1, delay: 5}
54 skip_fail: false
55
56- description: Sync grains
57 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
Tatyana Leontovicha754ce52017-11-13 16:46:43 +020058 -C 'I@ceph:osd' saltutil.sync_grains
Tatyana Leontovich460f7df2017-11-13 15:45:06 +020059 node_name: {{ HOSTNAME_CFG01 }}
60 retry: {count: 1, delay: 5}
61 skip_fail: false
62
63- description: Install ceph osd nodes
64 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
65 -C 'I@ceph:osd' state.sls ceph.osd.custom
66 node_name: {{ HOSTNAME_CFG01 }}
67 retry: {count: 1, delay: 5}
Tatyana Leontovicha754ce52017-11-13 16:46:43 +020068 skip_fail: true
Tatyana Leontovich460f7df2017-11-13 15:45:06 +020069
70- description: Sync grains
71 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
Tatyana Leontovicha754ce52017-11-13 16:46:43 +020072 -C 'I@ceph:osd' saltutil.sync_grains
Tatyana Leontovich460f7df2017-11-13 15:45:06 +020073 node_name: {{ HOSTNAME_CFG01 }}
74 retry: {count: 1, delay: 5}
75 skip_fail: false
76
77- description: Update mine on ceph osd
78 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
Tatyana Leontovicha754ce52017-11-13 16:46:43 +020079 -C 'I@ceph:osd' mine.update
Tatyana Leontovich460f7df2017-11-13 15:45:06 +020080 node_name: {{ HOSTNAME_CFG01 }}
81 retry: {count: 1, delay: 10}
82 skip_fail: false
83
84- description: Setup pools, keyrings and maybe crush
85 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
86 -C 'I@ceph:setup' state.sls ceph.setup
87 node_name: {{ HOSTNAME_CFG01 }}
88 retry: {count: 1, delay: 10}
89 skip_fail: false
90
91- description: Install ceph clinet
92 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
93 -C 'I@ceph:setup' state.sls ceph.setup
94 node_name: {{ HOSTNAME_CFG01 }}
95 retry: {count: 1, delay: 10}
96 skip_fail: false
97
98- description: Install radosgw if exists
99 cmd: |
Dennis Dmitriev281221b2018-02-13 16:40:48 +0200100 if salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@ceph:radosgw' match.pillar 'ceph:radosgw' ; then
101 salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@ceph:radosgw' saltutil.sync_grains;
102 salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@ceph:radosgw' state.sls ceph.radosgw;
103 salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@keystone:client' state.sls keystone.client;
Tatyana Leontovich460f7df2017-11-13 15:45:06 +0200104 fi
105 node_name: {{ HOSTNAME_CFG01 }}
106 retry: {count: 2, delay: 5}
107 skip_fail: false
108
109- description: Install ceph clinet
110 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
111 -C 'I@ceph:setup' state.sls ceph.setup
112 node_name: {{ HOSTNAME_CFG01 }}
113 retry: {count: 1, delay: 10}
114 skip_fail: false
115
Tatyana Leontovicha754ce52017-11-13 16:46:43 +0200116- description: Connect ceph to glance
Tatyana Leontovich460f7df2017-11-13 15:45:06 +0200117 cmd: |
Dennis Dmitriev281221b2018-02-13 16:40:48 +0200118 salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@ceph:common and I@glance:server' state.sls ceph.common,ceph.setup.keyring,glance;
119 salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@ceph:common and I@glance:server' service.restart glance-api;
120 salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@ceph:common and I@glance:server' service.restart glance-glare;
121 salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@ceph:common and I@glance:server' service.restart glance-registry;
Tatyana Leontovich460f7df2017-11-13 15:45:06 +0200122 node_name: {{ HOSTNAME_CFG01 }}
123 retry: {count: 2, delay: 5}
124 skip_fail: false
125
Tatyana Leontovicha754ce52017-11-13 16:46:43 +0200126- description: Connect ceph to cinder and nova
Tatyana Leontovich460f7df2017-11-13 15:45:06 +0200127 cmd: |
Dennis Dmitriev281221b2018-02-13 16:40:48 +0200128 salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@ceph:common and I@cinder:controller' state.sls ceph.common,ceph.setup.keyring,cinder;
129 salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@ceph:common and I@nova:compute' state.sls ceph.common,ceph.setup.keyring;
130 salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@ceph:common and I@nova:compute' saltutil.sync_grains;
131 salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@ceph:common and I@nova:compute' state.sls nova;
Tatyana Leontovich460f7df2017-11-13 15:45:06 +0200132 node_name: {{ HOSTNAME_CFG01 }}
133 retry: {count: 2, delay: 5}
134 skip_fail: false
Tatyana Leontovichd6cc3cb2017-12-06 13:01:13 +0200135
136- description: Restart cinder volume
137 cmd: |
Dennis Dmitriev281221b2018-02-13 16:40:48 +0200138 salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@cinder:controller' service.restart cinder-volume;
Tatyana Leontovichd6cc3cb2017-12-06 13:01:13 +0200139 node_name: {{ HOSTNAME_CFG01 }}
140 retry: {count: 2, delay: 5}
141 skip_fail: false
142
Tatyana Leontovich329e8ad2017-12-07 15:13:02 +0200143- description: Restart nova-compute
144 cmd: |
Dennis Dmitriev281221b2018-02-13 16:40:48 +0200145 salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@nova:compute' service.restart nova-compute;
Tatyana Leontovich329e8ad2017-12-07 15:13:02 +0200146 node_name: {{ HOSTNAME_CFG01 }}
147 retry: {count: 2, delay: 5}
148 skip_fail: false
149
Tatyana Leontovichd6cc3cb2017-12-06 13:01:13 +0200150- description: conver cirros image
151 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
152 'qemu-img convert cirros-0.3.4-i386-disk.img cirros.raw'
153 node_name: {{ HOSTNAME_CFG01 }}
154 retry: {count: 2, delay: 30}
155 skip_fail: false
156
157- description: Register image in glance
158 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
159 '. /root/keystonercv3; glance --timeout 120 image-create --name "cirros" --disk-format raw --container-format bare --visibility public --file cirros.raw'
160 node_name: {{ HOSTNAME_CFG01 }}
161 retry: {count: 1, delay: 30}
162 skip_fail: false