Commit Graph

40 Commits

Author SHA1 Message Date
Ghanshyam Mann a048e1094b Retire openstack-chef: remove repo content
OpenStack-chef project is retiring
- https://review.opendev.org/c/openstack/governance/+/905279

this commit remove the content of this project repo

Depends-On: https://review.opendev.org/c/openstack/project-config/+/909134
Change-Id: Id5659595c1a67540fff5434197a06d33cdb9d85e
2024-02-17 20:53:54 -08:00
Lance Albertson 2e5dd8c317 Cookstyle 6.19.5 fixes
Update ChefSpec due to changes made in apache2 cookbook.

Depends-On: https://review.opendev.org/756168
Change-Id: Ie849f5bae082e94581146793f964d0e001a7c8c8
Signed-off-by: Lance Albertson <lance@osuosl.org>
2020-10-05 20:26:07 -07:00
Lance Albertson 1b39032b8d Stein fixes
- Cookstyle fixes
- Refactor Berksfile to use groups so we can exclude integration testing
  cookbooks
- Update documentation
- Enable sensitive resources for the template[/etc/cinder/cinder.conf]
  and to resources improve security.
- Update delivery configuration to exclude integration cookbooks
- Fix ChefSpec output.
- Switch package installations to send packages as arrays instead of individual
  package resources. This generally speeds up chef runs.

Depends-On: https://review.opendev.org/701027
Depends-On: https://review.opendev.org/706151
Depends-On: https://review.opendev.org/706157
Change-Id: I73948a67e798477cfe7d3cf62474d0ea96f90db2
2020-03-19 11:26:06 -07:00
Lance Albertson b81d56bdc7 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.

- Remove unused default recipe ChefSpec
- Formatting cleanup

Speed was improved from 3 minutes 9.1 seconds to 38.21 seconds

Change-Id: I470991c600bca0ad2b6a389923a2fe8c954b7008
2020-01-08 11:16:23 -08:00
Jens Harbott a47fa16dd1 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.

Clean up some unused pkg attributes.

Depends-On: https://review.opendev.org/682918
Change-Id: I1a11352f54b4126d7b510aa74d9ed1c4a33348c1
2019-09-19 12:14:19 +00:00
Samuel Cassiba c18919e533 block-storage refactor for Pike and Chef 13
- deprecated postgresql support
- dropped apt cookbook dependency
- deprecated node.foo.bar method access for node['foo']['bar'] bracket syntax
- implemented foodcritic and cookstyle corrections
- migrated cinder api to a Chef-managed config
- deprecated cinder-group-active service, as it is no longer needed and gets in
  the way of functionality
- added lvm cookbook dependency for better pv/vg handling

Implements blueprint modern-chef

Change-Id: Id248c9267af6750c871487bc8b577aa2011a782a
2017-12-12 17:34:08 -08:00
Mark Vanderwiel 37a4707015 Cleanup options deprecated for mitaka
Some options have been deprecated for Mitaka, replace them with the new
variants.

Change-Id: I7563c8cac90d9caa0095944d8c0835d73f1b8dde
2016-04-13 15:03:54 -05:00
Christoph Albers 4a7dc692b9 refactoring final step
* added endpoint attributes (moved from common)
* removed qpid as a messaging option (can be incuded in a wrapper)
* deleted default attributes from nova.conf.rb originated in
  openstack-common
* adapted optimized endpoint logic
* removed rubocop exceptions in recipes and regenerated the
  .rubocop_todo.yaml containing all remaining exceptions
* added versionbumb for refactored os-identity and common
* moved version up to 13.0.0 for mitaka release
* removed fedora, suse as supported platform
* adapted the specs (unit tests) to work again
* added new logic into templates/default/cinder.conf.erb
* refactored attributes throughout all recipes that were connected to
  the attributes used for the cinder.conf.erb template to adapt the new
  template attribute syntax
* moved all attributes from attributes/default.rb that were used in
  cinder_conf.erb to attributes/cinder_conf.rb
* refactored attributes to fit upcomming template logic
* refactored recipes to fit upcomming template logic
* removed all attributes from default.rb and cinder.conf.erb which are set
  as default in attributes, openstack doc and used to render the template

Depends-On: Ifa5a7f4e1df47a3961976e64f654224864c3dcb4
Depends-On: I3262b2e6f792f37c32a446e6567790b82bdd4613
Depends-On: I0547182085eed91d05384fdd7734408a839a9a2c
Implements: blueprint cookbook-refactoring
Change-Id: Idadc97bd7380d6c4f9f6f33d9c6b1215a5f24772
2016-02-08 14:39:27 +01:00
Jan Klare 16a6af5000 move from bundler to chefdk
- deprecated Gemfile
- Updated TESTING.md and README.md
- updated Rakefile to use chef exec insted of bundle exec
- replaced Runner with SoloRunner in specs

