Commit Graph

90 Commits

Author SHA1 Message Date
Ghanshyam Mann 7372103182 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: I4561c6eefef05c672a4f6cb9d15b1a5a29e81110
2024-02-18 05:01:47 +00:00
Lance Albertson dd5a46c6dd CentOS 8 support
- Update package names
- Migrate to using apache2_mod_wsgi resource and require apache2 ~> 8.6
- Don't add --listen to libvirtd on EL8
- Update ChefSpec

Depends-On: https://review.opendev.org/c/openstack/cookbook-openstack-image/+/815148
Depends-On: https://review.opendev.org/c/openstack/cookbook-openstack-network/+/815172
Change-Id: I2e66b923b91d763ea7f484421dbdad883d9117a3
Signed-off-by: Lance Albertson <lance@osuosl.org>
2021-10-22 16:34:14 -07:00
Lance Albertson 3e101784a9 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
Depends-On: https://review.opendev.org/c/openstack/cookbook-openstack-network/+/814057
Change-Id: I84867a131b54d63f3d057c40a1e8ac4b4697c368
Signed-off-by: Lance Albertson <lance@osuosl.org>
2021-10-14 12:45:38 -07:00
Lance Albertson af47ea6ef5 Cookstyle 6.19.5 fixes
Update ChefSpec due to changes made in apache2 cookbook.

Depends-On: https://review.opendev.org/756168
Change-Id: I3ec792c519650b2d95a976ad50419a9b417a3514
Signed-off-by: Lance Albertson <lance@osuosl.org>
2020-10-05 17:26:51 -07:00
Roger Luethi 5747451dcb Restart apache only where appropriate
The current code tries to restart apache for every change to
/etc/nova/nova.conf even on compute nodes that do not have apache
installed. This changeset splits out the apache service resource into a
separate recipe that (unlike nova-common) is not included by the compute
recipe.

backport: stein

Change-Id: I87dda61dfabec460fe042b4cee21277382dd9487
2020-08-04 11:18:13 +00:00
Lance Albertson 50be0465fe Set threads=1 for api wsgi
This adds some attributes for adjusting the thread counts for each wsgi
application. By default we use 10 threads, however for the api service, it needs
to be set to 1 due to this upstream issue [1]. In addition, increase the
processes for the api service to 6 to account for the reduction in threads.

[1] https://docs.openstack.org/releasenotes/nova/stein.html#known-issues

Change-Id: Iebf78d24c57a069eabced1bf35051cbae5014902
2020-04-09 12:23:41 -07:00
Lance Albertson 2961ebabee Stein fixes
- Cookstyle fixes
- Refactor Berksfile to use groups so we can exclude integration testing
  cookbooks
- Update documentation
- Cleanup line wraps
- Enable sensitive resources for the template[/etc/nova/nova.conf] 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.
- Cleanup array syntax using %w() instead of []
- Add metadata to enabled_apis as that is the default upstream
- Switch to user resource for managing shell for nova user
- Switch to libvirtd instead of libvirt-bin for Ubuntu service name

Depends-On: https://review.opendev.org/701027
Depends-On: https://review.opendev.org/706151
Depends-On: https://review.opendev.org/708059
Depends-On: https://review.opendev.org/706157
Change-Id: I7e03fb9dace6e288a3b21f33106245b30b52ce9d
2020-03-19 12:36:40 -07:00
Lance Albertson 868900d090 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.

Additional fixes:
- Install mod_wsgi as a package on RHEL since there is no built-in
  resource for it.
- Don't set SELinux to permissive on RHEL (I tested this works properly
  with it set to enforcing).
- Remove hack for restarting apache.
- Convert web_app to template and subscribe to restarting apache.
- Remove resources to restore SELinux contexts since this taken care of
  by Chef now automatically.
- Fix resource ordering in placement_api
- Improve ChefSpec tests
- Add missing placement_api RHEL tests
- Fix issues with chain file and cipher suite in in 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: Ib404ab6bfcae3340fd7f0f924539ca6c445b55cf
2020-01-30 11:22:19 -08:00
Lance Albertson 82c5b9a243 Properly notify apache restarts on configuration updates
This uses edit_resource to add a notification in the nova-api,
nova-api-metadata and nova-placement-api apache configurations when one
of them 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 is intended to ensure we only restart apache when the configuration
is updated. Otherwise, the old behaviour was to restart apache on every
run which is problematic in production environments. I have been using
this in our production wrapper cookbook for the past year or so without
any issue.

This will be removed in the Stein release when we migrate to the newer
apache2 cookbook which uses proper resources.

Also amend the Berksfile to point to the new opendev.org location.

Change-Id: I55e6ea4124017e0f44f92f6a2fb01baad5a27555
Signed-off-by: Lance Albertson <lance@osuosl.org>
2019-08-20 12:47:08 +00:00
Samuel Cassiba 4992010231 Convert Nova APIs to WSGI services
To be consistent with the install guide[1], the Nova services should be
deployed as WSGI services.

