36 Commits

Author SHA1 Message Date
Lance Albertson
df9900d25b CentOS 8 support
- Add yum-centos cookbook to deps
  - Enable PowerTools and RabbitMQ repositories on EL8
- Update various packages for EL8

Depends-On: https://review.opendev.org/c/openstack/openstack-chef/+/814234
Change-Id: Ife3165204d9ffee132a0daacd4a6f30c7d31378b
Signed-off-by: Lance Albertson <lance@osuosl.org>
2021-10-22 09:46:15 -07:00
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
Lance Albertson
849de5efdb Remove deprecated mysql attributes
Depends-On: https://review.opendev.org/716075
Change-Id: Ic6750ae4334315079dd51fccf54f595f278e79bc
2020-03-30 13:54:21 -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
Jens Harbott
d0c2aa8fba Use python3 packages on Ubuntu
Python2.7 is going EOL soon, let us deploy python3 for Rocky from the
start, so we avoid having to switch later.

Change-Id: I9cacde567f1d390311ac425649d6f6843abf929b
2019-11-21 10:47:19 +00:00
Samuel Cassiba
b2881c3a80 common refactor for Pike and Chef 13
- 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
2018-01-11 17:42:41 +00: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
Samuel Cassiba
479af11fd7 Fixes for Ocata, define socket for MySQL
- 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
2017-08-02 16:24:48 -04:00
Jan Klare
9e066bdf53 database and message queue refactoring
* adapted the database and message queue attributes to fit to the ones used for
  the openstack services
* added optional attribute to allow setting an specific endpoint for the db root
  user (useful in hardening scenarios)

Implements: blueprint cookbook-refactoring
Change-Id: Iae7e302973805af3cb44be1b29d0e61e76eb0aa0
2016-02-18 15:18:35 +01: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
JJ Asghar
9218fee097 Initial Liberty Updates
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
2015-08-28 09:43:49 -05:00
Min Min Ren
375cdcde14 Add database slave connection support
- Add new attributes for database slave connection
- Change db_uri method to generate slave connection db_uri

Implements: blueprint sql-slave-connection-support
Change-Id: I9996e4944e58264b5195d625c98adaf28a04acd7
2015-07-16 21:45:22 -05:00
Jan Klare
e7b8676b0d add support for percona-cluster as db backend
- added percona-cluster as option to the proper openstack attributes

Change-Id: I0ccdc6efbdfa3d72bdc63a49b3cd0fd1630babe1
Implements Blueprint: galera-and-percona-support
2015-07-06 10:28:24 +02:00
Min Min Ren
2785880a8c Add galera-mysql cluster support openstack-common
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
2015-06-16 20:35:11 -05: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
Chen Zhiwei
3804ad73ef Unify database attributes
This commit changed the default dashboard service database username from
dash to horizon, please be aware of this change.

Change-Id: Iddd032442577f0b6f14e79fed6110ec457aca562
2015-05-12 16:56:10 +08:00
Yi Ming Yin
566a228da4 Fix issue for python_packages
This bug is caused by commit https://review.openstack.org/#/c/155220/
Sections for python packages has been moved above, but at the last line
of attributes/default.rb. These packages will be reset to only contain
postgresql related things.

Closes-Bug: #1436682
Change-Id: Ic3eff66637e7f50eea43d7fd9065876976416702
2015-03-26 14:03:23 +08:00
Yi Ming Yin
79b561353f Add mariadb database support to openstack-common
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
2015-03-25 22:03:34 +08:00
wenchma
141a2a9e14 Add new attributes for openstack-bare-metal cookbook
Update to add the new attributes about database and mq to support
openstack-bare-metal cookbook.

blueprint bare-metal-enablement

Change-Id: I777d04e72cd1e67525716afcf7538d4662a5e204
2015-03-05 01:33:14 +00:00
Mark Vanderwiel
89c99e47be MySql cookbook ver 6 changes
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
2015-02-13 08:11:49 -06:00
ZHU ZHU
6719c02eaa Add db2 sqlalchemy packages for Debian path
If controller is with DB2 database backend, the Ubuntu compute node need to
have db2 related sqlalchemy python packages installed so as to connect to the
DB2 server. Stackforge cookbooks don't have full db2 support(install/configure)
for controller now, but by having common attributes like this, it would make
writing the wrapper cookbook easier.

Change-Id: Id73be715869a000ea9ef37bbdf9c0de273d8be21
2015-02-05 21:35:38 -06:00
Chen Zhiwei
f0e55b8742 Add database charset during create
When using MySQL, the database charset should be utf-8.

And the default charset is latin1, which will cause glance db sync
failed.

Closes-bug: #1356887
Change-Id: I50e299410de8068150d1c405994ecb96918fbc7d
2014-08-20 00:26:24 +00:00
Ionuț Arțăriși
d082f7b199 add python_packages attribute for sqlite
this is used by dashboard

