Commit Graph

36 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 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 6c69ce58b1 Updates for Train
The major change in this release is that the placement-api code base has been
removed from nova and put into it's own project called placement [1]. Users who
are coming from Stein will need to follow the upgrade guide [2] to properly
upgrade to the new service.

All attributes related to placement-api have been moved into their own files
including configuration file attributes for placement.conf.

Added:
- Template to manage /etc/placement/placement.conf
- Include openstack-compute::_nova_cell recipe to nova-setup so that the db
  migrations happen properly

Changed:
- Update release to train
- Migrated from nova-placement-api to placement-api [1]

Fixed:
- Cookstyle & ChefSpec
- Ordering of db syncs which was causing issues for Train
- Set default['openstack']['compute']['syslog']['use'] to false by default
- Various comments

Removed:
- Removed references to nova-consoleauth which has been removed upstream [3]
- Removed references to xvpvnc which was removed upstream
- Unused .rubocop.yml and .rubocop_todo.yml

[1] https://docs.openstack.org/releasenotes/placement/train.html
[2] https://docs.openstack.org/placement/latest/admin/upgrade-to-stein.html
[3] https://docs.openstack.org/releasenotes/nova/train.html#prelude

Change-Id: I996bcd2f63a080e10fadf0c7adf9a0ddcb0b5c7a
Depends-On: https://review.opendev.org/731859
Depends-On: https://review.opendev.org/731860
Depends-On: https://review.opendev.org/731861
2020-06-09 10:09:15 -07: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 ef4adacafa 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 7 minutes 17 seconds to 1 minute 34.18 seconds

Change-Id: I8bdde8b68371d25275aa78d9438f5aeff960062f
2020-01-06 12:20:20 -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
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
Jan Klare d3a29ed8c2 moving from bundler to chefdk
- deprecated Gemfile
- updated Rakefile to use 'chef exec' instead of 'bundle exec'
- updated TESTING.md
- replaced Runner in specs with SoloRunner for new chefspec version
- initialized file_cache_path to make git_sync spec for docker work

Change-Id: I845c712f2d0d216d9d4a9d32c28ac4b03e96109a
2015-04-27 22:58:25 +02: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
Mark Vanderwiel e8189f2fe9 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: I91d6a47c3b5787df65f78e3e86941de1fb28583d
Implements: blueprint allow-package-updates
2014-05-07 09:53:44 -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
galstrom21 206ea8c9ad Refactoring ChefSpec tests
Change-Id: I85ea61fa5e3a9ae51b5f2be00bc7e81f87ddcd85
Addresses: blueprint refactor-spec-files
2014-03-16 22:22:29 -05:00
Andy McCrae 5acd143e9c 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'] in the spec tests
- Adjust the Gemfile to use fauxhai 2.1.0
- Adjust the Gemfile.lock

Change-Id: I75e1837871b9ad6d02c40ab8a9d5b127a685b66f
Addresses: blueprint fauxhai-cleanup
2014-02-18 11:46:16 +00:00
Andy McCrae be23ca0ef7 Add workaround for node['cpu']['total'] until fauxhai fix merges
- Set the node['cpu']['total'] value manually for each RUNNER
- This can be removed once https://github.com/customink/fauxhai/pull/77
  merges

Change-Id: Ie8e7eced230f89586c43f9637adae0c27ff95054
Partial-Bug: #1280309
2014-02-17 12:39:15 +00:00
Andy McCrae f9c4e3198e Update spec files to be rubocop compliant
- Update .rubocop.yml to include spec/**
- Update spec files to be rubocop compliant

Change-Id: I2ba55825cf6a80ffa338f849c6c2f274b915886b
Addresses: blueprint rubocop-for-compute
2014-01-29 12:02:05 +00:00
Ionuț Arțăriși ae9dafb73b Upgrade development dependencies
berkshelf ~> 2.0.10
chefspec ~> 3.0.2
foodcritic ~> 3.0.3

Change-Id: Ifafd78188eeb4f62d55389a4b0456a05c442dc6c
2013-12-18 02:13:03 -05:00
John Dewey 4ff7b0f72e Added compute_stubs into before filter
This makes our testing consistent with our other cookbooks.
Also, added require_relative two 2 tests which were missing it.

Change-Id: Iabebc6d658d9b5e6c3ccc3f9fd10b56c636fd304
2013-06-13 12:44:37 -07:00
John Dewey d496d4081f Tests should be using require_relative
The #require_relative statement is relative to the file
containing the the statement. Also, updated spec_helper
constants to follow existing spacing format.

Change-Id: I33c5c158ea34c30baf63bd72819b9d44b8516ca4
2013-06-03 19:47:59 -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
Ionuț Arțăriși 518d660056 spec test for starting nova-api-os-compute immediately
Change-Id: Iea86f62cf5654d644a3025300fa571512ad460c5
2013-05-28 10:11:08 +02:00
John Dewey 2f595bbb90 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.

Change-Id: I18db535ca1bab357ba083d57a76d86c5ccfddf15
Fixes: Bug 1182576
2013-05-24 10:42:35 -07: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
John Dewey bdc9d530de Moved api-paste notification tests to helper 2013-05-05 21:17:36 -07:00
John Dewey 3a83668d7a changed name of describe 2013-05-05 20:27:33 -07:00
John Dewey dbdf9d8fe6 Passing REDHAT/UBUNTU_OPTS throughout tests 2013-05-04 16:22:13 -07:00
John Dewey a98e4abf77 Added libvirt and nova-network tests
* Added rhel platform tests and default (ubuntu) tests for libvirt.
* Added rhel platform tests and default (ubuntu) tests for nova-network.
* Found and cleaned up a few misnamed tests.
2013-05-04 15:17:42 -07:00
John Dewey 4bcd9d20c8 Added initial chefspec tests
Does not include template rendering tests.
Could use some help with these, as they are fairly
important.
2013-05-03 23:38:22 -07:00