Tatyana Leontovich | 8dbc788 | 2018-08-29 13:11:16 +0300 | [diff] [blame] | 1 | {% from 'virtual-offline-pike-ovs-dpdk/underlay.yaml' import HOSTNAME_CFG01 with context %} |
| 2 | {% from 'virtual-offline-pike-ovs-dpdk/underlay.yaml' import HOSTNAME_CTL01 with context %} |
| 3 | {% from 'virtual-offline-pike-ovs-dpdk/underlay.yaml' import HOSTNAME_CTL02 with context %} |
| 4 | {% from 'virtual-offline-pike-ovs-dpdk/underlay.yaml' import HOSTNAME_CTL03 with context %} |
| 5 | {% from 'virtual-offline-pike-ovs-dpdk/underlay.yaml' import HOSTNAME_GTW01 with context %} |
| 6 | {% from 'shared-salt.yaml' import IPV4_NET_EXTERNAL_PREFIX with context %} |
| 7 | {% from 'shared-salt.yaml' import IPV4_NET_TENANT_PREFIX with context %} |
| 8 | {% set REPOSITORY_SUITE = os_env('REPOSITORY_SUITE', 'testing') %} |
| 9 | # Install OpenStack control services |
| 10 | {% set DOMAIN_NAME = os_env('DOMAIN_NAME', 'virtual-offline-pike-ovs-dpdk') %} |
| 11 | {% import 'shared-backup-restore.yaml' as BACKUP with context %} |
| 12 | {% import 'shared-salt.yaml' as SHARED with context %} |
| 13 | {% import 'shared-openstack.yaml' as SHARED_OPENSTACK with context %} |
| 14 | |
Tatyana Leontovich | eae3205 | 2018-10-24 22:28:18 +0300 | [diff] [blame] | 15 | {% set DOCKER_LOCAL_REPO = os_env('DOCKER_LOCAL_REPO', 'deb [arch=amd64] http://mirror.mcp.mirantis.local.test/' + REPOSITORY_SUITE + '/docker/xenial xenial stable') %} |
Tatyana Leontovich | 8dbc788 | 2018-08-29 13:11:16 +0300 | [diff] [blame] | 16 | |
Tatyana Leontovich | eae3205 | 2018-10-24 22:28:18 +0300 | [diff] [blame] | 17 | - description: Run 'openssh' formula on cfg01 |
| 18 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 19 | -C 'I@salt:master' state.sls openssh && |
| 20 | salt --hard-crash --state-output=mixed --state-verbose=False |
| 21 | -C 'I@salt:master' cmd.run "sed -i 's/PasswordAuthentication no/PasswordAuthentication |
| 22 | yes/' /etc/ssh/sshd_config && service ssh reload" |
| 23 | node_name: {{ HOSTNAME_CFG01 }} |
| 24 | retry: {count: 3, delay: 5} |
| 25 | skip_fail: false |
| 26 | |
| 27 | - description: Configure openssh on all nodes |
| 28 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@linux:system and not cfg01*' state.sls openssh && |
| 29 | salt --hard-crash --state-output=mixed --state-verbose=False |
| 30 | -C 'I@linux:system and not cfg01*' cmd.run "sed -i 's/PasswordAuthentication no/PasswordAuthentication |
| 31 | yes/' /etc/ssh/sshd_config && service ssh reload" |
| 32 | node_name: {{ HOSTNAME_CFG01 }} |
| 33 | retry: {count: 1, delay: 5} |
| 34 | skip_fail: false |
| 35 | |
Tatyana Leontovich | eea03e9 | 2018-11-20 12:51:50 +0200 | [diff] [blame] | 36 | #- description: Upload cirros image on ctl01 |
| 37 | # cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
| 38 | # 'wget http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-i386-disk.img' |
| 39 | # node_name: {{ HOSTNAME_CFG01 }} |
| 40 | # retry: {count: 2, delay: 30} |
| 41 | # skip_fail: false |
| 42 | # |
| 43 | #- description: Create net04_external |
| 44 | # cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
| 45 | # '. /root/keystonercv3; neutron net-create net04_ext --router:external True --provider:physical_network physnet1 --provider:network_type flat' |
| 46 | # node_name: {{ HOSTNAME_CFG01 }} |
| 47 | # retry: {count: 1, delay: 30} |
| 48 | # skip_fail: false |
| 49 | # |
| 50 | #- description: Create subnet_external |
| 51 | # cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
| 52 | # '. /root/keystonercv3; neutron subnet-create net04_ext {{ IPV4_NET_EXTERNAL_PREFIX }}.0/24 --name net04_ext__subnet --disable-dhcp --allocation-pool start={{ IPV4_NET_EXTERNAL_PREFIX }}.150,end={{ IPV4_NET_EXTERNAL_PREFIX }}.180 --gateway {{ IPV4_NET_EXTERNAL_PREFIX }}.1' |
| 53 | # node_name: {{ HOSTNAME_CFG01 }} |
| 54 | # retry: {count: 1, delay: 30} |
| 55 | # skip_fail: false |
| 56 | # |
| 57 | #- description: Create net04 |
| 58 | # cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
| 59 | # '. /root/keystonercv3; neutron net-create net04' |
| 60 | # node_name: {{ HOSTNAME_CFG01 }} |
| 61 | # retry: {count: 1, delay: 30} |
| 62 | # skip_fail: false |
| 63 | # |
| 64 | #- description: Create subnet_net04 |
| 65 | # cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
| 66 | # '. /root/keystonercv3; neutron subnet-create net04 {{ IPV4_NET_TENANT_PREFIX }}.0/24 --name net04__subnet --allocation-pool start={{ IPV4_NET_TENANT_PREFIX }}.120,end={{ IPV4_NET_TENANT_PREFIX }}.240' |
| 67 | # node_name: {{ HOSTNAME_CFG01 }} |
| 68 | # retry: {count: 1, delay: 30} |
| 69 | # skip_fail: false |
| 70 | # |
| 71 | #- description: Create router |
| 72 | # cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
| 73 | # '. /root/keystonercv3; neutron router-create net04_router01' |
| 74 | # node_name: {{ HOSTNAME_CFG01 }} |
| 75 | # retry: {count: 1, delay: 30} |
| 76 | # skip_fail: false |
| 77 | # |
| 78 | #- description: Set geteway |
| 79 | # cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
| 80 | # '. /root/keystonercv3; neutron router-gateway-set net04_router01 net04_ext' |
| 81 | # node_name: {{ HOSTNAME_CFG01 }} |
| 82 | # retry: {count: 1, delay: 30} |
| 83 | # skip_fail: false |
| 84 | # |
| 85 | #- description: Add interface |
| 86 | # cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
| 87 | # '. /root/keystonercv3; neutron router-interface-add net04_router01 net04__subnet' |
| 88 | # node_name: {{ HOSTNAME_CFG01 }} |
| 89 | # retry: {count: 1, delay: 30} |
| 90 | # skip_fail: false |
| 91 | # |
Tatyana Leontovich | 8dbc788 | 2018-08-29 13:11:16 +0300 | [diff] [blame] | 92 | - description: sync time |
| 93 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False '*' cmd.run |
| 94 | 'service ntp stop; ntpd -gq; service ntp start' |
| 95 | node_name: {{ HOSTNAME_CFG01 }} |
| 96 | retry: {count: 1, delay: 30} |
| 97 | skip_fail: false |
| 98 | |
Tatyana Leontovich | 8dbc788 | 2018-08-29 13:11:16 +0300 | [diff] [blame] | 99 | {{ BACKUP.MACRO_WR_NGINX_MASTER() }} |
| 100 | {{ BACKUP.MACRO_BACKUP_BACKUPNINJA() }} |
| 101 | {{ BACKUP.MACRO_BACKUP_XTRABACKUP() }} |