#!/bin/bash

set -o xtrace

source /var/onap/functions
source /var/onap/asserts

src_folder=$git_src_folder/mso
mso_repos=("chef-repo" "docker-config" "libs" "mso-config")

# clone_all_mso_repos() - Function that clones MSO source repo.
function clone_all_mso_repos {
    clone_repo mso $src_folder

    for dirc in ${mso_repos[@]}; do
        clone_repo mso/$dirc $src_folder/$dirc
    done
}

# compile_all_mso_repos() - Function that compiles MSO source repo.
function compile_all_mso_repos {
    compile_src $src_folder

    for dirc in ${mso_repos[@]}; do
        compile_src $src_folder/$dirc
    done
}

# install_mso() - Installation of mso images
function install_mso {
    if [[ "$build_image" == "True" ]]; then
        export GIT_NO_PROJECT=/opt/
        compile_src $src_folder
        build_docker_image $src_folder/packages/docker docker
        for image in mso mso-arquillian wildfly ubuntu-update jacoco; do
            asserts_image openecomp/$image
        done
    fi
}

# install_mso_docker_config() - Download and install MSO Docker configuration project
function install_mso_docker_config {
    MSO_ENCRYPTION_KEY=$(cat /opt/mso/docker-config/encryption.key)
    echo -n "$openstack_api_key" | openssl aes-128-ecb -e -K $MSO_ENCRYPTION_KEY -nosalt | xxd -c 256 -p > /opt/config/api_key.txt

    # Deployments in OpenStack require a keystone file
    if [ -e /opt/config/keystone.txt ]; then
        KEYSTONE_URL=$(cat /opt/config/keystone.txt)
        DCP_CLLI="DEFAULT_KEYSTONE"
        AUTH_TYPE="USERNAME_PASSWORD"
    else
        KEYSTONE_URL="https://identity.api.rackspacecloud.com/v2.0"
        DCP_CLLI="RAX_KEYSTONE"
        AUTH_TYPE="RACKSPACE_APIKEY"
    fi

    # Update the MSO configuration file.
    read -d '' MSO_CONFIG_UPDATES <<-EOF
{
"default_attributes":
    {
    "asdc-connections":
        {
            "asdc-controller1":
            {
                "environmentName": "$dmaap_topic"
            }
        },
        "mso-po-adapter-config":
        {
            "identity_services":
            [
                {
                    "dcp_clli": "$DCP_CLLI",
                    "identity_url": "$KEYSTONE_URL",
                    "mso_id": "$openstack_username",
                    "mso_pass": "$openstack_password",
                    "admin_tenant": "service",
                    "member_role": "admin",
                    "tenant_metadata": "true",
                    "identity_server_type": "KEYSTONE",
                    "identity_authentication_type": "$AUTH_TYPE"
                }
            ]
        }
    }
}
EOF
    export MSO_CONFIG_UPDATES
    export MSO_DOCKER_IMAGE_VERSION=$docker_version

    is_package_installed docker-ce || install_docker
    install_docker_compose
    # Deploy the environment
    pushd $src_folder/docker-config
    chmod +x deploy.sh
    if [[ "$build_image" == "True" ]]; then
        bash deploy.sh
    else
        # This script takes in input 2 nexus repos (the first one for the MSO image, the second one for mariadb)
        bash deploy.sh $nexus_docker_repo $nexus_username $nexus_password $nexus_docker_repo $nexus_username $nexus_password
    fi
    popd
}

# init_mso() - Function that initialize MSO services
function init_mso {
    clone_all_mso_repos
    if [[ "$compile_repo" == "True" ]]; then
        compile_all_mso_repos
    fi

    install_mso
    install_mso_docker_config
}
