diff options
author | 2018-03-13 12:26:08 -0700 | |
---|---|---|
committer | 2018-03-13 12:26:08 -0700 | |
commit | 4d7590ed7425a94c0f87a8461548c2461d79a710 (patch) | |
tree | 083ffc33a4cd6d8eff42deeea1da0b50c49efdfe /lib/appc | |
parent | ceb22354fcb078e8991a66dc9bc11dd5f21e77f4 (diff) |
Migrate vagrant-onap to devtool repo
This change covers the migration of the vagrant-onap tool's code
which was located under integration repo to devtool's repository.
The tool was renamed to avoid misunderstandings about its goals.
Change-Id: I79df8c35fccaa266a789217d441a6cf1183bd42a
Signed-off-by: Victor Morales <victor.morales@intel.com>
Issue-ID: INT-441
Diffstat (limited to 'lib/appc')
-rwxr-xr-x | lib/appc | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/lib/appc b/lib/appc new file mode 100755 index 0000000..95654fc --- /dev/null +++ b/lib/appc @@ -0,0 +1,43 @@ +#!/bin/bash + +source /var/onap/sdnc +source /var/onap/functions + +# _build_appc_images() - Function that creates APPC images from source code. +function _build_appc_images { + get_sdnc_images + build_docker_image ${src_folders[appc]}/deployment/installation/appc docker +} + +# get_appc_images() - Function that gets or build APPC docker images +function get_appc_images { + if [[ "$build_image" == "True" ]]; then + _build_appc_images + else + for image in appc-image dgbuilder-sdnc-image; do + pull_openecomp_image $image openecomp/$image:latest + done + fi +} + +# install_appc() - Function that clones and installs the APPC services from source code +function install_appc { + run_docker_compose ${src_folders[appc]}/deployment/docker-compose +} + +# init_appc() - Function that initialize APPC services +function init_appc { + if [[ "$clone_repo" == "True" ]]; then + clone_repos "appc" + if [[ "$compile_repo" == "True" ]]; then + compile_repos "appc" + fi + fi + + if [[ "$skip_get_images" == "False" ]]; then + get_appc_images + if [[ "$skip_install" == "False" ]]; then + install_appc + fi + fi +} |