#!/bin/bash

set -o xtrace

source /var/onap/functions

sdc_src_folder=$git_src_folder/sdc
sdc_repos=("sdc-os-chef" "jtosca" "sdc-distribution-client" "sdc-titan-cassandra" "sdc-tosca" "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 {
    clone_repo 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-os-chef docker
    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'
    local RELEASE=$docker_version
    NEXUS_DOCKER_PORT=$(echo $nexus_docker_repo | cut -d':' -f2)

    _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 $RELEASE -p $NEXUS_DOCKER_PORT
    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
}
