change the image and dependent packages used for rubbos download address 51/5351/2
authorMatthewLi <matthew.lijun@huawei.com>
Tue, 29 Dec 2015 11:13:30 +0000 (06:13 -0500)
committerMatthewLi <matthew.lijun@huawei.com>
Tue, 29 Dec 2015 12:12:27 +0000 (07:12 -0500)
JIRA: BOTTLENECK-35

Change-Id: I95e185fa8087121d895ec5d5167be34a98ffd31a
Signed-off-by: MatthewLi <matthew.lijun@huawei.com>
utils/infra_setup/heat_template/HOT_create_instance.sh
utils/infra_setup/vm_dev_setup/package.conf
utils/infra_setup/vm_dev_setup/setup_env.sh

index 010a256..8745510 100755 (executable)
@@ -109,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
index e7210f3..18eb5c5 100644 (file)
@@ -1,8 +1,11 @@
 TIMEOUT=10
-export PACKAGE_URL=${PACKAGE_URL:-http://artifacts.opnfv.org}
+export PACKAGE_URL=${PACKAGE_URL:-http://artifacts.opnfv.org/bottlenecks}
 
 export BOTTLENECKS_REPO=${BOTTLENECKS_REPO:-https://gerrit.opnfv.org/gerrit/bottlenecks}
 export BOTTLENECKS_REPO_DIR=${BOTTLENECKS_REPO_DIR:-/bottlenecks}
-export RUBBOS_CACHE_DIR=${CACHE_DIR:-$BOTTLENECKS_REPO_DIR/rubbos/app_tools}
+export RUBBOS_DIR=${RUBBOS_DIR:-$BOTTLENECKS_REPO_DIR/rubbos}
+export RUBBOS_MULINI6_DIR=${RUBBOS_MULINI6_DIR:-$RUBBOS_DIR/rubbos_scripts}
 export RUBBOS_RUN_DIR=${RUBBOS_RUN_DIR:-$BOTTLENECKS_REPO_DIR/rubbos/rubbos_scripts/1-1-1/scripts}
 export RUBBOS_EXE_DIR=${RUBBOS_EXE_DIR:-$BOTTLENECKS_REPO_DIR/rubbos/rubbos_scripts/1-1-1/scripts}
+export RUBBOS_APP_TOOLS_URL=${RUBBOS_APP_TOOLS_URL:-$PACKAGE_URL/rubbos/app_tools.tar.gz}
+export RUBBOS_MULINI6_URL=${RUBBOS_MULINI6_URL:-$PACKAGE_URL/rubbos/rubbosMulini6.tar.gz}
index a0018c8..9eba07c 100755 (executable)
@@ -4,23 +4,20 @@ set -ex
 
 bottlenecks_prepare_env()
 {
-    set +e
+    echo "Bottlenecks: install preinstall packages in VM"
+
     for i in $PreInstall_Packages; do
         if ! apt --installed list 2>/dev/null |grep "\<$i\>"
         then
             sudo apt-get install  -y --force-yes  $i
         fi
     done
-    set -e
-
-    if [ -d $RUBBOS_CACHE_DIR ]; then
-        rm -rf $RUBBOS_CACHE_DIR
-    fi
-    mkdir -p $RUBBOS_CACHE_DIR
 }
 
 bottlenecks_download_repo()
 {
+    echo "Bottlenecks: download bottlenecks repo"
+
     if [ -d $BOTTELENECKS_REPO_DIR/.git ]; then
         cd $BOTTLENECKS_REPO_DIR
         git pull origin master
@@ -33,16 +30,20 @@ bottlenecks_download_repo()
 
 bottlenecks_download_packages()
 {
-    for i in ; do #list the packages
-       if [[ ! $i ]]; then
-           continue
-       fi
-       curl --connect-timeout 10 -o $RUBBOS_CACHE_DIR/$i $PACKAGE_URL 2>/dev/null
-    done
+    echo "Bottlenecks: download rubbos dependent packages from artifacts"
+
+    curl --connect-timeout 10 -o /tmp/app_tools.tar.gz $RUBBOS_APP_TOOLS_URL 2>/dev/null
+    tar zxvf /tmp/app_tools.tar.gz -C $RUBBOS_DIR
+    rm -rf /tmp/app_tools.tar.gz
+    curl --connect-timeout 10 -o /tmp/rubbosMulini6.tar.gz $RUBBOS_MULINI6_URL 2>/dev/null
+    tar zxvf /tmp/rubbosMulini6.tar.gz -C $RUBBOS_MULINI6_DIR
+    rm -rf /tmp/rubbosMulini6.tar.gz
 }
 
 bottlenecks_rubbos_install_exe()
 {
+    echo "Bottlenecks: install and run rubbos"
+
     cd $RUBBOS_RUN_DIR
     ./run.sh
     cd $RUBBOS_EXE_DIR
@@ -63,3 +64,4 @@ main()
 }
 
 main
+set +ex