Merge "Change from using chef to local config files"
[integration.git] / bootstrap / vagrant-onap / lib / appc
1 #!/bin/bash
2
3 source /var/onap/sdnc
4 source /var/onap/functions
5
6 # _build_appc_images() - Function that creates APPC images from source code.
7 function _build_appc_images {
8     get_sdnc_images
9     build_docker_image ${src_folders[appc]}/deployment/installation/appc docker
10 }
11
12 # get_appc_images() - Function that gets or build APPC docker images
13 function get_appc_images {
14     if [[ "$build_image" == "True" ]]; then
15         _build_appc_images
16     else
17         for image in appc-image dgbuilder-sdnc-image; do
18             pull_openecomp_image $image openecomp/$image:latest
19         done
20     fi
21 }
22
23 # install_appc() - Function that clones and installs the APPC services from source code
24 function install_appc {
25     run_docker_compose ${src_folders[appc]}/deployment/docker-compose
26 }
27
28 # init_appc() - Function that initialize APPC services
29 function init_appc {
30     if [[ "$clone_repo" == "True" ]]; then
31         clone_repos "appc"
32         if [[ "$compile_repo" == "True" ]]; then
33             compile_repos "appc"
34         fi
35     fi
36
37     if [[ "$skip_get_images" == "False" ]]; then
38         get_appc_images
39         if [[ "$skip_install" == "False" ]]; then
40             install_appc
41         fi
42     fi
43 }