Tatyana Leontovich | b0b68d9 | 2018-01-11 13:27:08 +0200 | [diff] [blame] | 1 | {% from 'virtual-mcp-pike-ovs-ceph/underlay.yaml' import HOSTNAME_CFG01 with context %} |
Tatyana Leontovich | 7a869a7 | 2018-04-20 17:20:00 +0300 | [diff] [blame] | 2 | {% from 'virtual-mcp-pike-ovs-ceph/underlay.yaml' import HOSTNAME_GTW01 with context %} |
Oleksii Butenko | fa5f067 | 2018-04-20 14:43:14 +0300 | [diff] [blame] | 3 | {% from 'virtual-mcp-pike-ovs-ceph/underlay.yaml' import LAB_CONFIG_NAME with context %} |
| 4 | {% from 'virtual-mcp-pike-ovs-ceph/underlay.yaml' import DOMAIN_NAME with context %} |
| 5 | {% import 'shared-salt.yaml' as SHARED with context %} |
Tatyana Leontovich | 56005da | 2017-12-11 13:16:51 +0200 | [diff] [blame] | 6 | |
| 7 | # Install ceph mons |
| 8 | - description: Update grains |
| 9 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 10 | -C 'I@ceph:common' state.sls salt.minion.grains |
| 11 | node_name: {{ HOSTNAME_CFG01 }} |
| 12 | retry: {count: 1, delay: 10} |
| 13 | skip_fail: false |
| 14 | |
| 15 | - description: Generate keyrings |
| 16 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 17 | -C 'I@ceph:mon:keyring:mon or I@ceph:common:keyring:admin' state.sls ceph.mon |
| 18 | node_name: {{ HOSTNAME_CFG01 }} |
| 19 | retry: {count: 1, delay: 10} |
| 20 | skip_fail: false |
| 21 | |
| 22 | - description: Sync grains on ceph mon nodes |
| 23 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 24 | -C 'I@ceph:mon' saltutil.sync_grains |
| 25 | node_name: {{ HOSTNAME_CFG01 }} |
| 26 | retry: {count: 1, delay: 10} |
| 27 | skip_fail: false |
| 28 | |
| 29 | - description: Update mine on ceph mons |
| 30 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 31 | -C 'I@ceph:mon:keyring:mon or I@ceph:common:keyring:admin' mine.update |
| 32 | node_name: {{ HOSTNAME_CFG01 }} |
| 33 | retry: {count: 1, delay: 10} |
| 34 | skip_fail: false |
| 35 | |
| 36 | - description: Install ceph mon |
| 37 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 38 | -C 'I@ceph:mon' state.sls ceph.mon |
| 39 | node_name: {{ HOSTNAME_CFG01 }} |
| 40 | retry: {count: 1, delay: 5} |
| 41 | skip_fail: false |
| 42 | |
| 43 | - description: Install ceph mgr if defined(needed only for Luminious) |
| 44 | cmd: | |
Dennis Dmitriev | 281221b | 2018-02-13 16:40:48 +0200 | [diff] [blame] | 45 | if salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@ceph:mgr' match.pillar 'ceph:mgr' ; then |
| 46 | salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@ceph:mgr' state.sls ceph.mgr |
Tatyana Leontovich | 56005da | 2017-12-11 13:16:51 +0200 | [diff] [blame] | 47 | fi |
| 48 | node_name: {{ HOSTNAME_CFG01 }} |
| 49 | retry: {count: 2, delay: 5} |
| 50 | skip_fail: false |
| 51 | |
| 52 | - description: Install ceph osd |
| 53 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 54 | -C 'I@ceph:osd' state.sls ceph.osd |
| 55 | node_name: {{ HOSTNAME_CFG01 }} |
| 56 | retry: {count: 1, delay: 5} |
| 57 | skip_fail: false |
| 58 | |
| 59 | - description: Sync grains |
| 60 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 61 | -C 'I@ceph:osd' saltutil.sync_grains |
| 62 | node_name: {{ HOSTNAME_CFG01 }} |
| 63 | retry: {count: 1, delay: 5} |
| 64 | skip_fail: false |
| 65 | |
| 66 | - description: Install ceph osd nodes |
| 67 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 68 | -C 'I@ceph:osd' state.sls ceph.osd.custom |
| 69 | node_name: {{ HOSTNAME_CFG01 }} |
| 70 | retry: {count: 1, delay: 5} |
| 71 | skip_fail: true |
| 72 | |
| 73 | - description: Sync grains |
| 74 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 75 | -C 'I@ceph:osd' saltutil.sync_grains |
| 76 | node_name: {{ HOSTNAME_CFG01 }} |
| 77 | retry: {count: 1, delay: 5} |
| 78 | skip_fail: false |
| 79 | |
| 80 | - description: Update mine on ceph osd |
| 81 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 82 | -C 'I@ceph:osd' mine.update |
| 83 | node_name: {{ HOSTNAME_CFG01 }} |
| 84 | retry: {count: 1, delay: 10} |
| 85 | skip_fail: false |
| 86 | |
| 87 | - description: Setup pools, keyrings and maybe crush |
| 88 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 89 | -C 'I@ceph:setup' state.sls ceph.setup |
| 90 | node_name: {{ HOSTNAME_CFG01 }} |
| 91 | retry: {count: 1, delay: 10} |
| 92 | skip_fail: false |
| 93 | |
| 94 | - description: Install ceph clinet |
| 95 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 96 | -C 'I@ceph:setup' state.sls ceph.setup |
| 97 | node_name: {{ HOSTNAME_CFG01 }} |
| 98 | retry: {count: 1, delay: 10} |
| 99 | skip_fail: false |
| 100 | |
| 101 | - description: Install radosgw if exists |
| 102 | cmd: | |
Dennis Dmitriev | 281221b | 2018-02-13 16:40:48 +0200 | [diff] [blame] | 103 | if salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@ceph:radosgw' match.pillar 'ceph:radosgw' ; then |
| 104 | salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@ceph:radosgw' saltutil.sync_grains; |
| 105 | salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@ceph:radosgw' state.sls ceph.radosgw; |
| 106 | salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@keystone:client' state.sls keystone.client; |
Tatyana Leontovich | b0b68d9 | 2018-01-11 13:27:08 +0200 | [diff] [blame] | 107 | fi |
Tatyana Leontovich | 56005da | 2017-12-11 13:16:51 +0200 | [diff] [blame] | 108 | node_name: {{ HOSTNAME_CFG01 }} |
| 109 | retry: {count: 2, delay: 5} |
| 110 | skip_fail: false |
| 111 | |
| 112 | - description: Install ceph clinet |
| 113 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 114 | -C 'I@ceph:setup' state.sls ceph.setup |
| 115 | node_name: {{ HOSTNAME_CFG01 }} |
| 116 | retry: {count: 1, delay: 10} |
| 117 | skip_fail: false |
| 118 | |
Dennis Dmitriev | 5bcbdc5 | 2018-03-23 18:05:10 +0200 | [diff] [blame] | 119 | {%- for ssh in config.underlay.ssh %} |
| 120 | {%- set salt_roles = [] %} |
| 121 | {%- for role in ssh['roles'] %} |
| 122 | {%- if role in config.salt_deploy.salt_roles %} |
| 123 | {%- set _ = salt_roles.append(role) %} |
| 124 | {%- endif %} |
| 125 | {%- endfor %} |
| 126 | |
| 127 | {%- if salt_roles %} |
Tatyana Leontovich | 3fc6a09 | 2018-01-23 13:41:49 +0200 | [diff] [blame] | 128 | - description: Restart salt-minion as workaround of PROD-16970 |
| 129 | cmd: | |
| 130 | service salt-minion restart; # For case if salt-minion was already installed |
| 131 | node_name: {{ ssh['node_name'] }} |
| 132 | retry: {count: 1, delay: 1} |
| 133 | skip_fail: false |
Dennis Dmitriev | 5bcbdc5 | 2018-03-23 18:05:10 +0200 | [diff] [blame] | 134 | {%- endif %} |
| 135 | {%- endfor %} |
Tatyana Leontovich | 3fc6a09 | 2018-01-23 13:41:49 +0200 | [diff] [blame] | 136 | |
Tatyana Leontovich | 56005da | 2017-12-11 13:16:51 +0200 | [diff] [blame] | 137 | - description: Connect ceph to glance |
| 138 | cmd: | |
Dennis Dmitriev | 281221b | 2018-02-13 16:40:48 +0200 | [diff] [blame] | 139 | 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; |
| 140 | salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@ceph:common and I@glance:server' service.restart glance-api; |
Dennis Dmitriev | 281221b | 2018-02-13 16:40:48 +0200 | [diff] [blame] | 141 | salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@ceph:common and I@glance:server' service.restart glance-registry; |
Tatyana Leontovich | 56005da | 2017-12-11 13:16:51 +0200 | [diff] [blame] | 142 | node_name: {{ HOSTNAME_CFG01 }} |
| 143 | retry: {count: 2, delay: 5} |
| 144 | skip_fail: false |
| 145 | |
| 146 | - description: Connect ceph to cinder and nova |
| 147 | cmd: | |
Dennis Dmitriev | 281221b | 2018-02-13 16:40:48 +0200 | [diff] [blame] | 148 | 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; |
| 149 | salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@ceph:common and I@nova:compute' state.sls ceph.common,ceph.setup.keyring; |
| 150 | salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@ceph:common and I@nova:compute' saltutil.sync_grains; |
| 151 | salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@ceph:common and I@nova:compute' state.sls nova; |
Tatyana Leontovich | 56005da | 2017-12-11 13:16:51 +0200 | [diff] [blame] | 152 | node_name: {{ HOSTNAME_CFG01 }} |
| 153 | retry: {count: 2, delay: 5} |
| 154 | skip_fail: false |
| 155 | |
| 156 | - description: Restart cinder volume |
| 157 | cmd: | |
Dennis Dmitriev | 281221b | 2018-02-13 16:40:48 +0200 | [diff] [blame] | 158 | salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@cinder:controller' service.restart cinder-volume; |
Tatyana Leontovich | 56005da | 2017-12-11 13:16:51 +0200 | [diff] [blame] | 159 | node_name: {{ HOSTNAME_CFG01 }} |
| 160 | retry: {count: 2, delay: 5} |
| 161 | skip_fail: false |
| 162 | |
| 163 | - description: Restart nova-compute |
| 164 | cmd: | |
Dennis Dmitriev | 281221b | 2018-02-13 16:40:48 +0200 | [diff] [blame] | 165 | salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@nova:compute' service.restart nova-compute; |
Tatyana Leontovich | 56005da | 2017-12-11 13:16:51 +0200 | [diff] [blame] | 166 | node_name: {{ HOSTNAME_CFG01 }} |
| 167 | retry: {count: 2, delay: 5} |
| 168 | skip_fail: false |
Oleksii Butenko | 5cd0a16 | 2018-06-14 18:18:10 +0300 | [diff] [blame] | 169 | |