Change-Id: If3e3b54c9dbaa8bb51164bc85fd93ff5fc54ec4d
2015-04-28 17:56:15 +02:00
Mark Vanderwiel 12d0e9826a Setting up repo for master Juno Branch
* Update metadata version
* Removing Strainer file
* Adding Gemfile.lock to .gitignore
* Updating Gems
  * chef (11.12.0)
  * chefspec (4.0.0)
  * rspec (3.0.0)

Change-Id: I8b6858e811cc42ea53ec81ee4e3e70c65d4d444e
Partial-Bug: 1349865
2014-07-29 15:38:49 -05:00
JJ Asghar 1bc1272ade This is to get closer to 100% chefspec coverage
Ok, I admit it, it's only 94% but it's getting closer.

Change-Id: Ice7c47863a6e545a15366cd909e4d7c37cd397c8
2014-07-14 17:24:39 -05:00
Mark Vanderwiel 23754b4c06 Allow packages to be updatable
In order for package updates to occur, package resources need to use
the upgrade action.  This is first phase of blueprint, to get some
consistency, next phase is to allow some update control.

Change-Id: Ibf9aeea1a814383c298e432286c45a433ff257ed
Implements: blueprint allow-package-updates
2014-05-05 10:35:49 -05:00
galstrom21 92fdeed919 Refactoring ChefSpec tests
Adding strict dependency on python cookbook version. This removes the
requirement for carrying a matcher in this cookbook for the python
LWRPs.

Change-Id: I3e58c029044aa76fef71372e6a06f8f307d29df7
2014-03-21 22:17:43 -05:00
Chen Zhiwei 6ef026325c Rename openstack-metering to openstack-telemetry
update cookbook attribute name, change metering to telemetry

Change-Id: Idd9ca5fdf660a0fb98d7ae532dc29371aad7ef23
2014-03-13 02:56:15 -04:00
Andy McCrae 9ee4c9e65a Cleanup node['cpu']['total'] work-around for fauxhai
The fauxhai fix for the cpu stanza has merged and is available in
fauxhai version 2.1.0 so reverting the workaround patch and ensuring
fauxhai 2.1.0 is used.

- Remove the node.set for ['cpu']['total']
- Adjust the Gemfile to use fauxhai 2.1.0
- Adjust the Gemfile.lock

Change-Id: Ib1fc86af1306d5443721400589a8c830263c0767
Addresses: blueprint fauxhai-cleanup
2014-02-19 11:16:18 +00:00
Andy McCrae 15a08ff267 Fix for node['cpu']['total'] not being specified
- Add an override for node['cpu']['total'] in spec files

Change-Id: Ib519865760acd3648386d58bfd5da71a0a880cd0
Closes-Bug: #1280309
2014-02-17 11:26:47 +00:00
Matt Thompson 59c1955caf Clean up cookbook for bp/clean-up-attr-for-mq-and-db
This change removes the attributes we'll be moving to openstack-common
and changes reference of those attributes to reflect new (more
consistent) namespace. We also fix a broken test which doesn't properly
converge after changing a node attribute.  Lastly, we handle the rabbit
mq attribute use_ssl.

Change-Id: I12b9c33f89eb35a66bae7420340aff10efd18b1c
Implements: blueprint clean-up-attr-for-mq-and-db
2014-01-24 08:48:41 +00:00
Matt Ray 60e37c5eb0 Unified Rubocop cleanups under single file.
Consolidate all the .rubocop.yml into a single file, finished out cleanups for
all the Ruby files.

Change-Id: I92d5983724d5d0185cd25bea6a0f46657a6c05d4
Addresses: blueprint rubocop-for-block-storage
2014-01-17 15:35:20 -06:00
Matt Ray 230b2ed90e Initial rubocop support for ChefSpec tests.
Per the mailing list thread, introducing Rubocop as a replacement for Tailor.
Assuming Jenkins likes this, more pedantic patches will follow to make Rubocop
happy. So far this is just spacing issues and adding UTF-8 headers, but more
work will need to be done to remove all of the changes for the .rubocop-todo.yml

Addresses: blueprint rubocop-for-block-storage
Change-Id: Ibb11739e452016c101995a371d031faeeb7e7683
2014-01-10 12:53:30 -06:00
hanzhf 94f939eef3 Correct cinder scheduler test case name
addresses: bug #1262669

The "installs cinder scheduler packages" test case was named
"installs cinder scheduler packages" by mistake, correct it with
this patch.

Change-Id: I59a57b6774841d333fc2d8ef1c840f3ba91679b3
2013-12-19 22:03:31 +08:00
Chen Zhiwei 9cf9a0adfa Upgrade to Havana release
Also upgrade gems:
- berkshelf, ~> 2.0.10
- chefspec, ~> 3.0.2
- foodcritic, ~> 3.0.3
And update the DEPRECATION keywords

