Commit Graph

218 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
Marek Szuba d15e1572ab Configure SPICE consoles
There is now a recipe - not really a new one, it's "vncproxy" with some
attributes renamed - which handles the relevant packages and services
(Debian names confirmed to have been valid at least since Jessie,
Ubuntu and RHEL ones based on existing convention + review comments).
Furthermore, nova.conf is now populated with required enpoint information
- with hopefully sane default values of relevant attributes.
Finally, the attribute node['openstack']['compute']['console_type']
can be used to enable the desired console type; it defaults to 'vnc'
in accordance with default Nova configuration.

Signed-off-by: Marek Szuba <m.szuba@gsi.de>
Change-Id: I0996daddda6d21633930ba73e174f99775a9e0c9
2021-10-14 22:47:24 +00: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
Marek Szuba c5e91ee0b9 nova-common: add memcached config keys for keystonemiddleware
Modern versions of OpenStack (confirmed under Rocky and Victoria)
have two separate keys for specifying memcached servers to use - one
for Nova itself (which the cookbook already handled) and one for the
Keystone middleware (which it did not). As a result, with only the former
set Nova keeps on complaining in the logs (at least under Rocky) about
still using in-process token cache.

Signed-off-by: Marek Szuba <marek.szuba@cern.ch>
Change-Id: I7930048a55a26e66c1dd041245ae5b23794eada1
2021-07-15 20:24:37 +00:00
Jens Harbott a581a52dd6 Add a service_user section to nova.conf
This is needed in order to prevent long-running actions like
live-migration from failing if the user provided token expires
in the meantime. [0],[1]

[0] https://docs.openstack.org/nova/train/admin/live-migration-usage.html#addressing-migration-timeouts
[1] https://docs.openstack.org/nova/train/admin/support-compute.html#user-token-timeout

Change-Id: I00e3a6ac974b73b56b49fadc7751f1c0aaf292ac
2021-05-03 12:52:35 +02: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
Lance Albertson d645ef3f5e Chef 16 fixes
Depends-On: https://review.opendev.org/747602
Depends-On: https://review.opendev.org/747557
Change-Id: I73514e34628dbf61a35f6e0ad19191cdeb2b6451
Signed-off-by: Lance Albertson <lance@osuosl.org>
2020-08-27 17:36:20 -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 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
Jens Harbott 9fb22fbbed Drop admin endpoints
The admin endpoints offer no special functionality, users may talk to
the public endpoints instead. The only historic use case has been the
keystone v2 admin endpoint, but with keystone v3 API, even that is no
longer needed.

[0]
https://opendev.org/openstack/openstack-chef-specs/src/branch/master/specs/ocata/all/drop-admin-endpoints.rst

Depends-On: https://review.openstack.org/652050
Change-Id: I8bee6f671187324cfecd820510d2a6d56f26ca77
2019-04-16 09:37:38 +00:00
Zuul c987bedd01 Merge "Rename attributes: vncserver_* -> server_*" 2018-10-05 09:04:40 +00:00
Zuul b0cc7a69d5 Merge "Add www_authenticate_uri to keystone_authtoken" 2018-10-05 08:59:33 +00:00
Roger Luethi 55b58702fa Make nova.conf more readable
This patch replaces nova.conf.erb with openstack-service.conf.erb from
the openstack-common cookbook.

Besides removing some redundancy, it also makes nova.conf more readable
(due to a fix to openstack-service.conf.erb that never made it to
nova.conf.erb).

backport: queens pike

Change-Id: I07aeb7617ca152f66ec239cef4bcbef642c66bf7
2018-10-02 17:19:43 +02:00
Roger Luethi 6d78224bdb Rename attributes: vncserver_* -> server_*
Source:
* openstack/nova git repo:
  conf: Rename two VNC options
  Change-Id: Ic05c2c8364e015f6878b0bc25449216624568ad5
  commit e5a03e3c54d57aa29bd8154c9eddf7ee52c6c3b5

Change-Id: I3953195b1f8c7f166b89c7ea7ce7994bcd3c0461
2018-10-02 17:10:26 +02:00
Roger Luethi 7053785ecf Add www_authenticate_uri to keystone_authtoken
Without www_authenticate_uri set, nova logs contain warnings:

WARNING keystonemiddleware.auth_token
        Configuring www_authenticate_uri to point to the public identity
        endpoint is required; clients may not be able to authenticate
        against an admin endpoint

backport: queens

Change-Id: I0ff8202455b576227b882670c7254487b5e11f25
2018-10-02 17:03:39 +02:00
Samuel Cassiba 79b76424f3 Use internal identity endpoint for services
Depends-On: Id74966d9f1279f725bc41c08e434230a7845bbc1
Change-Id: Ibce1f2d4796e44941df4b7256de786e49a7386cc
2018-07-16 12:38:42 -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 ad88dc2a78
cleanup attribute leftovers that are not used anymore
* removed all unused attributes
* removed vmware specific configuration option that can be set in a
wrapper cookbook (and was not maintained for quite some time)
* removed caseswitch for nova user and group since we currently only
support debian and rhel
* moved all libvirtd related config options to specific attribute file
in preparation for further refactoring

Change-Id: I42a0bbcd03a570b9d6d24ba32ed2cafacc33ec76
2018-04-16 15:09:22 +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 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
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
Christoph Albers e0441b5322 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 + neutron
- updated readme

