19 Commits

Author SHA1 Message Date
Lance Albertson
d50c4ad40d Chef 17 support
- Require Chef >= 16.0
- Enable unified_mode
- Update to latest upstream cookbooks for etcd, mariadb and memcached
- Update copyright years

Depends-On: https://review.opendev.org/c/openstack/openstack-chef/+/813950
Change-Id: Ib410ed28388725751a6295c58ce1f5e89c529b28
Signed-off-by: Lance Albertson <lance@osuosl.org>
2021-10-13 23:28:32 -07:00
Lance Albertson
8d07e9acee Cookstyle 6.19.5 fixes
Also remove unused database resources that somehow got imported in
https://review.opendev.org/701027.

Change-Id: I5241e0f1eb3bf44158bc64019a3880d83a6d4bdc
Depends-On: https://review.opendev.org/756168
Signed-off-by: Lance Albertson <lance@osuosl.org>
2020-10-05 17:02:11 -07:00
Henrique Santos
455790e1e9 Adds provides method to define name of resources
In Chef Infra Client 16.2, resources have to be named using the provides
method. The resource_name method has not been changed in order to be
compatible with Chef Infra Client <16.2.

Also fix URI.encode and URI.decode deprecations.

Update etcd depends to ~> 6.0 to fix Chef 16 deprecation warnings.

Depends-On: https://review.opendev.org/747503
Change-Id: I24be89a3214207bac2df9eb360124871e0d8242f
Closes-Bug: #1886985
Signed-off-by: Henrique Santos <hfigueiredosantos@tecnico.ulisboa.pt>
Signed-off-by: Lance Albertson <lance@osuosl.org>
2020-08-27 16:50:23 -07:00
Lance Albertson
abab7d0ecb Stein fixes
- Switch to Stein release
- Cookstyle fixes
- Update cookbook etcd to ~> 5.6
- Update README
- Add myself to author list and OSU Copyright
- Properly fix completions recipe and ensure it works
- Create and start the etcd service in the etcd recipe
- Update delivery configuration to exclude integration cookbooks
- Refactor and update RenderConfigFileMatcher to work with newer
  ChefSpec. This fixes output which was passing but showing error
  messages.

Depends-On: https://review.opendev.org/701027
Change-Id: Iba3eeabe85ab9303147e43eeb550212a46d190f3
2020-03-19 10:52:29 -07:00
Samuel Cassiba
7740328325 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: Ied0fb46ae8c10273fde31691b910dc2748845faf
Implements: blueprint simplify-identity-endpoint
2018-06-14 21:05:25 -07:00
Roger Luethi
d232f34b4c Extend openstack_command
This patch extends openstack_command to accept an array in addition to a
string as an argument.

This allows the use of openstack_command in cases where an argument
contains protected spaces.

Examples:

mistral execution-create my_workflow \
    '{"names": ["John", "Mistral", "Ivan", "Crystal"]}'

barbican secret list --name chef_test_secret --format value -c"Secret href"

Without this patch, all arguments have to be passed as a single string
which openstack_command splits on white space regardless of any
quotation marks. Therefore, the examples above will fail.

Change-Id: I0419a1526beb103839a3cf235eba6c41d9d946d5
Closes-Bug: #1723949
2017-10-20 12:26:29 +02:00
Samuel Cassiba
ffbf83d17f Initial common Pike updates
- Bumped chefdk to 1.6.1
- Switched release to pike
- Added is_release attribute for testing, defaults to false
- Added RDO deps repo for testing pre-release packages
- Added ubuntu-cloud proposed repo for testing pre-release packages
- Switched the default linter to cookstyle
- Normalized the banner message
- Dropped pip installation method for python-openstackclient since the
  packages are fresh enough

Change-Id: I7a67ba2520b8e44efec6edd8506f96b0e0dc913b
2017-09-11 23:38:26 -07:00
Christoph Albers
57fa9ecef7 Tempest / Integration fixes
- added needed attributes to get glance image id
- edited specs in favor of identity v3

Change-Id: I9b87834190f013191cddaeffd1547278543e0dad
2017-01-02 15:36:24 +00:00
Samuel Cassiba
da21e16aa0 Convert command line clients to openstackclient
A prerequisite for Newton is to move to openstackclient for interfacing
with the OpenStack services.

Change-Id: I80a10bc1a3a50501306c16e278b960e43e9e9a59
Implements: blueprint openstackclient
2016-08-02 22:25:35 -07:00
Samuel Cassiba
51ac5f8b9f Style and lint fixes to support newer ChefDK
- bumps ChefDK release to 0.15.15 in bootstrap

