summaryrefslogtreecommitdiffstats
path: root/run_remote
diff options
context:
space:
mode:
authorPavel Raiskup <praiskup@redhat.com>2014-10-22 08:54:05 +0200
committerPavel Raiskup <praiskup@redhat.com>2014-10-22 08:54:05 +0200
commit2422a081a5be0d5ac5afb122361bc283da67341f (patch)
treecb255582060af6547dd9318c56ba0e8c761846a1 /run_remote
parent922089746e1029de9be986672fcdeb6bc82e18d7 (diff)
big reorg: prepare for generalization
Try to split into three separate components -> controller, tester, and 'tasks' (postgresql-tasks in our case). The controller component is the main part which is able to run the task remotely. Tester is more-like library for 'tasks' component (should be reusable on the raw git level). * controller: Almost separated component. * postgresql-tasks: Likewise. * tester: Likewise.
Diffstat (limited to 'run_remote')
-rwxr-xr-xrun_remote75
1 files changed, 0 insertions, 75 deletions
diff --git a/run_remote b/run_remote
deleted file mode 100755
index 39e45dd..0000000
--- a/run_remote
+++ /dev/null
@@ -1,75 +0,0 @@
-#!/bin/bash
-
-longopts="verbose,help,force,testid:,listonly"
-
-run_playbook=${run_playbook-ansible/fedora.yml}
-
-opt_workdir=/var/tmp/dbt-results
-opt_distro=fedora
-opt_openstack_instance=dropbear
-opt_distro_ver=20
-opt_extra_rpms=
-
-die() { echo >&2 "$@" ; exit 1 ; }
-
-longopts="distro:,distro-version:,workdir:,openstack-instance:,extra-rpms-file:"
-ARGS=$(getopt -o "v" -l "$longopts" -n "getopt" -- "$@") \
- || exit 1
-eval set -- "$ARGS"
-
-while true; do
- case "$1" in
- --distro)
- opt_distro="$2"
- shift 2
- ;;
-
- --distro-version)
- opt_distro_ver="$2"
- shift 2
- ;;
-
- --openstack-instance)
- opt_openstack_instance="$2"
- shift 2
- ;;
-
- --workdir)
- opt_workdir="$2"
- shift 2
- ;;
-
- --extra-rpms-file)
- opt_extra_rpms="$(readlink -f "$2")"
- shift 2
- ;;
-
- --)
- shift
- break
- ;;
- esac
-done
-
-credsfile="$(readlink -f "./private/os/$opt_openstack_instance.yml")"
-test -z "$credsfile" && die "--ansible-creds option must be specified"
-test ! -f "$credsfile" && die "file $credsfile not found"
-
-config_os_file="$(readlink -f "./config/os/$opt_openstack_instance.sh")"
-test ! -r "$config_os_file" && die "file $config_os_file not found"
-. "$config_os_file"
-
-config_os_id="$opt_distro$opt_distro_ver"
-
-export ANSIBLE_HOST_KEY_CHECKING=False
-ansible-playbook "$run_playbook" \
- --extra-vars "opt_distro=$opt_distro" \
- --extra-vars "opt_distro_ver=$opt_distro_ver" \
- --extra-vars "opt_tmp_resultdir=$opt_workdir" \
- --extra-vars "opt_credsfile=$credsfile" \
- --extra-vars "os_flavor_id=${os_flavor_ids[$config_os_id]}" \
- --extra-vars "os_image_id=${os_image_ids[$config_os_id]}" \
- --extra-vars "os_keypair=${os_keypair}" \
- --extra-vars "os_security_group=${os_security_group}" \
- --extra-vars "os_network_dev=${os_network_dev}" \
- --extra-vars "${opt_extra_rpms:+dtf_rpm_files_list=$opt_extra_rpms}"