blob: eb0a042e4948c24805273cafbe191a9857b41795 [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
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
Tatyana Leontovicha754ce52017-11-13 16:46:43 +020020 -C 'I@ceph:mon' saltutil.sync_grains
Tatyana Leontovich460f7df2017-11-13 15:45:06 +020021 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
Tatyana Leontovicha754ce52017-11-13 16:46:43 +020027 -C 'I@ceph:mon:keyring:mon or I@ceph:common:keyring:admin' mine.update
Tatyana Leontovich460f7df2017-11-13 15:45:06 +020028 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
Tatyana Leontovicha754ce52017-11-13 16:46:43 +020039- description: Install ceph mgr if defined(needed only for Luminious)
Tatyana Leontovich460f7df2017-11-13 15:45:06 +020040 cmd: |
Tatyana Leontovicha754ce52017-11-13 16:46:43 +020041 if salt -C 'I@ceph:mgr' match.pillar 'ceph:mgr' ; then
Tatyana Leontovich460f7df2017-11-13 15:45:06 +020042 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
Tatyana Leontovicha754ce52017-11-13 16:46:43 +020057 -C 'I@ceph:osd' saltutil.sync_grains
Tatyana Leontovich460f7df2017-11-13 15:45:06 +020058 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}
Tatyana Leontovicha754ce52017-11-13 16:46:43 +020067 skip_fail: true
Tatyana Leontovich460f7df2017-11-13 15:45:06 +020068
69- description: Sync grains
70 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
Tatyana Leontovicha754ce52017-11-13 16:46:43 +020071 -C 'I@ceph:osd' saltutil.sync_grains
Tatyana Leontovich460f7df2017-11-13 15:45:06 +020072 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
Tatyana Leontovicha754ce52017-11-13 16:46:43 +020078 -C 'I@ceph:osd' mine.update
Tatyana Leontovich460f7df2017-11-13 15:45:06 +020079 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 if salt -C 'I@ceph:radosgw' match.pillar 'ceph:radosgw' ; then
Tatyana Leontovicha754ce52017-11-13 16:46:43 +0200100 salt -C 'I@ceph:radosgw' saltutil.sync_grains;
Tatyana Leontovich460f7df2017-11-13 15:45:06 +0200101 salt -C 'I@ceph:radosgw' state.sls ceph.radosgw;
102 salt -C 'I@keystone:client' state.sls keystone.client;
103 fi
104 node_name: {{ HOSTNAME_CFG01 }}
105 retry: {count: 2, delay: 5}
106 skip_fail: false
107
108- description: Install ceph clinet
109 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
110 -C 'I@ceph:setup' state.sls ceph.setup
111 node_name: {{ HOSTNAME_CFG01 }}
112 retry: {count: 1, delay: 10}
113 skip_fail: false
114
Tatyana Leontovicha754ce52017-11-13 16:46:43 +0200115- description: Connect ceph to glance
Tatyana Leontovich460f7df2017-11-13 15:45:06 +0200116 cmd: |
Tatyana Leontovicha754ce52017-11-13 16:46:43 +0200117 salt -C 'I@ceph:common and I@glance:server' state.sls ceph.common,ceph.setup.keyring,glance;
118 salt -C 'I@ceph:common and I@glance:server' service.restart glance-api;
119 salt -C 'I@ceph:common and I@glance:server' service.restart glance-glare;
120 salt -C 'I@ceph:common and I@glance:server' service.restart glance-registry;
Tatyana Leontovich460f7df2017-11-13 15:45:06 +0200121 node_name: {{ HOSTNAME_CFG01 }}
122 retry: {count: 2, delay: 5}
123 skip_fail: false
124
Tatyana Leontovicha754ce52017-11-13 16:46:43 +0200125- description: Connect ceph to cinder and nova
Tatyana Leontovich460f7df2017-11-13 15:45:06 +0200126 cmd: |
Tatyana Leontovicha754ce52017-11-13 16:46:43 +0200127 salt -C 'I@ceph:common and I@cinder:controller' state.sls ceph.common,ceph.setup.keyring,cinder;
128 salt -C 'I@ceph:common and I@nova:compute' state.sls ceph.common,ceph.setup.keyring;
129 salt -C 'I@ceph:common and I@nova:compute' saltutil.sync_grains;
130 salt -C 'I@ceph:common and I@nova:compute' state.sls nova;
Tatyana Leontovich460f7df2017-11-13 15:45:06 +0200131 node_name: {{ HOSTNAME_CFG01 }}
132 retry: {count: 2, delay: 5}
133 skip_fail: false