Commit Graph

71 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 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
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 681a71fb33 starting rocky development patch
Change-Id: I829e8e793d107b9bf6d35781480cafdb27f7a928
2018-08-03 06:39:18 -07:00
Samuel Cassiba 93882de603 Simplify identity endpoint
Per the Keystone Install Guide[1] the admin endpoint is superseded in
favor of a single public endpoint. As a result, the admin endpoint is no
longer deployed by default.

[1] https://docs.openstack.org/keystone/queens/install/keystone-install-ubuntu.html#install-and-configure-components

Change-Id: I188edfcfbd6f8261a648c03b6e46532b960d3ac6
Implements: blueprint simplify-identity-endpoint
2018-06-14 21:28:42 -07:00
Jan Klare 607fd77784
remove all ceph related attributes and specs
Change-Id: I24b1a8f8e735e50de535e191cb6cfca489923c25
2018-04-05 16:30:31 +02: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 60a38b538d Initial block-storage Pike updates
- Changed the default linter to cookstyle
- cinder-group-active was missing a Provides header for the SysV init script
- Switched the qemu package to SCL for CentOS to get a newer release
- Normalized template banner comment

Change-Id: Iec59e0c8e3cb0b83db92a0a9f8db34a40953351f
2017-08-25 09:15:49 -04: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 68da464eae RPC_backend / transport_url workover
- removed deprecated rabbitmq attributes
- added rabbit_transport_url

Change-Id: I19ff8e4df8f559bf03ff746fcc49be9425edd84e
Depends-On: I0a6da37e3f2b839590b6349fd906d47c5206fbb3
2016-12-20 11:45:14 +00:00
Christoph Albers 49d23da167 use_cookbook-openstackclient/identity_v3
- 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
- added needed keystone_authtoken attributes
- updated README

Change-Id: I2f339055883354c6a8a77daa7967ff279c4d18d9
Depends-On: I0f8955f05de9b33711c54b9a198f45018cceb8e1
Depends-On: If7b4d6e563081a0be9957353d73ef61a9688df56
2016-09-30 10:58:23 +02:00
Samuel Cassiba ddad81bf9b Increment apt cookbook to 4.0
As a requirement for Ubuntu 16.04, the apt cookbook needs to be at least 4.0

Change-Id: I47416ef32af0e00acbcc366c9acdae306862a56a
Depends-On: I07ad79a93642d0f0c934a864fcb9bcd7b764e35f
Implements: blueprint newton-xenial
2016-08-03 16:35:02 -07:00
Samuel Cassiba 67149f00ff Style and lint fixes to support newer ChefDK
Change-Id: I39f35c718e706b8f29c2b4d6d6cbd270b510183e
Depends-On: I6ce4587caa3ae68ddbd3ef1a521aaf46f4840b2c
Depends-On: I0a3872cd3a21c31b5e3a7b6190f911280e9ed909
Depends-On: I34e4c7b29ff7c36c91245d90fb0b6897847cd22f
2016-07-06 09:20:23 -07: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 7386afb7c0 Replace deprecated get_secret
Use get_password 'token' instead.

Change-Id: If7b01ecaed9b51798acc53c9ea4833cb74250f62
Partial-Bug: #1467662
2015-06-22 15:50:38 -05: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
Mark Vanderwiel ad3fb248f8 Move to rhel 7.1
rhel 7.0 is not EUS/LTS, need to switch to 7.1.

Change-Id: I0cf7ab23cbe11e22aba63f920d58f557cca03f8e
Related-Bug: #1438878
2015-03-31 15:21:31 -05:00
Jin Hui 996254f21c Configure iscsi target service for RHEL7
In RHEL7, tgtd is replaced by LIO, and target deamon service and
targetcli package is used to manage iscsi target.

This fix also set iscsi_helper to lioadm for RHEL7

Change-Id: I5a5b1faec6a6aed9b9f3d5632e704a59e2d5c7b7
closes-bug: #1409619
2015-02-11 10:32:33 +08:00
Mark Vanderwiel 04da5567cf Trusty juno updates
* update spec platform versions

Change-Id: If91104494bc5ca0269c012a528f91445ec025fbb
Implements: blueprint trusty-juno
2015-02-05 16:29:38 +00:00
Yi Ming Yin dad180e458 Disable configuration of tgtd on RHEL 7
- This is a stage I fix for bug #1400958. First disable the related
resources for tgtd.
- Bump version to 10.1.0 to indicate this is a start point of new
platform support

Change-Id: Id3757f7847ba0620d4bf4492160921389e3ef475
Partial-bug: #1400958
2015-01-13 09:17:33 +08:00
Mark Vanderwiel 6d909ff139 Allow san_password attribute for svc driver
* add san_password= for storwize
* remove unused san_password attributes, get_password method is used
* add tests for password both storewize and solidfire

Change-Id: I4afde431332ca914d078bc3e30362ef22961016f
Closes-Bug: #1384085
2014-11-14 09:06:16 -06:00
leileiz 3b3c18ff81 Update cinder.conf permission
cinder.conf contains some secret information such as qpid password.
To prevent unauthorized users to access it, this file should be set
as 640 mode.

