summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xutils/infra_setup/heat_template/HOT_create_instance.sh2
-rw-r--r--utils/infra_setup/vm_dev_setup/package.conf7
-rwxr-xr-xutils/infra_setup/vm_dev_setup/setup_env.sh28
3 files changed, 21 insertions, 16 deletions
diff --git a/utils/infra_setup/heat_template/HOT_create_instance.sh b/utils/infra_setup/heat_template/HOT_create_instance.sh
index 010a2566..87455106 100755
--- a/utils/infra_setup/heat_template/HOT_create_instance.sh
+++ b/utils/infra_setup/heat_template/HOT_create_instance.sh
@@ -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
diff --git a/utils/infra_setup/vm_dev_setup/package.conf b/utils/infra_setup/vm_dev_setup/package.conf
index e7210f39..18eb5c56 100644
--- a/utils/infra_setup/vm_dev_setup/package.conf
+++ b/utils/infra_setup/vm_dev_setup/package.conf
@@ -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}
diff --git a/utils/infra_setup/vm_dev_setup/setup_env.sh b/utils/infra_setup/vm_dev_setup/setup_env.sh
index a0018c8e..9eba07cb 100755
--- a/utils/infra_setup/vm_dev_setup/setup_env.sh
+++ b/utils/infra_setup/vm_dev_setup/setup_env.sh
@@ -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