Remove support for puppet-ceph

Deployment of a managed Ceph cluster using puppet-ceph
is not supported from the Pike release. From Queens it
is not supported use of puppet-ceph when using an
external Ceph cluster either.

This change removes the old manifests necessary to
support deployment of Ceph via puppet-ceph.

Templates removed by I17b94e8023873f3129a55e69efd751be0674dfcb

Depends-On: I8b22917e7436084028ef4fbe7604d28d6a68bee0
Implements: blueprint remove-puppet-ceph
Change-Id: I052af1f755b40a5fefa1f8d37e62b6b36c931271
This commit is contained in:
Giulio Fidente 2018-05-23 15:20:52 +02:00
parent 19114034ea
commit c796ed32f7
25 changed files with 13 additions and 1017 deletions

View File

@ -1,83 +0,0 @@
# Copyright 2016 Red Hat, Inc.
#
# 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
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# == Class: tripleo::profile::base::ceph
#
# Ceph base profile for tripleo
#
# === Parameters
#
# [*ceph_mon_initial_members*]
# (Optional) List of IP addresses to use as mon_initial_members
# Defaults to hiera('ceph_mon_short_node_names')
#
# [*ceph_mon_host*]
# (Optional) List of IP addresses to use as mon_host
# Deftauls to hiera('ceph_mon_node_ips')
#
# [*enable_ceph_storage*]
# (Optional) enable_ceph_storage
# Deprecated: defaults to false
#
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
# for more details.
# Defaults to hiera('step')
#
class tripleo::profile::base::ceph (
$ceph_mon_initial_members = hiera('ceph_mon_short_node_names', undef),
$ceph_mon_host = hiera('ceph_mon_node_ips', '127.0.0.1'),
$enable_ceph_storage = false,
$step = Integer(hiera('step')),
) {
if ! $ceph_mon_initial_members {
$ceph_mon_initial_members_real = hiera('ceph_mon_node_names', undef)
} else {
$ceph_mon_initial_members_real = $ceph_mon_initial_members
}
if $step >= 2 {
if $ceph_mon_initial_members_real {
if is_array($ceph_mon_initial_members_real) {
$mon_initial_members = downcase(join($ceph_mon_initial_members_real, ','))
} else {
$mon_initial_members = downcase($ceph_mon_initial_members_real)
}
} else {
$mon_initial_members = undef
}
if is_array($ceph_mon_host) {
if is_ipv6_address($ceph_mon_host[0]) {
$mon_host = join(enclose_ipv6($ceph_mon_host), ',')
} else {
$mon_host = join($ceph_mon_host, ',')
}
} else {
$mon_host = $ceph_mon_host
}
class { '::ceph::profile::params':
mon_initial_members => $mon_initial_members,
mon_host => $mon_host,
}
include ::ceph::conf
}
# TODO: deprecated boolean
if $enable_ceph_storage {
include ::tripleo::profile::base::ceph::osd
}
}

View File

@ -1,34 +0,0 @@
# Copyright 2016 Red Hat, Inc.
#
# 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
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# == Class: tripleo::profile::base::ceph::client
#
# Ceph client profile for tripleo
#
# === Parameters
#
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
# for more details.
# Defaults to hiera('step')
#
class tripleo::profile::base::ceph::client (
$step = Integer(hiera('step')),
) {
include ::tripleo::profile::base::ceph
if $step >= 2 {
include ::ceph::profile::client
}
}

View File

@ -1,40 +0,0 @@
# Copyright 2016 Red Hat, Inc.
#
# 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
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# == Class: tripleo::profile::base::ceph::mds
#
# Ceph MDS profile for tripleo
#
# === Parameters
#
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
# for more details.
# Defaults to hiera('step')
#
class tripleo::profile::base::ceph::mds (
$step = Integer(hiera('step')),
) {
include ::tripleo::profile::base::ceph
if $step >= 3 {
include ::ceph::profile::mds
}
# when deploying mds, create also cephfs which is used by manila
if $step >= 4 {
include ::ceph::profile::fs
}
}

