Update ChefSpec due to changes made in apache2 cookbook.
Depends-On: https://review.opendev.org/756168
Change-Id: Ia19ea6bebf787f1d8b1542bb6c895a294a5e72bc
Signed-off-by: Lance Albertson <lance@osuosl.org>
This brings us up to date with the latest apache2 cookbook which
included a major refactor in 6.0.0 removing all of the definitions and
recipe with proper resources. Instead of using the apache2_default_site
resource, directly use a template and then enable the config file using
the apache2_site resource. This gives us the most flexibility.
Additional fixes:
- Install mod_wsgi as a package on RHEL since there is no built-in
resource for it.
- Remove hack for restarting apache.
- Convert web_app to template and subscribe to restarting apache.
- Remove resources to restore SELinux contexts since this taken care of
by Chef now automatically.
- Don't set SELinux to permissive on RHEL (I tested this works properly
with it set to enforcing).
- Remove collector recipe as this service has been deprecated upstream.
- Add openstack-ceilometer-notification package for RHEL in
agent_notification_packages as it was missing.
- Fix gnocchi-api_wsgi_and aodh-api_wsgi_file file on RHEL
- Remove openstack-aodh package in aodh_packages for RHEL as it does not
exist
- Clean up arrays in attributes using %w(foo) instead of ['foo']
- Set group for upgrade scripts so it can read files properly on RHEL
- Add missing ChefSpec tests for aodh
- Include additional cookbooks in Berksfile required for CI
Depends-On: https://review.opendev.org/702772
Depends-On: https://review.opendev.org/701824
Change-Id: Ie7e6d792a764314775c40d4489cfba05d5c483ce
This updates all references of let(:chef_run) to cached(:chef_run) to
speed up tests. By doing this, we have to create a new cached(:chef_run)
block whenever we need to adjust node attributes for testing.
Speed was improved from 14 minutes 3 seconds to 3 minutes 41.8 seconds
Change-Id: I1233e25e69b956936fc19f5c57cedc529afbb730
I ran into a problem similar to this one [1] where testing gnocchi
commands did not work properly. The key problem is the fact that
`--skip-gnocchi-resource-types` was included in the ceilometer-upgrade
command. To allow an easy work around, I figure we can just create an
attribute which can add any option to ceilometer-upgrade so you can set
it to '' if you don't want it.
It might be debatable on whether to just default to run it with out
ceilometer-upgrade instead.
Some additional fixes include:
- Move the ceilometer-upgrade command to a new setup recipe where it
makes more sense since it needs to be run after Ceilometer and Gnocchi
are setup.
- Fix name of gnocchi-metricd_service for RHEL
- Add same apache restart fixes that we implemented in other cookbooks.
This is needed so that you can properly run ceilometer-upgrade with
gnocchi enabled.
[1] https://bugs.launchpad.net/openstack-ansible/+bug/1737096
Change-Id: I619ef044b8cb254b23e0c7bc674c46d5dd7e0076
Signed-off-by: Lance Albertson <lance@osuosl.org>
This fixes two primary issues:
- Removal of using node['openstack']['api']['auth']['version'] and converting to
using ::URI.decode
- Renaming endpoint attributes from telemetry-metric to telemetry_metric to
match what's used in openstack-common. Also rename all attributes to using the
underscore to minimize confusion.
Change-Id: I59c960a18f9e88eea494ec3c7bdbf189309f23e7
Signed-off-by: Lance Albertson <lance@osuosl.org>
- Switched default linter to cookstyle
- Renamed rake tasks to better conform with Chef conventions
- Normalized template banner
Change-Id: If802d82561619a0b7951422dc0e1e913f2c4c8b4
- Now use cookbook-openstackclient to create endpoints role service and
user
- added domain creation and access granting
- added values to work with identity_v3
- rewrote specs to work again
- updated readme
Change-Id: I6c91c874013190522dd7f1fd6060dc3796dc80fd
Depends-On: I0f8955f05de9b33711c54b9a198f45018cceb8e1
Depends-On: I2d404a424bd79a6e9b282304e21591fa33a48981
Depends-On: If7b4d6e563081a0be9957353d73ef61a9688df56
Depends-On: I84f850f32f25a318c3ed3c7337a0dfa6f641a5fe
* applied new template logic and refactored all recipes accordingly
* removed vmware and suse support and specs
* removed alarm ceilometer-alarm notifier and evaluator (needs to be rewritten
for aodh)
* added recipe for telemetry-metric/gnocchi deployment
* set gnocchi as default dispatcher for ceilometer
* added initial specs for gnocchi recipes
Depends-On: I22114b6d2d46cce561a2f292b92ff5f531cff533
Change-Id: If513cb2715d8266845bd6541d12005edef70f11c
1. If the compute driver is vmwareapi.VMwareESXDriver or
vmwareapi.VMwareVCDriver, set the hypervisor_inspector to vsphere and
add vmware section in conf file.
2. Reuse the vmware related attribute from compute cookbooks since
ceilometer need monitor the same vsphere.
3. Update the testcases
Closes-Bug: #1351619
Change-Id: Ie67e84e5695bd5f9ceaa6ed6682cfe33f7ed0b68
The new get_secret method allows the 'secrets' databag to be renamed,
just like all other databags.
Change-Id: Ic8be5d19a112d78e22716c0cd571efc7186ac9ce
Related-Bug: #1288784
This change gives us new capabilities, such as matching notifies and
subscribes of resources.
Implements: blueprint chefspec-3-4
Change-Id: I0d0e38bca19f27b8406575ee86c23ca23462e878
Currently, qpid's password is stored in an attribute in the common
cookbook. This change causes the password to be looked up via
get_password method, which is how we obtain the rabbitmq password.
Change-Id: I7afe9a0a069c6527ced4df7f094c31c1ca4acec4
Implements: blueprint use-data-bag-for-qpid-password
- Adjust the stubs in spec/spec_helper.rb to specify the appropriate
number of expected variables.
Partial-Bug: #1271535
Change-Id: I34542d8544cf7cefa5caebf4c323879c567a4f20
- Add rubocop.yml in specs/
- Add spec rubocop test to Strainerfile
- Update specs to comply with rubocop
Change-Id: I7f2de5cd4bd9307485ec7db134f31f5415c84131
Addresses: blueprint rubocop-for-metering
The user_password, service_password and db_password functions are redundant
since they simply call "secret". Creates a get_password function thata will
accept a "type" of db, service or user.
All instances of these calls have been changed to call get_password
Change-Id: Ia4dbfe4ff794efc84c900950a666085deebaf7f3
Partial-Bug: #1195915
This minor change allows you to run rspec outside of strainer while
still having cookbook dependencies automatically handled by berkshelf
(which also means you can run individual chefspec tests).
Note that this change does marginally increase the time it takes to run
a strainer test.
A similar change was recently accepted in the openstack-compute
cookbook.
Change-Id: Idaebfe4472f733e2ccbe2b55e9156bec1dd1558f
Moving all qpid parameters under default["openstack"]["metering"]
["mq"]["qpid"] so that other qpid options can be added under it.
Rabbit parameters will be brought under "mq" eventually. MQ is
selected through default["openstack"]["metering"]["mq"]["service_type"].
Default is "rabbitmq".
Implements: blueprint qpid-activemq-support
Change-Id: I4dd153a631063ee7c518e2d49fe01aa39a6f261d
These were migrated out of `openstack-compute` and into their
own cookbook. This is an initial best-effort attempt.
Made the following changes, which differ from the recipes imported.
* Moved to openstack["metering"] attribute namespace.
* No longer performing source install. This was done for folsom.
* No longer writing out an Apache virtualhost. This was done to
protect the folsom non-authenticated API endpoint.
* Templates write out as the ceilometer user/group vs nova.
* No longer including nova-common recipe. It doesn't appear nova.conf
is necessay (although I may be wrong). The stackforge puppet manifests
do not seem to do this [1].
* Added Strainerfile for testing.
[1] https://github.com/stackforge/puppet-ceilometer).
bug 1187514
Change-Id: Ia97126e13e422037ad1f2c89debd9e4cdfa60b0a