From e9c6204c777d4d5169d6678a868782a7835d1350 Mon Sep 17 00:00:00 2001 From: liyuenan Date: Mon, 12 Sep 2016 12:13:39 +0800 Subject: Add a expansion functionality Through modify the virtual_cluster_expansion.yml, include host's name and mac, you can decide to how many compute nodes you need to add. And you also need to modify network.yml. Note that external subnet's ip_range should be changed as the first 6 IPs are already taken by the first deployment. Edit ``add.sh``, check the environment variable. Note that the OS version and OpenStack version should be same as the first deployment. Run ``add.sh``. JIRA:COMPASS-481 Change-Id: Id85f02518667e0ff80c2475e70856cd30cf1b9b7 Signed-off-by: liyuenan --- deploy/host_baremetal.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'deploy/host_baremetal.sh') diff --git a/deploy/host_baremetal.sh b/deploy/host_baremetal.sh index fc02875f..4c63f823 100755 --- a/deploy/host_baremetal.sh +++ b/deploy/host_baremetal.sh @@ -15,6 +15,14 @@ function reboot_hosts() { } function get_host_macs() { - machines=`echo $HOST_MACS | sed -e 's/,/'\',\''/g' -e 's/^/'\''/g' -e 's/$/'\''/g'` + if [[ "$EXPANSION" == "false" ]]; then + machines=`echo $HOST_MACS | sed -e 's/,/'\',\''/g' -e 's/^/'\''/g' -e 's/$/'\''/g'` + echo $machines > $WORK_DIR/switch_machines + else + machines_old=`cat $WORK_DIR/switch_machines` + machines_add=`echo $HOST_MACS | sed -e 's/,/'\',\''/g' -e 's/^/'\''/g' -e 's/$/'\''/g'` + echo $machines_add $machines_old > $WORK_DIR/switch_machines + machines=`echo $machines_add $machines_old|sed 's/ /,/g'` + fi echo $machines } -- cgit 1.2.3-korg