#!/usr/bin/env bash

set -e
if [[ $DEBUG =~ ^(True|true|1|yes)$ ]]; then
    set -x
fi

## Overrideable options
DOCKER_IMAGE=${DOCKER_IMAGE:-"ubuntu:16.04"}
DIST=${DIST:-xenial}
RECLASS_ROOT=${RECLASS_ROOT:-$(pwd)}
SALT_OPTS="${SALT_OPTS} --retcode-passthrough --force-color"
DOCKER_OPTS="${DOCKER_OPTS} -e DEBIAN_FRONTEND=noninteractive"
SKIP_CLEANUP=${SKIP_CLEANUP:-0}
USER_ID=$(id -u)
GROUP_ID=$(id -g)

declare -a CONTAINERS

## Functions
log_info() {
    echo "[INFO] $*"
}

log_err() {
    echo "[ERROR] $*" >&2
}

docker_exec() {
    if [[ $DETACH =~ ^(True|true|1|yes)$ ]]; then
        exec_opts="-d"
    else
        exec_opts=""
    fi

    docker exec ${exec_opts} ${CONTAINER} /bin/bash -c "$*"
}

_atexit() {
    RETVAL=$?
    trap true INT TERM EXIT
    if [ $SKIP_CLEANUP -eq 1 ]; then
        return $RETVAL
    fi

    log_info "Cleaning up"

    for container in ${CONTAINERS[@]}; do
        CONTAINER=$container docker_exec "chown -R ${USER_ID}:${GROUP_ID} /srv/salt/reclass" || true
        docker rm -f $container >/dev/null || true
    done

    if [ $RETVAL -ne 0 ]; then
        log_err "Execution failed"
    else
        log_info "Execution successful"
    fi

    return $RETVAL
}

run_container() {
    MASTER_HOSTNAME=$1
    CONTAINER=$(docker run ${DOCKER_OPTS} --name ${MASTER_HOSTNAME}-$(date +%s) -h $(echo ${MASTER_HOSTNAME}|cut -d . -f 1) -v ${RECLASS_ROOT}:/srv/salt/reclass -i -t -d ${DOCKER_IMAGE})
    echo $CONTAINER
}

test_master() {
    MASTER_HOSTNAME=$1
    log_info "Installing packages"
    docker_exec "which wget >/dev/null || (apt-get update; apt-get install -y wget)"
    docker_exec "echo 'deb [arch=amd64] http://apt-mk.mirantis.com/${DIST}/ nightly salt salt-latest' > /etc/apt/sources.list.d/apt-mk.list"
    docker_exec "wget -O - http://apt-mk.mirantis.com/public.gpg | apt-key add -"

    docker_exec "apt-get update"
    docker_exec "apt-get install -y salt-master python-psutil iproute2 curl reclass salt-formula-*"

    log_info "Setting up Salt master"
    # TODO: remove grains.d hack when fixed in formula
    docker_exec "mkdir -p /etc/salt/grains.d && touch /etc/salt/grains.d/dummy"
    docker_exec "[ ! -d /etc/salt/pki/minion ] && mkdir -p /etc/salt/pki/minion"
    docker_exec "[ ! -d /etc/salt/master.d ] && mkdir -p /etc/salt/master.d || true"
    docker_exec "cat << 'EOF' >> /etc/salt/master.d/master.conf
file_roots:
  base:
    - /usr/share/salt-formulas/env
pillar_opts: False
open_mode: True
reclass: &reclass
  storage_type: yaml_fs
  inventory_base_uri: /srv/salt/reclass
ext_pillar:
  - reclass: *reclass
master_tops:
  reclass: *reclass
EOF"

    log_info "Setting up reclass"
    docker_exec "[ -d /srv/salt/reclass/classes/service ] || mkdir -p /srv/salt/reclass/classes/service || true"
    docker_exec "for i in /usr/share/salt-formulas/reclass/service/*; do
    [ -e /srv/salt/reclass/classes/service/\$(basename \$i) ] || ln -s \$i /srv/salt/reclass/classes/service/\$(basename \$i)
    done"
    docker_exec "chown -R ${USER_ID}:${GROUP_ID} /srv/salt/reclass/classes/service"
    docker_exec "[ ! -d /etc/reclass ] && mkdir /etc/reclass || true"
    docker_exec "cat << 'EOF' >> /etc/reclass/reclass-config.yml
storage_type: yaml_fs
pretty_print: True
output: yaml
inventory_base_uri: /srv/salt/reclass
EOF"

    log_info "Setting up Salt minion"
    docker_exec "apt-get install -y salt-minion"
    docker_exec "[ ! -d /etc/salt/minion.d ] && mkdir -p /etc/salt/minion.d || true"
    docker_exec "cat << EOF >> /etc/salt/minion.d/minion.conf
id: ${MASTER_HOSTNAME}
master: localhost
EOF"

    log_info "Starting Salt master service"
    DETACH=1 docker_exec "/usr/bin/salt-master"
    sleep 3

    docker_exec "salt-call saltutil.sync_all"
    log_info "Running states to finish Salt master setup"
    docker_exec "reclass --nodeinfo ${MASTER_HOSTNAME} >/dev/null"
    docker_exec "salt-call ${SALT_OPTS} state.show_top"

    if [[ $SALT_MASTER_FULL =~ ^(True|true|1|yes)$ ]]; then
        # TODO: can fail on "hostname: you must be root to change the host name"
        docker_exec "salt-call ${SALT_OPTS} state.sls linux,openssh" || true
        docker_exec "salt-call ${SALT_OPTS} state.sls salt,reclass"
    else
        docker_exec "salt-call ${SALT_OPTS} state.sls reclass.storage.node" || true
    fi

    NODES=$(docker_exec "find /srv/salt/reclass/nodes -type f -name *.yml ! -name cfg*")
    for node in ${NODES}; do
        node=$(basename $node .yml)
        log_info "Testing node ${node}"
        docker_exec "reclass --nodeinfo ${node} >/dev/null"
        docker_exec "salt-call ${SALT_OPTS} --id=${node} state.show_top"
        docker_exec "salt-call ${SALT_OPTS} --id=${node} state.show_lowstate >/dev/null"
    done
}


## Main
trap _atexit INT TERM EXIT

masters=$(find nodes -type f -name 'cfg*.yml')
for master in ${masters[@]}; do
    master=$(basename $master .yml)
    log_info "Testing Salt master ${master}"
    log_info "Creating docker container from image ${DOCKER_IMAGE}"
    CONTAINER=$(run_container $master)
    CONTAINERS+=(${CONTAINER})
    test_master $master
done
