diff --git a/config/environments/default_libvirt.yml b/config/environments/default_libvirt.yml new file mode 100644 index 000000000..fdfaf4232 --- /dev/null +++ b/config/environments/default_libvirt.yml @@ -0,0 +1 @@ +environment_type: libvirt diff --git a/doc/source/environment-configuration.rst b/doc/source/environment-configuration.rst new file mode 100644 index 000000000..5ee7da787 --- /dev/null +++ b/doc/source/environment-configuration.rst @@ -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 diff --git a/doc/source/index.rst b/doc/source/index.rst index 0aa3df630..d02fc8e5c 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -10,6 +10,7 @@ Contents: configuration feature-configuration node-configuration + environment-configuration accessing-libvirt accessing-undercloud accessing-overcloud diff --git a/quickstart.sh b/quickstart.sh index b26d502de..9ec7c77b7 100755 --- a/quickstart.sh +++ b/quickstart.sh @@ -186,6 +186,9 @@ usage () { echo " -N, --nodes " echo " specify the number of nodes that should be created by" echo " the provisioner. " + echo " -E, --environment " + echo " specify additional configuration that is specific to" + echo " the environment where TripleO-Quickstart is running." echo " -e, --extra-vars =" echo " additional ansible variables, can be used multiple times" echo " -w, --working-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[@]} \