#!/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 {
    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-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
}
