Stein fixes

- Cookstyle fixes
- Update documentation
- Add myself as an author and add OSU for Copyright
- Update delivery configuration to exclude integration cookbooks

Depends-On: https://review.opendev.org/701027
Depends-On: https://review.opendev.org/706101
Change-Id: Ib2ccf949d5f5bced0f6efd32b09780469316b831
This commit is contained in:
Lance Albertson 2020-02-05 14:31:37 -08:00
parent 8747a1cf96
commit 93e7380abf
16 changed files with 49 additions and 79 deletions

View File

@ -1 +1,9 @@
remote_file = "https://raw.githubusercontent.com/chef-cookbooks/community_cookbook_tools/master/delivery/project.toml"
[local_phases]
unit = 'rspec spec/'
lint = 'cookstyle --display-cop-names --extra-details'
syntax = "berks install -e integration"
provision = "echo skipping"
deploy = "echo skipping"
smoke = "echo skipping"
functional = "echo skipping"
cleanup = "echo skipping"

View File

@ -1,5 +1,3 @@
inherit_from: .rubocop_todo.yml
AllCops:
Include:
- metadata.rb
@ -14,20 +12,3 @@ AllCops:
- .cookbooks/**/*
- berks-cookbooks/**/*
- .bundle/**/*
Encoding:
Exclude:
- metadata.rb
- Gemfile
NumericLiterals:
Enabled: false
StringLiterals:
Enabled: false
LineLength:
Enabled: false
WordArray:
MinSize: 3

View File

@ -1,13 +0,0 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2018-08-03 05:26:07 -0700 using RuboCop version 0.55.0.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.
# Offense count: 28
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
# URISchemes: http, https
Metrics/LineLength:
Max: 113

View File

