change the image and dependent packages used for rubbos download address
[bottlenecks.git] / utils / infra_setup / heat_template / HOT_create_instance.sh
index f04198c..8745510 100755 (executable)
@@ -79,7 +79,11 @@ bottlenecks_load_bottlenecks_image()
 {
    echo "load bottlenecks image"
 
-   wget $IMAGE_URL -O /tmp/bottlenecks-trusty-server.img
+   curl --connect-timeout 10 -o /tmp/bottlenecks-trusty-server.img $IMAGE_URL -v
+   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
 
    result=$(glance image-create \
        --name $IMAGE_NAME \
@@ -105,7 +109,7 @@ main()
 
    BOTTLENECKS_REPO=https://gerrit.opnfv.org/gerrit/bottlenecks
    BOTTLENECKS_REPO_DIR=/tmp/opnfvrepo/bottlenecks
-   IMAGE_URL=http://205.177.226.235:9999/bottlenecks/rubbos/bottlenecks-trusty-server.img
+   IMAGE_URL=http://artifacts.opnfv.org/bottlenecks/rubbos/bottlenecks-trusty-server.img
    IMAGE_NAME=bottlenecks-trusty-server
    KEY_PATH=$BOTTLENECKS_REPO_DIR/utils/infra_setup/bottlenecks_key
    HOT_PATH=$BOTTLENECKS_REPO_DIR/utils/infra_setup/heat_template