Commit Graph

55 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 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
Jens Harbott f6c6e8b180 Add a nova section to cinder configuration
Cinder needs to send notifications to nova when attached volumes
are being extended. By default, cinder uses the client context
for this, but nova requires admin privileges for this. So we
configure cinder to use the nova service user instead. See
also [0].

[0] https://bugs.launchpad.net/openstack-ansible/+bug/1902914

Change-Id: Ib4c6820dd15ecfa3e3763c188e0a2cc322ecea55
2021-03-04 16:06:01 +01: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 ad8219b6d1 Chef 16 updates
Depends-On: https://review.opendev.org/747557
Change-Id: I0421c776e8de8ebb1ce13fbace97856436ee2489
Signed-off-by: Lance Albertson <lance@osuosl.org>
2020-08-27 17:39:23 -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 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 b27c620954 Use internal identity endpoint for services
Depends-On: Id74966d9f1279f725bc41c08e434230a7845bbc1
Change-Id: I4d2cbcc860060ed6dfdc9f134c43c6c77bf9e9f7
2018-07-16 12:35:38 -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
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
Samuel Cassiba e5c43eb60b Differentiate between Debian and RHEL for Apache
- Apache HTTPD Server is called httpd on RHEL, and apache2 on Debian.
  This adds that distinction for the cinder-api web service.

Change-Id: I457c239f0ff80eb78c49f7a1aae989a8368df80f
2017-04-07 15:10:50 -07: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
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
Christoph Albers 502d7a0824 Use new bind_address method from Common to get address
* fixed my_ip attribute. now using the cinder_api_bind_address

Change-Id: Id85a23ae284157b6277a43b3ee3b10bc0e43655c
2016-02-18 14:18:25 +01:00
Christoph Albers 0d6cffad4e invert the order of endpoint and bind_service attributes
* endpoint type (admin, internal, public) and service (identitiy, network etc.)
  was switched during refactoring, this patch reverts this unintended switching
* edited bind_service service type from public,internal,admin to 'all'
  for default binding to just one service

Change-Id: I4d28b1b2489419c1f033dfcda0effa5a53c537c3
Depends-On: Iec485deaf415e4187a323435cce2b6bbadfc5d42
Depends-On: Ia5bddfc5e2fd77cd6e9e855c680b079f78fc1c3f
Depends-On: I4f97b659361dabd7fac216305d2aad2f1bb98f51
2016-02-15 19:05:20 +01: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
Min Min Ren 528cb177f6 Add database slave connection configure
- According to the bool attribute
      node['openstack']['endpoints']['db']['enabled_slave'], enable/disable
      nova database slave_connection
    - Add the slave_connection generated from db_uri function

Implements: blueprint sql-slave-connection-support

Change-Id: I9520441952993e8c6b4205e6886778815b5a2e4b
2015-08-28 13:36:33 +08: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 6f44d71631 Fix lock_path to be based upon state path
On some recent platforms, systemd based, the /var/lock/ path gets
cleaned up at reboot and causes issues for projects like cinder.
Nova and neutron changed long ago to base the lock path off the
state path, this change does the same thing now for cinder.

Change-Id: Ibe693c21cfc63dd5b6e1753c85081a952005b293
Closes-Bug: #1449711
2015-04-28 14:18:52 -05:00
Mark Vanderwiel ab8aa01421 Use identity_uri_transform
Remove deprecated keys and use identity_uri via the new transform
helper method.

Also, cleanup specs for endpoint testing to make sure Common is
fully tested.

Change-Id: I5a26d8cb83193e4bf66bb952f7973838d6acba40
Implements: blueprint identity-uri
2015-04-07 06:14:57 +00: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
Ken Thomas b25e15d32d Use new common specific_endpoint routines
Now that admin_endpoint, public_endpoint, and internal_endpoint
in the common library are working, these are the changes to use
them in the openstack-block-storge recipes.

