From de6a685915bc8bd5444217bca511da35c94b4d59 Mon Sep 17 00:00:00 2001 From: Michael Polenchuk Date: Tue, 4 Jul 2017 15:54:11 +0400 Subject: Turn on opendaylight scenario * fix formula & reclass cluster model * bring in running states Change-Id: I8e66e69045f5c745f9aa6f59f7ce6d66b5bf1c95 Signed-off-by: Michael Polenchuk --- mcp/scripts/dpdk.sh | 16 ---------------- mcp/scripts/lib.sh | 2 +- mcp/scripts/openstack.sh | 44 -------------------------------------------- mcp/scripts/salt.sh | 15 +++++++++++++++ 4 files changed, 16 insertions(+), 61 deletions(-) delete mode 100755 mcp/scripts/dpdk.sh delete mode 100755 mcp/scripts/openstack.sh (limited to 'mcp/scripts') diff --git a/mcp/scripts/dpdk.sh b/mcp/scripts/dpdk.sh deleted file mode 100755 index faa4390d3..000000000 --- a/mcp/scripts/dpdk.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash -# -# Enable DPDK on compute nodes -# - -ssh ${SSH_OPTS} ubuntu@${SALT_MASTER} bash -s << DPDK_INSTALL_END - sudo -i - - salt -C 'I@nova:compute' system.reboot - salt -C 'I@nova:compute' test.ping - - salt -C 'I@nova:compute' state.sls linux - salt -C 'I@nova:compute' state.sls nova,neutron - - salt -C 'I@keystone:server and *01*' cmd.run ". /root/keystonercv3; nova service-list; openstack network agent list" -DPDK_INSTALL_END diff --git a/mcp/scripts/lib.sh b/mcp/scripts/lib.sh index 50f441a78..bf8e3c100 100644 --- a/mcp/scripts/lib.sh +++ b/mcp/scripts/lib.sh @@ -95,7 +95,7 @@ check_connection() { # wait until ssh on Salt master is available while (($attempt <= $total_attempts)); do - ssh -i ${SSH_KEY} ubuntu@${SALT_MASTER} uptime + ssh -i ${SSH_OPTS} ubuntu@${SALT_MASTER} uptime case $? in 0) echo "${attempt}> Success"; break ;; *) echo "${attempt}/${total_attempts}> ssh server ain't ready yet, waiting for ${sleep_time} seconds ..." ;; diff --git a/mcp/scripts/openstack.sh b/mcp/scripts/openstack.sh deleted file mode 100755 index 88db83d49..000000000 --- a/mcp/scripts/openstack.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/bash -# -# Deploy Openstack -# - -ssh ${SSH_OPTS} ubuntu@${SALT_MASTER} bash -s << OPENSTACK_INSTALL_END - sudo -i - - salt-call state.apply salt - salt '*' state.apply salt || salt '*' state.apply salt - - salt -C 'I@salt:master' state.sls linux - salt -C '* and not cfg01*' state.sls linux - - salt '*' state.sls ntp - - salt -C 'I@rabbitmq:server' state.sls rabbitmq - salt -C 'I@rabbitmq:server' cmd.run "rabbitmqctl status" - - salt -C 'I@mysql:server' state.sls mysql - - salt -C 'I@memcached:server' state.sls memcached - - salt -C 'I@keystone:server' state.sls keystone.server - salt -C 'I@keystone:server' cmd.run "systemctl restart apache2" - while true; do salt -C 'I@keystone:server' state.sls keystone.client && break; done - salt -C 'I@keystone:server' cmd.run ". /root/keystonercv3; openstack service list" - - salt -C 'I@glance:server' state.sls glance - salt -C 'I@nova:controller' state.sls nova - salt -C 'I@heat:server' state.sls heat - salt -C 'I@cinder:controller' state.sls cinder - - salt -C 'I@neutron:server' state.sls neutron - salt -C 'I@neutron:gateway' state.sls neutron - - salt -C 'I@nova:compute' state.sls nova - salt -C 'I@neutron:compute' state.sls neutron - - salt 'ctl01*' cmd.run ". /root/keystonercv3; openstack compute service list; openstack network agent list; openstack stack list; openstack volume list" - - salt 'ctl01*' cmd.run ". /root/keystonercv3; openstack network create --share --external --provider-network-type flat --provider-physical-network physnet1 floating_net" - salt 'ctl01*' cmd.run ". /root/keystonercv3; openstack subnet create --gateway 10.16.0.1 --no-dhcp --allocation-pool start=10.16.0.130,end=10.16.0.254 --network floating_net --subnet-range 10.16.0.0/24 floating_subnet" -OPENSTACK_INSTALL_END diff --git a/mcp/scripts/salt.sh b/mcp/scripts/salt.sh index 56a6fb3b8..9378b6c43 100755 --- a/mcp/scripts/salt.sh +++ b/mcp/scripts/salt.sh @@ -20,4 +20,19 @@ ssh ${SSH_OPTS} ubuntu@${SALT_MASTER} bash -s << SALT_INSTALL_END cd /srv/salt/scripts MASTER_HOSTNAME=cfg01.${CLUSTER_DOMAIN} DISTRIB_REVISION=nightly ./salt-master-init.sh salt-key -Ay + + cp -r /root/fuel/mcp/metadata/service /usr/share/salt-formulas/reclass + cp -r /root/fuel/mcp/salt-formulas/* /usr/share/salt-formulas/env + cd /srv/salt/reclass/classes/service && ln -s /usr/share/salt-formulas/reclass/service/opendaylight + + salt '*' saltutil.refresh_pillar + salt '*' saltutil.sync_all + + salt-call state.apply salt + salt '*' state.apply salt || salt '*' state.apply salt + + salt -C 'I@salt:master' state.sls linux + salt -C '* and not cfg01*' state.sls linux + + salt '*' state.sls ntp SALT_INSTALL_END -- cgit 1.2.3-korg