aboutsummaryrefslogtreecommitdiffstats
path: root/bootstrap/vagrant-onap/lib/sdnc
diff options
context:
space:
mode:
authorVictor Morales <victor.morales@intel.com>2017-06-16 18:32:48 -0500
committerVictor Morales <victor.morales@intel.com>2017-06-20 21:13:28 -0500
commit89ce3216514b002b725777d132df144b3838e42d (patch)
treefd1dcc35972c448a576265a7eb6381d8b89e115c /bootstrap/vagrant-onap/lib/sdnc
parentf5cd892f130bd6a8d0cdf44d705b966c3cee3499 (diff)
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 <victor.morales@intel.com> Issue-id: CIMAN-28
Diffstat (limited to 'bootstrap/vagrant-onap/lib/sdnc')
-rwxr-xr-xbootstrap/vagrant-onap/lib/sdnc38
1 files changed, 38 insertions, 0 deletions
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
+}