Commit Graph

46 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 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
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
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 b2b093cc3b Initial Liberty Changes
Metadata changes
- Updated maintainer email
- Updated the version

rubocop updates
remove db2 refs

Change-Id: I4be2304091443ee173ebb4605e24b54c699b929a
2015-08-31 12:05:03 -05:00
Lan Qi song 7f980745eb Create mount point directory when use multi backend configuration
Currently, when we use GPFSDriver as multi backend volume driver,
cookbook won't create gpfs mount point base directory automatically.

This patch fix this problem.

Closes-Bug: #1476960

Change-Id: I1faf33470747fac6df66854470cf45d35a38f3c1
2015-07-25 09:19:44 +08: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
Masaki Matsushita 0fd962dae2 use LVMVolumeDriver as default.
LVMISCSIDriver is deprecated.
See also: cinder/volume/drivers/lvm.py

Change-Id: I08b157ee7fbb0d61c8c9ec406edf2240a9a40c1d
Closes-Bug: #1451363
2015-05-06 19:39:53 +09: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
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
lqslan 6ef4275296 Install qemu-img package for cinder-volume node
Currently the qemu-img package is not installed by default
for a cinder-volume node. This causes cinder to fail when
trying to create images using the qemu-img command.

This patch will change the 'cinder_volume_packages' attribute
to also install the qemu-img package for cinder-volume nodes.

Change-Id: Idb923f3edfa39720178e498433d94e4e37a76f7d
Closes-bug: #1413088
2015-02-09 09:53:02 +08: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
Sasikanth cf9ec63b94 Update gpfs volume driver path
* Change of driver path from "drivers.gpfs.GPFSDriver" to
  "drivers.ibm.gpfs.GPFSDriver"
* Fix issue of assigning "gpfs_images_share_mode=copy_on_write"
  even if the parent attribute "gpfs_images_dir" is not defined

Change-Id: Ica00f00901502857d5d21ef7ce7ae3b68e4ca9b7
Closes-Bug: #1389955
2014-11-07 15:04:50 +05:30
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
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
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
Jenkins c546ad44a7 Merge "Add gpfs volume driver configuration flags" 2014-03-26 15:11:05 +00:00
Bill Owen c25f1a9024 Add gpfs volume driver configuration flags
Add support for gpfs volume driver configuration flags.  Add
initialization of gpfs_mount_point_base directory with proper
owner and permission settings.

Use Havana location of gpfs driver.  In Icehouse, this will
be updated to reflect change in driver path under "ibm" subdirectory.

Partially implements: blueprint gpfs-storage-support
Change-Id: I002fc73c1d1fa89d8cb56d8da048426701251a46
2014-03-24 16:46:30 -07: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 5a66435826 Fix DB2 ODBC driver installation issue
There is an LWRP in db2 cookbook to install ODBC driver,
so need to move this driver installation to db2 cookbook.

Change-Id: I8916c11db99e0e57d36a44d48d9d0c39fd5e44a2
Closes-bug: 1294376
2014-03-20 23:24:46 -04: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
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
Jenkins 52dd20137d Merge "Add DB2 support to cinder on redhat platform" 2014-01-13 22:00:02 +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
Chen Zhiwei 4fe53e18ca Add DB2 support to cinder on redhat platform
Add a new attribute
default["openstack"]["block-storage"]["platform"]["db2_python_packages"]

Change-Id: Ibfaef276788322867a9461235eeac8d5c706c3f5
Implements: blueprint db2-support
2014-01-08 21:12:46 -05: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 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
Jenkins 8034ca4b94 Merge "add PostgreSQL support" 2013-07-20 17:17:18 +00:00
Ionuț Arțăriși 4949b57572 add PostgreSQL support
Change-Id: Ifcec59a28a4531f8e708c3d053c3cf6c8e99b710
2013-07-17 17:54:23 +02:00
Ionuț Arțăriși 913145991a remove duplicate test case
Change-Id: I4cb75bfbc224564897ca39a4f54258e6acff1f7e
2013-07-17 17:48:14 +02:00
alop a05a53dfeb Adding support for netapp NFS direct driver
This commit adds support for the 7mode NFS direct driver.
Changed the 'if driver' to a case, somewhat based off the
rcbops cinder-volume recipe. if the NFS driver is chosen, the
volume recipe will install the nfs client package, setup a mountpoint
a shares config file, and setups cinder.conf accordingly

Change-Id: Ia8d4c31235426614a317729494569062a23a05bf
2013-07-11 11:32:41 -07: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
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 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
alop b2a91e4335 added template content tests
Added content tests for all other templates, Added some negation tests, and where applicable, platform tests for RHEL vs Ubuntu
2013-05-09 14:22:07 -07: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