Change-Id: I0dff44d05e27ee414c2c70a4515f5997754f2b8f
Blueprint: move-python-db-client-attrs-to-common
2014-06-25 10:47:36 +02:00
Ionuț Arțăriși
9a6f959c23 move python_packages attributes from dependent cookbooks
Move the database client python packages attributes from dependent
cookbooks in -common so we don't duplicate them everywhere.

Change-Id: If45621d31889a582dde62474c4b08f52905a277f
Implements: blueprint move-python-db-client-attrs-to-common
2014-06-17 18:20:03 +02:00
Ionuț Arțăriși
cf0db5598d add Trove attributes (mq, endpoints, database)
Change-Id: Idb112a2ad9ca8c064b5f023bf3e8916ee04f5857
2014-06-13 11:37:46 +02:00
Mark Vanderwiel
9c96ba893c Allow database connection options
Telemetry db2 case uses nosql connection string and this might
require additional connection options, like ?socketTimeoutMS=200
Added ability to specify db options for all db backends.

Change-Id: I41a577200824a7a5f0b735207df9596d92d034c9
Closes-bug: #1323733
2014-05-28 13:46:45 -05:00
Chris Dearborn
5299ec6586 Removed deprecated connection attributes
This is a follow up change set that removes the now deprecated
messaging and database cookbook connection attributes for host and
port.  These attributes have been replaced with corresponding
attributes in endpoints.

blueprint increase-ip-binding-flexibility

Change-Id: I2a8676155c6e71bd7ea92d1f33145d073cd899d1
2014-03-19 10:34:13 -04:00
Chen Zhiwei
e2a48b7013 Rename openstack-metering to openstack-telemetry
update cookbook attribute name, change metering to telemetry

Change-Id: I066001b38a236fdb84c5de4db13ddf0aa635868a
2014-03-13 02:51:05 -04:00
Chris Dearborn
f6da45d11f Add ability to specify IP for service
The problem that this change addresses is that the address_for method
will not work correctly if there are multiple IP address associated
with the specified interface.

The approach to solving this problem and moving towards the overall
goal of having one place where service networking information is
stored is to convert address_for calls into endpoints, and add a
address() method to the endpoints interface for IP address resolution.

The address() method has the following behavior: if the
bind_interface of an endpoint is set, then the IP is looked up on
the interface.  Otherwise, the IP specified in the host attribute is
returned.  This allows the caller to choose either method of
determining what IP a service will be bound to.

This initial change switches both the openstack-ops-database and
openstack-ops-messaging cookbooks over to use endpoints instead of
address_for.  The other cookbooks will be switched over time.

blueprint increase-ip-binding-flexibility

Change-Id: I527e4e734f3c1eea9ac2567e0a90524d78ee867e
2014-03-06 08:38:41 -05:00
Jenkins
8d0440a59d Merge "Add NoSQL database support for metering." 2014-02-28 01:50:43 +00:00
Jenkins
6270801dde Merge "Add attributes for cookbook-openstack-network" 2014-02-27 03:04:49 +00:00
ericzhou
f1755eac55 Add NoSQL database support for metering.
- Add two attributes to indicate whether NoSQL is used for metering
  database and the port used for NoSQL database.
- When database type is DB2, only NoSQL is supported and the SQL
  connection is not same to the one SQLAlchemy-based.

Change-Id: Icff805cee8e078f99ff46a59e290da60d2f9bb29
2014-02-26 22:35:57 +08:00
gengjh
95e315c11d Add attributes for cookbook-openstack-network
Add attributes for cookbook-openstack-network to sync the latest neutron
configuration for database.

Implements: blueprint neutron-ml2
Change-Id: I1fb5cf77ab7a2d700dbd72915fc30a7b176b8ca2
2014-02-26 09:18:13 +08:00
Ionuț Arțăriși
a66da5ace3 add dashboard migrate attribute
this will be used from the -dashboard cookbook

Change-Id: Ibb98ec431a88f94788125a77b52fbac86c1898bd
2014-02-21 10:25:09 +01:00
Matt Thompson
c741059eda Initial step to clean up db and mq attributes
Here we move db and mq attributes already present in default.rb
attributes into new files (database.rb,messaging.rb).  Additionally, we
pull in rabbit/mq attributes from
openstack-{block-storage,compute,image,metering,network} while
transforming namespace from openstack.SERVICE.mq and
openstack.SERVICE.rabbit to openstack.mq.SERVICE
and openstack.mq.SERVICE.rabbit.  Lastly, we copy
openstack.SERVICE.db.username attribute from
openstack-{compute,dashboard,identity,image,metering,network} while
transforming namespace to openstack.db.SERVICE.username.

Change-Id: I50c900aa2ba92ce53f4a6ad05aeabd59e701b514
Implements: blueprint clean-up-attr-for-mq-and-db
2014-01-24 08:54:12 +00:00