blob: 95654fc102b765fc891aef7f0afeac652b898239 [file] [log] [blame]
Victor Morales89ce3212017-06-16 18:32:48 -05001#!/bin/bash
2
Victor Morales89ce3212017-06-16 18:32:48 -05003source /var/onap/sdnc
Victor Morales65deef22017-08-18 20:53:42 -05004source /var/onap/functions
5
Victor Morales65deef22017-08-18 20:53:42 -05006# _build_appc_images() - Function that creates APPC images from source code.
7function _build_appc_images {
8 get_sdnc_images
Victor Moralesf8730f52018-03-02 13:24:33 -08009 build_docker_image ${src_folders[appc]}/deployment/installation/appc docker
Victor Morales65deef22017-08-18 20:53:42 -050010}
Victor Moralesdd074802017-07-26 16:06:35 -050011
Victor Morales65deef22017-08-18 20:53:42 -050012# get_appc_images() - Function that gets or build APPC docker images
13function get_appc_images {
Victor Morales89ce3212017-06-16 18:32:48 -050014 if [[ "$build_image" == "True" ]]; then
Victor Morales65deef22017-08-18 20:53:42 -050015 _build_appc_images
Victor Morales89ce3212017-06-16 18:32:48 -050016 else
Victor Moralesf8730f52018-03-02 13:24:33 -080017 for image in appc-image dgbuilder-sdnc-image; do
18 pull_openecomp_image $image openecomp/$image:latest
19 done
Victor Morales89ce3212017-06-16 18:32:48 -050020 fi
Victor Morales65deef22017-08-18 20:53:42 -050021}
22
23# install_appc() - Function that clones and installs the APPC services from source code
24function install_appc {
Victor Moralesf8730f52018-03-02 13:24:33 -080025 run_docker_compose ${src_folders[appc]}/deployment/docker-compose
Victor Morales89ce3212017-06-16 18:32:48 -050026}
27
28# init_appc() - Function that initialize APPC services
29function init_appc {
Idan Amit1690e082017-08-20 08:58:14 +030030 if [[ "$clone_repo" == "True" ]]; then
Victor Moralesf1f1ba52017-11-20 16:38:28 -080031 clone_repos "appc"
Idan Amit1690e082017-08-20 08:58:14 +030032 if [[ "$compile_repo" == "True" ]]; then
Victor Moralesf1f1ba52017-11-20 16:38:28 -080033 compile_repos "appc"
Idan Amit1690e082017-08-20 08:58:14 +030034 fi
Victor Morales65deef22017-08-18 20:53:42 -050035 fi
36
Victor Morales6a919972017-09-28 18:29:54 -070037 if [[ "$skip_get_images" == "False" ]]; then
38 get_appc_images
39 if [[ "$skip_install" == "False" ]]; then
40 install_appc
41 fi
42 fi
Victor Morales89ce3212017-06-16 18:32:48 -050043}