[1] https://docs.openstack.org/nova/queens/install/controller-install-ubuntu.html

Change-Id: I49a767724e744f98d7f008411755c063f96a4c9d
2018-06-26 13:54:13 +00:00
Samuel Cassiba cbe2ef6647 Initial compute Pike updates
- Switched the default linter to cookstyle
- Deprecated config settings for Pike
- Normalized template comment

Depends-On: I7a67ba2520b8e44efec6edd8506f96b0e0dc913b
Change-Id: I7abd4194bb7f322764309cad514040c1f5feca00
2017-09-25 16:57:08 +00:00
Samuel Cassiba 012902ad92 Added cellv2 support
- Added basic cellv2 recipe, as it is required from Ocata on
- Style and lint fixes to support newer chefdk
- Rewrote metadata.rb for readability
- Removed ancient Gemfile

Change-Id: I97b453fc419bfbf01679dadf39a256b1f0f99859
2017-08-10 17:35:07 -04:00
Jens Rosenboom dc339a859d Add recipe to deploy Compute service placement-api
The placement-api has been added by nova for the Newton cycle, it has
become mandatory for Ocata.

It is deployed as a wsgi app similar to what we have for keystone and
gnocchi already.

Change-Id: I1d1f1cc7046cb30a91894a0c884bc861d7f3dd95
2017-03-06 14:34:37 +00:00
Samuel Cassiba 5261813e40 Deprecated python-novaclient
- deleted client.rb
- deprecated python-novaclient references
- removed neutron packages

Implements blueprint newton-xenial

Change-Id: I8ff0dcad66ab937f18faf82e6af0cc626dfff15a
2016-12-20 08:40:40 +00:00
Jan Klare 53eacd9934 added api_db sync and made libvirtd-bin template configurable
* added sync for api_db (required in mitaka) and needed configuration options in
  nova.conf
* made libvirtd_opts configurable in preparation for xenial and systemd on
  ubuntu (libvirtd needs to be started with just -l option on xenial)

Change-Id: I6c01e45f10d75db96c95c0bb37b016ada2f5933f
Depends-On: Idf6645064a1c2f337f542b29a026969c7d35efbe
2016-03-23 13:47:25 +01:00
Christoph Albers 799029519b refactoring final step
* added endpoint attributes (moved from common)
* removed qpid as a messaging option (can be incuded in a wrapper)
* removed os-bare-metal dependencies
* deleted default attributes from nova.conf.rb originated in
  openstack-common
* removed fedora and suse as supported platform
* 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
* adapted the specs (unit tests) to work again
* refactored spec_helper.rb method "expect_creates_api_paste"
* added new logic into templates/default/nova.conf.erb
* refactored attributes throughout all recipes that were connected to
  the attributes used for the nova.conf.erb template to adapt the new
  template attribute syntax
* moved all attributes from attributes/default.rb that were used in
  nova_conf.erb to attributes/nova_conf.rb
* refactored attributes to fit upcomming template logic
* refactored recipes/nova_common.rb to fit upcomming template logic
* removed all attributes from default.rb and nova.conf.erb which are set
  as default in attributes, openstack doc and used to render the template
* removed nova-network as a supported config option

Depends-On: I9cc1b5cc069987ac83e064322c2291772505ff5f
Depends-On: Ifa5a7f4e1df47a3961976e64f654224864c3dcb4
Depends-On: I3262b2e6f792f37c32a446e6567790b82bdd4613
Depends-On: I0547182085eed91d05384fdd7734408a839a9a2c
Implements: blueprint cookbook-refactoring
Change-Id: I9ac9eeb29ab27f31394830e4b6f999d5870cc0e4
2016-02-08 12:05:12 +01:00
Mark Vanderwiel 27207cd30b 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: Ic874a3e0a8d005e410baa40584f0f00dfc805a56
2015-05-28 16:09:12 -05:00
ericzhou 46c30ed4d1 Move auth config from api-paste.ini to nova.conf.
In Icehouse, the configurations for keystone auth token has been moved
to nova.conf. So we need to remove the configurations from api-paste.ini
and move them to nova.conf.

Change-Id: I5b5b32b16c8e9235103bd61f3c3eb1774b093e0a
Closes-Bug: #1342002
2014-07-15 16:31:24 +08:00
Mark Vanderwiel 542ed2c2ea Create state and lock paths
The instances path was bring created, but not the state or lock paths.
If these are overridden to different places, nova will fail to start.
Removed the unused hardcoded lock path in api and scheduler recipes.
Moved the path creation to nova-common recipe.

