summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthewLi <matthew.lijun@huawei.com>2015-12-30 03:18:33 -0500
committerMatthewLi <matthew.lijun@huawei.com>2015-12-30 03:18:33 -0500
commitf46936dd3c84eaec10b21fd1055acb6897da7fc9 (patch)
treed7a0e56929ea9ad1c57f7a53a85ca21cb622eca0
parent6d25fc86c7fdaa43148a9c645185c6756e650017 (diff)
amend bottlenecks image url
JIRA: BOTTLENECK-33 Change-Id: I2c0c4e3804b4e07e074c0a779b407392fe450526 Signed-off-by: MatthewLi <matthew.lijun@huawei.com>
-rwxr-xr-xutils/infra_setup/heat_template/HOT_create_instance.sh27
1 files changed, 18 insertions, 9 deletions
diff --git a/utils/infra_setup/heat_template/HOT_create_instance.sh b/utils/infra_setup/heat_template/HOT_create_instance.sh
index bc8e726f..4c6ccbd0 100755
--- a/utils/infra_setup/heat_template/HOT_create_instance.sh
+++ b/utils/infra_setup/heat_template/HOT_create_instance.sh
@@ -15,6 +15,15 @@ bottlenecks_env_prepare()
source $BOTTLENECKS_REPO_DIR/rubbos/rubbos_scripts/1-1-1/scripts/env_preparation.sh
}
+bottlenecks_check_instance()
+{
+ echo "check instance"
+ heat stack-list
+ heat stack-show bottlenecks
+ nova list
+ nova list | grep rubbos_control
+}
+
bottlenecks_create_instance()
{
echo "create bottlenecks instance using heat template"
@@ -29,10 +38,6 @@ bottlenecks_create_instance()
cd $HOT_PATH
heat stack-create bottlenecks -f ${TEMPLATE_NAME} \
-P "image=$IMAGE_NAME;key_name=$KEY_NAME;public_net=$PUBLIC_NET_NAME;flavor=$FLAVOR_NAME"
- heat stack-list
- heat stack-show bottlenecks
- nova list
- nova list | grep rubbos_control
}
bottlenecks_rubbos_cirros_run()
@@ -77,14 +82,14 @@ bottlenecks_rubbos_run()
chmod 600 $KEY_PATH/bottlenecks_key
ssh -i $KEY_PATH/bottlenecks_key \
-o StrictHostKeyChecking=no \
- -o BatchMode=yes root@$control_ip "uname -a"
+ -o BatchMode=yes ec2-user@$control_ip "uname -a"
scp -r -i $KEY_PATH/bottlenecks_key \
-o StrictHostKeyChecking=no -o BatchMode=yes \
$BOTTLENECKS_REPO_DIR/utils/infra_setup/vm_dev_setup \
- root@$control_ip:/tmp
+ ec2-user@$control_ip:/tmp
ssh -i $KEY_PATH/bottlenecks_key \
-o StrictHostKeyChecking=no \
- -o BatchMode=yes root@$control_ip "bash /tmp/vm_dev_setup/setup_env.sh"
+ -o BatchMode=yes ec2-user@$control_ip "bash /tmp/vm_dev_setup/setup_env.sh"
rm -rf $BOTTLENECKS_REPO_DIR/utils/infra_setup/vm_dev_setup/hosts.conf
}
@@ -152,7 +157,10 @@ bottlenecks_load_bottlenecks_image()
{
echo "load bottlenecks image"
- curl --connect-timeout 10 -o /tmp/bottlenecks-trusty-server.img $IMAGE_URL -v
+# curl --connect-timeout 10 -o /tmp/bottlenecks-trusty-server.img $IMAGE_URL -v
+
+ wget https://cloud-images.ubuntu.com/trusty/current/trusty-server-cloudimg-amd64-disk1.img -O \
+ /tmp/bottlenecks-trusty-server.img
result=$(glance image-create \
--name $IMAGE_NAME \
@@ -192,15 +200,16 @@ main()
bottlenecks_load_cirros_image
bottlenecks_create_instance
sleep 120
+ bottlenecks_check_instance
bottlenecks_rubbos_cirros_run
bottlenecks_cleanup
bottlenecks_load_bottlenecks_image
bottlenecks_create_instance
sleep 600
+ bottlenecks_check_instance
bottlenecks_rubbos_run
bottlenecks_cleanup
}
main
set +ex
-