#!/bin/bash

set -o xtrace

source /var/onap/functions
source /var/onap/asserts

hbase_version=1.2.3
src_folder=$git_src_folder/aai
aai_repos=("aai-common" "aai-config" "aai-data" "aai-service" "data-router" "logging-service" "model-loader" "resources" "rest-client" "router-core" "search-data-service" "sparky-be" "sparky-fe" "test-config" "traversal")

# install_hadoop() - Function that installs Hadoop
function install_hadoop {
    local release=titan
    local version=1.0.0
    local filename=$release-$version-hadoop1
    local dest_folder=/opt/hadoop/current

    if [ ! -d $dest_folder ]; then
        curl http://s3.thinkaurelius.com/downloads/$release/$filename.zip -o /tmp/${filename}.zip
        install_package unzip
        mkdir -p $dest_folder
        unzip /tmp/${filename}.zip -d $dest_folder
        pushd $dest_folder/${filename}
        ./bin/titan.sh start
        popd
    fi
}

# install_haproxy() - Function that install HAProxy
function install_haproxy {
    install_package haproxy
    sed -i "s|ENABLED=0|ENABLED=1|g" /etc/default/haproxy
#    cp /var/onap/files/haproxy.cfg /etc/haproxy/
    cp /var/onap/files/aai.pem /etc/ssl/private/
    chmod 640 /etc/ssl/private/aai.pem
    chown root:ssl-cert /etc/ssl/private/aai.pem
    mkdir /usr/local/etc/haproxy
    echo "127.0.0.1 localhost aai-traversal.api.simpledemo.openecomp.org aai-resources.api.simpledemo.openecomp.org" >> /etc/hosts

    service haproxy restart
}

# clone_all_aai_repos() - Function that clones AAI source repo.
function clone_all_aai_repos {
    for dirc in ${aai_repos[@]}; do
        clone_repo aai/$dirc $src_folder/$dirc
    done
}

# compile_aai_repos() - Function that compiles AAI source repo.
function compile_aai_repos {
    local repos=("aai-common" "resources" "logging-service" "traversal")
    if [[ "$compile_repo" == "True" ]]; then
        repos=aai_repos
    fi

    for dirc in ${repos[@]}; do
        compile_src $src_folder/$dirc
    done
}

