#!/bin/bash

source /var/onap/sdnc
source /var/onap/functions

appc_src_folder=$git_src_folder/appc
appc_repos=("appc" "appc/deployment")

# _build_appc_images() - Function that creates APPC images from source code.
function _build_appc_images {
    get_sdnc_images
    build_docker_image $appc_src_folder/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
        pull_openecomp_image appc-image openecomp/appc-image:latest
        pull_openecomp_image dgbuilder-sdnc-image openecomp/dgbuilder-sdnc-image:latest
    fi
}

# install_appc() - Function that clones and installs the APPC services from source code
function install_appc {
    pushd $appc_src_folder/deployment/docker-compose
    install_docker_compose
    /opt/docker/docker-compose up -d
    popd
}

# 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
}