View File

@ -1,49 +0,0 @@
# Copyright 2016 Red Hat, Inc.
#
# 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
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# == Class: tripleo::profile::base::ceph::mon
#
# Ceph Monitor profile for tripleo
#
# === Parameters
#
# [*ceph_pools*]
# (Optional) Hash of pools to create
# Example with hiera:
# tripleo::profile::base::ceph::mon::ceph_pools:
# mypool:
# size: 5
# pg_num: 128
# pgp_num: 128
# Defaults to {}
#
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
# for more details.
# Defaults to hiera('step')
#
class tripleo::profile::base::ceph::mon (
$ceph_pools = {},
$step = Integer(hiera('step')),
) {
include ::tripleo::profile::base::ceph
if $step >= 2 {
include ::ceph::profile::mon
}
if $step >= 4 {
create_resources('ceph::pool', $ceph_pools)
}
}

View File

@ -1,53 +0,0 @@
# Copyright 2016 Red Hat, Inc.
#
# 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
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# == Class: tripleo::profile::base::ceph::osd
#
# Ceph OSD profile for tripleo
#
# === Parameters
#
# [*ceph_osd_selinux_permissive*]
# (Optional) Wheter to configure SELinux in permissive mode
# Default to false
#
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
# for more details.
# Defaults to hiera('step')
#
class tripleo::profile::base::ceph::osd (
$ceph_osd_selinux_permissive = false,
$step = Integer(hiera('step')),
) {
include ::tripleo::profile::base::ceph
if $step >= 3 {
if $ceph_osd_selinux_permissive {
exec { 'set selinux to permissive on boot':
command => "sed -ie 's/^SELINUX=.*/SELINUX=permissive/' /etc/selinux/config",
onlyif => "test -f /etc/selinux/config && ! grep '^SELINUX=permissive' /etc/selinux/config",
path => ['/usr/bin', '/usr/sbin'],
}
exec { 'set selinux to permissive':
command => 'setenforce 0',
onlyif => "which setenforce && getenforce | grep -i 'enforcing'",
path => ['/usr/bin', '/usr/sbin'],
} -> Class['ceph::profile::osd']
}
include ::ceph::profile::osd
}
}

View File

@ -1,100 +0,0 @@
# Copyright 2016 Red Hat, Inc.
#
# 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
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# == Class: tripleo::profile::base::ceph::rgw
#
# Ceph RadosGW profile for tripleo
#
# === Parameters
#
# [*civetweb_bind_ip*]
# IP address where to bind the RGW civetweb instance
# (Optional) Defaults to 127.0.0.1
#
# [*civetweb_bind_port*]
# PORT where to bind the RGW civetweb instance
# (Optional) Defaults to 8080
#
# [*keystone_admin_token*]
# The keystone admin token
#
# [*rgw_keystone_version*] The api version for keystone.
# Possible values 'v2.0', 'v3'
# Optional. Default is 'v2.0'
#
# [*keystone_url*]
# The internal or admin url for keystone
#
# [*rgw_key*]
# The cephx key for the RGW client service
#
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
# for more details.
# Defaults to hiera('step')
#
class tripleo::profile::base::ceph::rgw (
$keystone_admin_token,
$keystone_url,
$rgw_key,
$civetweb_bind_ip = '127.0.0.1',
$civetweb_bind_port = '8080',
$rgw_keystone_version = 'v2.0',
$step = Integer(hiera('step')),
) {
include ::tripleo::profile::base::ceph
if $step >= 3 {
$rgw_name = hiera('ceph::profile::params::rgw_name', 'radosgw.gateway')
$civetweb_bind_ip_real = normalize_ip_for_uri($civetweb_bind_ip)
include ::ceph::params
include ::ceph::profile::client
ceph::rgw { $rgw_name:
frontend_type => 'civetweb',
rgw_frontends => "civetweb port=${civetweb_bind_ip_real}:${civetweb_bind_port}",
user => 'ceph',
}
ceph::key { "client.${rgw_name}":
secret => $rgw_key,
cap_mon => 'allow *',
cap_osd => 'allow *',
inject => true,
}
}
if $step >= 4 {
if $rgw_keystone_version == 'v2.0' {
ceph::rgw::keystone { $rgw_name:
rgw_keystone_accepted_roles => ['admin', 'Member'],
use_pki => false,
rgw_keystone_admin_token => $keystone_admin_token,
rgw_keystone_url => $keystone_url,
user => 'ceph',
rgw_keystone_revocation_interval => 0,
}
}
else
{
ceph::rgw::keystone { $rgw_name:
rgw_keystone_accepted_roles => ['admin', 'Member'],
use_pki => false,
rgw_keystone_url => $keystone_url,
rgw_keystone_version => $rgw_keystone_version,
user => 'ceph',
rgw_keystone_revocation_interval => 0,
}
}
}
}