Change-Id: I7538edff91233761a1c6336ca4cfe080eeee093d
Closes-Bug: #1328956
2014-06-11 15:04:27 -05:00
Matt Odden bcad4b1670 Nova API services need keystoneclient not keystone
The API service recipes have been pulling in the entire
python-keystone package, which is the entire Keystone
set of services. This hasn't been necessary since
some time after Grizzly, when the tokenauth middleware
was moved to the client.

Closes-Bug: #1305318

Change-Id: I75ff23847936bb288ea49ca41d1e46edb5bd7730
2014-04-09 21:19:01 +00:00
ericzhou bd4939d2ee Use the library method auth_uri_transform
Use the library method auth_uri_transform to transform the auth uri
by the auth version.

Change-Id: Ia12d942ead55728deaac96ea6b5858d4c0bb01ba
Imlements: blueprint move-keystone-authtoken-move-auth-uri-logic
2014-03-20 16:22:23 +08:00
Christopher H. Laco 3cc89cabf9 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
- Move Excludes for non-existent folders to Includes so they
  automatically cover future additions

Change-Id: I00254b346718c1c70e8ad6f8b97e4dbf3f56396f
Implements: blueprint lint-and-unit-testing-for-havana
2014-02-04 15:37:38 -05:00
Andy McCrae be675315ec Update recipes to be rubocop compliant
- Adjust .rubocop.yml to include recipes/**
- Ensure all recipes are rubocop compliant

Change-Id: I7ecb3896b5a2b2d93304014a4ab19cb0e3c2e31c
Addresses: blueprint rubocop-for-compute
2014-01-29 12:51:12 +00:00
Andy McCrae cc385721e6 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: I3f37d2e940dfcaab8c40fe3d039cbd24239ffa42
Partial-Bug: #1195915
2014-01-17 10:20:33 +00:00
Jay Pipes 5117fb0eb3 Corrects the auth_token middleware configuration
Partially addresses LP 1207504

We need to ensure that auth_uri is set properly, that
auth_version defaults to v2.0, even when the v3 Keystone
API is available, and that the non-auth_uri config options
refer to the admin endpoint, not the service endpoint.

Change-Id: Ifbfbbf86bb6956b9b7c366dec5a8a12b383a476b
2013-08-02 11:14:24 -04:00
Jay Pipes 2f474342ce Changed identity to proper identity-api
Previous commit had wrong endpoint key. Should have
been identity-api, not identity.

Change-Id: Ia280b7e0da81cdb57d4ffc00ef639b31de0c5dd8
2013-07-24 17:31:37 -04:00
Jay Pipes ee622854d1 Allow auth_version in auth_token middleware
Allows the auth_version to be only included when a node
attribute is set to v2.0. This ensures that Keystone v3 works
with Nova when not on Keystone v2.0.

Also corrects the auth endpoint to the main endpoint not
the admin one.

Fixes LP #1204627

Change-Id: Ib7c3eae117a33cc2a7a5668e033851acaecd880b
2013-07-24 16:12:50 -04:00
Jenkins 6e6f4dc6f7 Merge "Use new cookbook name for service_password" 2013-06-04 00:25:01 +00:00
John Dewey 7d67ff7fd6 Use new cookbook name for service_password
Bring this cookbook in line with other cookbooks
(openstack-block-storage), already following this
pattern.

Change-Id: I34d40d102b94459d700fbd290fad684297e27e66
2013-06-03 15:27:48 -07:00
John Dewey 84fbc783cf Always create the `signing_dir` basedir
Since the `signing_dir` is always set in api-paste.ini,
the basedir must exist or the openstack compute API fails
to start.  No reason to guard the creation of this dir
now that it is always referenced.

Change-Id: I4c62cba37b801aa5d07151e049e6ad30bf6a8a29
2013-06-03 12:42:25 -07:00
tpaszkowski d4176a6987 Fix for nova-compute service not beeing started.
nova-compute service should be started after nova::compute recipie will
finish its work.

Change-Id: I4c9b7de2391f76e9c7cb74df17446b97565a8ed6
2013-05-28 10:08:39 +02:00
Matt Ray 80f36cf59c Move attributes to [openstack][compute] namespace.
As we have decided to move all cookbooks to use the
[openstack][<service>] attribute namespace convention, move compute
to fit this model.

Change-Id: Ibc19fd5326af0340ea1e3788aa7d2701e187f3a0
2013-05-23 00:22:14 -04:00
Craig Tracey ab49072ea9 More changes to rename this to openstack-compute
In the previous commit, the vast majority of the work to move this
repo to openstack-compute was completed. Functionally it works. This
change is intended to address some cosmetic issues and make it
consistent with work done in other cookbook repos.

All tests pass.

Change-Id: I58216cd87b9ff0a77c599c7b5aab132ab2a9304d
2013-05-18 09:36:02 -04:00
John Dewey a1acd590a0 Changed cookbook name to openstack-compute
Changed the cookbook name to openstack-compute, fixed all tests, and
addressed attributes. Also addressed calls to external services,
primarily keystone -> openstack-identity.

All tests pass.

Change-Id: Ic567a33cefd78cc3b2217986d3ff7475bc93f874
2013-05-16 17:59:06 -07:00
Jay Pipes da17ee847c Separate out Keystone endpoint registration into separate recipe 2013-03-19 18:01:22 -04:00
Jay Pipes 8c401d138e Update to use newer keystone register providers 2013-03-19 14:10:48 -04:00
John Dewey 0dc9bc0c28 Removed unnecessary default actions 2013-01-11 21:41:42 -08:00
John Dewey 95e6769550 Simply creating base directory of `cache_dir` 2013-01-11 21:40:15 -08:00
Jay Pipes ebd882eeca Final changes related to PKI 2013-01-11 10:54:32 -05:00
Jay Pipes bae6512dd9 service_pass bug 2013-01-09 00:53:22 -05:00
jaypipes b6bf879769 Merge pull request #45 from retr0h/working
Re-Revert "Revert "Foodcritic cleanups""
2013-01-08 18:22:49 -08:00
John Dewey 96e0d0109b Re-Revert "Revert "Foodcritic cleanups""
This reverts commit 681aa57270.

Corrected the notification syntax
2013-01-07 17:40:53 -08:00
John Dewey 631e695da2 Cleanup per jay's suggestions 2013-01-07 14:23:54 -08:00
John Dewey aca4e5561f Added auth_host, auth_port, auth_scheme
This is required for middleware to work properly
2013-01-07 14:08:25 -08:00
Jay Pipes 681aa57270 Revert "Foodcritic cleanups"
This reverts commit e59e131ad8.
2013-01-07 11:19:53 -05:00
John Dewey e59e131ad8 Foodcritic cleanups
Think I got em all right, esp the subscribes...

FC033: Missing template: cookbook-nova/recipes/nova-common.rb:124
FC033: Missing template: cookbook-nova/recipes/nova-common.rb:132
FC033: Missing template: cookbook-nova/recipes/nova-common.rb:140
FC033: Missing template: cookbook-nova/recipes/nova-common.rb:148
FC034: Unused template variables: cookbook-nova/templates/default/nova.conf.erb:1
FC034: Unused template variables: cookbook-nova/templates/default/openrc.erb:1
FC043: Prefer new notification syntax: cookbook-nova/recipes/api-ec2.rb:50
FC043: Prefer new notification syntax: cookbook-nova/recipes/api-ec2.rb:138
FC043: Prefer new notification syntax: cookbook-nova/recipes/api-metadata.rb:50
FC043: Prefer new notification syntax: cookbook-nova/recipes/api-metadata.rb:65
FC043: Prefer new notification syntax: cookbook-nova/recipes/api-os-compute.rb:50
FC043: Prefer new notification syntax: cookbook-nova/recipes/api-os-compute.rb:137
FC043: Prefer new notification syntax: cookbook-nova/recipes/compute.rb:54
FC043: Prefer new notification syntax: cookbook-nova/recipes/libvirt.rb:72
FC043: Prefer new notification syntax: cookbook-nova/recipes/libvirt.rb:84
FC043: Prefer new notification syntax: cookbook-nova/recipes/libvirt.rb:95
FC043: Prefer new notification syntax: cookbook-nova/recipes/network.rb:32
FC043: Prefer new notification syntax: cookbook-nova/recipes/nova-cert.rb:31
FC043: Prefer new notification syntax: cookbook-nova/recipes/scheduler.rb:40
FC043: Prefer new notification syntax: cookbook-nova/recipes/vncproxy.rb:39
FC043: Prefer new notification syntax: cookbook-nova/recipes/vncproxy.rb:47
2013-01-03 22:55:45 -08:00
Jay Pipes 2a00dd2116 Couple tiny things found on debugging in CI 2013-01-03 22:26:09 -05:00
Jay Pipes bd6f1cc229 Changes corresponding to new openstack-common and keystone
* Use service_password, db_password, and user_password
  new openstack-common library routines
* Use updated calls to keystone_register that utilize
  auth_uri and admin pass
2012-12-20 12:12:02 -05:00
Jay Pipes 2a056cecfa Support for setting the service user/pass/tenant_name in paste.ini
Removes use of admin_token and now-irrelevant host/port/scheme
sections of api-paste.ini in favor of admin_user/tenant_name and
admin_password corresponding to the service user/tenant/pass.
2012-12-17 18:38:11 -05:00
John Dewey 6154ee8ee4 must decode the compute-api & compute-volume
Unfortunately these endpoints have invalid path that chokes
URI.parse.  We can clean this up more if we like, so that
we do not need to URI.decode everywhere.
2012-11-26 14:09:06 -08:00