Do this so that we have one way to install puppet (the puppet-install
role) and not multiple ways (including install_puppet.sh). This has
become more important because we need to fix how we install puppet after
upstream deleted the package repos and rather than double account
everything we can do it once.
Change-Id: Iec86a5423b053d4d02f8e0a74fea883d328b1945
This doesn't exist yet, but is coming in the needed-by patch. Add the
roles dir in system-config to the roles path.
Change-Id: If05f02e856598403d7f94edf5e6e52c5fa69e8e6
Needed-By: https://review.openstack.org/590753
As we start to do things in the base playbook instead of in puppet, we
need for those things to happen before we run puppet, and before we test
final system state.
Install ansible into a virtualenv, then run the base playbook.
Change-Id: I88808dec9dd4ebdd3fb9081881d2ab69f9eed95e
Without this change, the gem helper passes the entirely of the user's
environment through beaker's SSH connection. This causes problems with
puppet 4 because all of the ruby and bundler arguments confuse the ruby
interpreter and we see errors like this:
/var/lib/gems/2.3.0/gems/bundler-1.16.2/lib/bundler/spec_set.rb:91:in `block in materialize' : Could not find rake-12.2.1 in any of the sources ( Bundler::GemNotFound )
The only important variable is PUPPET_VERSION so just pass that and
nothing else.
Change-Id: I678716890d0c749e755ec0526621d47fee44a4bb
Previously, we were using the helper methods provided by beaker to
install puppet. When we moved to Xenial but stayed on puppet 3, we
changed the spec helper to install puppet 3 from the Xenial repos. This
duplicates effort that we have already written into install_puppet.sh,
and it doesn't reflect how we really install puppet in production. This
patch changes the install_infra_puppet method to use the install script
in system-config, so that when we make changes to how we install puppet
or what version we install, we only have to do it in one place. This
passes the test environment to the install command so that any
environment variables we set in the job (for example, if we make the
puppet version configurable through environment variables) make it
through. Also add logic to support puppet 4 by adding the new bin path
to the environment and using the appropriate modulepath.
We also need to modernize this helper for Zuulv3. zuul-cloner doesn't
exist on CI nodes any more, but we can rely on Zuul installing the
system-config repo beforehand, so just use that.
Change-Id: Ifa95171e580da96456d76900092ba924da626def
Update the Zuul conditional check to handle Zuul v3. Zuul v3 no longer
sets a URL or BRANCH env variable so we shouldn't rely on those for
checking if we are running under Zuul. Instead we can check if the
ZUUL_UUID is set which will be present for every job.
Depends-On: I83e7088c36b1b57279bb32e44c9f74730da582cf
Change-Id: Id4f6ae8cc4128083f0db72fb6e2dc81b9968e884
The spec helper file has been cargocult-copied from puppetlabs and
puppet-openstack modules, adjusted slightly for Infra's particular
needs. It is hard to read which makes adjusting it hard to do and hard
to review. This refactor moves code into descriptively-named functions,
and condenses the main setup code so that there is only one loop over
the host list, and passes the entire environment into host commands
instead of crafting long bash commands with required environment
variables.
Change-Id: I572a5dc0d9987e8c90a27f300c8b4979e20c43a2
Every puppet module contains the same file that prepares beaker tests.
Currently, when we need to make changes to it, we need to change it in
every puppet module. This is inefficient and causes a huge review
backlog for identical changes. This patch copies the
spec_helper_acceptance.rb file, with minor modifications to keep the
path logic correct, into the common helper gem. The modules already
depend on this gem for common gem dependencies. This way, modules can
simply `require
puppet-openstack_infra_spec_helper/spec_helper_acceptance` in their
tests and not bother keeping the spec_helper_acceptance module locally.
Change-Id: I18ed6cd2f8ee472a66cf580e3e183d14c00e6877