Change-Id: I8f8bf961ec065944696d4c85120aefe6c2bf76bb
2013-12-12 21:06:04 -05:00
alop 73bfaccfee Removed work-around for bug 1169730
Updated cinder packages have made it into precise
https://bugs.launchpad.net/ubuntu/+source/cinder/+bug/1169730

no longer need to manually update stevedore module

Change-Id: I1690b6f9bbb78233a0750c56a99197760a66649b
2013-10-29 11:13:00 -07:00
John Tran bc00347db1 cronjob binary path depends on platform
also refactored some tests

Change-Id: I7ef1082a515898efd26be398fa30d32b756c27c3
2013-09-23 17:43:46 +00:00
John Tran af20b1e521 configurable audit cron and ensure only one
Prior, the cronjobs were being set if there was more than one scheduler node.
This logic will ensure only one node at a time will be set to run the audit.
Cron job is also now configurable to preference.  Prior was setting to every
minute, which is more frequent than necessary.

Change-Id: I27b760b9260963bad3459bf2eb220e2c2966eb0f
2013-09-13 20:36:16 +00:00
alop d8a7f219c1 Upgrading 'stevedore' module for bug 1169730
https://bugs.launchpad.net/ubuntu/+source/cinder/+bug/1169730
Running into this on Ubuntu 12.04

Simply upgrading to a newer 'stevedore' resolved the issues with
the cinder scheduler.

Change-Id: I162c6714d56650fb891ec772bf71126856c82d8c
2013-08-26 11:28:27 -07:00
Ionuț Arțăriși 10765fd76e implement SUSE platform support
Change-Id: Ief3e20dd27f262d742db04549b5ac2213dc725fe
2013-07-17 18:22:06 +02:00
Ionuț Arțăriși 4949b57572 add PostgreSQL support
Change-Id: Ifcec59a28a4531f8e708c3d053c3cf6c8e99b710
2013-07-17 17:54:23 +02:00
John Dewey e2fc07597b Test cleanups for chefspec 1.3.0
ChefSpec 1.3.0 allows tests to evaluate guards.  Wired in
this cookbook to use that functionality.  Made tests a
bit clearer, and better utilize the block_storage_stubs.

Change-Id: Ib2e3ee8e00bdc5fb5dcda6b48beb0c405e9d8b92
2013-06-07 17:00:07 -07:00
John Dewey 1e45b8e40b Tests should be using require_relative
The #require_relative statement is relative to the file
containing the the statement.

Change-Id: I032eb8384328fb478e12b6f433d3cfa2229e252a
2013-06-04 18:33:04 -07:00
John Dewey 297c8b1c51 Renamed keystone_registration recipe
Renamed keystone_registration to identity_registration, and added
identity_registration tests.  Added registration tests to simply
test the args being passed to the `openstack_identity_register` LWRP.
The identity LWRP should be tested at a deeper level than the consumers.

Testing args passed to a DSL (&block) is a bit tricky. The tests
are not ideal, but give us the necessary coverage to catch common
errors.

Fixes: Bug 1182574
Change-Id: I4794e555133852cfbacd407dc726c6b65ecdef65
2013-05-21 22:17:54 -07:00
Carl Perry d17c345fde Moved attributes to the openstack namespace
Change-Id: Id18ff424018ded60c9c4570d81dbf5359f0187b7
2013-05-18 19:39:08 -07:00
Matt Ray e37be72e3d rename cookbook from 'cinder' to 'openstack-block-storage' and attributes accordingly.
Change-Id: I5f797567d110281b4698cbc6dbae5b76b03bdf67
2013-05-18 18:22:48 -05:00
John Dewey 36e51d8963 Removed local patches
These patches make assumptions that are a bit too liberal.
As these cookbooks are more widely used, these should be
moved into a wrapper cookbook.

Change-Id: I5348876712418a520659aab606065e5a5b288d99
2013-05-16 14:10:13 -07:00
John Dewey 88b242434b Using wrong recipe names for logging tests 2013-05-09 20:55:40 -07:00
John Dewey 1925451f67 Gave better examples of how to test templates
I wanted to work off what abe did to give examples to others on
ways to add attributes and test conditionals.
2013-05-09 16:06:19 -07:00
John Dewey 6ffe37b361 Merge pull request #58 from alop/spec-template
Spec template
2013-05-09 15:06:35 -07:00
alop a57649564b added some template content tests
I set the volume_driver to RBD, and test out some of the defaults
2013-05-09 13:25:54 -07:00
John Tran bebda71d3e only run on one node 2013-05-08 20:15:28 +00:00
John Dewey 414a57935d Corrected incorrectly named method 2013-05-06 20:56:32 -07:00
John Dewey 9ae54fc736 Initial testing via chefspec of all recipes
* Did not implement template testing ATM.  Need to go through
  and add those.  Hoping to get some help with that.
2013-05-05 22:17:48 -07:00