From dd074806ad51761392a9cca3f1f04fbbebd3de22 Mon Sep 17 00:00:00 2001 From: Victor Morales Date: Wed, 26 Jul 2017 16:06:35 -0500 Subject: Sync latest changes for vagrant-onap Given some internal procedures was not possible to submit all the changes. In the meantime, those changes were placed into an non-official project. This change syncronizes the latest changes into the official repository. Issue-id: INT-17 Change-Id: Ia4125f4b70273401e4ed3cc1908d2e2ad7d1c2e9 Signed-off-by: Victor Morales --- bootstrap/vagrant-onap/lib/dcae | 40 +++++++++++++++++++++++++++++++++------- 1 file changed, 33 insertions(+), 7 deletions(-) (limited to 'bootstrap/vagrant-onap/lib/dcae') diff --git a/bootstrap/vagrant-onap/lib/dcae b/bootstrap/vagrant-onap/lib/dcae index 0f6e27507..05527bc1d 100755 --- a/bootstrap/vagrant-onap/lib/dcae +++ b/bootstrap/vagrant-onap/lib/dcae @@ -57,16 +57,40 @@ function compile_docker_image { popd } +# clone_all_dcae_repos() - Function that clones DCAE source repo. +function clone_all_dcae_repos { + local src_folder=/opt/dcae + clone_repo dcae $src_folder + + for dirc in apod apod/analytics apod/buildtools apod/buildtools collectors collectors/ves controller controller/analytics dcae-inventory \ + demo demo/startup demo/startup/aaf demo/startup/controller demo/startup/message-router dmaapbc operation operation/utils pgaas utils utils/buildtools; do + clone_repo dcae/$dirc $src_folder/$dirc + done +} + +# compile_all_dcae_repos() - Function that compiles DCAE source repo. +function compile_all_dcae_repos { + local src_folder=/opt/dcae + + for dirc in apod apod/analytics apod/buildtools apod/buildtools collectors collectors/ves controller controller/analytics dcae-inventory \ + demo demo/startup demo/startup/aaf demo/startup/controller demo/startup/message-router dmaapbc operation operation/utils pgaas utils utils/buildtools; do + compile_src $src_folder/$dirc + done +} + + # install_dcae() - Function that clones and installs the DCAE controller services from source code function install_dcae { - export MTU=$(/sbin/ifconfig | grep MTU | sed 's/.*MTU://' | sed 's/ .*//' | sort -n | head -1) - local src_folder=/opt/dcae-startup-vm-controller - clone_repo dcae/demo/startup/controller $src_folder - pushd $src_folder install_docker_compose + + clone_all_dcae_repos + if [[ "$compile_repo" == "True" ]]; then + compile_all_dcae_repos + fi + if [[ "$build_image" == "True" ]]; then install_docker - src_folder=/opt/dcae + local src_folder=/opt/dcae compile_docker_image dcae/dmaapb $src_folder/dmaapbc openecomp/dcae-dmaapbc compile_docker_image dcae/orch-dispatcher $src_folder/orch-dispatcher dcae/orch-dispatcher @@ -84,16 +108,18 @@ function install_dcae { asserts_image dcae-inventory dcae_image=`docker images | grep dcae-controller | awk '{print $1 ":" $2}'` + pushd $src_folder/demo/startup/controller sed -i "s|DOCKER-REGISTRY/openecomp/dcae-controller:DCAE-VERSION|$dcae_image|g" docker-compose.yml sed -i "s|MTU|$MTU|g" docker-compose.yml /opt/docker/docker-compose up -d + popd else + pushd /opt/dcae/demo/startup/controller bash init.sh install_package make make up + popd fi - - popd } # init_dcae() - Function that initialize DCAE Controller services -- cgit 1.2.3-korg