From 89ce3216514b002b725777d132df144b3838e42d Mon Sep 17 00:00:00 2001 From: Victor Morales Date: Fri, 16 Jun 2017 18:32:48 -0500 Subject: Add vagrant-onap project This commit contains the current state of the files and folders imported from github repository[1]. Fixes and features are expected to be implemented in this project. [1] https://github.com/electrocucaracha/vagrant-onap Change-Id: Ib1e8d264e9566c5e44454f5475b5da4638879cb7 Signed-off-by: Victor Morales Issue-id: CIMAN-28 --- bootstrap/vagrant-onap/lib/sdnc | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100755 bootstrap/vagrant-onap/lib/sdnc (limited to 'bootstrap/vagrant-onap/lib/sdnc') diff --git a/bootstrap/vagrant-onap/lib/sdnc b/bootstrap/vagrant-onap/lib/sdnc new file mode 100755 index 000000000..b3c64f90e --- /dev/null +++ b/bootstrap/vagrant-onap/lib/sdnc @@ -0,0 +1,38 @@ +#!/bin/bash + +set -o xtrace + +# build_sdnc_images() - Builds SDNC images from source code +function build_sdnc_images { + local src_folder=/opt/sdnc/oam + clone_repo sdnc/oam $src_folder + build_docker_image $src_folder/installation/ubuntu + /var/lib/dpkg/info/ca-certificates-java.postinst configure + build_docker_image $src_folder/installation/sdnc + build_docker_image $src_folder/installation/admportal + build_docker_image $src_folder/installation/dgbuilder +} + +# install_sdnc() - Download and install SDNC services from source code +function install_sdnc { + install_package unzip + local src_folder=/opt/sdnc/oam + export MTU=$(/sbin/ifconfig | grep MTU | sed 's/.*MTU://' | sed 's/ .*//' | sort -n | head -1) + clone_repo sdnc/oam $src_folder + 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 + fi + pushd $src_folder/installation/src/main/yaml + install_docker_compose + /opt/docker/docker-compose up -d + popd +} + +# init_sdnc() - Function that initialize SDNC services +function init_sdnc { + install_sdnc +} -- cgit 1.2.3-korg