Commit Graph

19 Commits

Author SHA1 Message Date
Lance Albertson 111d3621a9 Update to apache2 ~> 8.0 cookbook
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
2020-01-30 09:31:59 -08:00
Lance Albertson e34f03b53e Improve ChefSpec test speed by enabling caching
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
2020-01-09 14:17:31 -08:00
Lance Albertson 3923f6ff5c Use python3 packages on Ubuntu
Python2.7 is going EOL soon, let us deploy python3 for Rocky from the
start, so we avoid having to switch later.

Change-Id: I52b2431da20b4ac994d920c233e6473ce275b197
2019-11-27 08:26:59 -08:00
Lance Albertson 2fc511323f Create attribute for setting options passed to ceilometer-upgrade
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>
2019-11-18 14:47:26 -08:00
Seb-Solon 2e812eb316 Replace ceilometer-dbsync by ceilometer-upgrade
ceilometer-dbsync is removed in pike release
see : https://docs.openstack.org/releasenotes/ceilometer/en_GB/ocata.html

Change-Id: I2d2407e4b0deb38e8fa410c9e96e2d16e69964e3
Closes-Bug: #1727329
2017-10-26 09:19:43 -04:00
Jan Klare faceb7e6e0 initial refactoring step and addition of gnocchi
* 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
2016-06-20 17:50:16 +02:00
Jan Klare dc78336dd9 move from bundler to chefdk
- deprecated Gemfile
- updated TESTING and README
- updated Rakefile to use chef exec instead of bundle exec
- replaced Runner by SoloRunner in specs

Change-Id: If523a416d87e2f6424923acd9942b44382c67065
2015-04-29 10:45:22 +02:00
lqslan 2d36ef461f Make ceilometer dbsync command timeout to be an optional parameter
The default dbsync command timeout value 3600 seconds may be too small
when there are large data in ceilometer database.
Make timeout to be optional to fix this problem.

Change-Id: Id4e703fab260f8e010ff089e4134e7aab8e21fd2
Closes-bug: #1389111
2014-11-05 17:46:48 +08:00
Mark Vanderwiel d2b5ba6136 Fix DB2 and nosql ceilometer dbsync
* Remove very old and now incorrect check for running
ceilometer-dbsync with nosql.  This is fine to do now, and is
needed when nosql is used for DB2 with ceilometer.

Change-Id: Id31d7dffb3e01513bb0470a7a6f5f07118dc28ef
Closes-Bug: #1373600
2014-09-24 15:19:21 -05:00
Jan Klare c309a0ae91 Changed the action of all package resources from default to :upgrade
Since no version is specified for any package and usually you do not
want to stick with one unspecific version you get during your first run
the action should be :upgrade.

Change-Id: Idc662737f1b03049de5555c6e1e54fc77532972f
Implements: blueprint allow-package-updates
2014-07-07 11:38:09 +02:00
Stephan Renatus 5c557b7153 Fix service subscriptions and definitions, add package overrides
Some things were a little off wrt. the way we usually do stuff.  This
change fixes the following:

- package resources take the override settings from node attributes
- all services subscribe to their config file
- the service definitions include restart and status actions, and
  enable services

Change-Id: I3d4a2f9247dda34a35897fdfe08d9e8cf27556b8
Closes-Bug: #1303777
2014-04-09 10:49:41 +02:00
galstrom21 5ae67ff44f Refactoring ChefSpec tests
Change-Id: I6c9148e0981f7c01eae4e09545ef011bf38bedfe
Addresses: blueprint refactor-spec-files
2014-03-18 15:47:44 -05:00
Chen Zhiwei c74a5400b7 Rename openstack-metering to openstack-telemetry
update cookbook name, attribute name

Change-Id: Ibd17a61b06769ed03e87bdcf54f394e67fce5bcb
2014-03-12 23:47:26 -04:00
ericzhou dc647a3283 Add NoSQL support for metering.
When NoSQL is used, ceilometer db sync is not required.

Change-Id: I568baf73d95311d895cbd59119688495a0b879dc
Implements: blueprint metering-nosql-support
2014-03-05 11:53:24 +08:00
Christopher H. Laco 9b60236ca1 Update specs to be rubocop compliant
- 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
2014-01-17 15:20:52 -06:00
Matt Ray c1f4c9b7f8 Filling out initial rubocop support for metadata.rb and the Gemfile.
https://blueprints.launchpad.net/openstack-chef/+spec/lint-and-unit-testing-for-havana
Removing tailor, cleaning up metadata and Gemfile, added TESTING.md and fixed a
broken test.

Addresses: blueprint rubocop-for-metering
Change-Id: I5a712c18033b6586548903dea93c8421050d971e
2014-01-09 17:37:17 -06:00
Ionuț Arțăriși 9423f6110d upgrade to Havana release
also upgrade gems:
- berkshelf, ~> 2.0.10
- chefspec, ~> 3.0.2
- foodcritic, ~> 3.0.3

Change-Id: I732f73d02263e3257167898826dbb8d0f60a064d
2013-12-12 09:42:55 +01:00
John Tran 6ba0451ca2 Add depedency for python-mysqldb package
If missing, ceilometer db-sync throws errors the library is missing

Change-Id: Ifc84f1a787e39dc8b95fd47f4c4d4c593d5b20ee
2013-09-17 17:26:50 +00:00
John Dewey c9851501b7 Initial add of ceilometer recipes
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
2013-08-02 14:20:06 -07:00