Commit Graph

67 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
Christoph Albers 8efd295421 remove targets.conf
- since the target package ships the default conf we won't need this
  anymore
- the cinder target.conf is shipped by the cinder package to the right
  directory
- removed targets.conf.erb since this isn't used anymore
- removed obsolete specs

Change-Id: I9485cc65231b1da8b24efdb7e25551e4d4688d6a
2019-03-27 14:31:58 +00:00
Christoph Albers 42168ec938 use targetcli-fb package for debian platform_family
- openstack rocky uses bionic as ubuntu platform
  the package name changed since ubuntu xenial.
  fixed it

Change-Id: I3607d10577ee3391c39027676151bd5ef03259b5
2019-03-22 16:13:43 +01:00
Samuel Cassiba 681a71fb33 starting rocky development patch
Change-Id: I829e8e793d107b9bf6d35781480cafdb27f7a928
2018-08-03 06:39:18 -07:00
Samuel Cassiba 2e17c9a922 Use updated volume packages for Cinder
- scsi-target-utils comes from EPEL. Now that EPEL is disabled, this is removed
  in favor of targetcli from the base repo. This is also available for Ubuntu to
  provide a consistent outcome.

Change-Id: Ibc146350ef2ddd1d19e35402cbf69e036a759f1d
Implements: blueprint modern-chef
2018-02-08 22:14:55 -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
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 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
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
Mark Vanderwiel 98688befe1 Make sure lvm2 package is installed
lvm volume recipe makes use of lvm commands like vgcreate. These
commands are part of the lvm2 package which may not be a
dependency for the base openstack cinder packages anymore. So,
make sure this get installed before using those commands.

Change-Id: I75f47260677b409ff32c4b2c6fc5598a31214ecf
Closes-Bug: #1435968
2015-04-09 15:00:27 +00:00
lqslan 1a7152c2d9 Raise an error when san private key is missing
Currently, if san private key is missing, cookbook will create an
empty one which cause cinder can't work properly.

This patch will check whether san private key is exist or not, if
not, raise an error to remind user to provide one.

Change-Id: Ia1e0a60dec9ef463a908756fffa5f5274ebc0fb7
2015-03-30 15:43:19 +08:00
Edwin Wang ab7c43d8ef Add config for IBM FlashSystem
Modify config in attributes/default.rb, recipes/cinder-common.rb,
spec/volume_spec.rb, spec/cinder_common_spec.rb and
templates/default/cinder.conf.erb with SAN login and password.
It has been merged in Kilo. iSCSI code is on the way.

Change-Id: I784f69424a5f1b20f99ba5faccc85b3066e23de3
2014-12-31 13:47:13 +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
Elliott Davis f75d819c2f Add dependency on upstream ceph cookbook for better key management
The upstream ceph cookbook already hooks into chef for environment information.
This patch utilizes the client LWRP to create or add ceph keys for RBD support.
This patch also changes some default attribute names for more sane organization

Partial-Bug: #1409943

Change-Id: Ibba6c568d4e4d00153061458b71593cd28714e60
2015-02-05 09:11:12 -06:00
xijiax d4678e8a47 Add package sysfsutils for cinder SVC driver.
Change-Id: I4e2c997dc29e4c23b3d5cd006d81504cde840e09
Closes-Bug: #1386062
2014-10-28 14:17:21 +00: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
Jenkins 45039e284c Merge "Allow create volume group with block devices for lvm" 2014-07-21 10:32:12 +00: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 84e52038f8 Allow create volume group with block devices for lvm
Add new attribute, create_colume_group_type to allow
either create simple test volume based upon a file
(as existing support does),
or create volume group based upon block devices.

Change-Id: Ia81354f9fab9310c1b5e633d4ca05e434f9c2da6
Closes-Bug: #1321336
2014-07-11 15:33:45 -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
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
Luis A. Garcia 58e68ad565 Update Storewize/SVC driver name
The Storewize/SVC driver name changed as a result of change
I1696a97279efe834a96b3f3843bc65f0ea6da9cc. This patch simply updates the
name.

Change-Id: I4d2aa3d828b9f61f237dbf12c2e199e57f3f06f7
Closes-Bug: #1311200
2014-04-22 09:19:22 -07: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
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
Stephan Renatus 77a62d51ef Add ceph-common to cinder_ceph_packages
The ceph-common packages provides the `ceph` command line client that is
needed by cinder for getting the list of currently active MON hosts:

https://github.com/openstack/cinder/blob/stable/havana/cinder/volume/drivers/rbd.py#L310

Implements: blueprint rbd-for-block-storage
Change-Id: I00c08c26109763923c284e1759527dae911482df
2014-03-21 12:14:27 +01:00
Stephan Renatus 4c2807dc8e Update specs since openstack-common::ceph_client was merged
This change reworked the ceph-related specs, now that ceph_client is
available in openstack-common.

Change-Id: Ib3a77b17bd3f5b899b1fb704ce7084982aa45b54
2014-03-11 17:37:24 +01: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
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
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
Jenkins 228958c15c Merge "Move to use "get_password" instead of "{user,service,db}_password"" 2014-01-16 20:32:28 +00:00
gengjh 9b810c36ba Need create init.d script file before enable the service
Closes-bug: #1267095

Change-Id: I7897c6cb03ae3040a819dc86f45fc6c7dea9a3e5
2014-01-16 10:13:42 +08:00
Jenkins b8237582af Merge "Add Storwize/SVC configuration attributes" 2014-01-15 19:28:46 +00: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
Luis A. Garcia d2363a7a9c Add Storwize/SVC configuration attributes
Change-Id: Ica5513abdc8bed298edb475f0c44e2eabf50b93b
2014-01-14 17:00:58 +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
gengjh a1be978fe1 Create volume group when use the LVMISCSIDriver
Create volume group when set volume_driver to
cinder.volume.drivers.lvm.LVMISCSIDriver otherwise we can not create
volume with cinder.

Change-Id: I9d27a19254aa62130c13171d68c0c67e4e3686ce
2013-12-20 15:30:59 +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