Commit Graph

60 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 08f84ac085 CentOS 8 support
- Update package names
- Migrate to using apache2_mod_wsgi resource and require apache2 ~> 8.6
- Update ChefSpec

Depends-On: https://review.opendev.org/c/openstack/cookbook-openstack-image/+/815148
Change-Id: I7223112092393e3c2ef8a871bb2b2e20326dafdd
Signed-off-by: Lance Albertson <lance@osuosl.org>
2021-10-22 12:28:55 -07: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 1600e4752d Updates for Train
Changed:
- Update release to train
- Update to apache2 ~> 8.1

Fixed:
- ChefSpec

Removed:
- Unused rubocop rules

Change-Id: I804485a93475cdfd651ccee21c93fce844872b3b
Depends-On: https://review.opendev.org/731859
Depends-On: https://review.opendev.org/731860
2020-06-09 10:14:15 -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 873b58d13b 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.

Other changes:
- Remove selinux for depends as it's not being referenced anywhere in
  the cookbook
- Included more ChefSpec tests for api recipe
- Update WSGI template
- Include additional cookbooks in Berksfile required for CI

Depends-On: https://review.opendev.org/702772
Depends-On: https://review.opendev.org/701824
Change-Id: I289091f54750dd5068e98fd4f4853880f4b72c6c
2020-01-30 09:29:10 -08: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
Lance Albertson 0566bf9578 Properly notify apache restarts on cinder configuration updates
This uses edit_resource to add a notification in the block storage
apache configuration when it gets updated. This is a workaround due to
the fact we are using a version of the apache2 cookbook that is still
using definitions and cannot add notifications with definitions.

This will be removed in the Stein release when we migrate to the newer
apache2 cookbook which uses proper resources.

Change-Id: I7efddef83333ca0794ee3c298ca1a2488defe941
Signed-off-by: Lance Albertson <lance@osuosl.org>
2019-07-09 12:56:37 -07:00
Samuel Cassiba 681a71fb33 starting rocky development patch
Change-Id: I829e8e793d107b9bf6d35781480cafdb27f7a928
2018-08-03 06:39:18 -07: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
Samuel Cassiba d2ff4496bb Added systemd unit, style and lint fixes for chefdk
- cinder-group-active is still SysV, but can and will start via systemd if
  coaxed to do so.
- Style and lint fixes for newer chefdk
- Removed ancient Gemfile
- Rewrote metadata.rb for readability

Change-Id: I4c26aea78220eb20fc4e5e964af93414855df5f6
2017-08-02 02:15:54 -04:00
Jens Rosenboom a3ba8685a7 Make cinder work for Ocata
- cinder-api now runs under apache2 and no longer as systemd service
- cinder-volume needs explicit backend configuration
- don't install deprecated cinder v1 API endpoints
- clean up some config options

To be added in a follow-up:
- Make backend configuration more flexible
- Replace distro provided wsgi setup with our custom one

Change-Id: I77ac294fd8e1cd4e6bc39667ddfdea21c4daed8a
2017-03-30 14:34:15 +00:00
Samuel Cassiba 13ae9c1784 Deprecated python-cinderclient
- deleted client.rb
- deprecated python-cinderclient references
- incremented apt to 5.0

Implements blueprint newton-xenial
Depends-On: I57c8729e8732161ac34caa85259de8264e99c56d

Change-Id: I1b8c34eea50ed10d6c040caa89802dd64124ec74
2016-12-14 19:15:39 -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
Mark Vanderwiel 0b94103098 Cleanup minor rubocop offenses
Cleaned up all the minor rubocop issues, the ones left relate to
complex logic and what I think is a bug in rubocop for nested
vs compact modules/class definitions.

Change-Id: I5ac6d513c3b1397ba7205dc6f661134a93d17741
2015-05-28 14:43:16 -05: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 33fd5eee2c Remove api-paste.ini as it provided by package
Since we have no attribute overrides for api-paste.ini, no
need to have a template resource for it.  Until we need to
have some attribute, removing this will take away burden of
keeping in sync with base openstack code.

Change-Id: Ic72c638ba61929bc06061b04d13ce986514b0460
Related-Bug: #1433152
2015-03-17 11:13:10 -05:00
Mark Vanderwiel e84947717a Move keystone authtoken keys into cinder.conf
* Remove the keystone keys from api-paste.ini template
* Add the keystone keys to cinder.conf template
* update specs