@ -14,8 +14,8 @@ supports MySQL and PostgreSQL.
Requirements
============
- Chef 14 or higher
- ChefDK 3.2.30 for testing (also includes Berkshelf for cookbook
- Chef 15 or higher
- Chef Workstation 0.15.18 for testing (also includes Berkshelf for cookbook
dependency resolution)
Platforms
@ -33,7 +33,7 @@ The following cookbooks are dependencies:
- 'mariadb', '~> 1.5'
- 'mysql2_chef_gem' , '~> 2.0'
- 'mysql', '~> 8.2'
- 'openstack-common', '~> 18.0.0'
- 'openstack-common', '~> 19.0.0'
Usage
=====
@ -184,6 +184,8 @@ License and Author
+-----------------+---------------------------------------------------+
| **Author** | Jan Klare (j.klare@x-ion.de) |
+-----------------+---------------------------------------------------+
| **Author** | Lance Albertson (lance@osuosl.org) |
+-----------------+---------------------------------------------------+
+-----------------+---------------------------------------------------+
| **Copyright** | Copyright (c) 2012-2013, Rackspace US, Inc. |
@ -196,6 +198,8 @@ License and Author
+-----------------+---------------------------------------------------+
| **Copyright** | Copyright (c) 2014-2015, IBM, Corp. |
+-----------------+---------------------------------------------------+
| **Copyright** | Copyright (c) 2019-2020, Oregon State University |
+-----------------+---------------------------------------------------+
Licensed under the Apache License, Version 2.0 (the "License"); you may
not use this file except in compliance with the License. You may obtain

View File

@ -1,9 +1,9 @@
# encoding: UTF-8
#
# Cookbook Name:: openstack-ops-database
# Cookbook:: openstack-ops-database
# Recipe:: default
#
# Copyright 2013, AT&T Services, Inc.
# Copyright:: 2013, AT&T Services, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.

View File

@ -1,6 +1,6 @@
# encoding: UTF-8
#
# Cookbook Name:: openstack-ops-database
# Cookbook:: openstack-ops-database
# Recipe:: default
#
# Licensed under the Apache License, Version 2.0 (the "License");

View File

@ -3,27 +3,17 @@ maintainer 'openstack-chef'
maintainer_email 'openstack-discuss@lists.openstack.org'
license 'Apache-2.0'
description 'Provides the shared database configuration for OpenStack'
version '18.0.0'
recipe 'client', 'Installs client packages for the database used by the deployment.'
recipe 'server', 'Installs and configures server packages for the database used by the deployment.'
recipe 'mysql-client', 'Installs MySQL client packages.'
recipe 'mysql-server', 'Installs and configures MySQL server packages.'
recipe 'mariadb-client', 'Installs MariaDB client packages.'
recipe 'mariadb-server', 'Installs and configures MariaDB server packages.'
recipe 'mariadb-cluster-client', 'Installs MariaDB Cluster client packages.'
recipe 'mariadb-cluster-server', 'Installs and configures MariaDB Cluster server packages.'
recipe 'openstack-db', 'Creates necessary tables, users, and grants for OpenStack.'
version '19.0.0'
%w(ubuntu redhat centos).each do |os|
supports os
end
depends 'openstack-common', '>= 18.0.0'
depends 'openstack-common', '>= 19.0.0'
depends 'mariadb', '~> 3.1'
depends 'mysql', '~> 8.6'
issues_url 'https://launchpad.net/openstack-chef'
source_url 'https://opendev.org/openstack/cookbook-openstack-ops-database'
chef_version '>= 14.0'
chef_version '>= 15.0'

View File

@ -1,10 +1,10 @@
# encoding: UTF-8
#
# Cookbook Name:: openstack-ops-database
# Cookbook:: openstack-ops-database
# Recipe:: client
#
# Copyright 2013, Opscode, Inc.
# Copyright 2013, AT&T Services, Inc.
# Copyright:: 2013, Opscode, Inc.
# Copyright:: 2013, AT&T Services, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.

View File

@ -1,6 +1,6 @@
# encoding: UTF-8
#
# Cookbook Name:: openstack-ops-database
# Cookbook:: openstack-ops-database
# Recipe:: mariadb-client
#
# Licensed under the Apache License, Version 2.0 (the "License");

View File

@ -1,6 +1,6 @@
# encoding: UTF-8
#
# Cookbook Name:: openstack-ops-database
# Cookbook:: openstack-ops-database
# Recipe:: mariadb-cluster-client
#
# Licensed under the Apache License, Version 2.0 (the "License");

View File

@ -1,6 +1,6 @@
# encoding: UTF-8
#
# Cookbook Name:: openstack-ops-database
# Cookbook:: openstack-ops-database
# Recipe:: mariadb-cluster-server
#
# Licensed under the Apache License, Version 2.0 (the "License");
@ -25,22 +25,22 @@ end
bind_db = node['openstack']['bind_service']['db']
if bind_db['interface']
listen_address = address_for bind_db['interface']
node.normal['mariadb']['galera']['options']['port'] = bind_db['port']
node.default['mariadb']['galera']['options']['port'] = bind_db['port']
else
listen_address = bind_db['host']
node.normal['mariadb']['galera']['options']['port'] = node['openstack']['endpoints']['db']['port']
node.default['mariadb']['galera']['options']['port'] = node['openstack']['endpoints']['db']['port']
end
node.normal['mariadb']['galera']['options']['bind-address'] = listen_address
node.default['mariadb']['galera']['options']['bind-address'] = listen_address
## CLUSTER SPECIFIC CONFIG
node.normal['mariadb']['galera']['cluster_name'] = 'openstack'
node.normal['mariadb']['galera']['wsrep_provider_options']['gmcast.listen_addr'] = "tcp://#{listen_address}:4567"
node.default['mariadb']['galera']['cluster_name'] = 'openstack'
node.default['mariadb']['galera']['wsrep_provider_options']['gmcast.listen_addr'] = "tcp://#{listen_address}:4567"
### find all nodes in the mariadb cluster
cluster_nodes = search(:node, 'recipes:"openstack-ops-database\:\:mariadb-cluster-server"').sort
# if it's the first node make sure that wsrep_cluster_address is set to nothing to be able to bootstrap.
is_first_node = cluster_nodes.empty? || (cluster_nodes.size == 1 && cluster_nodes.first['fqdn'] == node['fqdn'])
if is_first_node
node.normal['mariadb']['galera']['gcomm_address'] = 'gcomm://'
node.default['mariadb']['galera']['gcomm_address'] = 'gcomm://'
else
# otherwise set the correct cluster address with all cluster nodes
family = node['openstack']['endpoints']['family']
@ -50,7 +50,7 @@ else
cluster_nodes_addresses << address
end
cluster_address = cluster_nodes_addresses.join(',')
node.normal['mariadb']['galera']['gcomm_address'] = "gcomm://#{cluster_address}"
node.default['mariadb']['galera']['gcomm_address'] = "gcomm://#{cluster_address}"
end
include_recipe 'openstack-ops-database::mariadb-client'

View File

@ -1,6 +1,6 @@
# encoding: UTF-8
#
# Cookbook Name:: openstack-ops-database
# Cookbook:: openstack-ops-database
# Recipe:: mariadb-server
#
# Licensed under the Apache License, Version 2.0 (the "License");

View File

@ -1,11 +1,11 @@
# encoding: UTF-8
#
# Cookbook Name:: openstack-ops-database
# Cookbook:: openstack-ops-database
# Recipe:: mysql-client
#
# Copyright 2013, Opscode, Inc.
# Copyright 2013, AT&T Services, Inc.
# Copyright 2014, SUSE Linux, GmbH
# Copyright:: 2013, Opscode, Inc.
# Copyright:: 2013, AT&T Services, Inc.
# Copyright:: 2014, SUSE Linux, GmbH
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.

View File

@ -1,11 +1,11 @@
# encoding: UTF-8
#
# Cookbook Name:: openstack-ops-database
# Cookbook:: openstack-ops-database
# Recipe:: mysql-server
#
# Copyright 2013, Opscode, Inc.
# Copyright 2012-2013, Rackspace US, Inc.
# Copyright 2013, AT&T Services, Inc.
# Copyright:: 2013, Opscode, Inc.
# Copyright:: 2012-2013, Rackspace US, Inc.
# Copyright:: 2013, AT&T Services, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.

View File

@ -1,9 +1,9 @@
# encoding: UTF-8
#
# Cookbook Name:: openstack-ops-database
# Cookbook:: openstack-ops-database
# Recipe:: openstack-db
#
# Copyright 2012-2013, AT&T Services, Inc.
# Copyright:: 2012-2013, AT&T Services, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.

View File

@ -1,10 +1,10 @@
# encoding: UTF-8
#
# Cookbook Name:: openstack-ops-database
# Cookbook:: openstack-ops-database
# Recipe:: server
#
# Copyright 2013, Opscode, Inc.
# Copyright 2013, AT&T Services, Inc.
# Copyright:: 2013, Opscode, Inc.
# Copyright:: 2013, AT&T Services, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.