View File

@ -14,7 +14,7 @@
#
# == Class: tripleo::profile::base::cinder::backup::swift
#
# Cinder Backup Ceph profile for tripleo
# Cinder Backup Swift profile for tripleo
#
# === Parameters
#

View File

@ -205,7 +205,6 @@ class tripleo::profile::base::cinder::volume (
command => "setfacl -m u:cinder:r-- /etc/ceph/ceph.client.${cinder_rbd_client_name}.keyring",
unless => "getfacl /etc/ceph/ceph.client.${cinder_rbd_client_name}.keyring | grep -q user:cinder:r--",
}
Ceph::Key<| title == "client.${cinder_rbd_client_name}" |> -> Exec["exec-setfacl-${cinder_rbd_client_name}-cinder"]
$cinder_rbd_extra_pools = hiera('tripleo::profile::base::cinder::volume::rbd::cinder_rbd_extra_pools', undef)
if $cinder_rbd_extra_pools {

View File

@ -41,7 +41,7 @@
#
# [*cinder_rbd_secret_uuid*]
# (Optional) UUID of the of the libvirt secret storing the Cephx key
# Defaults to 'ceph::profile::params::fsid'
# Defaults to undef
#
# [*cinder_rbd_user_name*]
# (Optional) The user name for the RBD client
@ -58,7 +58,7 @@ class tripleo::profile::base::cinder::volume::rbd (
$cinder_rbd_ceph_conf = hiera('cinder::backend::rbd::rbd_ceph_conf', '/etc/ceph/ceph.conf'),
$cinder_rbd_pool_name = 'volumes',
$cinder_rbd_extra_pools = undef,
$cinder_rbd_secret_uuid = hiera('ceph::profile::params::fsid', undef),
$cinder_rbd_secret_uuid = undef,
$cinder_rbd_user_name = 'openstack',
$step = Integer(hiera('step')),
) {

View File

@ -190,7 +190,6 @@ class tripleo::profile::base::glance::api (
command => "setfacl -m u:glance:r-- /etc/ceph/ceph.client.${glance_rbd_client_name}.keyring",
unless => "getfacl /etc/ceph/ceph.client.${glance_rbd_client_name}.keyring | grep -q user:glance:r--",
}
Ceph::Key<| title == "client.${glance_rbd_client_name}" |> -> Exec["exec-setfacl-${glance_rbd_client_name}-glance"]
}
'cinder': { $backend_store = 'cinder' }
default: { fail('Unrecognized glance_backend parameter.') }

View File

@ -151,7 +151,6 @@ class tripleo::profile::base::gnocchi::api (
command => "setfacl -m u:gnocchi:r-- /etc/ceph/ceph.client.${gnocchi_rbd_client_name}.keyring",
unless => "getfacl /etc/ceph/ceph.client.${gnocchi_rbd_client_name}.keyring | grep -q user:gnocchi:r--",
}
Ceph::Key<| title == "client.${gnocchi_rbd_client_name}" |> -> Exec["exec-setfacl-${gnocchi_rbd_client_name}-gnocchi"]
}
default: { fail('Unrecognized gnocchi_backend parameter.') }
}

