diff options
author | Gary Wu <gary.i.wu@huawei.com> | 2018-03-02 21:59:10 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-03-02 21:59:10 +0000 |
commit | 964af191e5d959ad855636cbab2dfa1350cbfa9e (patch) | |
tree | ffa54596302f86f1c2c233e280dc13b3c6b2bbe3 /bootstrap | |
parent | 10d984c3606b5c6a026dea4b9df0954d74d0a8d1 (diff) | |
parent | f8730f5f8d0e044fac2f76f465f285736446c5ca (diff) |
Merge "Remove customize src_folder variables"
Diffstat (limited to 'bootstrap')
-rwxr-xr-x | bootstrap/vagrant-onap/lib/aai | 18 | ||||
-rwxr-xr-x | bootstrap/vagrant-onap/lib/appc | 12 | ||||
-rwxr-xr-x | bootstrap/vagrant-onap/lib/ccsdk | 4 | ||||
-rwxr-xr-x | bootstrap/vagrant-onap/lib/dcae | 12 | ||||
-rwxr-xr-x | bootstrap/vagrant-onap/lib/mr | 4 | ||||
-rwxr-xr-x | bootstrap/vagrant-onap/lib/msb | 12 | ||||
-rwxr-xr-x | bootstrap/vagrant-onap/lib/mso | 6 | ||||
-rwxr-xr-x | bootstrap/vagrant-onap/lib/policy | 13 | ||||
-rwxr-xr-x | bootstrap/vagrant-onap/lib/robot | 8 | ||||
-rwxr-xr-x | bootstrap/vagrant-onap/lib/sdnc | 17 | ||||
-rwxr-xr-x | bootstrap/vagrant-onap/lib/vfc | 12 | ||||
-rwxr-xr-x | bootstrap/vagrant-onap/lib/vid | 4 | ||||
-rwxr-xr-x | bootstrap/vagrant-onap/lib/vnfsdk | 4 |
13 files changed, 56 insertions, 70 deletions
diff --git a/bootstrap/vagrant-onap/lib/aai b/bootstrap/vagrant-onap/lib/aai index 316a981ff..1ce3485c6 100755 --- a/bootstrap/vagrant-onap/lib/aai +++ b/bootstrap/vagrant-onap/lib/aai @@ -115,19 +115,13 @@ function get_aai_images { if [[ "$build_image" == "True" ]]; then unset MAVEN_OPTS - build_docker_image ${src_folders[aai]}/resources/aai-resources - build_docker_image ${src_folders[aai]}/traversal/aai-traversal - build_docker_image ${src_folders[aai]}/search-data-service - build_docker_image ${src_folders[aai]}/data-router - build_docker_image ${src_folders[aai]}/model-loader - build_docker_image ${src_folders[aai]}/sparky-be + for project in resources/aai-resources traversal/aai-traversal search-data-service data-router model-loader sparky-be; do + build_docker_image ${src_folders[aai]}/$project + done else - pull_onap_image aai-resources - pull_onap_image aai-traversal - pull_onap_image search-data-service - pull_onap_image data-router - pull_onap_image model-loader - pull_onap_image sparky-be + for image in aai-resources aai-traversal search-data-service data-router model-loader sparky-be; do + pull_onap_image $image + done fi } diff --git a/bootstrap/vagrant-onap/lib/appc b/bootstrap/vagrant-onap/lib/appc index ad01ca53e..95654fc10 100755 --- a/bootstrap/vagrant-onap/lib/appc +++ b/bootstrap/vagrant-onap/lib/appc @@ -6,7 +6,7 @@ source /var/onap/functions # _build_appc_images() - Function that creates APPC images from source code. function _build_appc_images { get_sdnc_images - build_docker_image $appc_src_folder/deployment/installation/appc docker + build_docker_image ${src_folders[appc]}/deployment/installation/appc docker } # get_appc_images() - Function that gets or build APPC docker images @@ -14,17 +14,15 @@ function get_appc_images { if [[ "$build_image" == "True" ]]; then _build_appc_images else - pull_openecomp_image appc-image openecomp/appc-image:latest - pull_openecomp_image dgbuilder-sdnc-image openecomp/dgbuilder-sdnc-image:latest + for image in appc-image dgbuilder-sdnc-image; do + pull_openecomp_image $image openecomp/$image:latest + done fi } # install_appc() - Function that clones and installs the APPC services from source code function install_appc { - pushd $appc_src_folder/deployment/docker-compose - install_docker_compose - /opt/docker/docker-compose up -d - popd + run_docker_compose ${src_folders[appc]}/deployment/docker-compose } # init_appc() - Function that initialize APPC services diff --git a/bootstrap/vagrant-onap/lib/ccsdk b/bootstrap/vagrant-onap/lib/ccsdk index 112839c69..93ee0c85d 100755 --- a/bootstrap/vagrant-onap/lib/ccsdk +++ b/bootstrap/vagrant-onap/lib/ccsdk @@ -5,9 +5,9 @@ source /var/onap/functions # _build_ccsdk_images() - Build CCSDK Docker images from source code function _build_ccsdk_images { install_package unzip - compile_src $ccsdk_src_folder/distribution + compile_src ${src_folders[ccsdk]}/distribution for image in ubuntu opendaylight odlsli dgbuilder-docker; do - build_docker_image $ccsdk_src_folder/distribution/$image docker + build_docker_image ${src_folders[ccsdk]}/distribution/$image docker done } diff --git a/bootstrap/vagrant-onap/lib/dcae b/bootstrap/vagrant-onap/lib/dcae index d6fdd89b2..d6ebd8200 100755 --- a/bootstrap/vagrant-onap/lib/dcae +++ b/bootstrap/vagrant-onap/lib/dcae @@ -4,7 +4,7 @@ source /var/onap/functions # _create_config_file() - Creates a configuration yaml file for the controller function _create_config_file { - cat > $dcae_src_folder/controller/config.yaml << EOL + cat > ${src_folders[dcae]}/controller/config.yaml << EOL ZONE: $dcae_zone STATE: $dcae_state DCAE-VERSION: $artifacts_version @@ -36,14 +36,14 @@ function _build_dcae_images { if [[ "$compile_repo" != "True" ]]; then compile_repos "dcae" fi - build_docker_image $dcae_src_folder/dmaapbc openecomp/dcae-dmaapbc - build_docker_image $dcae_src_folder/orch-dispatcher dcae/orch-dispatcher + build_docker_image ${src_folders[dcae]}/dmaapbc openecomp/dcae-dmaapbc + build_docker_image ${src_folders[dcae]}/orch-dispatcher dcae/orch-dispatcher - pushd $dcae_src_folder/demo + pushd ${src_folders[dcae]}/demo bash dcae-demo-controller/src/main/docker-build/build.sh popd - build_docker_image $dcae_src_folder/dcae-inventory + build_docker_image ${src_folders[dcae]}/dcae-inventory } # get_dcae_images() - Function that retrieves or builds DCAE docker images. @@ -59,7 +59,7 @@ function get_dcae_images { # install_dcae() - Function that clones and installs the DCAE controller services from source code function install_dcae { install_docker_compose - pushd $dcae_src_folder/demo/startup/controller + pushd ${src_folders[dcae]}/demo/startup/controller if [[ "$build_image" == "True" ]]; then dcae_image=`docker images | grep dcae-controller | awk '{print $1 ":" $2}'` sed -i "s|DOCKER-REGISTRY/openecomp/dcae-controller:DCAE-VERSION|$dcae_image|g" docker-compose.yml diff --git a/bootstrap/vagrant-onap/lib/mr b/bootstrap/vagrant-onap/lib/mr index 499f53f6a..bba748618 100755 --- a/bootstrap/vagrant-onap/lib/mr +++ b/bootstrap/vagrant-onap/lib/mr @@ -12,7 +12,7 @@ function get_mr_images { function install_message_router { install_docker_compose - pushd $mr_src_folder + pushd ${src_folders[mr]} bash deploy.sh popd } @@ -20,7 +20,7 @@ function install_message_router { # init_mr() - Function that initialize Message Router services function init_mr { if [[ "$clone_repo" == "True" ]]; then - clone_repo dcae/demo/startup/message-router $mr_src_folder + clone_repo dcae/demo/startup/message-router ${src_folders[mr]} fi if [[ "$skip_get_images" == "False" ]]; then get_mr_images diff --git a/bootstrap/vagrant-onap/lib/msb b/bootstrap/vagrant-onap/lib/msb index a14e8ea6c..bcf27fe75 100755 --- a/bootstrap/vagrant-onap/lib/msb +++ b/bootstrap/vagrant-onap/lib/msb @@ -8,9 +8,9 @@ function _build_msb_images { compile_repos "msb" fi - build_docker_image $msb_src_folder/apigateway/distributions/msb-apigateway/src/main/basedocker onap/msb/msb_base - build_docker_image $msb_src_folder/apigateway/distributions/msb-apigateway/src/main/docker onap/msb/msb_apigateway - build_docker_image $msb_src_folder/discovery/distributions/msb-discovery/src/main/docker onap/msb/msb_discovery + build_docker_image ${src_folders[msb]}/apigateway/distributions/msb-apigateway/src/main/basedocker onap/msb/msb_base + build_docker_image ${src_folders[msb]}/apigateway/distributions/msb-apigateway/src/main/docker onap/msb/msb_apigateway + build_docker_image ${src_folders[msb]}/discovery/distributions/msb-discovery/src/main/docker onap/msb/msb_discovery } # get_msb_images() - Function that retrieves the Microservices Bus images @@ -20,9 +20,9 @@ function get_msb_images { _build_msb_images else unset docker_version - pull_onap_image msb/msb_base - pull_onap_image msb/msb_apigateway - pull_onap_image msb/msb_discovery + for image in base apigateway discovery; do + pull_onap_image msb/msb_$image + done fi } diff --git a/bootstrap/vagrant-onap/lib/mso b/bootstrap/vagrant-onap/lib/mso index 44d4a7b04..6dd0676eb 100755 --- a/bootstrap/vagrant-onap/lib/mso +++ b/bootstrap/vagrant-onap/lib/mso @@ -6,8 +6,8 @@ source /var/onap/functions function get_mso_images { if [[ "$build_image" == "True" ]]; then export GIT_NO_PROJECT=/opt/ - compile_src $mso_src_folder - build_docker_image $mso_src_folder/packages/docker docker + compile_src ${src_folders[mso]} + build_docker_image ${src_folders[mso]}/packages/docker docker fi } @@ -65,7 +65,7 @@ EOF install_docker install_docker_compose # Deploy the environment - pushd $mso_src_folder/docker-config + pushd ${src_folders[mso]}/docker-config chmod +x deploy.sh if [[ "$build_image" == "True" ]]; then bash deploy.sh diff --git a/bootstrap/vagrant-onap/lib/policy b/bootstrap/vagrant-onap/lib/policy index ad982ad95..0dac14dee 100755 --- a/bootstrap/vagrant-onap/lib/policy +++ b/bootstrap/vagrant-onap/lib/policy @@ -4,8 +4,8 @@ source /var/onap/functions # _build_policy_images() - Function that build Policy docker images from source code function _build_policy_images { - compile_src $policy_src_folder/docker - pushd $policy_src_folder/docker + compile_src ${src_folders[policy]}/docker + pushd ${src_folders[policy]}/docker install_maven mvn prepare-package cp -r target/policy-pe/* policy-pe/ @@ -20,16 +20,15 @@ function get_policy_images { if [[ "$build_image" == "True" ]]; then _build_policy_images else - pull_onap_image policy/policy-db onap/policy/policy-db:latest - pull_onap_image policy/policy-pe onap/policy/policy-pe:latest - pull_onap_image policy/policy-drools onap/policy/policy-drools:latest - pull_onap_image policy/policy-nexus onap/policy/policy-nexus:latest + for image in db pe drools nexus; do + pull_onap_image policy/policy-$image onap/policy/policy-$image:latest + done fi } # install_policy() - Function that clones and installs the Policy services from source code function install_policy { - pushd $policy_src_folder/docker + pushd ${src_folders[policy]}/docker chmod +x config/drools/drools-tweaks.sh echo $IP_ADDRESS > config/pe/ip_addr.txt install_docker_compose diff --git a/bootstrap/vagrant-onap/lib/robot b/bootstrap/vagrant-onap/lib/robot index 90fbcf8c0..70f8cf704 100755 --- a/bootstrap/vagrant-onap/lib/robot +++ b/bootstrap/vagrant-onap/lib/robot @@ -6,10 +6,10 @@ source /var/onap/functions function _setup_ete_folder { mkdir -p /opt/eteshare/config - cp $robot_src_folder/integration_* /opt/eteshare/config - cp $robot_src_folder/vm_config2robot.sh /opt/eteshare/config - cp $robot_src_folder/ete.sh /opt - cp $robot_src_folder/demo.sh /opt + cp ${src_folders[robot]}/integration_* /opt/eteshare/config + cp ${src_folders[robot]}/vm_config2robot.sh /opt/eteshare/config + cp ${src_folders[robot]}/ete.sh /opt + cp ${src_folders[robot]}/demo.sh /opt chmod +x /opt/ete.sh chmod +x /opt/demo.sh diff --git a/bootstrap/vagrant-onap/lib/sdnc b/bootstrap/vagrant-onap/lib/sdnc index a8cf756b4..8dacf9e16 100755 --- a/bootstrap/vagrant-onap/lib/sdnc +++ b/bootstrap/vagrant-onap/lib/sdnc @@ -7,15 +7,15 @@ source /var/onap/ccsdk function compile_all_sdnc_repos { for repo in ${repos[sdnc]}; do if [[ "$repo" == "sdnc/core" ]]; then - compile_src $sdnc_src_folder/core/rootpom + compile_src ${src_folders[sdnc]}/core/rootpom fi - compile_src $sdnc_src_folder${repo#*sdnc} + compile_src ${src_folders[sdnc]}${repo#*sdnc} done } # _build_sdnc_images() - Builds SDNC images from source code function _build_sdnc_images { - local folder=$sdnc_src_folder/oam + local folder=${src_folders[sdnc]}/oam get_ccsdk_images install_package unzip @@ -33,19 +33,16 @@ function get_sdnc_images { if [[ "$build_image" == "True" ]]; then _build_sdnc_images else - pull_openecomp_image sdnc-image openecomp/sdnc-image:latest - pull_openecomp_image admportal-sdnc-image openecomp/admportal-sdnc-image:latest - pull_openecomp_image dgbuilder-sdnc-image openecomp/dgbuilder-sdnc-image:latest + for image in sdnc-image admportal-sdnc-image dgbuilder-sdnc-image; do + pull_openecomp_image $image openecomp/$image:latest + done fi pull_docker_image mysql/mysql-server:5.6 } # install_sdnc() - Download and install SDNC services from source code function install_sdnc { - pushd $sdnc_src_folder/oam/installation/src/main/yaml - install_docker_compose - /opt/docker/docker-compose up -d - popd + run_docker_compose ${src_folders[sdnc]}/oam/installation/src/main/yaml } # init_sdnc() - Function that initialize SDNC services diff --git a/bootstrap/vagrant-onap/lib/vfc b/bootstrap/vagrant-onap/lib/vfc index 2b5407ca3..64f7df00e 100755 --- a/bootstrap/vagrant-onap/lib/vfc +++ b/bootstrap/vagrant-onap/lib/vfc @@ -9,7 +9,7 @@ function compile_all_vfc_repos { tox_repos=("gvnfm/vnflcm/lcm" "gvnfm/vnfmgr/mgr" "gvnfm/vnfres/res" "nfvo/lcm" \ "nfvo/driver/vnfm/gvnfm/gvnfmadapter" "nfvo/driver/vnfm/svnfm/zte/vmanager") for dirc in ${tox_repos[@]}; do - pushd $vfc_src_folder/$dirc + pushd ${src_folders[vfc]}/$dirc tox -e py27 popd done @@ -28,7 +28,7 @@ function compile_all_vfc_repos { # _build_vfc_image() - Build VFC docker image function _build_vfc_image { - pushd $vfc_src_folder/$1/docker + pushd ${src_folders[vfc]}/$1/docker sed -i "s/^push_image/#push_image/g" build_image.sh sed -i 's|IMAGE_NAME="${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/${IMAGE}"|IMAGE_NAME=${ORG}/${IMAGE}|g' build_image.sh ./build_image.sh @@ -53,11 +53,9 @@ function get_vfc_images { build_nfvo_vnfm_gvnfmadapter_image # TODO(sshank): Add other VFC component docker image builds. else - pull_onap_image vfc/gvnfm/vnflcm/lcm - pull_onap_image vfc/gvnfm/vnfmgr/mgr - pull_onap_image vfc/gvnfm/vnfres/res - pull_onap_image vfc/nfvo/lcm - pull_onap_image vfc/nfvo/driver/vnfm/gvnfm/gvnfmadapter + for image in gvnfm/vnflcm/lcm gvnfm/vnfmgr/mgr gvnfm/vnfres/res nfvo/lcm nfvo/driver/vnfm/gvnfm/gvnfmadapter; do + pull_onap_image vfc/$image + done fi } diff --git a/bootstrap/vagrant-onap/lib/vid b/bootstrap/vagrant-onap/lib/vid index f5ca9d293..0c7ad8536 100755 --- a/bootstrap/vagrant-onap/lib/vid +++ b/bootstrap/vagrant-onap/lib/vid @@ -5,9 +5,9 @@ source /var/onap/functions # _build_vid_images() - Function that builds VID docker images function _build_vid_images { if [[ "$compile_repo" != "True" ]]; then - compile_src $vid_src_folder + compile_src ${src_folders[vid]} fi - build_docker_image $vid_src_folder/deliveries + build_docker_image ${src_folders[vid]}/deliveries } # get_vid_images() - Function that retrieves VID docker images diff --git a/bootstrap/vagrant-onap/lib/vnfsdk b/bootstrap/vagrant-onap/lib/vnfsdk index 58e3a9aa2..ea7fa3332 100755 --- a/bootstrap/vagrant-onap/lib/vnfsdk +++ b/bootstrap/vagrant-onap/lib/vnfsdk @@ -5,7 +5,7 @@ source /var/onap/functions # _build_vnfsdk_images() - Builds VNFSDK images from source code function _build_vnfsdk_images { install_package unzip - pushd $vnfsdk_src_folder/refrepo/vnfmarket-be/deployment/docker/docker-refrepo + pushd ${src_folders[vnfsdk]}/refrepo/vnfmarket-be/deployment/docker/docker-refrepo build_docker_image . popd } @@ -24,7 +24,7 @@ function get_vnfsdk_images { # install_vnfsdk - Function that installs vnfsdk Docker images function install_vnfsdk { install_docker_compose - pushd $vnfsdk_src_folder/refrepo/vnfmarket-be/deployment/install + pushd ${src_folders[vnfsdk]}/refrepo/vnfmarket-be/deployment/install /opt/docker/docker-compose up -d popd } |