# setup_titan() - Function that configures AAI services to connect to Hadoop Titan
function setup_titan {
    local $subdirectory=bundleconfig-local/etc/appprops
    install_python_package crudini

    for dirc in resources/aai-resources traversal/aai-travers; do
        for file in titan-cached.properties titan-realtime.properties; do
            crudini --set --existing $src_folder/$dirc/$subdirectory/$file "" storage.backend cassandra
            crudini --set --existing $src_folder/$dirc/$subdirectory/$file "" storage.hostname localhost
        done
    done

    # Addthe schema to the local isntance
    pushd $src_folder
    java -DAJSC_HOME=$src_folder/resources/aai-resources -DBUNDLECONFIG_DIR="bundleconfig-local" -cp aai-common/aai-core/target/aai-core-1.1.0-SNAPSHOT.jar:resources/aai-resources/target/aai-resources.jar:resources/aai-resources/target/userjars/* org.openecomp.aai.dbgen.GenTester
    popd
}

# start_aai_microservices() - Function that starts AAI microservices
function start_aai_microservices {
    MAVEN_OPTS="-Xms1024m -Xmx5120m -XX:PermSize=2024m -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=9446,server=y,suspend=n"
    for svc in resources traversal; do
        pushd $src_folder/resources
        mvn -P runAjsc
        popd
    done
}

# pull_hbase_image() - Pull HBase container image from a Docker Registry Hub
function pull_hbase_image {
    docker_openecomp_login
    docker pull $nexus_docker_repo/aaidocker/aai-hbase-${hbase_version}
}

# install_hbase() - Install HBase Service
function install_hbase {
    docker rm -f hbase
    pull_hbase_image
    docker run -d --net=host --name="hbase" $nexus_docker_repo/aaidocker/aai-hbase-${hbase_version}
}

# install_ajsc() - Install ASJC Java service container
function install_ajsc_aai {
    local src_folder=/opt/aai/aai-service
    cat <<EOL > /etc/ajsc-aai.conf
AAI_REPO_PATH=r/aai
AAI_CHEF_ENV=simpledemo
AAI_CHEF_LOC=/var/chef/aai-data/environments
docker_gitbranch=master
EOL
    docker rm -f aai-service
    if [[ "$build_image" == "True" ]]; then
        clone_repo aai/aai-service $src_folder
        build_docker_image $src_folder/ajsc-aai
    else
        pull_openecomp_image ajsc-aai
    fi

    asserts_image openecomp/ajsc-aai

    docker run --env-file /etc/ajsc-aai.conf --name=aai-service --net=host -v /etc/ssl/certs/ca-certificates.crt:/etc/ssl/certs/ca-certificates.crt -it -d $nexus_docker_repo/openecomp/ajsc-aai:$docker_version
}

# install_model_loader() Install Model Loader 
function install_model_loader {
    local src_folder=/opt/aai/model-loader/
    cat <<EOL > /etc/model-loader.conf
DISTR_CLIENT_ASDC_ADDRESS=${SDC_ADDRESS:-c2.vm1.sdc.simpledemo.openecomp.org:8443}
DISTR_CLIENT_CONSUMER_GROUP=${UEB_CONSUMER_GROUP:-SDCGroup}
DISTR_CLIENT_CONSUMER_ID=${UEB_CONSUMER_GROUP_ID:-UEB}
DISTR_CLIENT_ENVIRONMENT_NAME=${dmaap_topic}
DISTR_CLIENT_PASSWORD=${SDC_PASSWORD:-OBF:1ks51l8d1o3i1pcc1r2r1e211r391kls1pyj1z7u1njf1lx51go21hnj1y0k1mli1sop1k8o1j651vu91mxw1vun1mze1vv11j8x1k5i1sp11mjc1y161hlr1gm41m111nkj1z781pw31kku1r4p1e391r571pbm1o741l4x1ksp}
DISTR_CLIENT_USER=${SDC_USER:-aai}
                     
APP_SERVER_BASE_URL=${APP_SERVER_URL:-https://c1.vm1.aai.simpledemo.openecomp.org:8443}
APP_SERVER_AUTH_USER=${APP_USER:-ModelLoader}
APP_SERVER_KEYSTORE_PASSWORD=OBF:1i9a1u2a1unz1lr61wn51wn11lss1unz1u301i6o
APP_SERVER_AUTH_PASSWORD=${APP_PASSWORD:-OBF:1qvu1v2h1sov1sar1wfw1j7j1wg21saj1sov1v1x1qxw}
EOL

    ARGS=""

    docker rm -f model-loader-service
    if [[ "$build_image" == "True" ]]; then
        clone_repo aai/model-loader $src_folder
        build_docker_image $src_folder
        ARGS+="--env-file /etc/model-loader.conf model-loader"
    else
        pull_openecomp_image model-loader
        ARGS+="--name=model-loader-service -it -d --env-file /etc/model-loader.conf $nexus_docker_repo/openecomp/model-loader:$docker_version"
    fi
    asserts_image openecomp/model-loader
    docker run ${ARGS}
}

# wait_for_sdc() - Function that determines if SDC is up and running
function wait_for_sdc {
    if [[ -s "/opt/config/sdc_ip_addr.txt" ]]; then
        SDC_IP_ADDR=$(cat /opt/config/sdc_ip_addr.txt)
    else
        SDC_IP_ADDR="10.0.3.1"
    fi

     # Run Health Check against SDC and verify that all five components are up
    RES=$(curl http://$SDC_IP_ADDR:8181/sdc1/rest/healthCheck | grep -c "OK")
    while [[ $RES -lt 5 ]]; do
        RES=$(curl http://$SDC_IP_ADDR:8181/sdc1/rest/healthCheck | grep -c "OK")
    done
}

# init_aai() - Function that initialize AAI services
function init_aai {
    install_hadoop
    install_haproxy

    clone_all_aai_repos
    compile_aai_repos

    setup_titan
    start_aai_microservices

    mkdir -p /opt/openecomp/aai/logs
    mkdir -p /opt/openecomp/aai/data

    install_hbase

    # Wait 3 minutes before instantiating the A&AI container
    sleep 180

    install_ajsc_aai
    wait_for_sdc
    install_model_loader
}