View File

@ -147,7 +147,6 @@ class tripleo::profile::base::manila::share (
command => "setfacl -m u:manila:r-- ${keyring_path}",
unless => "getfacl ${keyring_path} | grep -q user:manila:r--",
}
Ceph::Key<| title == "client.${cephfs_auth_id}" |> -> Exec["exec-setfacl-${cephfs_auth_id}"]
}
# manila netapp:

View File

@ -42,7 +42,6 @@ class tripleo::profile::base::nova::compute_libvirt_shared (
command => "setfacl -m u:nova:r-- /etc/ceph/ceph.client.${nova_rbd_client_name}.keyring",
unless => "getfacl /etc/ceph/ceph.client.${nova_rbd_client_name}.keyring | grep -q user:nova:r--",
}
Ceph::Key<| title == "client.${nova_rbd_client_name}" |> -> Exec["exec-setfacl-${nova_rbd_client_name}-nova"]
}
if $rbd_ephemeral_storage {

View File

@ -1,98 +0,0 @@
# Copyright 2016 Red Hat, Inc.
#
# 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
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# == Class: tripleo::profile::pacemaker::ceph::rbdmirror
#
# Ceph RBD mirror Pacemaker profile for tripleo
#
# === Parameters
#
# [*bootstrap_node*]
# (Optional) The hostname of the node responsible for bootstrapping tasks
# Defaults to hiera('ceph_rbdmirror_bootstrap_short_node_name')
#
# [*client_name*]
# (Optional) Name assigned to the RBD mirror client
# Defaults to 'rbd-mirror'
#
# [*pcs_tries*]
# (Optional) The number of times pcs commands should be retried.
# Defaults to hiera('pcs_tries', 20)
#
# [*stack_action*]
# (Optional) Action executed on the stack. See tripleo-heat-templates
# for more details.
# Defaults to hiera('stack_action')
#
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
# for more details.
# Defaults to hiera('step')
#
class tripleo::profile::pacemaker::ceph::rbdmirror (
$bootstrap_node = hiera('ceph_rbdmirror_short_bootstrap_node_name'),
$client_name = 'openstack',
$pcs_tries = hiera('pcs_tries', 20),
$stack_action = hiera('stack_action'),
$step = Integer(hiera('step')),
) {
Service <| tag == 'ceph-rbd-mirror' |> {
hasrestart => true,
restart => '/bin/true',
start => '/bin/true',
stop => '/bin/true',
}
if $::hostname == downcase($bootstrap_node) {
$pacemaker_master = true
} else {
$pacemaker_master = false
}
include ::tripleo::profile::base::ceph
if $step >= 2 {
pacemaker::property { 'ceph-rbdmirror-role-node-property':
property => 'ceph-rbdmirror-role',
value => true,
tries => $pcs_tries,
node => $::hostname,
}
}
if $step >= 3 {
require ::ceph::profile::client
ceph::mirror { $client_name:
rbd_mirror_enable => false,
rbd_mirror_ensure => 'stopped',
}
-> pacemaker::resource::service { "ceph-rbd-mirror_${client_name}":
# NOTE(gfidente): systemd uses the @ sign but it is an invalid
# character in a pcmk resource name, so we need to use it only
# for the name of the service
service_name => "ceph-rbd-mirror@${client_name}",
tries => $pcs_tries,
location_rule => {
resource_discovery => 'exclusive',
score => 0,
expression => ['ceph-rbdmirror-role eq true'],
}
}
}
if $step >= 3 and $pacemaker_master and $stack_action == 'UPDATE' {
Ceph_config<||> ~> Tripleo::Pacemaker::Resource_restart_flag["ceph-rbd-mirror@${client_name}"]
tripleo::pacemaker::resource_restart_flag { "ceph-rbd-mirror@${client_name}": }
}
}

View File

@ -25,7 +25,6 @@
"dependencies": [
{ "name": "puppetlabs/stdlib", "version_requirement": ">= 4.12.0 < 5.0.0" },
{ "name": "sensu/sensu" },
{ "name": "yelp/uchiwa" },
{ "name": "openstack/ceph"}
{ "name": "yelp/uchiwa" }
]
}

