#!/bin/bash

set -o xtrace

source /var/onap/functions

sdc_src_folder=$git_src_folder/sdc
sdc_repos=("jtosca" "sdc-distribution-client" "sdc-docker-base" "sdc-titan-cassandra" "sdc-tosca" "sdc-vnfdesign" "sdc-workflow-designer" "sdc_common")

# _mount_external_partition() - Create partition and mount the external volume
function _mount_external_partition {
    cat <<EOL > /tmp/sdc_ext_volume_partitions.txt
# partition table of /dev/sdb
unit: sectors

/dev/sdb1 : start=     2048, size=209713152, Id=83
/dev/sdb2 : start=        0, size=        0, Id= 0
/dev/sdb3 : start=        0, size=        0, Id= 0
/dev/sdb4 : start=        0, size=        0, Id= 0
EOL
    sfdisk --force /dev/sdb < /tmp/sdc_ext_volume_partitions.txt
    mkfs -t ext4 /dev/sdb1
    mkdir -p /data
    mount /dev/sdb1 /data
    echo "/dev/sdb1  /data           ext4    errors=remount-ro,noatime,barrier=0 0       1" >> /etc/fstab
}

# _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 rund='/data/scripts/docker_run.sh'
alias health='/data/scripts/docker_health.sh'
EOL
}

# clone_all_sdc_repos() - Function that clones SDC source repo.
function clone_all_sdc_repos {
    clone_repo sdc $sdc_src_folder

    for dirc in ${sdc_repos[@]}; do
        clone_repo sdc/$dirc $sdc_src_folder/$dirc
    done
}

# compile_all_sdc_repos() - Function that compiles SDC source repo.
function compile_all_sdc_repos {
    compile_src sdc $sdc_src_folder

    for dirc in ${sdc_repos[@]}; do
        compile_src $sdc_src_folder/$dirc
    done
}

# get_sdc_images() - Function that retrieves the SDC docker images
function get_sdc_images {
    if [[ "$build_image" == "True" ]]; then
        if [[ "$compile_repo" != "True" ]]; then
            compile_src $sdc_src_folder
        fi
        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
    chmod +x /data/scripts/docker_run.sh
    chmod +x /data/scripts/docker_health.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 [[ "$pull_docker_image" == "True" ]]; then
        docker_openecomp_login
        bash /data/scripts/docker_run.sh -e $ENV_NAME -r $docker_version -p $(echo $nexus_docker_repo | cut -d':' -f2)
    else
        bash /data/scripts/docker_run.sh -e $ENV_NAME  -l
    fi
}

# init_sdc() - Function that initialize SDC services
function init_sdc {
    _mount_external_partition
    if [[ "$clone_repo" == "True" ]]; then
        clone_all_sdc_repos
        if [[ "$compile_repo" == "True" ]]; then
            compile_all_sdc_repos
        fi
    fi
    get_sdc_images
    install_sdc
    _setup_docker_aliases
}