Change-Id: I5cff962fe200cc1b63352b5e3491f7afed9897f7
Closes-Bug: #1359864
2014-08-25 09:54:35 -05: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
Matt Thompson aa8d617808 Run cinder-manage as correct user/group
We need to explicitly run cinder-manage with cinder user/group.
Running as root may cause files in /var/log/cinder/* to be owned by
root, and this will cause cinder services from being able to start (due
to being unable to write to files in that directory).

This is a non-issue when you install from packages as the package
post-install typically does a cinder-manage with the correct user, and
this ensures logs are created w/ correct ownership.

Change-Id: I50c94646a993ae5eb2e8775d979a4c0a73f2f4f2
2014-05-09 14:59:58 +01:00
Jenkins 85a7d6efd5 Merge "Allow packages to be updatable" 2014-05-06 15:02:23 +00: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
Andy McCrae 97955ecb78 Allow policy.json file to be specified
The policy.json file was removed in e5beee63c1
this will allow you to specify an attribute to point to a location of a
policy.json file to be used.

By default this is nil and the packaged policy.json file will be used,
but if required this can be overridden.

Change-Id: Ic3a1b0c507be627acbee1c74302997fa66a72e4b
Implements: blueprint remote-policy
2014-05-02 15:24:14 +01:00
Jenkins 5f8300c216 Merge "Move all cinder-common tests into cinder-common_spec" 2014-04-28 19:52:49 +00:00
Darren Birkett f95c821406 Move all cinder-common tests into cinder-common_spec
The cinder.conf template resource exists in the cinder-common recipe,
and therefore all tests for that template should sit in the cinder-common_spec

Also, this removes a duplicated test that was in both (syslog config)

Change-Id: I00add345d961eb4502ec9dc9a3b8e7b29096ff7c
2014-04-28 13:41:09 +01:00
Darren Birkett d9eb8eff9f Allow binding locally to different IP than endpoint IP
Sometimes you want the actual endpoint IP to be a load balanced IP, but
the bind IP to be a local IP (different per node).

This change allows that by using attributes from the [block-storage-api-bind] namespace

Implements blueprint increase-ip-binding-flexibility

Change-Id: I79ca114d2d78caaf101357e1400aa046c9943956
2014-04-28 13:09:29 +01:00
Federico Gimenez Nieto 43a4e47717 Added/checked template tests
Added inline stubs for endpoint, db_uri, rabbit_servers and
get_password.
In spec/cinder_common_spec.rb, the most complex template, there is a
context for commonly named attributes, those which name matches a
node attribute with keys ['openstack']['block-storage'][attr_key],
storage_availability_zone for instance. This pattern is used in lots
of configuration spec blocks, for example in
['openstack']['block-storage']['vmware'][attr_key].
I've also found what appear to be some incongruences, like duplicated
conditional checks for volume driver types and repeated storwize
settings at the bottom. Perhaps these should be checked in another
bug.
Custom template banners have been added when needed.

Change-Id: I4e90a602caea044d5415ca9b637d19d82f9ab227
Closes-Bug: #1304412
2014-04-24 14:31:55 +02:00
Mark Vanderwiel e5beee63c1 Remove policy json file
Remove the policy.json template, as they contain no templated variables.
This would allow use of the policy.json files provided via the package,
and decrease the need to sync them with upstream

Change-Id: I4b76b948b6a08502f15c5289f5c0503d24382006
Implements: blueprint remove-policy-templates
2014-04-17 13:18:30 -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
ericzhou d316106989 Use the library method auth_uri_transform.
Use the library method auth_uri_transform to transform the auth uri
by the auth version.

Change-Id: Ifd3a45dbe76f20e5ab142894e4c0267e0cbda936
Implements: blueprint move-keystone-authtoken-move-auth-uri-logic
2014-03-20 14:37:00 +08: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
Jenkins 3cc1b69377 Merge "Fix the RBD driver class reference" 2014-01-31 06:28:41 +00:00
Stephan Renatus 62a6d8ed9a Fix the RBD driver class reference
The reference for the RBD driver class was wrong.  It was fixed in all
places.

blueprint rbd-for-block-storage

Change-Id: Ie91fd2d41b82120673c0b579230228c2f6dc79e3
2014-01-24 14:59:26 +01: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
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
Ionuț Arțăriși d5a321f086 auth_token configuration: always set auth_uri
Change-Id: I9a10bded9699d46e99da6f0ea4e49876a28c536e
Addresses: bug #1207504
2013-11-19 10:31:39 +01:00
Ionuț Arțăriși 8748b09b84 install the common package in the common recipe
This fixes a bug on SUSE where the openstack-cinder (common) package
would not be installed when the template in recipes/cinder-common.rb is
created. That package requires the openstack-cinder user which is
created by the openstack-cinder package.

Change-Id: I745d5d32cc70bd2660a734821a682900f3d1043d
2013-08-15 14:48:32 +02: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
galstrom21 7c2659a8cb Using correct volume driver paths
cinder.volume.X instead of cinder.volume.drivers.X results in a
  deprecation warning in the cinder-volume log.

  https://github.com/openstack/cinder/blob/master/etc/cinder/cinder.conf.sample#L1352-L1353

Change-Id: Ica4ff79b3ccc35a9d3ff64bdc0bb89a94e7ead1f
2013-06-06 13:55:08 -05:00
Jenkins 6359028d4d Merge "Always set the `cache_dir`" 2013-06-06 08:52:05 +00:00
John Dewey 880e2195fb Always set the `cache_dir`
Following the pattern from other cookbooks to always set the
`cache_dir`.

Change-Id: I5e1e08311942c6847361f8e1555bac5615d9dc13
2013-06-05 10:31:28 -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