summaryrefslogtreecommitdiffstats
path: root/utils/infra_setup/heat_template/HOT_create_instance.sh
diff options
context:
space:
mode:
authorQiLiang <liangqi1@huawei.com>2015-12-30 05:02:15 +0000
committerQiLiang <liangqi1@huawei.com>2015-12-30 06:21:29 +0000
commitb23c5c9b89cdcd2ad73734807456426fada35c4a (patch)
treed812a648a999ae20e4f9bc6d3c26e111fd02b119 /utils/infra_setup/heat_template/HOT_create_instance.sh
parent8fdd4c13d48645b2d36602a0e8d011d8a18014e2 (diff)
Rubbos vm ip CI auto config
JIRA: BOTTLENECK-37 Change-Id: I48e83735703f9ec102e347556ba6e201d2984402 Signed-off-by: QiLiang <liangqi1@huawei.com>
Diffstat (limited to 'utils/infra_setup/heat_template/HOT_create_instance.sh')
-rwxr-xr-xutils/infra_setup/heat_template/HOT_create_instance.sh15
1 files changed, 13 insertions, 2 deletions
diff --git a/utils/infra_setup/heat_template/HOT_create_instance.sh b/utils/infra_setup/heat_template/HOT_create_instance.sh
index 3c96ce1c..9e1c3f11 100755
--- a/utils/infra_setup/heat_template/HOT_create_instance.sh
+++ b/utils/infra_setup/heat_template/HOT_create_instance.sh
@@ -40,6 +40,14 @@ bottlenecks_rubbos_run()
{
echo "Run Rubbos"
control_ip=$(nova list | grep rubbos_control | awk '{print $13}')
+ for i in rubbos_benchmark rubbos_client1 rubbos_client2 rubbos_client3 \
+ rubbos_client4 rubbos_control rubbos_httpd rubbos_mysql1 \
+ rubbos_tomcat1
+ do
+ ip=$(nova list | grep $i | awk '{print $12}' | awk -F [=,] '{print $2}')
+ echo "$i=$ip" >> $BOTTLENECKS_REPO_DIR/utils/infra_setup/vm_dev_setup/hosts.conf
+ done
+
chmod 600 $KEY_PATH/bottlenecks_key
ssh -i $KEY_PATH/bottlenecks_key \
-o StrictHostKeyChecking=no \
@@ -51,6 +59,9 @@ bottlenecks_rubbos_run()
ssh -i $KEY_PATH/bottlenecks_key \
-o StrictHostKeyChecking=no \
-o BatchMode=yes root@$control_ip "bash /tmp/vm_dev_setup/setup_env.sh"
+
+ rm -rf $BOTTLENECKS_REPO_DIR/utils/infra_setup/vm_dev_setup/hosts.conf
+
}
bottlenecks_cleanup()
@@ -92,10 +103,10 @@ bottlenecks_load_bottlenecks_image()
echo "load bottlenecks image"
curl --connect-timeout 10 -o /tmp/bottlenecks-trusty-server.img $IMAGE_URL -v
- if [ $? != 0 ]; then
+ #if [ $? != 0 ]; then
wget http://download.cirros-cloud.net/0.3.3/cirros-0.3.3-x86_64-disk.img -O \
/tmp/bottlenecks-trusty-server.img
- fi
+ #fi
result=$(glance image-create \
--name $IMAGE_NAME \