#!/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 drun='/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
        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
    if [[ "$clone_repo" == "True" ]]; then
        clone_all_sdc_repos
        if [[ "$compile_repo" == "True" ]]; then
            compile_all_sdc_repos
        fi
    fi

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