aboutsummaryrefslogtreecommitdiffstats
path: root/bootstrap/vagrant-onap/lib
diff options
context:
space:
mode:
Diffstat (limited to 'bootstrap/vagrant-onap/lib')
-rwxr-xr-xbootstrap/vagrant-onap/lib/ccsdk2
-rwxr-xr-xbootstrap/vagrant-onap/lib/portal26
-rwxr-xr-xbootstrap/vagrant-onap/lib/sdnc2
-rwxr-xr-xbootstrap/vagrant-onap/lib/vfc86
4 files changed, 80 insertions, 36 deletions
diff --git a/bootstrap/vagrant-onap/lib/ccsdk b/bootstrap/vagrant-onap/lib/ccsdk
index d115eaa0f..6ea829fb5 100755
--- a/bootstrap/vagrant-onap/lib/ccsdk
+++ b/bootstrap/vagrant-onap/lib/ccsdk
@@ -28,8 +28,8 @@ function compile_ccsdk_repos {
# _build_ccsdk_images() - Build CCSDK Docker images from source code
function _build_ccsdk_images {
install_package unzip
- compile_src $ccsdk_src_folder/distribution
clone_repo ccsdk/distribution $ccsdk_src_folder/distribution
+ compile_src $ccsdk_src_folder/distribution
for image in ubuntu opendaylight odlsli dgbuilder-docker; do
build_docker_image $ccsdk_src_folder/distribution/$image docker
done
diff --git a/bootstrap/vagrant-onap/lib/portal b/bootstrap/vagrant-onap/lib/portal
index 505bdde0c..998d6c075 100755
--- a/bootstrap/vagrant-onap/lib/portal
+++ b/bootstrap/vagrant-onap/lib/portal
@@ -4,26 +4,26 @@ set -o xtrace
source /var/onap/functions
-policy_src_folder=$git_src_folder/portal
-policy_repos=("sdk")
+portal_src_folder=$git_src_folder/portal
+portal_repos=("sdk")
# clone_all_portal_repos() - Function that clones Portal source repo.
function clone_all_portal_repos {
- clone_repo portal $policy_src_folder
- clone_repo ecompsdkos $policy_src_folder/ecompsdkos
- clone_repo "ui/dmaapbc" $policy_src_folder/dmaapbc
+ clone_repo portal $portal_src_folder
+ clone_repo ecompsdkos $portal_src_folder/ecompsdkos
+ clone_repo "ui/dmaapbc" $portal_src_folder/dmaapbc
- for dirc in ${policy_repos[@]}; do
- clone_repo portal/$dirc $policy_src_folder/$dirc
+ for dirc in ${portal_repos[@]}; do
+ clone_repo portal/$dirc $portal_src_folder/$dirc
done
}
# compile_all_portal_repos() - Function that compiles Portal source repo.
function compile_all_portal_repos {
- compile_src $policy_src_folder
+ compile_src $portal_src_folder
- for dirc in ${policy_repos[@]}; do
- compile_src $policy_src_folder/$dirc
+ for dirc in ${portal_repos[@]}; do
+ compile_src $portal_src_folder/$dirc
done
}
@@ -31,14 +31,12 @@ function compile_all_portal_repos {
function _build_portal_images {
install_maven
- pushd $policy_src_folder/deliveries
+ pushd $portal_src_folder/deliveries
chmod +x *.sh
export MVN=$(which mvn)
export GLOBAL_SETTINGS_FILE=/usr/share/maven3/conf/settings.xml
export SETTINGS_FILE=$HOME/.m2/settings.xml
bash build_portalapps_dockers.sh
- compile_src $policy_src_folder/ecomp-portal-widget-ms
- build_docker_image $policy_src_folder/ecomp-portal-widget-ms
popd
}
@@ -64,7 +62,7 @@ function install_portal {
docker rm -f ecompdb_portal
docker rm -f 1610-1
- pushd $policy_src_folder/deliveries
+ pushd $portal_src_folder/deliveries
mkdir -p /PROJECT/OpenSource/UbuntuEP/logs
install_package unzip
unzip -o etc.zip -d /PROJECT/OpenSource/UbuntuEP/
diff --git a/bootstrap/vagrant-onap/lib/sdnc b/bootstrap/vagrant-onap/lib/sdnc
index c7c2745d8..770f6be9f 100755
--- a/bootstrap/vagrant-onap/lib/sdnc
+++ b/bootstrap/vagrant-onap/lib/sdnc
@@ -3,6 +3,7 @@
set -o xtrace
source /var/onap/functions
+source /var/onap/ccsdk
sdnc_src_folder=$git_src_folder/openecomp/sdnc
sdnc_repos=("core" "adaptors" "northbound" "plugins" "oam")
@@ -28,6 +29,7 @@ function compile_all_sdnc_repos {
function _build_sdnc_images {
local folder=$sdnc_src_folder/oam
+ get_ccsdk_images
install_package unzip
clone_repo sdnc/oam $folder
# The OAM code depends on all the SDNC repos which should be downloaded and compiled first
diff --git a/bootstrap/vagrant-onap/lib/vfc b/bootstrap/vagrant-onap/lib/vfc
index 2b0634bc6..2d1418258 100755
--- a/bootstrap/vagrant-onap/lib/vfc
+++ b/bootstrap/vagrant-onap/lib/vfc
@@ -19,22 +19,15 @@ function clone_all_vfc_repos {
function compile_all_vfc_repos {
install_python_package tox
- pushd $src_folder/gvnfm/vnflcm/lcm
- tox -e py27
- popd
-
-
- pushd $src_folder/nfvo/lcm
- tox -e py27
- popd
+ 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 $src_folder/$dirc
+ tox -e py27
+ popd
+ done
- # TODO(sshank): Add compile for other vfc_repos. (Both Java and Python based.)
- # Python based:
- # gvnfm/vnflcm/lcm
- # gvnfm/vnfmgr/mgr
- # gvnfm/vnfres/res
- # nfvo/driver/vnfm/gvnfm/gvnfmadapter
- # nfvo/driver/vnfm/svnfm/zte/vmanager
+ # TODO(sshank): Add compile for other vfc_repos. (Java based.)
# Java based:
# nfvo/catalog
@@ -46,10 +39,42 @@ function compile_all_vfc_repos {
# nfvo/wfengine
}
+# build_gvnfm_lcm_image() - Build VFC GVNFM VNF LCM docker image
+function build_gvnfm_lcm_image {
+ pushd $src_folder/gvnfm/vnflcm/lcm/docker
+ sed -i '$ {s/^/#/}' build_image.sh
+ ./build_image.sh
+ popd
+}
+
+# build_gvnfm_vnfmgr_image() - Build VFC GVNFM VNF Manager docker image
+function build_gvnfm_vnfmgr_image {
+ pushd $src_folder/gvnfm/vnfmgr/mgr/docker
+ sed -i '$ {s/^/#/}' build_image.sh
+ ./build_image.sh
+ popd
+}
+
+# build_gvnfm_vnfres_image() - Build VFC GVNFM VNF Resource Management docker image
+function build_gvnfm_vnfres_image {
+ pushd $src_folder/gvnfm/vnfres/res/docker
+ sed -i '$ {s/^/#/}' build_image.sh
+ ./build_image.sh
+ popd
+}
+
# build_nfvo_lcm_image() - Build VFC NFVO LCM docker image
function build_nfvo_lcm_image {
pushd $src_folder/nfvo/lcm/docker
- sed -i '$ d' build_image.sh
+ sed -i '$ {s/^/#/}' build_image.sh
+ ./build_image.sh
+ popd
+}
+
+# build_nfvo_vnfm_gvnfmadapter_image() - Build VFC NFVO General VNF Adapter docker image
+function build_nfvo_vnfm_gvnfmadapter_image {
+ pushd $src_folder/nfvo/driver/vnfm/gvnfm/gvnfmadapter/docker
+ sed -i '$ {s/^/#/}' build_image.sh
./build_image.sh
popd
}
@@ -58,18 +83,37 @@ function build_nfvo_lcm_image {
function get_vfc_images {
if [[ "$build_image" == "True" ]]; then
install_docker
+ # Separate methods are required since the image build process will change.
+ build_gvnfm_lcm_image
+ build_gvnfm_vnfmgr_image
+ build_gvnfm_vnfres_image
build_nfvo_lcm_image
- # TODO(sshank): Add other VFC component docker image builds when they are ready.
+ build_nfvo_vnfm_gvnfmadapter_image
+ # TODO(sshank): Add other VFC component docker image builds.
else
- pull_onap_image vfc/nslcm
+ 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
fi
}
# install_vfc() - Download and install vfc service from source code
function install_vfc {
nslcm_image=`docker images | grep nslcm | grep latest| awk '{print $1 ":" $2}'`
- docker run -d --name vfc-nslcm -p 3306:3306 -p 8403:8403 -e MSB_ADDR=127.0.0.1 $nslcm_image
- # TODO(sshank): Run other VFC component docker images when they are ready.
+ vnflcm_image=`docker images | grep vnflcm | grep latest| awk '{print $1 ":" $2}'`
+ vnfmgr_image=`docker images | grep vnfmgr | grep latest| awk '{print $1 ":" $2}'`
+ vnfres_image=`docker images | grep vnfres | grep latest| awk '{print $1 ":" $2}'`
+ gvnfmdriver_image=`docker images | grep gvnfmdriver | grep latest| awk '{print $1 ":" $2}'`
+
+ docker run -d --name vfc-nslcm -p 8403:8403 -e MSB_ADDR=127.0.0.1 $nslcm_image
+ docker run -d --name vfc-vnflcm -p 8801:8801 -e MSB_ADDR=127.0.0.1 $vnflcm_image
+ docker run -d --name vfc-vnfmgr -p 8803:8803 -e MSB_ADDR=127.0.0.1 $vnfmgr_image
+ docker run -d --name vfc-vnfres -p 8802:8802 -e MSB_ADDR=127.0.0.1 $vnfres_image
+ docker run -d --name vfc-gvnfmdriver -p 8484:8484 -e MSB_ADDR=127.0.0.1 $gvnfmdriver_image
+
+ # TODO(sshank): Run other VFC component docker images.
}
# init_vfc() - Function that initialize VF-C services
@@ -78,7 +122,7 @@ function init_vfc {
if [[ "$clone_repo" == "True" ]]; then
clone_all_vfc_repos
- if [[ "$compile_repo" == "False" ]]; then
+ if [[ "$compile_repo" == "True" ]]; then
compile_all_vfc_repos
fi
fi