blob: e702f3e6f601dc463261a9e684c05f3d6751072c [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 %}
Tatyana Leontovich56005da2017-12-11 13:16:51 +02002
3# Install ceph mons
4- description: Update grains
5 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
6 -C 'I@ceph:common' state.sls salt.minion.grains
7 node_name: {{ HOSTNAME_CFG01 }}
8 retry: {count: 1, delay: 10}
9 skip_fail: false
10
11- description: Generate keyrings
12 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
13 -C 'I@ceph:mon:keyring:mon or I@ceph:common:keyring:admin' state.sls ceph.mon
14 node_name: {{ HOSTNAME_CFG01 }}
15 retry: {count: 1, delay: 10}
16 skip_fail: false
17
18- description: Sync grains on ceph mon nodes
19 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
20 -C 'I@ceph:mon' saltutil.sync_grains
21 node_name: {{ HOSTNAME_CFG01 }}
22 retry: {count: 1, delay: 10}
23 skip_fail: false
24
25- description: Update mine on ceph mons
26 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
27 -C 'I@ceph:mon:keyring:mon or I@ceph:common:keyring:admin' mine.update
28 node_name: {{ HOSTNAME_CFG01 }}
29 retry: {count: 1, delay: 10}
30 skip_fail: false
31
32- description: Install ceph mon
33 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
34 -C 'I@ceph:mon' state.sls ceph.mon
35 node_name: {{ HOSTNAME_CFG01 }}
36 retry: {count: 1, delay: 5}
37 skip_fail: false
38
39- description: Install ceph mgr if defined(needed only for Luminious)
40 cmd: |
41 if salt -C 'I@ceph:mgr' match.pillar 'ceph:mgr' ; then
42 salt -C 'I@ceph:mgr' state.sls ceph.mgr
43 fi
44 node_name: {{ HOSTNAME_CFG01 }}
45 retry: {count: 2, delay: 5}
46 skip_fail: false
47
48- description: Install ceph osd
49 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
50 -C 'I@ceph:osd' state.sls ceph.osd
51 node_name: {{ HOSTNAME_CFG01 }}
52 retry: {count: 1, delay: 5}
53 skip_fail: false
54
55- description: Sync grains
56 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
57 -C 'I@ceph:osd' saltutil.sync_grains
58 node_name: {{ HOSTNAME_CFG01 }}
59 retry: {count: 1, delay: 5}
60 skip_fail: false
61
62- description: Install ceph osd nodes
63 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
64 -C 'I@ceph:osd' state.sls ceph.osd.custom
65 node_name: {{ HOSTNAME_CFG01 }}
66 retry: {count: 1, delay: 5}
67 skip_fail: true
68
69- description: Sync grains
70 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
71 -C 'I@ceph:osd' saltutil.sync_grains
72 node_name: {{ HOSTNAME_CFG01 }}
73 retry: {count: 1, delay: 5}
74 skip_fail: false
75
76- description: Update mine on ceph osd
77 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
78 -C 'I@ceph:osd' mine.update
79 node_name: {{ HOSTNAME_CFG01 }}
80 retry: {count: 1, delay: 10}
81 skip_fail: false
82
83- description: Setup pools, keyrings and maybe crush
84 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
85 -C 'I@ceph:setup' state.sls ceph.setup
86 node_name: {{ HOSTNAME_CFG01 }}
87 retry: {count: 1, delay: 10}
88 skip_fail: false
89
90- description: Install ceph clinet
91 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
92 -C 'I@ceph:setup' state.sls ceph.setup
93 node_name: {{ HOSTNAME_CFG01 }}
94 retry: {count: 1, delay: 10}
95 skip_fail: false
96
97- description: Install radosgw if exists
98 cmd: |
99 salt -C 'I@ceph:radosgw' saltutil.sync_grains;
100 salt -C 'I@ceph:radosgw' state.sls ceph.radosgw;
101 salt -C 'I@keystone:client' state.sls keystone.client;
102 node_name: {{ HOSTNAME_CFG01 }}
103 retry: {count: 2, delay: 5}
104 skip_fail: false
105
106- description: Install ceph clinet
107 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
108 -C 'I@ceph:setup' state.sls ceph.setup
109 node_name: {{ HOSTNAME_CFG01 }}
110 retry: {count: 1, delay: 10}
111 skip_fail: false
112
113- description: Connect ceph to glance
114 cmd: |
115 salt -C 'I@ceph:common and I@glance:server' state.sls ceph.common,ceph.setup.keyring,glance;
116 salt -C 'I@ceph:common and I@glance:server' service.restart glance-api;
117 salt -C 'I@ceph:common and I@glance:server' service.restart glance-glare;
118 salt -C 'I@ceph:common and I@glance:server' service.restart glance-registry;
119 node_name: {{ HOSTNAME_CFG01 }}
120 retry: {count: 2, delay: 5}
121 skip_fail: false
122
123- description: Connect ceph to cinder and nova
124 cmd: |
125 salt -C 'I@ceph:common and I@cinder:controller' state.sls ceph.common,ceph.setup.keyring,cinder;
126 salt -C 'I@ceph:common and I@nova:compute' state.sls ceph.common,ceph.setup.keyring;
127 salt -C 'I@ceph:common and I@nova:compute' saltutil.sync_grains;
128 salt -C 'I@ceph:common and I@nova:compute' state.sls nova;
129 node_name: {{ HOSTNAME_CFG01 }}
130 retry: {count: 2, delay: 5}
131 skip_fail: false
132
133- description: Restart cinder volume
134 cmd: |
135 salt -C 'I@cinder:controller' service.restart cinder-volume;
136 node_name: {{ HOSTNAME_CFG01 }}
137 retry: {count: 2, delay: 5}
138 skip_fail: false
139
140- description: Restart nova-compute
141 cmd: |
142 salt -C 'I@nova:compute' service.restart nova-compute;
143 node_name: {{ HOSTNAME_CFG01 }}
144 retry: {count: 2, delay: 5}
145 skip_fail: false
146
147- description: conver cirros image
148 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
149 'qemu-img convert cirros-0.3.4-i386-disk.img cirros.raw'
150 node_name: {{ HOSTNAME_CFG01 }}
151 retry: {count: 2, delay: 30}
152 skip_fail: false
153
154- description: Register image in glance
155 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
156 '. /root/keystonercv3; glance --timeout 120 image-create --name "cirros" --disk-format raw --container-format bare --visibility public --file cirros.raw'
157 node_name: {{ HOSTNAME_CFG01 }}
158 retry: {count: 1, delay: 30}
159 skip_fail: false