Commit Graph

87 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 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 f922173a34 starting rocky development patch
Change-Id: Ic08b45c18b8593c7302dc0977158b8d4e9d58b5a
2018-08-03 23:01:12 -07: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 3a4c7f6b6f 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: Ife7bb6d09eafd137c6858f6ae18d4d34508928a6
Implements: blueprint simplify-identity-endpoint
2018-06-14 19:17:02 -07:00
Jan Klare 2434b03f7d
remove all ceph related attributes,recipes,specs and the cookbook dependency
Change-Id: I24f9976ed57a90cb7062ed990e758fd9707d04b4
2018-04-05 16:38:31 +02:00
Samuel Cassiba 859fc5df20 compute refactor for Pike and Chef 13
- implemented foodcritic and cookstyle corrections
- deprecated node.foo.bar method access for node['foo']['bar'] bracket access
- parameterize run directory for apache2

Implements blueprint modern-chef

Change-Id: I6cf4cd67a96c7d353c4871db02be42ebdc9c1528
2017-12-10 20:02:43 -08: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 aed3567528 Update api-paste.ini template for Ocata
The default content of api-paste.ini has changed, in particular we were
missing the http_proxy_to_wsgi filter allowing proper URL discovery.

Change-Id: Iaa968a963df5baf49116829f111ef4f46c4f8951
2017-04-19 15:17:06 +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
Christoph Albers 61fc649dd9 RPC_backend / transport_url workover
- removed deprecated rabbitmq attributes
- added rabbit_transport_url

Change-Id: Iaf33e8f5ae97ee0c07cfccf67d32d0e05f48e5bb
2016-12-20 11:45:34 +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
Samuel Cassiba 4eac0887ff Increment Ubuntu release to 16.04
This is a cosmetic change that only affects unit tests.

Change-Id: Ifdac5cff8c2e64741eae093737e4f4eb2a4bc202
Implements: blueprint newton-xenial
2016-08-10 19:33:51 -07:00
Samuel Cassiba c6c3537242 Style and lint fixes to support newer ChefDK
Change-Id: If87a38d33de73da45648fabf127e3b127fa46045
Depends-On: I6ce4587caa3ae68ddbd3ef1a521aaf46f4840b2c
Depends-On: I0a3872cd3a21c31b5e3a7b6190f911280e9ed909
Depends-On: I34e4c7b29ff7c36c91245d90fb0b6897847cd22f
Depends-On: Ie45076f0ee36e880c9a6080f2b330982e40c282c
2016-07-06 12:55:03 -07:00
Jenkins 2aec9921b7 Merge "Remove api-ec2 recipe" 2016-04-11 08:23:53 +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
Samuel Cassiba 749f4ccfd3 Remove api-ec2 recipe
api-ec2 is being replaced by the `openstack-ec2` cookbook.

Change-Id: I5b4bc088bbf9a5061ed311d164dc381a3caca2d5
Depends-On: I2dbbafaf8641ece00d4181d1ea4ba93f00eed6ed
2016-03-18 08:04:29 -07: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 2efe3277a1 Replace deprecated get_secret
Use get_password 'token' instead.

Change-Id: I93e9f43fa296bbdfe37e5fe9e72feaf6a3fea6f6
Partial-Bug: #1467662
2015-06-22 15:51:01 -05: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
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 ba166ad376 Move to rhel 7.1
rhel 7.0 is not EUS/LTS, need to switch to 7.1.

Change-Id: I8b46f6f7f567aef5d43f1c2ed21e35cc7ad64b7d
Related-Bug: #1438878
2015-03-31 15:21:02 -05:00
Mark Vanderwiel f536f87624 Fix incorrect package name for multipath on rhel and suse
The correct package name is device-mapper-multipath.

Change-Id: I041e46b96e7fd91216d3f4c7c41c3d20d80ff40f
Closes-Bug: #1431036
2015-03-12 09:14:34 -05:00
wenchma 33fca8c176 Add ironic section to openstack compute service
Add ironic section configuration to make openstack compute service
use openstack bare metal service.

blueprint bare-metal-enablement

Change-Id: I7492edac417609a0eb952f0ca0780876ef8564fc
2015-03-06 12:04:06 +08:00
Mark Vanderwiel 41ff3cd711 Add missing nova volume attach packages
In some cases like FiberChannel storage, nova volume-attach will
fail because some utility packages are missing. Adding those
into the compute node set of installed packages.

Change-Id: I974bdd00c9f3d046baae8b6c4b531d54f3d7f45c
Closes-Bug: #1412388
2015-02-26 17:18:07 -06:00
Jenkins b80923ad91 Merge "Trusty juno updates" 2015-02-09 01:09:30 +00:00
Mark Vanderwiel 60de8c09d3 Trusty juno updates
* update spec platform versions

Change-Id: I3ee183090018d53d9e80566554cd6a45aed8d7a2
Implements: blueprint trusty-juno
2015-02-02 16:17:15 -06:00
Elliott Davis 557afe0989 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: Ia87e123ae2d88e3122b8d66d8ff144a804e6d8c4
2015-02-02 11:16:16 -06:00
Mark Vanderwiel d4c01834ef Allow rootwrap configuration via attributes
Change-Id: Ibf090253dd52a1b027e9ad2467a1de766bce7243
Closes-Bug: #1347861
2014-08-01 12:56:37 -05:00
Mark Vanderwiel 2622063033 Fix fauxhai platform versions for suse and redhat
Change-Id: I65de657ba308dd0184a321cdf9d7174c7b4ea545
Partial-Bug: #1344199
2014-07-18 12:47:46 -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
gengjh 613a57eb80 Get the vCenter password from databag for compute
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: I342e26aee713216f2aecc39113a67ada25ec1fb5
2014-05-09 22:22:07 +08: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
galstrom21 e80609508d Speeding up ChefSpec test cases
Change-Id: I99f03b67f2d42904b8e82707bfd28b5456d3e209
2014-04-28 13:55:32 -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
Luis A. Garcia 576d3b0735 Use get_secret instead of secret
The new get_secret method allows the 'secrets' databag to be renamed,
just like all other databags.

Change-Id: Ic8be5d19a112d78e22716c0cd571efc7186ac9ce
Related-Bug: #1288784
2014-04-02 08:21:47 -07:00
Stephan Renatus 6822da08f9 Update ChefSpec to 3.4.0
This change gives us new capabilities, such as matching notifies and
subscribes of resources.

Implements: blueprint chefspec-3-4
Change-Id: I4842259e06f7213e9d7d20b719561e18b0c9767e
2014-03-28 17:20:04 +01:00
Federico Gimenez Nieto 998eb1bb04 Adds specs for template contents
Both conditional and plain content are tested. All template-related
pending tests have been addressed, one in spec/compute_spec.rb that
was tied to a cookbook_file resource has been just removed.

Change-Id: Ib2d8871794920a10ad8e111fc89ab03ab057d3dc
Partial-Bug: #1182563
2014-03-24 20:31:20 +01: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
galstrom21 206ea8c9ad Refactoring ChefSpec tests
Change-Id: I85ea61fa5e3a9ae51b5f2be00bc7e81f87ddcd85
Addresses: blueprint refactor-spec-files
2014-03-16 22:22:29 -05:00
Jenkins 0406ef11ae Merge "Use get_password method to obtain qpid password" 2014-03-09 23:35:30 +00:00