View File

@ -0,0 +1,9 @@
---
deprecations:
- |
Deployment of a managed Ceph cluster using puppet-ceph
is not supported from the Pike release. From the Queens
release it is not supported to use puppet-ceph when
configuring OpenStack with an external Ceph cluster.
In Rocky any support file necessary for the deployment
with puppet-ceph is removed completely.

View File

@ -1,59 +0,0 @@
#
# Copyright (C) 2016 Red Hat, Inc.
#
# 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
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
require 'spec_helper'
describe 'tripleo::profile::base::ceph::client' do
shared_examples_for 'tripleo::profile::base::ceph::client' do
let (:pre_condition) do
<<-eof
class { '::tripleo::profile::base::ceph':
step => #{params[:step]}
}
eof
end
context 'with step less than 2' do
let(:params) { { :step => 1 } }
it 'should do nothing' do
is_expected.to contain_class('tripleo::profile::base::ceph::client')
is_expected.to contain_class('tripleo::profile::base::ceph')
is_expected.to_not contain_class('ceph::profile::client')
end
end
context 'with step 2' do
let(:params) { {
:step => 2,
} }
it 'should include client configuration' do
is_expected.to contain_class('tripleo::profile::base::ceph')
is_expected.to contain_class('ceph::profile::client')
end
end
end
on_supported_os.each do |os, facts|
context "on #{os}" do
let(:facts) do
facts.merge({ :hostname => 'node.example.com' })
end
it_behaves_like 'tripleo::profile::base::ceph::client'
end
end
end

View File

@ -1,59 +0,0 @@
#
# Copyright (C) 2016 Red Hat, Inc.
#
# 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
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
require 'spec_helper'
describe 'tripleo::profile::base::ceph::mds' do
shared_examples_for 'tripleo::profile::base::ceph::mds' do
let (:pre_condition) do
<<-eof
class { '::tripleo::profile::base::ceph':
step => #{params[:step]}
}
eof
end
context 'with step less than 3' do
let(:params) { { :step => 2 } }
it 'should do nothing' do
is_expected.to contain_class('tripleo::profile::base::ceph')
is_expected.to_not contain_class('ceph::profile::mds')
end
end
context 'with step 3' do
let(:params) { {
:step => 3,
} }
it 'should include mds configuration' do
is_expected.to contain_class('tripleo::profile::base::ceph')
is_expected.to contain_class('ceph::profile::mds')
end
end
end
on_supported_os.each do |os, facts|
context "on #{os}" do
let(:facts) do
facts.merge({ :hostname => 'node.example.com' })
end
it_behaves_like 'tripleo::profile::base::ceph::mds'
end
end
end

View File

@ -1,77 +0,0 @@
#
# Copyright (C) 2016 Red Hat, Inc.
#
# 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
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
require 'spec_helper'
describe 'tripleo::profile::base::ceph::mon' do
shared_examples_for 'tripleo::profile::base::ceph::mon' do
let (:pre_condition) do
<<-eof
class { '::tripleo::profile::base::ceph':
step => #{params[:step]}
}
eof
end
context 'with step less than 2' do
let(:params) { { :step => 1 } }
it 'should do nothing' do
is_expected.to contain_class('tripleo::profile::base::ceph::mon')
is_expected.to contain_class('tripleo::profile::base::ceph')
is_expected.to_not contain_class('ceph::profile::mon')
end
end
context 'with step 2' do
let(:params) { {
:step => 2,
} }
it 'should include mon configuration' do
is_expected.to contain_class('tripleo::profile::base::ceph')
is_expected.to contain_class('ceph::profile::mon')
end
end
context 'with step 4 create pools' do
let(:params) { {
:step => 4,
:ceph_pools => { 'mypool' => { 'size' => 5, 'pg_num' => 128, 'pgp_num' => 128 } }
} }
it 'should include mon configuration' do
is_expected.to contain_class('tripleo::profile::base::ceph')
is_expected.to contain_class('ceph::profile::mon')
is_expected.to contain_ceph__pool('mypool').with({
:size => 5,
:pg_num => 128,
:pgp_num => 128
})
end
end
end
on_supported_os.each do |os, facts|
context "on #{os}" do
let(:facts) do
facts.merge({ :hostname => 'node.example.com' })
end
it_behaves_like 'tripleo::profile::base::ceph::mon'
end
end
end