Change-Id: I6ce4587caa3ae68ddbd3ef1a521aaf46f4840b2c
2016-07-01 18:16:19 -07:00
Mark Vanderwiel
7a51c3b952 Add some debug output for cli's
Add debug output for cli results.

Change-Id: Ief6b040970017b734eaec0932014e56d68d52109
2016-05-11 16:52:25 -05:00
Jan Klare
1858c025b2 library cleanup and refactoring
* version bump to 13.0.0 for mitaka release
* removed suse support
* removed general endpoint method, since we should be able to always specify
  which endpoint we need
* removed fallbacks in specific_endpoint method, since this behaviour is not a
  very obvious one to the user and it should rather return an error than an
  unexpected result
* dry public, internal and admin endpoint methods
* removed obsolete private methods
* adapted method calls for admin_endpoint in libraries/cli.rb
* refactored set_endpoints_by_interface recipe to directly call address_for
  instead of address, since the recipe already checks for an existing attribute
  ..['bind_interface'] and therefore address would redirect to address_for
  anyways
* moved the nested hash order for the public, internal and admin attributes to
  to be more clear and to break all existing calls to fix them during the
  refactoring process of all cookbooks
  e.g: node['openstack']['endpoints']['internal']['identity'] is now
  node['openstack']['endpoints']['identity']['internal'] and can be moved into
  the identity cookbook. This also streamlines these endpoint attributes with
  the bind_interface and host attributes
* removed dependency on openstack-identity cookbooks by moving openrc recipe to
  opentack-identity (same for corrensponding specs and template)
* removed address method and use the address (or hostname) defined in the
  endpoints hash directly (logic to set this attribute should rather be
  done in a wrapper (with a fitting method) instead of a static and predefined
  one)
* removed set_endpoints_by_interface recipe since logic for defining the
  endpoints will be moved to wrapper cookbooks
* added helper method merge_config_options for generation of config hashes used
  in service config templates
* added template for openstack-service.conf.erb which can be used by all service
  cookbooks
* deleted all endpoints attibutes, since these are moved to the service
  cookbooks for easier dependency handling

Implements: blueprint cookbook-refactoring
Change-Id: I0547182085eed91d05384fdd7734408a839a9a2c
2016-02-05 08:38:07 +01:00
Mark Vanderwiel
fc217f6ce4 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: Ic0c0677de44642e0994c0b95a3c270cbd4749b40
2015-06-02 11:45:59 -05:00
Mark Vanderwiel
acae85611f Fix up some files modes
Correct some source files to mode 00644

Change-Id: I58a11ce44eea995be35a65f613f9e4a0cb440b51
2015-02-06 15:16:49 -06:00
ZHU ZHU
554a50e07d Add '--xxx' only argument type for client cli
Beside the command type "<client> --key=<value> <command>", there is
other type of command type "<client> --key <command>" for example
"keystone --insecure tenant-list". Add this command argument type
into consideration.

Change-Id: I6bb97279ef380eb71ac581f8cd99623ab7d1519e
2014-11-06 07:10:11 -06:00
ZHU ZHU
0655583c91 Fix the argument order for openstack client
If there are --xxx argument placed for openstack clients such as
nova, glance, keystone etc, these arguments need to be placed before
the actual command line. Otherwise, the client will raise unrecognized
arguments exception which will make the command execution fail.

Change-Id: I1568f9332accffdfa3a34d8bbd842f707b1a340e
Closes-Bug: #1388147
2014-11-04 05:05:25 -06:00
Stephan Renatus
1a3c689d6d Add network-related CLI commands
This change introduced the ability to query UUIDs for Neutron entities:
routers, (sub)networks, etc.

To do so, the identity_uuid method was generalised and the image_id
method rewritten to make use of the new get_uuid method.

Change-Id: Idf9f4f04a8ca482ab23c0c667c3546437829690a
2014-06-26 10:45:16 +02:00
Matt Thompson
0742d2c9ee Add image_id method and update openstack_command
This change adds a new method to libraries/cli.rb which we will use
in new cookbook-openstack-integration-test to obtain a glance image id
from a glance image name.

Additionally, we've had to update openstack-command method to handle
situation where we have commands like "glance image-show <id|name>".
Currently, it only seems to work with commands like
"keystone user-list".

Change-Id: Ie4b063340e813ac50cbd4b21e41cc3fa65eebeca
2014-06-05 21:49:27 +01:00
Mark Vanderwiel
f121e39060 Add new cli method
Add new method for calling openstack clis
Add new method for getting uuid via cli
These methods are based upon the identity register provider ones
Add tests
Related change in network: I89dd47c802a544bdd998059b36884cb10f628223

Change-Id: I2b2f1d94dbd67550ad3a352c2205a532173f6065
Implements: blueprint neutron-icehouse-default-changes
2014-04-17 12:36:15 -05:00