From a2f777c19494999c5bec3ee50b63a627155d5d9b Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Thu, 23 Oct 2014 16:21:13 +0200 Subject: controller/dtf-run-remote: fix problems with default OS ID Rename the config vairable from DTF_OPENSTACK_ID to DTF_OPENSTACK_DEFAULT_ID to better match the name with its purpose. * controller/bin/dtf-run-remote.in: Use DTF_OPENSTACK_DEFAULT_ID instead of DTF_OPENSTACK_ID. * controller/config/config.sh.template: Moved. * controller/etc/dtf.conf.d/config.sh.template: Document renamed variable on new place. --- controller/bin/dtf-run-remote.in | 5 ++-- controller/config/config.sh.template | 36 ---------------------------- controller/etc/dtf.conf.d/config.sh.template | 36 ++++++++++++++++++++++++++++ 3 files changed, 39 insertions(+), 38 deletions(-) delete mode 100644 controller/config/config.sh.template create mode 100644 controller/etc/dtf.conf.d/config.sh.template diff --git a/controller/bin/dtf-run-remote.in b/controller/bin/dtf-run-remote.in index 276ad40..d801d28 100644 --- a/controller/bin/dtf-run-remote.in +++ b/controller/bin/dtf-run-remote.in @@ -8,7 +8,7 @@ run_playbook=${run_playbook-@ansibleplaybooksdir@/fedora.yml} opt_workdir= opt_distro=fedora -opt_openstack_instance="$DTF_OPENSTACK_ID" +opt_openstack_instance="$DTF_OPENSTACK_DEFAULT_ID" opt_distro_ver=20 opt_extra_rpms= opt_taskdir= @@ -62,10 +62,11 @@ while true; do esac done +test -z "$opt_openstack_instance" && die "option --openstack-instance=ID not used" test -z "$opt_taskdir" && die "you must specify --taskdir" credsfile="$HOME/.dtf/private/os/$opt_openstack_instance.yml" -test ! -f "$credsfile" && die "file '$credsfile' not found" +test ! -f "$credsfile" && die "creds file '$credsfile' not found" config_os_file="$HOME/.dtf/os/$opt_openstack_instance.sh" test ! -r "$config_os_file" && die "file '$config_os_file' not found" diff --git a/controller/config/config.sh.template b/controller/config/config.sh.template deleted file mode 100644 index 94cbe22..0000000 --- a/controller/config/config.sh.template +++ /dev/null @@ -1,36 +0,0 @@ -# OpenStack ID -# ------------ -# -# By default, based on DTF_OPENSTACK_ID content the corresponding OpenStack -# configuration is used. You may have multiple OpenStack instances configured - -# this option selects one. Based on the OpenStack ID (say 'EXAMPLE'), those -# configuration-like files are used: -# -# * private/os/'EXAMPLE'.yml -# File having OpenStack credentials in ansible variable file (YAML file -# with "key: value" lines). See the ./private/os/EXAMPLE.yml for -# variables you should set up. Keep this file secret. -# -# * config/os/'EXAMPLE'.sh -# This file must contain configuration for specific OpenStack instance. -# Usually information about available images, flavors, networking, etc. -# The template file config/os/EXAMPLE.sh may be used when configuring your -# testing environment. - -export DTF_OPENSTACK_ID=dropbear - -# Result Database -# --------------- -# Directory where the testsuite should keep its (persistent) results. Make sure -# that this directory is backed up. - -export DTF_DATABASE=/var/lib/dtf_results - -# Presenter place -# --------------- -# For now, only static results are available. DTF_PRESENTER_PLACE must contain -# rsync-compatible destination (it may be place accessible via ssh+rsync). It -# is expected that some httpd server is able to read the directory with results -# and publish them as static directory structure over http://. - -export DTF_PRESENTER_PLACE=user@example.org:/var/www/html/my_project/dtf diff --git a/controller/etc/dtf.conf.d/config.sh.template b/controller/etc/dtf.conf.d/config.sh.template new file mode 100644 index 0000000..11aa40b --- /dev/null +++ b/controller/etc/dtf.conf.d/config.sh.template @@ -0,0 +1,36 @@ +# OpenStack ID +# ------------ +# +# By default, based on DTF_OPENSTACK_DEFAULT_ID content the corresponding +# OpenStack configuration is used. You may have multiple OpenStack instances +# configured - this option selects one. Based on the OpenStack ID (say +# 'EXAMPLE'), those configuration-like files are used: +# +# * private/os/'EXAMPLE'.yml +# File having OpenStack credentials in ansible variable file (YAML file +# with "key: value" lines). See the ./private/os/EXAMPLE.yml for +# variables you should set up. Keep this file secret. +# +# * config/os/'EXAMPLE'.sh +# This file must contain configuration for specific OpenStack instance. +# Usually information about available images, flavors, networking, etc. +# The template file config/os/EXAMPLE.sh may be used when configuring your +# testing environment. + +export DTF_OPENSTACK_DEFAULT_ID=dropbear + +# Result Database +# --------------- +# Directory where the testsuite should keep its (persistent) results. Make sure +# that this directory is backed up. + +export DTF_DATABASE=/var/lib/dtf_results + +# Presenter place +# --------------- +# For now, only static results are available. DTF_PRESENTER_PLACE must contain +# rsync-compatible destination (it may be place accessible via ssh+rsync). It +# is expected that some httpd server is able to read the directory with results +# and publish them as static directory structure over http://. + +export DTF_PRESENTER_PLACE=user@example.org:/var/www/html/my_project/dtf -- cgit