nova: Remove profile::base::nova::placement

Depends-On: https://review.openstack.org/#/c/635141/
Change-Id: I523dcbe4559fce067d815a3972df3a909ed87b2e
This commit is contained in:
Lee Yarwood 2019-02-06 12:51:13 +00:00
parent 03b94bfb9d
commit 953b4c3633
6 changed files with 0 additions and 257 deletions

View File

@ -208,10 +208,6 @@
# (optional) Enable or not Nova API binding # (optional) Enable or not Nova API binding
# Defaults to hiera('nova_api_enabled', false) # Defaults to hiera('nova_api_enabled', false)
# #
# [*nova_placement*]
# (optional) Enable or not Nova Placement API binding
# Defaults to hiera('nova_placement_enabled', false)
#
# [*placement*] # [*placement*]
# (optional) Enable or not Placement API binding # (optional) Enable or not Placement API binding
# Defaults to hiera('placement_enabled', false) # Defaults to hiera('placement_enabled', false)
@ -463,10 +459,6 @@
# (optional) Specify the network nova_osapi is running on. # (optional) Specify the network nova_osapi is running on.
# Defaults to hiera('nova_api_network', undef) # Defaults to hiera('nova_api_network', undef)
# #
# [*nova_placement_network*]
# (optional) Specify the network nova_placement is running on.
# Defaults to hiera('nova_placement_network', undef)
#
# [*placement_network*] # [*placement_network*]
# (optional) Specify the network placement is running on. # (optional) Specify the network placement is running on.
# Defaults to hiera('placement_network', undef) # Defaults to hiera('placement_network', undef)
@ -559,8 +551,6 @@
# 'neutron_api_ssl_port' (Defaults to 13696) # 'neutron_api_ssl_port' (Defaults to 13696)
# 'nova_api_port' (Defaults to 8774) # 'nova_api_port' (Defaults to 8774)
# 'nova_api_ssl_port' (Defaults to 13774) # 'nova_api_ssl_port' (Defaults to 13774)
# 'nova_placement_port' (Defaults to 8778)
# 'nova_placement_ssl_port' (Defaults to 13778)
# 'nova_metadata_port' (Defaults to 8775) # 'nova_metadata_port' (Defaults to 8775)
# 'nova_novnc_port' (Defaults to 6080) # 'nova_novnc_port' (Defaults to 6080)
# 'nova_novnc_ssl_port' (Defaults to 13080) # 'nova_novnc_ssl_port' (Defaults to 13080)
@ -634,7 +624,6 @@ class tripleo::haproxy (
$trove = hiera('trove_api_enabled', false), $trove = hiera('trove_api_enabled', false),
$glance_api = hiera('glance_api_enabled', false), $glance_api = hiera('glance_api_enabled', false),
$nova_osapi = hiera('nova_api_enabled', false), $nova_osapi = hiera('nova_api_enabled', false),
$nova_placement = hiera('nova_placement_enabled', false),
$placement = hiera('placement_enabled', false), $placement = hiera('placement_enabled', false),
$nova_metadata = hiera('nova_api_enabled', false), $nova_metadata = hiera('nova_api_enabled', false),
$nova_novncproxy = hiera('nova_vnc_proxy_enabled', false), $nova_novncproxy = hiera('nova_vnc_proxy_enabled', false),
@ -697,7 +686,6 @@ class tripleo::haproxy (
$nova_metadata_network = hiera('nova_api_network', undef), $nova_metadata_network = hiera('nova_api_network', undef),
$nova_novncproxy_network = hiera('nova_vnc_proxy_network', undef), $nova_novncproxy_network = hiera('nova_vnc_proxy_network', undef),
$nova_osapi_network = hiera('nova_api_network', undef), $nova_osapi_network = hiera('nova_api_network', undef),
$nova_placement_network = hiera('nova_placement_network', undef),
$placement_network = hiera('placement_network', undef), $placement_network = hiera('placement_network', undef),
$octavia_network = hiera('octavia_api_network', undef), $octavia_network = hiera('octavia_api_network', undef),
$opendaylight_network = hiera('opendaylight_api_network', undef), $opendaylight_network = hiera('opendaylight_api_network', undef),
@ -752,8 +740,6 @@ class tripleo::haproxy (
neutron_api_ssl_port => 13696, neutron_api_ssl_port => 13696,
nova_api_port => 8774, nova_api_port => 8774,
nova_api_ssl_port => 13774, nova_api_ssl_port => 13774,
nova_placement_port => 8778,
nova_placement_ssl_port => 13778,
nova_metadata_port => 8775, nova_metadata_port => 8775,
nova_novnc_port => 6080, nova_novnc_port => 6080,
nova_novnc_ssl_port => 13080, nova_novnc_ssl_port => 13080,
@ -1057,21 +1043,6 @@ class tripleo::haproxy (
} }
} }
$nova_placement_vip = hiera('nova_placement_vip', $controller_virtual_ip)
if $nova_placement {
::tripleo::haproxy::endpoint { 'nova_placement':
public_virtual_ip => $public_virtual_ip,
internal_ip => $nova_placement_vip,
service_port => $ports[nova_placement_port],
ip_addresses => hiera('nova_placement_node_ips', $controller_hosts_real),
server_names => hiera('nova_placement_node_names', $controller_hosts_names_real),
mode => 'http',
public_ssl_port => $ports[nova_placement_ssl_port],
service_network => $nova_placement_network,
member_options => union($haproxy_member_options, $internal_tls_member_options),
}
}
$placement_vip = hiera('placement_vip', $controller_virtual_ip) $placement_vip = hiera('placement_vip', $controller_virtual_ip)
if $placement { if $placement {
::tripleo::haproxy::endpoint { 'placement': ::tripleo::haproxy::endpoint { 'placement':

View File

@ -244,9 +244,6 @@ class tripleo::profile::base::database::mysql (
if hiera('nova_api_enabled', false) { if hiera('nova_api_enabled', false) {
include ::nova::db::mysql_api include ::nova::db::mysql_api
} }
if hiera('nova_placement_enabled', false) {
include ::nova::db::mysql_placement
}
if hiera('placement_enabled', false) { if hiera('placement_enabled', false) {
include ::placement::db::mysql include ::placement::db::mysql
} }

View File

@ -390,9 +390,6 @@ class tripleo::profile::base::keystone (
if hiera('nova_api_enabled', false) { if hiera('nova_api_enabled', false) {
include ::nova::keystone::auth include ::nova::keystone::auth
} }
if hiera('nova_placement_enabled', false) {
include ::nova::keystone::auth_placement
}
if hiera('placement_enabled', false) { if hiera('placement_enabled', false) {
include ::placement::keystone::auth include ::placement::keystone::auth
} }

View File

@ -1,85 +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::nova::placement
#
# Nova Placement API profile for tripleo
#
# [*bootstrap_node*]
# (Optional) The hostname of the node responsible for bootstrapping tasks
# Defaults to hiera('nova_placement_short_bootstrap_node_name')
#
# [*certificates_specs*]
# (Optional) The specifications to give to certmonger for the certificate(s)
# it will create.
# Example with hiera:
# apache_certificates_specs:
# httpd-internal_api:
# hostname: <overcloud controller fqdn>
# service_certificate: <service certificate path>
# service_key: <service key path>
# principal: "haproxy/<overcloud controller fqdn>"
# Defaults to hiera('apache_certificate_specs', {}).
#
# [*enable_internal_tls*]
# (Optional) Whether TLS in the internal network is enabled or not.
# Defaults to hiera('enable_internal_tls', false)
#
# [*nova_placement_network*]
# (Optional) The network name where the nova placement endpoint is listening on.
# This is set by t-h-t.
# Defaults to hiera('nova_placement_network', undef)
#
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
# for more details.
# Defaults to hiera('step')
#
class tripleo::profile::base::nova::placement (
$bootstrap_node = hiera('nova_placement_short_bootstrap_node_name', undef),
$certificates_specs = hiera('apache_certificates_specs', {}),
$enable_internal_tls = hiera('enable_internal_tls', false),
$nova_placement_network = hiera('nova_placement_network', undef),
$step = Integer(hiera('step')),
) {
if $::hostname == downcase($bootstrap_node) {
$is_bootstrap = true
} else {
$is_bootstrap = false
}
include ::tripleo::profile::base::nova
include ::tripleo::profile::base::nova::authtoken
if $enable_internal_tls {
if !$nova_placement_network {
fail('nova_placement_network is not set in the hieradata.')
}
$tls_certfile = $certificates_specs["httpd-${nova_placement_network}"]['service_certificate']
$tls_keyfile = $certificates_specs["httpd-${nova_placement_network}"]['service_key']
} else {
$tls_certfile = undef
$tls_keyfile = undef
}
if $step >= 4 or ( $step >= 3 and $is_bootstrap ) {
include ::tripleo::profile::base::apache
class { '::nova::wsgi::apache_placement':
ssl_cert => $tls_certfile,
ssl_key => $tls_keyfile,
}
}
}

View File

@ -1,134 +0,0 @@
#
# Copyright (C) 2017 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::nova::placement' do
shared_examples_for 'tripleo::profile::base::nova::placement' do
let(:pre_condition) do
<<-eos
class { '::tripleo::profile::base::nova':
step => #{params[:step]},
oslomsg_rpc_hosts => [ 'localhost' ],
oslomsg_rpc_username => 'nova',
oslomsg_rpc_password => 'foo'
}
class { '::tripleo::profile::base::nova::authtoken':
step => #{params[:step]},
}
eos
end
context 'with step less than 3' do
let(:params) { {
:step => 1,
} }
it {
is_expected.to contain_class('tripleo::profile::base::nova::placement')
is_expected.to contain_class('tripleo::profile::base::nova')
is_expected.to_not contain_class('nova::keystone::authtoken')
is_expected.to_not contain_class('nova::wsgi::apache_placement')
}
end
context 'with step less than 3 and internal tls and generate certs' do
let(:params) { {
:step => 1,
:enable_internal_tls => true,
:nova_placement_network => 'bar',
:certificates_specs => {
'httpd-bar' => {
'hostname' => 'foo',
'service_certificate' => '/foo.pem',
'service_key' => '/foo.key',
},
}
} }
it {
is_expected.to contain_class('tripleo::profile::base::nova::placement')
is_expected.to contain_class('tripleo::profile::base::nova')
is_expected.to_not contain_class('nova::keystone::authtoken')
is_expected.to_not contain_class('nova::wsgi::apache_placement')
}
end
context 'with step 3 and not bootstrap' do
let(:params) { {
:step => 3,
} }
it {
is_expected.to contain_class('tripleo::profile::base::nova::placement')
is_expected.to contain_class('tripleo::profile::base::nova')
is_expected.to contain_class('nova::keystone::authtoken')
is_expected.not_to contain_class('nova::wsgi::apache_placement')
}
end
context 'with step 3 and bootstrap' do
let(:params) { {
:step => 3,
:bootstrap_node => 'node.example.com'
} }
it {
is_expected.to contain_class('tripleo::profile::base::nova::placement')
is_expected.to contain_class('tripleo::profile::base::nova')
is_expected.to contain_class('nova::keystone::authtoken')
is_expected.to contain_class('nova::wsgi::apache_placement')
}
end
context 'with step 3 and bootstrap with enable_internal_tls and skip generate certs' do
let(:params) { {
:step => 3,
:enable_internal_tls => true,
:nova_placement_network => 'bar',
:bootstrap_node => 'node.example.com',
:certificates_specs => {
'httpd-bar' => {
'hostname' => 'foo',
'service_certificate' => '/foo.pem',
'service_key' => '/foo.key',
},
}
} }
it {
is_expected.to contain_class('tripleo::profile::base::nova::placement')
is_expected.to contain_class('tripleo::profile::base::nova')
is_expected.to contain_class('nova::keystone::authtoken')
is_expected.to contain_class('nova::wsgi::apache_placement').with(
:ssl_cert => '/foo.pem',
:ssl_key => '/foo.key')
}
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::nova::placement'
end
end
end

View File

@ -49,7 +49,6 @@ describe 'tripleo::profile::base::nova' do
:default_transport_url => 'rabbit://nova:foo@localhost:5672/?ssl=0' :default_transport_url => 'rabbit://nova:foo@localhost:5672/?ssl=0'
) )
is_expected.to contain_class('nova::config') is_expected.to contain_class('nova::config')
is_expected.to contain_class('nova::placement')
is_expected.to contain_class('nova::cache').with( is_expected.to contain_class('nova::cache').with(
:enabled => true, :enabled => true,
:backend => 'oslo_cache.memcache_pool', :backend => 'oslo_cache.memcache_pool',
@ -71,7 +70,6 @@ describe 'tripleo::profile::base::nova' do
is_expected.to_not contain_class('nova') is_expected.to_not contain_class('nova')
is_expected.to_not contain_class('nova::config') is_expected.to_not contain_class('nova::config')
is_expected.to_not contain_class('nova::cache') is_expected.to_not contain_class('nova::cache')
is_expected.to_not contain_class('nova::placement')
} }
end end
@ -93,7 +91,6 @@ describe 'tripleo::profile::base::nova' do
) )
is_expected.to contain_class('nova::config') is_expected.to contain_class('nova::config')
is_expected.to contain_class('nova::cache') is_expected.to contain_class('nova::cache')
is_expected.to contain_class('nova::placement')
is_expected.to_not contain_class('nova::migration::libvirt') is_expected.to_not contain_class('nova::migration::libvirt')
is_expected.to_not contain_file('/etc/nova/migration/authorized_keys') is_expected.to_not contain_file('/etc/nova/migration/authorized_keys')
is_expected.to_not contain_file('/etc/nova/migration/identity') is_expected.to_not contain_file('/etc/nova/migration/identity')