Previously the anchors and dependencies that allow external hooks were
all in the main ::heat class. However, if you wanted to include just
::heat::db::mysql, then it would fail, since it assumed the main heat
class was included. This moves all of those resources and relationships
into a new class, ::heat::deps. All of the classes will now include
this class so that the anchors and deps are always evaluated even if
only a portion of the classes are used, and even if ::heat isn't pulled
in.
Change-Id: I4297df160a7afae2b66c1ac76e37de313fa4fb09
Closes-Bug: #1507934
The domain name wasn't used for the keystone_user_role resource.
This change requires "replace indirection calls" [1]
Both needs to be merged as same time in order to pass CI tests.
[1] https://review.openstack.org/226624
Change-Id: I2a717b06a73af966d6625b4f6ec3254baf7c50a0
Depends-On: I36fabf547fa50fc14d49f491f11cb4a0571f7d31
In OpenStack Infra, we would like to run Puppet unit tests that
sometimes depends on other Puppet OpenStack modules.
Example: a patch in puppet-openstacklib that needs to be tested in puppet-nova.
This patch modifies the Rakefile to:
* clean spec_prep and spec_clean Rake tasks
* use openstack/puppet-openstack-integration/install_modules_unit.sh script
to clone modules.
* do not use .fixtures.yaml file to clone modules and rely on
zuul-cloner or git.
* Add openstack/ in gitignore so we never commit the
puppet-openstack-integration repository (can happen when spec_clean
did not run but you want to submit the patch anyway)
* Allow to run a custom Puppetfile if PUPPETFILE env is exported. It
will allow people to test the module with the dependencies they like,
feature we had with .fixtures.yaml.
Also add 'r10k' to Gemfile.
That way, we will be able to use zuul dependencies and run tests accross
modules like we do with functional testing.
Change-Id: If983dae0260ea2a1df49b4bdb0ada3c5223012c9
Currently logging configuration is splitted in two distinct classes, the
init.pp and the logging.pp classes. This review aims to centralize all
logging related parameters in a single class, the logging.pp one.
The impacted parameters are :
* use_syslog
* use_stderr
* log_facility
* verbose
* debug
* log_dir
This change remains backward compatible with what is currently in place
Change-Id: Ia040f7c935941da0b747cf3e8b5eda1abf2ae07a
Before you could configure the role in the config file but not the
keystone role that was created. Now you can do both.
Change-Id: Iea6df1679d3ceef1f0876e65dac06628147c700b
When configuring Heat domains, we might want to use the default domain.
However, the default domain might already exist or managed by
puppet-keystone.
This patch allows to disable its management in puppet-heat, but keep
True for backward compatibility so the domain will be managed by
default.
Change-Id: I2e9f2ebb5b12cc33565d74bf955250dcc82bcbb9
rpc_backend should be 'rabbit' which is the default in Olso Messaging.
This patch update the default and the conditional.
Change-Id: I392dc5670d8b9ebb8c58e06c8cadd44a4adb1694
In Kilo, we decided to use ::heat::keystone::auth to manage the
Keystone_role resource to help with Trusts configuration.
Though the configuration was and still remains part of ::heat::engine
class because we assume ::heat::keystone::auth can be run outside the
heat-engine node.
So this patch aims to drop the deprecated parameter, update the
documentation and unit tests.
Change-Id: I045a3a82095e23778c4e878b13f2fc7f561d680e
Since our recent discussion about Ubuntu packaging, we decided to bump
Ubuntu packaging to trusty-proposed/liberty so we can install Liberty in
a better shape than current situation (Staging repo).
This patch installs UCA liberty repository.
Depends-On: I57e2ddc5d0e228142f8045623ffbde362c0e7f7b
Change-Id: I20decfb1743b334a44365166b310c264f521e4d7
This adds defined anchor points for external modules to hook into the
software install, config and service dependency chain. This allows
external modules to manage software installation (virtualenv,
containers, etc) and service management (pacemaker) without needing rely
on resources that may change or be renamed.
Change-Id: I032ee01505e0cbc125b0e219c436b77c93f57720
With the creation of the new openstack_config provider, some processing
that was done in heat_config has been centralized in
openstack_config.
Impacted methods are :
* section
* setting
* separator
Also, this commit adds the fact that, when passing a specific string
(ensure_absent_val) the provider will behave as if ensure => absent was
specified. '<SERVICE DEFAULT>' is the default value for
ensure_absent_val.
The use case is the following :
heat_config { 'DEFAULT/foo' : value => 'bar' } # will work as usual
heat_config { 'DEFAULT/foo' : value => '<SERVICE DEFAULT>' } # will mean absent
That means that all the current :
if $myvar {
heat_config { 'DEFAULT/foo' : value => $myvar }
} else {
heat_config { 'DEFAULT/foo' : ensure => absent }
}
can be removed in favor of :
heat_config { 'DEFAULT/foo' : value => $myvar }
If for any reason '<SERVICE DEFAULT>' turns out to be a valid value for
a specific parameter. One could by pass that doing the following :
heat_config { 'DEFAULT/foo' : value => '<SERVICE DEFAULT>',
ensure_absent_val => 'foo' }
Change-Id: Iaaf2e5755080ef32d7d585465aaea6fd408d0ece
Depends-On: I0eeebde3aac2662cc7e69bfad7f8d2481463a218
This patch is the initial modulesync run, it impacts:
* gitignore: just a sync between projects
* gemfile:
- update and allow to setup facter version and gem source
- split beaker gems with a dedicated group
- switch to rspec-puppet 2.2.0
* rakefile:
- use the new syntax for lint configuration
- add a acceptance target
* acceptance:
- sync nodesets
* spec: added rspec coverage report
Change-Id: Ib75add2af3380d0b1d4ce320b58df22b6c3ffa57
Enable debug & verbose when possible for OpenStack services logs, so we can read a maximum
of informations in Jenkins jobs logs and easily debug our eventual failures.
Change-Id: I5bdb2f9d9083efdfff9fa43f45371a90a75e38b7
Currently we specify the ordering of config resources wherever it is
necessary based on the presence of the file it will write to, or the
presence of the package in charge of providing the file it will write
to.
Those kind of ordering can be specified directly at the resource level
using the autorequire mechanism. With this patch, any config resource
will make sure the package in charge of providing the file will be
installed first.
Change-Id: I6476060c97d350640b5a254738a60e319ad522e9
When running the tests, rspec will download the modules speficied in
.fixtures.yml and put them in spec/fixtures/modules.
Some of those modules still point to stackforge/ namespace when they
should be pointing to openstack/ namespace.
Change-Id: Id167dfbe4d1281a3a019611dc69bbcb78f4d99bf
When logging is already set up, it can be useful to disable this option
to avoid logs duplication (collected by Upstart, for example)
Change-Id: I6ceb1d38307db9ca7187d19e0b4a686e39c4a118
Closes-bug: #1482564
In order to standardize the way dbsync are run across our modules,
we create a new class heat::db::sync.
This class will be included if sync_db is enabled.
By making this transition the heat::db::sync class
can be returned by the ENC.
A use case would be in an highly available environment, with 3 galera
nodes, include heat on every node with sync_db set to false
and have the ENC return heat::db::sync just for one node.
Change-Id: I2165dcce6ae9a47b8c9315411933de42516a18c9
This patch replaces the usage of Exec to create the Heat domain, by
using the Keystone_domain resource recently implemented in
puppet-keystone.
Change-Id: I5abdac6334e535e8be4e4d19223b4e83b7a39db1
In order to be able to take an action after all the packages of the
module have been installed/updated or all the services have been
started/restarted, we set a 'heat-package' and 'heat-service' tag
for each package and service of this module.
At the moment, there is a generic openstack tag that is not specific
enough if one wants to take action upon a single module change.
Use case :
If an action needs to be taken after all the packages have been
installed or updated : Package <| tag == 'heat-package' |> -> X
Change-Id: I38a6b422054dbf0fceacf6b7e329dbb3cb0fa9cb
Other modules provide an X::config class to be able to specify
parameters that are not yet part of the module. Heat was missing this
feature.
This commit aims to add it for puppet-heat.
Change-Id: Ie481598ee4a1b2c451a1e8bddd5faa526d15ef30
For some deployments (multi-DC) being able to increase the response
timeout for heat RPC's is vital.
Change-Id: Ib6a61e01ba9879315f9283c4fae34873ce89d338
Zuul-cloner's behavior is to clone the repository into a subdirectory
under a directory named for the repo namespace. Git's default behavior
is to just clone it directly into the present working directory. This
patch adds an argument to the git clone command to clone it into the
<namespace>/<repo name> directory, so that whether zuul-cloner or git
is used the repo ends up in the same directory relative to the PWD.
Change-Id: Id973085376a546940b8ee650da80912a6b136bbc
This patch updates the spec_helper_acceptance.rb file to use the common
module install script and Puppetfile from the new
openstack/puppet-openstack-integration repo. This will allow us to take
advantage of Zuul's Depends-On feature so that we can test changes
across multiple related modules. This is based on idea 1 from this
brainstorming session[1].
This will probably be abstracted out into a separate function or
eventually a separate gem so that it can be more easily shared across
the OpenStack modules and the Infra modules.
[1] https://etherpad.openstack.org/p/puppet-git-dependencies
Change-Id: I887ee2d495a6ac8f02ce3d0ba5b6d524e0a0f899
Co-Authored-By: James E. Blair <jeblair@hp.com>
Co-Authored-By: Spencer Krum <spencer.krum@hp.com>