summaryrefslogtreecommitdiffstats
path: root/bootstrap/vagrant-onap/lib
diff options
context:
space:
mode:
authorVictor Morales <victor.morales@intel.com>2017-09-12 12:19:57 -0700
committerVictor Morales <victor.morales@intel.com>2017-09-12 12:23:25 -0700
commit896c80752ee8d5e4e9439146bba12606246aaf53 (patch)
treee9c689e2acc49ae88e686207fda9d91f72e9fc06 /bootstrap/vagrant-onap/lib
parent0b08c9e236dfad21f3550e534608e0c640b728ba (diff)
Add CCSDK support
This changes add support to Common Controller SDK project, which it's extracting some code from SDNC. Change-Id: I0e7365fdc854c4c6357c5c3b4bc7608f0076d241 Signed-off-by: Victor Morales <victor.morales@intel.com> Issue-Id: INT-196
Diffstat (limited to 'bootstrap/vagrant-onap/lib')
-rwxr-xr-xbootstrap/vagrant-onap/lib/_onap_functions9
-rwxr-xr-xbootstrap/vagrant-onap/lib/ccsdk64
-rwxr-xr-xbootstrap/vagrant-onap/lib/vfc12
3 files changed, 77 insertions, 8 deletions
diff --git a/bootstrap/vagrant-onap/lib/_onap_functions b/bootstrap/vagrant-onap/lib/_onap_functions
index 9e06010ed..18a465948 100755
--- a/bootstrap/vagrant-onap/lib/_onap_functions
+++ b/bootstrap/vagrant-onap/lib/_onap_functions
@@ -28,6 +28,15 @@ function pull_openecomp_image {
docker logout
}
+# pull_onap_image() - Pull Docker container image from a Docker Registry Hub
+function pull_onap_image {
+ local image=$1
+ local tag=$2
+ docker_openecomp_login
+ pull_docker_image $nexus_docker_repo/onap/${image}:$docker_version $tag
+ docker logout
+}
+
# configure_bind()- Configure bind utils
function configure_bind {
_install_bind
diff --git a/bootstrap/vagrant-onap/lib/ccsdk b/bootstrap/vagrant-onap/lib/ccsdk
new file mode 100755
index 000000000..d115eaa0f
--- /dev/null
+++ b/bootstrap/vagrant-onap/lib/ccsdk
@@ -0,0 +1,64 @@
+#!/bin/bash
+
+set -o xtrace
+
+source /var/onap/functions
+
+ccsdk_src_folder=$git_src_folder/ccsdk
+ccsdk_repos=("dashboard" "distribution" "parent" "platform/blueprints" "platform/nbapi" "platform/plugins" "sli" "sli/adaptors" "sli/core" "sli/northbound" "sli/plugins" "storage" "storage/esaas" "storage/pgaas" "utils")
+
+# clone_ccsdk_repos() - Function that clones the CCSDK repositories
+function clone_ccsdk_repos {
+ clone_repo ccsdk $ccsdk_src_folder
+
+ for dirc in ${ccsdk_repos[@]}; do
+ clone_repo ccsdk/$dirc $ccsdk_src_folder/$dirc
+ done
+}
+
+# compile_ccsdk_repos() -
+function compile_ccsdk_repos {
+ compile_src ccsdk $ccsdk_src_folder
+
+ for dirc in ${ccsdk_repos[@]}; do
+ compile_src $ccsdk_src_folder/$dirc
+ done
+}
+
+# _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
+ for image in ubuntu opendaylight odlsli dgbuilder-docker; do
+ build_docker_image $ccsdk_src_folder/distribution/$image docker
+ done
+}
+
+# get_ccsdk_images() - Get CCSDK Docker images
+function get_ccsdk_images {
+ if [[ "$build_image" == "True" ]]; then
+ _build_ccsdk_images
+ else
+ for image in ubuntu odl dgbuilder; do
+ pull_onap_image ccsdk-$image-image
+ done
+ fi
+
+}
+
+# install_ccsdk() -
+function install_ccsdk {
+ echo "pass"
+}
+
+# init_ccsdk() - Function that initialize Multi Cloud services
+function init_ccsdk {
+ if [[ "$clone_repo" == "True" ]]; then
+ clone_ccsdk_repos
+ if [[ "$compile_repo" == "True" ]]; then
+ compile_ccsdk_repos
+ fi
+ fi
+ install_ccsdk
+}
diff --git a/bootstrap/vagrant-onap/lib/vfc b/bootstrap/vagrant-onap/lib/vfc
index 6fa42182e..2b0634bc6 100755
--- a/bootstrap/vagrant-onap/lib/vfc
+++ b/bootstrap/vagrant-onap/lib/vfc
@@ -61,19 +61,15 @@ function get_vfc_images {
build_nfvo_lcm_image
# TODO(sshank): Add other VFC component docker image builds when they are ready.
else
- pull_docker_image nexus3.onap.org:10003/onap/vfc/nslcm latest
+ pull_onap_image vfc/nslcm
fi
}
-# run_vfc_images() - Run VFC docker images
-function run_vfc_images() {
- docker run -d --name vfc-nslcm -p 3306:3306 -p 8403:8403 -e MSB_ADDR=127.0.0.1 nexus3.onap.org:10003/onap/vfc/nslcm
- # TODO(sshank): Run other VFC component docker images when they are ready.
-}
-
# install_vfc() - Download and install vfc service from source code
function install_vfc {
- run_vfc_images
+ 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.
}
# init_vfc() - Function that initialize VF-C services