View File

@ -1,75 +0,0 @@
#
# Copyright (C) 2016 Red Hat, Inc.
#
# 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
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
require 'spec_helper'
describe 'tripleo::profile::base::ceph::osd' do
shared_examples_for 'tripleo::profile::base::ceph::osd' do
let (:pre_condition) do
<<-eof
class { '::tripleo::profile::base::ceph':
step => #{params[:step]}
}
eof
end
context 'with step less than 3' do
let(:params) { { :step => 1 } }
it 'should do nothing' do
is_expected.to contain_class('tripleo::profile::base::ceph::osd')
is_expected.to contain_class('tripleo::profile::base::ceph')
is_expected.to_not contain_class('ceph::profile::osd')
end
end
context 'with step 3 defaults' do
let(:params) { {
:step => 3,
} }
it 'should include osd configuration' do
is_expected.to contain_class('tripleo::profile::base::ceph')
is_expected.to contain_class('ceph::profile::osd')
is_expected.to_not contain_exec('set selinux to permissive on boot')
is_expected.to_not contain_exec('set selinux to permissive')
end
end
context 'with step 3 enable selinux permissive' do
let(:params) { {
:step => 3,
:ceph_osd_selinux_permissive => true
} }
it 'should include osd configuration' do
is_expected.to contain_class('tripleo::profile::base::ceph')
is_expected.to contain_class('ceph::profile::osd')
is_expected.to contain_exec('set selinux to permissive on boot')
is_expected.to contain_exec('set selinux to permissive')
end
end
end
on_supported_os.each do |os, facts|
context "on #{os}" do
let(:facts) do
facts.merge({ :hostname => 'node.example.com' })
end
it_behaves_like 'tripleo::profile::base::ceph::osd'
end
end
end

View File

