Tatyana Leontovich | b0b68d9 | 2018-01-11 13:27:08 +0200 | [diff] [blame] | 1 | {% from 'virtual-mcp-pike-dvr-ceph-rgw/underlay.yaml' import HOSTNAME_CFG01 with context %} |
Tatyana Leontovich | 56005da | 2017-12-11 13:16:51 +0200 | [diff] [blame] | 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 |
| 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 | |
Tatyana Leontovich | 3fc6a09 | 2018-01-23 13:41:49 +0200 | [diff] [blame] | 113 | {% for ssh in config.underlay.ssh %} |
| 114 | - description: Restart salt-minion as workaround of PROD-16970 |
| 115 | cmd: | |
| 116 | service salt-minion restart; # For case if salt-minion was already installed |
| 117 | node_name: {{ ssh['node_name'] }} |
| 118 | retry: {count: 1, delay: 1} |
| 119 | skip_fail: false |
| 120 | {% endfor %} |
| 121 | |
Tatyana Leontovich | 56005da | 2017-12-11 13:16:51 +0200 | [diff] [blame] | 122 | - description: Connect ceph to glance |
| 123 | cmd: | |
| 124 | salt -C 'I@ceph:common and I@glance:server' state.sls ceph.common,ceph.setup.keyring,glance; |
| 125 | salt -C 'I@ceph:common and I@glance:server' service.restart glance-api; |
| 126 | salt -C 'I@ceph:common and I@glance:server' service.restart glance-glare; |
| 127 | salt -C 'I@ceph:common and I@glance:server' service.restart glance-registry; |
| 128 | node_name: {{ HOSTNAME_CFG01 }} |
| 129 | retry: {count: 2, delay: 5} |
| 130 | skip_fail: false |
| 131 | |
| 132 | - description: Connect ceph to cinder and nova |
| 133 | cmd: | |
| 134 | salt -C 'I@ceph:common and I@cinder:controller' state.sls ceph.common,ceph.setup.keyring,cinder; |
| 135 | salt -C 'I@ceph:common and I@nova:compute' state.sls ceph.common,ceph.setup.keyring; |
| 136 | salt -C 'I@ceph:common and I@nova:compute' saltutil.sync_grains; |
| 137 | salt -C 'I@ceph:common and I@nova:compute' state.sls nova; |
| 138 | node_name: {{ HOSTNAME_CFG01 }} |
| 139 | retry: {count: 2, delay: 5} |
| 140 | skip_fail: false |
| 141 | |
| 142 | - description: Restart cinder volume |
| 143 | cmd: | |
| 144 | salt -C 'I@cinder:controller' service.restart cinder-volume; |
| 145 | node_name: {{ HOSTNAME_CFG01 }} |
| 146 | retry: {count: 2, delay: 5} |
| 147 | skip_fail: false |
| 148 | |
| 149 | - description: Restart nova-compute |
| 150 | cmd: | |
| 151 | salt -C 'I@nova:compute' service.restart nova-compute; |
| 152 | node_name: {{ HOSTNAME_CFG01 }} |
| 153 | retry: {count: 2, delay: 5} |
| 154 | skip_fail: false |
| 155 | |
| 156 | - description: conver cirros image |
| 157 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
| 158 | 'qemu-img convert cirros-0.3.4-i386-disk.img cirros.raw' |
| 159 | node_name: {{ HOSTNAME_CFG01 }} |
| 160 | retry: {count: 2, delay: 30} |
| 161 | skip_fail: false |
| 162 | |
| 163 | - description: Register image in glance |
| 164 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
| 165 | '. /root/keystonercv3; glance --timeout 120 image-create --name "cirros" --disk-format raw --container-format bare --visibility public --file cirros.raw' |
| 166 | node_name: {{ HOSTNAME_CFG01 }} |
| 167 | retry: {count: 1, delay: 30} |
| 168 | skip_fail: false |