formalize the notion of an environment configuration

Create the structure and notion of environment configuration
in tripleo-quickstart.  Environmental configuration would be
defined as any configuration that does not change featureset
values or node topology.  This is for the naunces that are
required to run tripleo in different host environments whether
that be rdo-ci, tripleo-ci, ovb in a specific cloud etc.

Change-Id: I4cf2e1cac0325837deeefa889a3699e0db0ec7d8
This commit is contained in:
Wes Hayutin 2017-06-01 15:31:13 -04:00
parent 897b2f4d94
commit 915b55017f
4 changed files with 47 additions and 2 deletions

View File

@ -0,0 +1 @@
environment_type: libvirt

View File

@ -0,0 +1,32 @@
.. _environment-configuration:
Environment Configuration
=========================
TripleO-Quickstart has the requirement and capacity to execute in several
different environments and using different types of systems to bootstrap
the environments.
Some known examples of different environments are:
* upstream OpenStack CI
* CI CentOS (ci.centos.org)
* local libvirt environments
* running OVB based deployments in various clouds
* Using a CentOS or RHEL qcow2 image without preinstalled OpenStack RPMS.
Anything defined in an environment configuration file should not impact or
overwrite a variable in a featureset, topology or release configuration file.
There should be no intersection of variables between the three types of
configuration.
You will find environment configuration files under $repo/config/environments.
Some of the environment configuration will be stored in TripleO Quickstart or
TripleO Quickstart Extras, however sometimes the configuration is specific
to CI and may only exist in the environment itself. For example variables
specific to executing TripleO Quickstart in upstream will live in
https://github.com/openstack-infra/tripleo-ci/tree/master/toci-quickstart
Example Invocation::
quickstart.sh -E config/environments/default_libvirt.yml $VIRTHOST

View File

@ -10,6 +10,7 @@ Contents:
configuration
feature-configuration
node-configuration
environment-configuration
accessing-libvirt
accessing-undercloud
accessing-overcloud

View File

@ -186,6 +186,9 @@ usage () {
echo " -N, --nodes <file>"
echo " specify the number of nodes that should be created by"
echo " the provisioner. "
echo " -E, --environment <file>"
echo " specify additional configuration that is specific to"
echo " the environment where TripleO-Quickstart is running."
echo " -e, --extra-vars <key>=<value>"
echo " additional ansible variables, can be used multiple times"
echo " -w, --working-dir <dir>"
@ -282,6 +285,11 @@ while [ "x$1" != "x" ]; do
shift
;;
--environment|-E)
OPT_ENVIRONMENT=$2
shift
;;
--clean|-X)
OPT_CLEAN=1
;;
@ -383,6 +391,8 @@ fi
: ${OPT_CONFIG:=$OPT_WORKDIR/config/general_config/minimal.yml}
# Default Nodes
: ${OPT_NODES:=$OPT_WORKDIR/config/nodes/1ctlr_1comp.yml}
# Default Environment
: ${OPT_ENVIRONMENT:=$OPT_WORKDIR/config/environments/default_libvirt.yml}
# allow the deprecated config files to work
OLD_CONFIG=""
@ -481,9 +491,10 @@ else
fi
ansible-playbook -$VERBOSITY $OPT_WORKDIR/playbooks/$OPT_PLAYBOOK \
-e @$OPT_CONFIG \
-e @$OPT_NODES \
-e @$OPT_WORKDIR/config/release/$OPT_RELEASE.yml \
-e @$OPT_NODES \
-e @$OPT_CONFIG \
-e @$OPT_ENVIRONMENT \
-e local_working_dir=$OPT_WORKDIR \
-e virthost=$VIRTHOST \
${OPT_VARS[@]} \