@ -1,112 +0,0 @@
#
# Copyright (C) 2016 Red Hat, Inc.
#
# 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
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
require 'spec_helper'
describe 'tripleo::profile::base::ceph::rgw' do
shared_examples_for 'tripleo::profile::base::ceph::rgw' do
let (:pre_condition) do
<<-eof
class { '::tripleo::profile::base::ceph':
step => #{params[:step]}
}
eof
end
let (:default_params) do
{
:keystone_admin_token => 'token',
:keystone_url => 'url',
:rgw_key => 'key',
:civetweb_bind_ip => '2001:db8:0:1234:0:567:8:1',
:civetweb_bind_port => '8888',
}
end
context 'with step less than 3' do
let(:params) { default_params.merge({ :step => 1 }) }
it 'should do nothing' do
is_expected.to contain_class('tripleo::profile::base::ceph::rgw')
is_expected.to contain_class('tripleo::profile::base::ceph')
is_expected.to_not contain_class('ceph::rgw')
end
end
context 'with step 3' do
let(:params) { default_params.merge({ :step => 3 }) }
it 'should include rgw configuration' do
is_expected.to contain_class('tripleo::profile::base::ceph')
is_expected.to contain_ceph__rgw('radosgw.gateway').with(
:frontend_type => 'civetweb',
:rgw_frontends => 'civetweb port=[2001:db8:0:1234:0:567:8:1]:8888'
)
is_expected.to contain_ceph__key('client.radosgw.gateway').with(
:secret => 'key',
:cap_mon => 'allow *',
:cap_osd => 'allow *',
:inject => true
)
is_expected.to_not contain_ceph__rgw__keystone('radosgw.gateway')
end
end
context 'with step 4' do
let(:params) { default_params.merge({ :step => 4 }) }
it 'should include rgw configuration' do
is_expected.to contain_class('tripleo::profile::base::ceph')
is_expected.to contain_ceph__rgw('radosgw.gateway').with(
:frontend_type => 'civetweb',
:rgw_frontends => 'civetweb port=[2001:db8:0:1234:0:567:8:1]:8888'
)
is_expected.to contain_ceph__key('client.radosgw.gateway').with(
:secret => 'key',
:cap_mon => 'allow *',
:cap_osd => 'allow *',
:inject => true
)
is_expected.to contain_ceph__rgw__keystone('radosgw.gateway').with(
:rgw_keystone_accepted_roles => ['admin', 'Member'],
:use_pki => false,
:rgw_keystone_admin_token => 'token',
:rgw_keystone_url => 'url',
:rgw_keystone_revocation_interval => 0
)
end
end
context 'with step 4 and keystone v3' do
let(:params) { default_params.merge({ :step => 4, :rgw_keystone_version => 'v3' }) }
it 'should include rgw configuration' do
is_expected.to contain_ceph__rgw__keystone('radosgw.gateway').with(
:rgw_keystone_accepted_roles => ["admin", "Member"],
:use_pki => false,
:rgw_keystone_url => 'url',
:rgw_keystone_revocation_interval => 0
)
end
end
end
on_supported_os.each do |os, facts|
context "on #{os}" do
let(:facts) do
facts.merge({ :hostname => 'node.example.com' })
end
it_behaves_like 'tripleo::profile::base::ceph::rgw'
end
end
end

View File

@ -1,99 +0,0 @@
#
# Copyright (C) 2016 Red Hat, Inc.
#
# 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
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
require 'spec_helper'
describe 'tripleo::profile::base::ceph' do
shared_examples_for 'tripleo::profile::base::ceph' do
context 'with step less than 2' do
let(:params) { { :step => 1 } }
it 'should do nothing' do
is_expected.to contain_class('tripleo::profile::base::ceph')
is_expected.to_not contain_class('ceph::conf')
is_expected.to_not contain_class('ceph::profile::params')
end
end
context 'with step 2' do
let(:params) { {
:step => 2,
} }
it 'should trigger complete configuration' do
is_expected.to contain_class('ceph::profile::params').with(
:mon_initial_members => nil,
:mon_host => '127.0.0.1'
)
is_expected.to contain_class('ceph::conf')
end
end
context 'with step 2 with initial members' do
let(:params) { {
:step => 2,
:ceph_mon_initial_members => [ 'monA', 'monB', 'monc' ]
} }
it 'should trigger complete configuration' do
is_expected.to contain_class('ceph::profile::params').with(
:mon_initial_members => 'mona,monb,monc',
:mon_host => '127.0.0.1'
)
is_expected.to contain_class('ceph::conf')
end
end
context 'with step 2 with ipv4 mon host' do
let(:params) { {
:step => 2,
:ceph_mon_host => ['10.0.0.1', '10.0.0.2']
} }
it 'should trigger complete configuration' do
is_expected.to contain_class('ceph::profile::params').with(
:mon_initial_members => nil,
:mon_host => '10.0.0.1,10.0.0.2'
)
is_expected.to contain_class('ceph::conf')
end
end
context 'with step 2 with ipv6 mon host' do
let(:params) { {
:step => 2,
:ceph_mon_host => ['fe80::fc54:ff:fe9e:7846', '10.0.0.2']
} }
it 'should trigger complete configuration' do
is_expected.to contain_class('ceph::profile::params').with(
:mon_initial_members => nil,
:mon_host => '[fe80::fc54:ff:fe9e:7846],10.0.0.2'
)
is_expected.to contain_class('ceph::conf')
end
end
end
on_supported_os.each do |os, facts|
context "on #{os}" do
let(:facts) do
facts.merge({ :hostname => 'node.example.com' })
end
it_behaves_like 'tripleo::profile::base::ceph'
end
end
end

