Browse Source

adaptions to work with refactored cookbooks

* adapted mariadb, mysql and postgresql server recipes to work with net endpoint
  logic
* removed suse support

Depends-On: I0547182085eed91d05384fdd7734408a839a9a2c
Impements: blueprint cookbook-refactoring
Change-Id: Ia7fd927f42f4a1e484e8f2d34c52b1dc6d0ce6dd
Jan Klare 3 years ago
parent
commit
69ae909123

+ 3
- 3
metadata.rb View File

@@ -3,7 +3,7 @@ maintainer 'openstack-chef'
3 3
 maintainer_email 'openstack-dev@lists.openstack.org'
4 4
 license 'Apache 2.0'
5 5
 description 'Provides the shared database configuration for Chef for OpenStack.'
6
-version '12.0.0'
6
+version '13.0.0'
7 7
 
8 8
 recipe 'client', 'Installs client packages for the database used by the deployment.'
9 9
 recipe 'server', 'Installs and configures server packages for the database used by the deployment.'
@@ -15,7 +15,7 @@ recipe 'postgresql-client', 'Installs PostgreSQL client packages.'
15 15
 recipe 'postgresql-server', 'Installs and configures PostgreSQL server packages.'
16 16
 recipe 'openstack-db', 'Creates necessary tables, users, and grants for OpenStack.'
17 17
 
18
-%w(fedora ubuntu redhat centos suse).each do |os|
18
+%w(ubuntu redhat centos).each do |os|
19 19
   supports os
20 20
 end
21 21
 
@@ -24,4 +24,4 @@ depends 'mysql', '~> 6.0.13'
24 24
 depends 'mysql2_chef_gem', '~> 1.0.1'
25 25
 depends 'postgresql', '~> 3.4.18'
26 26
 depends 'database', '~> 4.0.2'
27
-depends 'openstack-common', '>= 12.0.0'
27
+depends 'openstack-common', '>= 13.0.0'

+ 1
- 1
recipes/mariadb-server.rb View File

@@ -20,7 +20,7 @@ class ::Chef::Recipe # rubocop:disable Documentation
20 20
   include ::Openstack
21 21
 end
22 22
 
23
-db_endpoint = endpoint 'db'
23
+db_endpoint = node['openstack']['endpoints']['db']
24 24
 super_password = get_password 'user', node['openstack']['db']['root_user_key']
25 25
 
26 26
 node.override['mariadb']['allow_root_pass_change'] = true

+ 1
- 1
recipes/mysql-server.rb View File

@@ -24,7 +24,7 @@ class ::Chef::Recipe # rubocop:disable Documentation
24 24
   include ::Openstack
25 25
 end
26 26
 
27
-db_endpoint = endpoint 'db'
27
+db_endpoint = node['openstack']['endpoints']['db']
28 28
 
29 29
 super_password = get_password 'user', node['openstack']['db']['root_user_key']
30 30
 

+ 1
- 1
recipes/postgresql-server.rb View File

@@ -25,7 +25,7 @@ class ::Chef::Recipe # rubocop:disable Documentation
25 25
   include ::Openstack
26 26
 end
27 27
 
28
-db_endpoint = endpoint 'db'
28
+db_endpoint = node['openstack']['endpoints']['db']
29 29
 
30 30
 node.override['postgresql']['config']['listen_addresses'] = db_endpoint.host
31 31
 

+ 1
- 1
spec/mariadb-client-redhat_spec.rb View File

@@ -3,7 +3,7 @@
3 3
 require_relative 'spec_helper'
4 4
 
5 5
 describe 'openstack-ops-database::mariadb-client' do
6
-  describe 'suse' do
6
+  describe 'redhat' do
7 7
     let(:runner) { ChefSpec::SoloRunner.new(REDHAT_OPTS) }
8 8
     let(:node) do
9 9
       runner.node.set['openstack']['db']['service_type'] = 'mariadb'

+ 0
- 18
spec/mariadb-client-suse_spec.rb View File

@@ -1,18 +0,0 @@
1
-# encoding: UTF-8
2
-
3
-require_relative 'spec_helper'
4
-
5
-describe 'openstack-ops-database::mariadb-client' do
6
-  describe 'suse' do
7
-    let(:runner) { ChefSpec::SoloRunner.new(SUSE_OPTS) }
8
-    let(:node) do
9
-      runner.node.set['openstack']['db']['service_type'] = 'mariadb'
10
-      runner.node
11
-    end
12
-    let(:chef_run) { runner.converge(described_recipe) }
13
-
14
-    it 'installs mariadb python client packages' do
15
-      expect(chef_run).to install_package('python-mysql')
16
-    end
17
-  end
18
-end

+ 0
- 15
spec/mysql-client-suse_spec.rb View File

@@ -1,15 +0,0 @@
1
-# encoding: UTF-8
2
-
3
-require_relative 'spec_helper'
4
-
5
-describe 'openstack-ops-database::mysql-client' do
6
-  describe 'suse' do
7
-    let(:runner) { ChefSpec::SoloRunner.new(SUSE_OPTS) }
8
-    let(:node) { runner.node }
9
-    let(:chef_run) { runner.converge(described_recipe) }
10
-
11
-    it 'installs mysql packages' do
12
-      expect(chef_run).to install_package('python-mysql')
13
-    end
14
-  end
15
-end

+ 0
- 5
spec/spec_helper.rb View File

@@ -5,11 +5,6 @@ require 'chefspec/berkshelf'
5 5
 ChefSpec::Coverage.start! { add_filter 'openstack-ops-database' }
6 6
 
7 7
 LOG_LEVEL = :fatal
8
-SUSE_OPTS = {
9
-  platform: 'suse',
10
-  version: '11.3',
11
-  log_level: ::LOG_LEVEL
12
-}
13 8
 REDHAT_OPTS = {
14 9
   platform: 'redhat',
15 10
   version: '7.1',

Loading…
Cancel
Save