Commit Graph

37 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
Lance Albertson f2a4e0c7ee Fixes to support fog-openstack-1.x
fog-openstack-1.x already appends "auth/tokens" so we no longer need to
do that.

Depends-On: https://review.opendev.org/666176
Change-Id: Id090b2f70bf2844ce73fc75a1fe4871d3465485d
Signed-off-by: Lance Albertson <lance@osuosl.org>
2019-06-19 11:00:35 -07:00
Manuel Torrinha 9c2757e528 Removes admin endpoint references
Also fixes wrong service type reference in for wsgi banner

Change-Id: I82c60b7c4efaa19459a3a0ab835eb4e48f8ee991
Signed-off-by: Manuel Torrinha <manuel.torrinha@tecnico.ulisboa.pt>
2019-06-05 08:12:06 +00: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
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
Roger Luethi 54f8d6d917 Remove domain role from cinder service user
This patch removes the openstack_user resource with :grant_domain
action. A user is always created within a specific domain; such a
membership cannot be tacked on later. This resource gave the user the
role intended for their project for the domain (i.e., for the Default
domain instead of for the service project).

We add the domain_name attribute that creates the cinder user in the
desired domain. Note that this change needs a sufficiently recent
openstackclient cookbook -- otherwise the domain_name attribute is
ignored (which does not matter as long as the cinder user is to be
created in the Default domain).

Change-Id: I3d3cad8f870f80b577ded04588c401c27c62fbc8
2017-11-13 15:09:07 +00:00
Roger Luethi e5e8bb9326 Remove superfluous role_name arguments
This patch removes the role_name when using openstack_user's :create
action (it gets ignored by the target method).

Note that the spec test would still pass if only the line in
identity_registration.rb (but not the test) were changed, because the
code that actually does grant the role to the resource is executed right
after user creation and before any tests check the resource for the
existence of the role_name attribute. In other words: if the argument
were required in a call but only supplied in another call, the spec
tests would not catch it. Something to watch out for.

Change-Id: I320d0e85287aa5d6368d5be323999f8d9e1c462f
2017-11-10 10:31:06 +01: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
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 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
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
Masaki Matsushita 12d1c1ab83 Make service name and type configurable
Change-Id: I3176bd266a89506db52ed9469c3aa68ce6839da2
Closes-Bug: #1452555
2015-05-08 13:21:49 +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 f7c3a8cc11 Use new "service" role instead of "admin"
Change-Id: Id0f0b1e5b7caba3666715bdae487f4de26ac26a9
Partial-Bug: #1436050
2015-03-25 08:04:35 -05: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
ZHU ZHU 87865791ea Register cinder v2 service and endpoint to support recent nova changes
Recently nova merged commit https://review.openstack.org/#/c/124468/
have switch to use cinder v2. Block-storage cookbook need to be updated
for this change.

Compute cookbook already updated to adopt v2 from commit:
https://review.openstack.org/#/c/133908/

This commit will depends on common cookbook:
https://review.openstack.org/#/c/134275/

Change-Id: I096b4015f637d2df811cf9abb4d7233f706ce8d1
2014-11-13 18:28:42 -06:00
Jun Hong Li 6cbd72035b Change the specs for reverting cinder api to v1
Since there are many problems when applying cinder v2 api, like
cannot attach volumes to VM from nova, and there may be other
problems in glance, the integration of cinder v2 api and
other services is not well tested and the related configurations
are not clear. We'd better revert the cinder api version back to
v1 before all things are clear.

This patch may break cookbook-openstack-block-storage unless the
patch https://review.openstack.org/#/c/132517/ is merged.

Closes-bug: #1388741
Change-Id: I39cd138fe7cb6fe685df12403ff81aad8906d134
2014-11-03 16:51:53 +08:00
Jun Hong Li 801a2735cf Change spec since v2 api is used as default
Since the cinder endpoint API version has been changed to v2 in
https://review.openstack.org/#/c/130738, the spec needs to be
adapted to this change accordingly.

This patch will break unit test unless the patch in
https://review.openstack.org/#/c/130738 is merged, because the API
version is changed in cookbook-openstack-common project.

I've run unit test in my local env successfully with these two
matched patches.

Change-Id: I28d182ff9e26fd31e5cd4f713dbffde3f04807dc
Closes-bug: #1385099
2014-10-28 16:05:56 +08:00
Luis A. Garcia 7aec81a043 Create service tenant if needed
When running the os-block-storage role on its own but no other openstack
services, cinder fails to install because the 'service' tenant is not
created for the 'cinder' user to register under.

This patch creates the service tenant like other projects do.

Change-Id: Ib3929ea363d3f97723152ed4b134be46cf2a6d21
Closes-Bug: #1306782
2014-04-11 14:39:41 -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
Andy McCrae 39c61d04e6 Utilise ['openstack']['region'] from cookbook-openstack-common
- Set ['openstack']['block-storage']['region'] to equal ['openstack']['region']
- Add tests for endpoint creation, to confirm region is set.
- Add test to override the endpoint and confirm it is used.

Change-Id: I2e88e8ff7d5fa8f5d0d611e916eff65ddff8e85e
Addresses: blueprint uniform-region
2014-02-20 16:07:02 +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 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
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 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
John Dewey 2f7915360a Clearer registraton LWRP tests
This is a much clearer way to test LWRPs are executed with
the proper options.  The previous approach was hacky, and
relied upon too much stubbing and ruby magik.  Also, updated
to berkshelf 2.0 where Berksfile.lock is respected.  This
is necessary for berkshelf to lock to the proper cookbook
deps in openstack's CI system.

Change-Id: I21c1c000581f2d3c94ff2f9628f0cea0f6536013
2013-06-12 22:34:32 -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 b1e8d00fec user_enabled should be a Boolean not a string
The provider now requires a Bool.  Updated the impl and tests
to use the new functionality.

Change-Id: I5564041b2fb8fc886c7193ffd28034c7bcd828e3
2013-05-27 22:48:14 -07:00
John Dewey a0c825f96e Correct identity_registration test mock
To keep tests consistent, should follow the same mocking
as the other cookbooks.

Change-Id: I0b096715223e5fdb8e6338cceac848cc2bd58e6f
Fixes: Bug 1183950
2013-05-24 10:51:46 -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