Change-Id: Ief4b9d011f55236270a4dc18f2b1f3f769d0a493
Partial-Bug: 1412919
2015-02-06 14:37:15 +00:00
Mark Vanderwiel e6d89d0689 Allow storwize private key without san_login and san_password
Using The san_private_key by itself is a common use case. The
current code requires the san_login and password to be set.
This patch allows the key to be used without the login and password.
Also removed some clutter comments from the conf template.

Change-Id: Iea84c8310eec39481c115587219cdac35c9b3589
Closes-Bug: #1398469
2014-12-02 12:55:30 -06: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
chenxiao 5ebe4b2756 Configure glance_api_insecure and glance_api_servers
This change adds some attributes into the cookbook so
that they are configurable. They are mainly to configure
for glance_api_insecure and make glance_api_servers to be
prefixed with scheme(http or https).

Change-Id: I79e04b47918fe1ec0b45472bd2cec9afa73d5897
Closes-Bug: #1383619
2014-10-22 15:55:21 +08: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 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
Jan Klare f890e9eceb added rootwrap.conf template like in cookbook-openstack-compute
Change-Id: I86b9ddab78edf0eb31f2cd82d77d49aa930d7163
2014-07-10 08:51:14 +02:00
Yi Ming Yin a7bd7eb0ed Add multiple backends support for cinder conf
This implementation allows users to configure multiple backends for
cinder volume. By providing a hash map for different volume driver
sections, cinder.conf can be configured to support multiple backends.

Change-Id: Idec6691168c6a67f1a11f7174a8a97ffb950d7b8
Implements: blueprint cinder-multi-backend-conf
2014-06-12 13:56:18 +08:00
Stephan Renatus cef7dbd6c2 Make retrieval of vmware_host_pass optional
Before this change, a non-vmware user would (without developer mode)
have to create a data bag item for this pass even when not using it,
because otherwise the get_secret's call would fail.

Plus, it's more in line with the other drivers.

Implements: blueprint vmware-password-databag
Change-Id: I48a6e23d6aa9abd106e65e70b40662c8d4cca5fc
2014-05-26 10:55:35 +02: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
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
Jenkins 0a2d3e6174 Merge "allow specifying bind port" 2014-04-16 18:17:42 +00:00
Darren Birkett 1fdbba053a allow specifying bind port
Much like a previous commit to allow specifying a bind IP for the API
service (3a576ac), this commit adds a similar ability to specify a bind port.

Change-Id: I62caf397995fbcf3a202992b353c05cc027d07b6
2014-04-16 15:29:44 +01: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
Xiao Chen 3a576acbc4 Let "osapi_volume_listen" can be configurable
When setup cinder in multiple nodes, cinder-api and cinder-volume
will not exist in same node, so we should avoid value of
"osapi_volume_listen" to be "0.0.0.0" and should set it as
the ip of volume api host.

Change-Id: I6daa46d497297e8e4ab9faa2caa953d242cc424e
Closes-bug: #1305157
2014-04-10 11:09:28 +08: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 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
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
Luis A. Garcia 53efbf5225 Create lock directory for cinder
This patch creates the /var/lock/cinder directory (or other location
specified in the corresponding attribute) to use for lock files.

Change-Id: I23d2d8a201f892cc1bf56f8db825f70fc1fdf5d6
2013-12-16 19:02:20 +00:00
salmanbaset b203b42812 Adding qpid support to cinder
Moving all qpid parameters under default["openstack"]["block-storage"]
["mq"]["qpid"] so that other qpid options can be added under it. Rabbit
parameters will be brought under "mq" eventually. MQ is selected
through default["openstack"]["block-storage"]["mq"]["service_type"].
Default is "rabbitmq".

Implements: blueprint qpid-activemq-support
Change-Id: I4c45a1aa8f6a6a505c8a1494d02f8bf5bc19dbfe
2013-11-30 00:31:01 +08:00