diff options
author | MatthewLi <matthew.lijun@huawei.com> | 2015-12-29 06:13:30 -0500 |
---|---|---|
committer | MatthewLi <matthew.lijun@huawei.com> | 2015-12-29 07:12:27 -0500 |
commit | 0e343f2389d5be46aba6399757d3090ce24effab (patch) | |
tree | 76bc10fbf78ec48432f9ce84a4cd3dd2b4a89e47 /utils/infra_setup/vm_dev_setup/setup_env.sh | |
parent | 769843a58a4a93f202d97749d6ff8b7072d6fddf (diff) |
change the image and dependent packages used for rubbos download address
JIRA: BOTTLENECK-35
Change-Id: I95e185fa8087121d895ec5d5167be34a98ffd31a
Signed-off-by: MatthewLi <matthew.lijun@huawei.com>
Diffstat (limited to 'utils/infra_setup/vm_dev_setup/setup_env.sh')
-rwxr-xr-x | utils/infra_setup/vm_dev_setup/setup_env.sh | 28 |
1 files changed, 15 insertions, 13 deletions
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 |