#!/bin/bash

source /var/onap/functions

# _init_data_folders() - Function that initialize the data folders
function _init_data_folders {
    mkdir -p /data/environments
    mkdir -p /data/scripts
    mkdir -p /data/logs/BE
    mkdir -p /data/logs/FE
    chmod 777 /data
    chmod 777 /data/logs
}

# _setup_docker_aliases() - Function that setups the aliases required by sdc scripts
function _setup_docker_aliases {
    cat <<EOL > /root/.bash_aliases
alias dcls='/data/scripts/docker_clean.sh \$1'
alias dlog='/data/scripts/docker_login.sh \$1'
alias drun='/data/scripts/docker_run.sh'
alias health='/data/scripts/docker_health.sh'
EOL
}

# get_sdc_images() - Function that retrieves the SDC docker images
function get_sdc_images {
    if [[ "$build_image" == "True" ]]; then
        build_docker_image $sdc_src_folder/sdc-docker-base
    else
        for image in backend frontend elasticsearch kibana cassandra sanity; do
            pull_openecomp_image openecomp/sdc-$image
        done
    fi
}

# install_sdc() - Function that pull templates and executes
function install_sdc {
    local ENV_NAME=$dmaap_topic
    local MR_IP_ADDR='10.0.11.1'

    _init_data_folders
    cp $sdc_src_folder/sdc-os-chef/environments/Template.json /data/environments
    cp $sdc_src_folder/sdc-os-chef/scripts/docker_run.sh /data/scripts
    cp $sdc_src_folder/sdc-os-chef/scripts/docker_health.sh /data/scripts
    cp $sdc_src_folder/sdc-os-chef/scripts/docker_login.sh /data/scripts
    cp $sdc_src_folder/sdc-os-chef/scripts/docker_clean.sh /data/scripts
    chmod +x /data/scripts/docker_run.sh
    chmod +x /data/scripts/docker_health.sh
    chmod +x /data/scripts/docker_login.sh
    chmod +x /data/scripts/docker_clean.sh

    cat /data/environments/Template.json | sed "s/yyy/"$IP_ADDRESS"/g" > /data/environments/$ENV_NAME.json
    sed -i "s/xxx/"$ENV_NAME"/g" /data/environments/$ENV_NAME.json
    sed -i "s/\"ueb_url_list\":.*/\"ueb_url_list\": \""$MR_IP_ADDR","$MR_IP_ADDR"\",/g" /data/environments/$ENV_NAME.json
    sed -i "s/\"fqdn\":.*/\"fqdn\": [\""$MR_IP_ADDR"\", \""$MR_IP_ADDR"\"]/g" /data/environments/$ENV_NAME.json

    install_docker
    if [[ "$skip_get_images" == "False" ]]; then
        bash /data/scripts/docker_run.sh -e $ENV_NAME  -l
    else
        bash /data/scripts/docker_run.sh -e $ENV_NAME -r $docker_version -p $(echo $nexus_docker_repo | cut -d':' -f2)
    fi
}

# init_sdc() - Function that initialize SDC services
function init_sdc {
    mount_external_partition sdb /data/
    if [[ "$clone_repo" == "True" ]]; then
        clone_repos "sdc"
        if [[ "$compile_repo" == "True" ]]; then
            compile_repos "sdc"
        fi
    fi

    if [[ "$skip_get_images" == "False" ]]; then
        get_sdc_images
    fi
    if [[ "$skip_install" == "False" ]]; then
        install_sdc
    fi
    _setup_docker_aliases
}