Change-Id: I84f850f32f25a318c3ed3c7337a0dfa6f641a5fe
Depends-On: I0f8955f05de9b33711c54b9a198f45018cceb8e1
Depends-On: I2d404a424bd79a6e9b282304e21591fa33a48981
Depends-On: If7b4d6e563081a0be9957353d73ef61a9688df56
2016-09-30 11:37:41 +02:00
Jens Rosenboom 3239a17ce9 Also set the cache backend when using memcached
The default backend for oslo_cache is dogpile.cache.null, so we need to
explicitly specify the proper backend that we want to use.

Related-Bug: 1572062
Change-Id: I8942f872c072f263959ac8790df7f7eedc9599e2
2016-04-19 13:26:13 +02:00
Jenkins 2aec9921b7 Merge "Remove api-ec2 recipe" 2016-04-11 08:23:53 +00:00
Jens Rosenboom e7b8e5b6dc Cleanup options deprecated for mitaka
Some options have been deprecated for Mitaka, replace them with the new
variants.

Change-Id: If4c7ec0348384ba149e18bd865db8d9b2a544555
2016-04-05 15:18:41 +02: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 9b46ac6d13 Now using the new bind_address method from common
* cleaned up endpoint and bind interface attributes
* moved compute-ec2 attribute to compute-ec2-api
  for clearness on which is public internal or admin

Change-Id: I16fb99ea2f865ea95b653c68fd5a42f15d039439
2016-02-24 14:32:34 +00:00
Christoph Albers 5ce7ba9ca0 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: Ia1785dc4ed7df88d0457e640fa0a668baccf12d5
Depends-On: I4f97b659361dabd7fac216305d2aad2f1bb98f51
Depends-On: I9bf230ba53d23ce11a32acaea2410572eaeb6123
Depends-On: Iec485deaf415e4187a323435cce2b6bbadfc5d42
Depends-On: Ia5bddfc5e2fd77cd6e9e855c680b079f78fc1c3f
2016-02-23 23:16:34 +00: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
Min Min Ren e6d706c956 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: I8d904ca7076d7e6a74f1eda09c40ee79f1fc1a7f
2015-08-27 17:09:11 +08:00
Zhe Jiang f78d153935 Make serial console configurable
Add serial_console section to nova.conf template.
The section attributes are enabled, base_url, port_range and
proxyclient_address.

Depends-On: I9c4061ea196a511f7fb306f3130db75f4ba52ff1
Closes_Bug: 1470025

Change-Id: I5336a9bc83669e7200afe68702031f2a13d1a2e0
2015-07-08 15:27:08 +08: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
Mark Vanderwiel 1680ba280e Use identity_uri_transform for identiry_uri support
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: I3beac9d8d80d8a1a15e44bf944f1d8ca84d45350
Implements: blueprint identity-uri
2015-04-21 09:20:13 -05:00
Mark Vanderwiel 0d57f7097f osapi_compute_link_prefix should not be set by default
Correctly default osapi_compute_link_prefix to nil.
Added osapi_glance_link_prefix for completeness.
Created attributes for these for flexibility.
Updated specs to cover these and other misc keys.

Change-Id: Ic2fd79fc74dedb649b08c451ded678ac1d1ed310
Closes-Bug: #1418583
2015-04-08 13:31:39 -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 631f097acf Add compute metadata api to common endpoints
Nova metadata api endpoint was missing from common endpoints.
This patch will be follow by one for compute and network to
make use of these new endpoint.

Change-Id: I1c3bfe3dac4b04c7f482f698523327ce4754e594
Partial-Bug: #1425633
2015-02-25 15:18:38 -06:00
Ken Thomas 030642ec4e 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-compute recipes.

Change-Id: I4c90f4c7222f2f0b7fb7eba91f68e47841970e7c
Partial-Bug: 1412919
2015-02-03 21:29:36 +00: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
jun xie 89f6118f38 Add several insecure-related attributes
This change adds some attributes into the cookbook so
that they are configurable. They are mainly to configure
for glance_api_insecure and neutron_api_insecure in nova.conf.
It also makes neutron_url and neutron_admin_auth_url to be
prefixed with scheme(http or https).

Change-Id: If6d50a6963b47ee0983ecc71087414ab7c366623
Closes-Bug: #1381599
2014-10-17 00:20:30 +08:00
Mark Vanderwiel a80dc09214 Separate endpoints for vncserver_listen and vncserver_proxyclient_address
* A patch for Common added a new endpoint for vnc proxy
* Use the new vnc proxy endpoint for the nova.conf

Change-Id: I9909e3dd500d9fcc31133b81c93420b629ed4e37
Closes-Bug: #1367807
2014-10-09 12:48:54 -05:00
leileiz 95982ca226 Update nova.conf permission
contains password properties like:
qpid_password=
neutron_admin_password=
To avoid unauthorized user to access it and decode the password, this file will be set as 640

Fix bug 1369411
Change-Id: I66c7d742ce814be7d39e61180e896a9d02ccb800
2014-09-23 22:09:58 -04: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
Ionuț Arțăriși 2369a3ea5c use new python_packages attributes from -common
*_python_packages attributes are being moved to -common in order to
remove the duplication from all the cookbooks which are using them

Change-Id: I952372ec06cc6560b9a942bfc100d12622152ab2
Implements: blueprint move-python-db-client-attrs-to-common
2014-06-27 11:29:43 +02:00