View File

@ -1,64 +0,0 @@
#
# Copyright (C) 2016 Red Hat, Inc.
#
# 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
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
require 'spec_helper'
describe 'tripleo::profile::pacemaker::ceph::rbdmirror' do
shared_examples_for 'tripleo::profile::pacemaker::ceph::rbdmirror' do
let (:pre_condition) do
<<-eof
class { '::tripleo::profile::base::ceph':
step => #{params[:step]}
}
eof
end
context 'with step less than 3' do
let(:params) { { :step => 2 } }
it 'should do nothing' do
is_expected.to contain_class('tripleo::profile::base::ceph')
is_expected.to_not contain_class('ceph::mirror')
end
end
context 'with step 3 and client_name' do
let(:params) { {
:step => 3,
:client_name => 'myname',
} }
it 'should include rbdmirror configuration' do
is_expected.to contain_class('tripleo::profile::base::ceph')
is_expected.to contain_class('ceph::rbdmirror').with(
:rbd_mirror_enable => false,
:rbd_mirror_ensure => 'stopped',
)
is_expected.to contain_class('pacemaker::resource::service')
end
end
end
on_supported_os.each do |os, facts|
context "on #{os}" do
let(:facts) do
facts.merge({ :hostname => 'node.example.com' })
end
it_behaves_like 'tripleo::profile::pacemaker::ceph::rbdmirror'
end
end
end

View File

@ -18,7 +18,6 @@ barbican::keystone::authtoken::password: 'password'
ceilometer::rabbit_password: 'password'
ceilometer::keystone::authtoken::password: 'password'
# ceph related items
ceph::profile::params::mon_key: 'password'
# NOTE(gfidente): we want to use keystone v3 API for RGW so the following are
# needed to comply with the if condition:
# https://github.com/openstack/puppet-ceph/blob/master/manifests/rgw/keystone.pp#L111

View File

@ -12,7 +12,6 @@
- ^manifests/haproxy.*$
- ^manifests/profile/(base|pacemaker)/aodh.*$
- ^manifests/profile/(base|pacemaker)/ceilometer.*$
- ^manifests/profile/(base|pacemaker)/ceph.*$
- ^manifests/profile/(base|pacemaker)/cinder.*$
- ^manifests/profile/(base|pacemaker)/glance.*$
- ^manifests/profile/(base|pacemaker)/gnocchi.*$
@ -42,7 +41,6 @@
- tripleo-ci-centos-7-scenario004-multinode-oooq-container:
files:
- ^manifests/haproxy.*$
- ^manifests/profile/(base|pacemaker)/ceph.*$
- ^manifests/profile/(base|pacemaker)/glance.*$
- ^manifests/profile/(base|pacemaker)/manila.*$
- tripleo-ci-centos-7-scenario007-multinode-oooq-container:
@ -61,7 +59,6 @@
- ^manifests/haproxy.*$
- ^manifests/profile/(base|pacemaker)/aodh.*$
- ^manifests/profile/(base|pacemaker)/ceilometer.*$
- ^manifests/profile/(base|pacemaker)/ceph.*$
- ^manifests/profile/(base|pacemaker)/cinder.*$
- ^manifests/profile/(base|pacemaker)/glance.*$
- ^manifests/profile/(base|pacemaker)/gnocchi.*$
@ -91,7 +88,6 @@
- tripleo-ci-centos-7-scenario004-multinode-oooq-container:
files:
- ^manifests/haproxy.*$
- ^manifests/profile/(base|pacemaker)/ceph.*$
- ^manifests/profile/(base|pacemaker)/glance.*$
- ^manifests/profile/(base|pacemaker)/manila.*$
- tripleo-ci-centos-7-scenario007-multinode-oooq-container: