A change made in 16.5 causes an issue when trying to require `addressable/uri`.
This has been filed upstream with this issue [1]. As a workaround, it seems
using `autoload` fixes the problem.
[1] https://github.com/chef/chef/issues/10452
Change-Id: Iae337a8ff1784c46e8171fc54eb00ef28f11561a
Depends-On: https://review.opendev.org/753102
Signed-off-by: Lance Albertson <lance@osuosl.org>
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>
- 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
This updates the mariadb cookbook dependency which pulls in mariadb_user
and mariadb_database resources that do not require the mysql2 gem. In
addition, this removes all of the imported mysql libraries and resources.
Other fixes include:
- Rename openstack_common_database resource to openstack_database
- Convert LWRP to a custom resource
Change-Id: I723740b53fe772cf17e65acfb62d5f82e107b7ea
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.
Some additional fixes include:
- Add default['openstack']['common']['search_count_max'] attribute to allow speed
ups during testing.
- Improved a few tests
- Adjusted some formatting
- Remove deprecated ChefSpec::Coverage.start function
- Show warnings
- Use major version for redhat platform
- Update to Ubuntu 18.04
Speed was improved from 4 minutes 16 seconds to 41.98 seconds.
Change-Id: Icb9147036a01f92ec48a24c692dd022258e294c0
When using rabbit_transport_url in a multi node environment, the address
used is the bind_address if we do not use a mq cluster, where it should
be the rabbit server endpoint hostname, if not we can end up with some
transport_url configurations as rabbit://<...>@0.0.0.0:<...>, if the
rabbit server is configured to listen on all interfaces.
Change-Id: I617f54030ca3610638e6fd1bd3215dc2e7b23841
Signed-off-by: Manuel Torrinha <manuel.torrinha@tecnico.ulisboa.pt>
The two functions auth_uri_transform() and identity_uri_transform()
implicitly assume that the identity endpoint has no path component other
than 'v2.0'. This blocks modern deployment designs, so drop these
functions.
Probably will need some dependencies to clean up consumers of these
functions.
Change-Id: I711ff0c0f8d35c581d2a419debe50425ec0d51c2
- etcd does not take any arguments. the default is create.
- remove use_inline_resources in preparation for custom resources
Change-Id: Ic9c98978587cf81bfd430bd5b712cf537c3fb9a0
Depends-On: I161af1074cd17f2e3d2d2cf0b37a0c5fa1015fd3
- changed the default RDBMS to MariaDB in accordance with install docs[0]
- removed deprecated database, apt and yum cookbooks
- incorporated `database' and MySQL-specific abstractions from database
cookbook
- implemented foodcritic and cookstyle corrections
- deprecated node.foo.bar method access for node['foo']['bar'] bracket syntax
- updated default recipe for core apt resource
- use /etc/apt/apt.conf.d on Ubuntu instead of passing the dpkg overrides as
command line options in every cookbook
[0]: https://docs.openstack.org/install-guide/environment-sql-database.html
Implements blueprint modern-chef
Change-Id: I143e0ed0a2bdd76269fc0c402052696426d96d81
Depends-On: I00e2237cef0c9aa35f78d3ccec04a1c7b9271ce8
Depends-On: I7ee0f5eae4e79e5c70ee8de4a0094a7c34fdd18f
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
- 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
- bumped chefdk to 1.5
- bumped mariadb to 1.5
- style fixes to make rubocop/foodcritic happy
- rewrote metadata.rb for readability
- removed ancient Gemfile
- removed openshift rubygems mirror since it doesn't help us
Change-Id: I950605f384405b55737af77bc4224f1e18fee8e1
- added possibility to add more then one rabbit host
- edited rubocop constraints due to transport_url complexity
Change-Id: I9540b40c0dba46a62c21242b94089b81921700ca
- added rabbit_transport_url method to endpoints library
usage i.e for block-storage will be
node.default['openstack']['block-storage']['conf_secrets']
['DEFAULT']['transport_url'] = rabbit_transport_url 'block-storage'
Change-Id: I0a6da37e3f2b839590b6349fd906d47c5206fbb3
A prerequisite for Newton is to move to openstackclient for interfacing
with the OpenStack services.
Change-Id: I80a10bc1a3a50501306c16e278b960e43e9e9a59
Implements: blueprint openstackclient
* helper method bind_address should return the address for a given service
config, if an :interface is defined, it should return the address on the
interface, else it will just return the :host
Change-Id: I80ba506f7d9a745c3f4c47a78099199195abd9ad
* endpoint type (admin, internal, public) and service (identitiy, network etc.)
was switched during refactoring, this patch reverts this unintended switching
Change-Id: Iec485deaf415e4187a323435cce2b6bbadfc5d42
* 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
MetaData Changes:
- bump metadata version to 12
Other codes changes
- change juno to kilo where appropriate
- rubocop todo file updates
- removed db2 refs
Bootstrap Changes
- Updated to 0.7.0 release of the ChefDK
Change-Id: I65745eae2e430ced0c25e8f05dd490fdad840623
This will fail with a useful error message in case the interface we are
trying to get an address for does not exist. Currently the user will
only get an unspecific "undefined method [] for nil" error.
Change-Id: I392564324fb5203df3ce390aff990ff976058320
- added percona-cluster as option to the proper openstack attributes
Change-Id: I0ccdc6efbdfa3d72bdc63a49b3cd0fd1630babe1
Implements Blueprint: galera-and-percona-support
1. Add a new db service_type as 'galera'
2. Reuse compatible code for mysql to support 'galera'
Change-Id: I7de9a7eab3523d8acdf4627a571335b59be0e0ee
Implements: blueprint galera-and-percona-support
- defined lwrp openstack_common_database
- removed libraries/database.rb
- created _openstack_common_database_spec.rb recipe for testing the
provider
- comments for db2 in provider since this resource does not exist in any
availabe or linked opensource cookbook
- updated README.md
related-Change-Id: Idb47c9b7e3ce954ddd1a544b71b96eed734e46e5
Change-Id: I1940cd63aa1ae95586e6ecbed9476f7ce5fe19ab
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
- splitted the address_for method into address_for and get_address
- added the option to search for an address from another node
- added an optional filter for virtual ips in get_address
- refactored network specs
Change-Id: I4678969045b317071296b1d7dc8e7d13505f4db7
These small wrappers are now needed by other cookbooks. They
provide a easy way to create a clean spec test.
Will put these into the Common openstack library module namespace
for easy use across the cookbooks.
Added common role defintion for compute worker. Eventually all
the role definitions should be moved here.
Added new spec for these wrappers.
Change-Id: If548a9d63a42799e1401b18540878eca5ba2a0e1
Related-Bug: #1448255
Since duplicate sections are allowed within openstack conf files,
need to be able to handle them in some cases. The first case of
this is in network where the ml2 conf is including the openvswitch
conf within it and there are a couple dup sections. This
allows the spec tests to handle those cases.
Change-Id: I8d2733a248a6a13ab87c286ff620c71955726f86
Closes-Bug: #1444696
Starting on the identity_uri blueprint. A difference
between the public auth_uri and the admin identity_uri is that
the identity_uri does not include the path/version (/v2.0).
And the auth_uri has to modify the version depending upon
the needs of the environment.
There existed a helper routine called, auth_uri_transform, so
to be consistent and make this easy to follow, I created a
identity_uri_transform which simply removes the path/version
from the uri given.
This helper will then be used thru out the cookbooks to make
the switch to the identity_uri very easy.
I guess the alturnatives are messing with our generic endpoint
definitions/methods, but since they are used for many different
purposes, I think having another matching transform method is the
right way to go here.
Bumped version for adding new method which other cookbooks will
depend upon.
Change-Id: I035a4491945c600dea8feb317b357a1a69da28cd
Implements: blueprint identity-uri
1. Add a new db.service_type as 'mariadb'
2. Reuse compatible code for mysql to support mariadb
3. Set mariadb as default database type for RHEL family
Change-Id: Ib537dc921b6e9d05cb79ef3e95dac558a7180816
blueprint: mariadb-support
MetaData changes
- bump metadata versions to 11
Gemfile changes
- bump robocop to 0.29.1
- bump chef to 11.18.6 close to 12 but not quite (need infra changes for 12)
- bump berks to 3.2.1 to get fix for running twice (destination already exists)
Rubocop changes
- add .robucop_todo.yml for future cleanup
- rubocop --auto-gen-config and add an inherit_from: .rubocop_todo.yml in your .rubocop.yml
- add .bundle/**/* to .rubocop.yml
- add .cookbooks/**/* to robocop.yml
- fixup berks-cookbooks/** with /**/*
Changelog changes
- delete Changelog.rb
Other codes changes
- change juno to kilo where appropriate
- cleanup any obvious old deprecated code
Change-Id: I146aa7f7ba4024115c1297103e176a72336fbe5d
Partial-Bug: #1426424
mysql cookbook is now provider driver, and no longer has default
attributes, like server_root_password.
For the password, now always using the Common password methods.
Therefore the ['openstack']['db']['root_user_use_databag'] attribute
was removed, it's now the default path.
For the other mysql attributes we used, these were moved into the
ops-database cookbook. See that patch for more info.
This patch requires updates to the database and mysql-chef-gem cookbooks.
Change-Id: I817030cd7fb56cb025e1a8e21dc2b956b0ad7911
Implements: blueprint trusty-juno
I missed a commit with last change to this part. The
change was to make the resource unique, but the username attribute
was not added to the resource so it will fail.
Change-Id: I78e84078ab1f1e2919131a6a443a14d8815c02a6
Related-Bug: #1409921
There's a bug in the common library specific_endpoint routine that
was just merged. If there's a defined endpoint for any one of the
specified types ('internal', 'admin', 'public') it causes the code
to incorrectly think that any name of that same type actually
exists. This leads to an empty string being returned rather than
picking up the general endpoint.
For example:
['endpoints']['admin']['foo'] has been set
['endpoints']['bar'] has been set
The admin_endpoint('bar') routine should see that there's no 'bar'
under 'admin' and return the general endpoint. Instead, it's
returning an empty string simply because there's an 'admin' subhash
there for 'foo'.
Change-Id: Ifd4ee6108b4c7b0f66bd56cc817b5ea646e82a68
Partial-Bug: 1412919
Provide new endpoint routines for admin_endpoint, internal_endpoint,
and public_endpoint. These will allow folks to specify different URLs
for those endpoints if they wish.
This is the first part of the fix. After the routines have been merged,
I'll start working on using the routines in the various component
recipies.
Change-Id: I5b3b90324ee0f9bf6b2c5278ad60724856d43321
Partial-Bug: 1412919