#!/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
        if [[ "$compile_repo" == "True" ]]; then
            compile_src $sdc_src_folder
        fi
        build_docker_image $sdc_src_folder/sdc-docker-base
    else
		if [["$pull_docker_image" == True]]; then
			for image in backend frontend elasticsearch kibana cassandra sanity; do
				pull_openecomp_image openecomp/sdc-$image
			done
		fi
    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 [[ "$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
}
