Commit Graph

63 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 427adf523c Chef 17 support
- Remove bind from Berksfile
- Update copyright years
- Require Chef >= 16.0

Depends-On: https://review.opendev.org/c/openstack/cookbook-openstack-image/+/814052
Change-Id: I3712128980179e316a88a50d1c103dd8a92bd837
Signed-off-by: Lance Albertson <lance@osuosl.org>
2021-10-14 12:31:32 -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 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
Zuul 11ee82bb4d Merge "Properly notify apache restarts on cinder configuration updates" 2019-08-20 13:27:30 +00:00
Roger Luethi 8c0d728d13 api: prevent installation of invalid apache2 conf file
If apache is (re)starting while the chef-client installs the cinder-api
package, it may pick up the package-supplied cinder-wsgi apache2 conf
file before chef-client gets around to disabling it which may result in
apache2 failing due to a non-working configuration.

This changeset eliminates the race by creating an empty configuration
file before installing the software. The solution is based on the
assumption that no reasonably configured package manager will overwrite
an existing, user-created configuration file. The empty configuration
file is left in place to avoid its creation and removal during every
recipe run.

backport: queens

Change-Id: I225a30379820e6e033bcea987fbf1a4db33dbd3a
2019-08-06 13:14:21 +02: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 fd7ca4eddf Convert hyphens to underscores for service names
The Chef Style Guide[1] does not recommend using hyphens for
cookbook or resource names. To maintain consistency, we should follow
best practices.

[1]: https://docs.chef.io/ruby.html#use-of-hyphens

Depends-On: Ic2b6d8f1cdf719791faaebdbd7e29e789eb3f31c
Change-Id: Ib8c788f69e9545b2d7121199590e3795f2212c7f
2018-12-14 23:55:16 -08: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
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 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
Ionuț Arțăriși 8fde9630ae use new python_packages attributes from -common
*_python_packages attributes are being moved to -common in order to
remove the duplication from all the cookbooks which are using them

Change-Id: I60798fb39f6167eafd0cc483dca9bb930a236946
Implements: blueprint move-python-db-client-attrs-to-common
2014-07-02 14:32:41 +02: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
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
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
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
Christopher H. Laco ef8c535cc8 Upgrade/Update rubocop
Now that almost all of the rubocop blueprints have been completed, make
one final pass through all of the cookbooks ensuring they're all in
sync with each other.

- Upgrade rubocop to 0.18.1
- Fix violations caused by 0.18.1 upgrade
- Add Includes for non-existent folders to Includes so they
  automatically cover future additions

Change-Id: I9224b785f50103d348e3b16ea24e5dc8cab84c62
Implements: blueprint lint-and-unit-testing-for-havana
2014-02-04 15:27:56 -05: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
Andy McCrae 3fd80c0a3f Move to use "get_password" instead of "{user,service,db}_password"
The user_password, service_password and db_password functions are redundant
since they simply call "secret". Creates a get_password function that will
accept a "type" of db, service or user.

All instances of these calls have been changed to call get_password

Change-Id: Ifdb5c7b3f590431aaa7ffc021cdee34899ac8c15
Partial-Bug: #1195915
2014-01-15 17:53:47 +00:00
Matt Ray 018d125a51 Initial rubocop support for recipes.
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

Change-Id: I590ac5ec03ce6a00dd73027d6798e36105a32af1
2014-01-09 12:38:07 -06: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 4949b57572 add PostgreSQL support
Change-Id: Ifcec59a28a4531f8e708c3d053c3cf6c8e99b710
2013-07-17 17:54:23 +02: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 c1e16f840f Removed `glance_api_chef_role`
This is dead code and should be removed.  Also,
needed to update tests, so that they passed.

Change-Id: Ib7df8f6036ccc1ace58854c713f6ce646e09820f
2013-06-04 10:39:56 -07:00
alop ce19634ee3 Initial commit of cinder-common
Noticed that every recipe in the cookbook had a declaration for the
cinder.conf template, with a notify to the service defined in that recipie.

I moved the template, and the variables that it needs to populate,
to cinder-common.rb, included that in all the other recipes,
and changed the notify in the template to subscribes in each service
Also, added a spec for this.

All tests pass

Change-Id: Ibcab9566a907e1ea9febbd61e37b9587625a15e6
2013-06-02 23:19:17 -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
alop 92f922a275 adds policy.json as a template 2013-05-13 12:15:25 -07:00
John Dewey 170ef0404d AT&T cleanup 2013-05-05 19:48:42 -07:00
jaypipes 30f095ffda Merge pull request #45 from jhtran/add_syslog
add syslog
2013-03-20 12:15:32 -07:00
Jay Pipes b807516f83 Separate out Keystone endpoint registration into separate recipe 2013-03-19 18:24:18 -04:00
Jay Pipes 19f7225768 Update to use newer keystone register providers 2013-03-19 14:14:31 -04:00
John Tran 26a2105e46 add syslog 2013-03-13 03:14:55 +00:00
Yun Mao bca823e122 Sync db after the config file is generated
cinder-api seems to be able to start without a proper db schema
so we still don't need to use event to notify db sync.
2013-02-06 15:08:06 -05:00
Jay Pipes ec61d22251 Corrects rabbit variables on api and scheduler 2013-01-13 14:42:20 -05:00
John Dewey bfd60affa2 cinder-manage db sync was never running
Set to always execute since idempotent
2013-01-12 10:09:29 -08:00
John Dewey 1f9b7ad174 Removed unnecessary default action 2013-01-11 21:33:05 -08:00
John Dewey 2b16b12cca Simply creating the basedir of `cache_dir`. 2013-01-11 21:32:35 -08:00
Jay Pipes 0d51d9d0a7 Final changes related to PKI 2013-01-11 10:53:59 -05:00
Jay Pipes a768b4fe5e Service password error 2013-01-09 00:55:21 -05:00
John Dewey 613af33057 Re-"Revert "Foodcritic cleanups""
This reverts commit 519f1996ef.

Corrected the notification syntax.
2013-01-07 17:17:45 -08:00
John Dewey d6b13a9a06 Cleaned up per jay's suggestions 2013-01-07 14:19:16 -08:00
John Dewey 7dd2b286ab Added auth_host, auth_port, auth_scheme
This is required for middleware to work properly
2013-01-07 14:07:00 -08:00
Jay Pipes 519f1996ef Revert "Foodcritic cleanups"
This reverts commit 75659d82d5.

Conflicts:

	attributes/default.rb
2013-01-07 11:22:27 -05:00