#!/bin/bash

source /var/onap/functions

# _create_config_file() - Creates a configuration yaml file for the controller
function _create_config_file {
    cat > $dcae_src_folder/controller/config.yaml << EOL
ZONE: $dcae_zone
STATE: $dcae_state
DCAE-VERSION: $artifacts_version
HORIZON-URL: https://mycloud.rackspace.com/cloud/$tenant_id
KEYSTONE-URL: https://identity.api.rackspacecloud.com/v2.0
OPENSTACK-TENANT-ID: $tenant_id
OPENSTACK-TENANT-NAME: OPEN-ECOMP
OPENSTACK-REGION: $openstack_region
OPENSTACK-PRIVATE-NETWORK: $openstack_private_network_name
OPENSTACK-USER: $openstack_user
OPENSTACK-PASSWORD: $openstack_password
OPENSTACK-KEYNAME: ${key_name}${rand_str}_dcae
OPENSTACK-PUBKEY: $pub_key
     
NEXUS-URL-ROOT: $nexus_repo_root
NEXUS-USER: $nexus_username
NEXUS-PASSWORD: $nexus_password
NEXUS-URL-SNAPSHOTS: $nexus_url_snapshots
NEXUS-RAWURL: $nexus_repo
     
DOCKER-REGISTRY: $nexus_docker_repo

GIT-MR-REPO: http://gerrit.onap.org/r/dcae/demo/startup/message-router.git
EOL
}

# _build_dcae_images() Function that builds DCAE docker images from source code.
function _build_dcae_images {
    if [[ "$compile_repo" != "True" ]]; then
        compile_repos "dcae"
    fi
    build_docker_image $dcae_src_folder/dmaapbc openecomp/dcae-dmaapbc
    build_docker_image $dcae_src_folder/orch-dispatcher dcae/orch-dispatcher

    pushd $dcae_src_folder/demo
    bash dcae-demo-controller/src/main/docker-build/build.sh
    popd

    build_docker_image $dcae_src_folder/dcae-inventory
}

# get_dcae_images() - Function that retrieves or builds DCAE docker images.
function get_dcae_images {
    if [[ "$build_image" == "True" ]]; then
        _build_dcae_images
    else
        pull_openecomp_image dcae-dmaapbc openecomp/dcae-dmaapbc
        pull_openecomp_image dcae-controller
    fi
}

# install_dcae() - Function that clones and installs the DCAE controller services from source code
function install_dcae {
    install_docker_compose
    pushd $dcae_src_folder/demo/startup/controller
    if [[ "$build_image" == "True" ]]; then
        dcae_image=`docker images | grep dcae-controller | awk '{print $1 ":" $2}'`
        sed -i "s|DOCKER-REGISTRY/openecomp/dcae-controller:DCAE-VERSION|$dcae_image|g" docker-compose.yml
        sed -i "s|MTU|$MTU|g" docker-compose.yml
        /opt/docker/docker-compose up -d
    else
        bash init.sh
        install_package make
        make up
    fi
    popd
    # run_docker_image -p 8080:8080 -d -v <some local directory>/config.yml:/opt/config.yml --name dcae-inventory <docker registry>/dcae-inventory:<version>
}

# init_dcae() - Function that initialize DCAE Controller services
function init_dcae {
    if [[ "$clone_repo" == "True" ]]; then
        clone_repos "dcae"
        if [[ "$compile_repo" == "True" ]]; then
            compile_repos "dcae"
        fi
    fi

    _create_config_file
    if [[ "$skip_get_images" == "False" ]]; then
        get_dcae_images
        if [[ "$skip_install" == "False" ]]; then
            install_dcae
        fi
    fi
}