Fix bug 1369467
Change-Id: I12a0e6e3e492397f1282366ab38ed1e1f46997f7
2014-09-17 06:49:38 -04: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
Mark Vanderwiel a4e0000fab Fix fauxhai platform versions for suse and redhat
Change-Id: If4c74214bc64c6fc60e13dc7036efb6408974c87
Partial-Bug: #1344199
2014-07-18 12:38:10 -05:00
gengjh 409d883b0f Get the vCenter password from databag for cinder
1. Add new attribute openstack_vmware_secret_name to indicate the
databag secret key
2. Get the password from databag if dev mode is false
3. Update the test cases

Implements: blueprint vmware-password-databag

Change-Id: Id6872d38c255067a4991aceaa0bf6fb400cce1c8
2014-05-09 22:19:09 +08: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
Sasikanth Eda 5103ccd784 Add IBMNAS driver configuration flags
- Add support for IBMNAS volume driver configuration flags.
(nfs_shares_config, nfs_sparsed_volumes, nfs_mount_point_base
nas_ip, nas_login, nas_password)
- Add initialization of nfs_mount_point_base directory,
nfs_shares_config with proper owner and permission settings.
- Updated README.md with ibmnas attributes

Change-Id: I88607740963916ccc26daee5873cca532b00a434
Implements: blueprint ibmnas-chef-support
2014-04-14 10:26:41 +05:30
Luis A. Garcia f177e019dc Use get_secret instead of secret
The new get_secret method allows the 'secrets' databag to be renamed,
just like all other databags.

Change-Id: Ic8be5d19a112d78e22716c0cd571efc7186ac9ce
Related-Bug: #1288784
2014-04-02 08:14:26 -07:00
Stephan Renatus 29aafd424f Update ChefSpec to 3.4.0
This change gives us new capabilities, such as matching notifies and
subscribes of resources.

Implements: blueprint chefspec-3-4
Change-Id: If9c4e70f4b3e99cf75bb595ca577be01a072eced
2014-03-28 17:21:14 +01: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
Matt Thompson 12d2154a01 Use get_password method to obtain qpid password
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: If95c39af79d49894503631fb8acadb4bf8cd0d45
Implements: blueprint use-data-bag-for-qpid-password
2014-03-05 15:43:16 +00:00
Andy McCrae e7bcd475a9 Add EMC VMAX/VNX support as a provider for cinder
- Add EMC attributes
- Create cinder_emc_config.xml when EMC driver is used.
- Installs appropriate packages when EMC driver is used.
- Add tests for new cinder_emc_config.xml
- Add tests for changed attributes in existing cinder.conf
- Add tests for package installs

Change-Id: I5a44e3626784814f57e15a43ce459a4d36d31c6b
Implements: blueprint emc-cinder-provider
2014-02-24 21:59:42 +00:00
Jenkins 2c1e480a81 Merge "Ceph RBD integration for openstack-block-storage" 2014-02-24 21:31:47 +00:00
Jenkins 2c256456e6 Merge "Add SolidFire support as a provider for cinder" 2014-02-24 21:23:34 +00:00
Stephan Renatus c859d9fdcc Ceph RBD integration for openstack-block-storage
This allows using a Ceph cluster as cinder backend.  The necessary
dependencies are defined in platform_options['cinder_ceph_packages'] and
can be overridden.

Overall documentation on Ceph integration has to be added, I'd be glad
to help with that.

This changes the way secrets are handled:

openstack[block-storage][rbd_secret_name]  will fetch the secret uuid
shared between cinder and nova from the databag with that name and set the
openstack[block-storage][rbd_secret_uuid] attribute.

Besides that, the user is expected to provide the password for the cephx
user, `rbd_user`, used with the pool `rbd_pool`, in the data bag item
`rbd_key_name` in the service password data bag.

Implements: blueprint rbd-for-block-storage

Change-Id: Iafe2bdea0d6120bb08c027482c94d819a67aee4a
2014-02-21 10:02:40 +01:00
galstrom21 e7eb1b41f7 Adding ChefSpec::Converge to spec_helper.rb
Change-Id: I1e6cc97c4ebdf35e3f023d4c6d9c5be4033aab3d
Addresses: blueprint lint-and-unit-testing-for-havana
2014-02-18 14:29:09 +00:00
Andy McCrae 7dce1f09bc Add SolidFire support as a provider for cinder
- Add SolidFire attributes
- Re-organise SAN attributes, to be generic and import from
  SolidFire/storwize
- Add tests for SolidFire attributes/settings

Implements: blueprint solidfire-cinder-provider
Change-Id: Ic91be41ca04426e829a68a66317d34db08e60b6f
2014-02-13 11:24:15 +00:00
Ionuț Arțăriși 2cb0c061d6 change tests to use SLES platform instead of openSUSE
Change-Id: I0631e9c26f02164fa15cf52198055643eb540132
2014-02-07 10:53:35 +01:00
Andy McCrae 6c480393fe Remove ambiguity in stubbed methods in spec_helper
- Adjust the stubs in spec/spec_helper.rb to specify the appropriate
  number of expected variables
- Add parenthensis around return values

Change-Id: Id92fbfad0433fcdcbe0ab6909a0b717d614ac62c
Partial-Bug: #1271535
2014-01-22 16:40:25 +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
Jenkins aa9f7a0bf0 Merge "Initial rubocop support for ChefSpec tests." 2014-01-13 10:35:50 +00: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