diff --git a/manifests/haproxy.pp b/manifests/haproxy.pp index aea68dfd4..afa1c0529 100644 --- a/manifests/haproxy.pp +++ b/manifests/haproxy.pp @@ -208,10 +208,6 @@ # (optional) Enable or not Nova API binding # 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*] # (optional) Enable or not Placement API binding # Defaults to hiera('placement_enabled', false) @@ -463,10 +459,6 @@ # (optional) Specify the network nova_osapi is running on. # 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*] # (optional) Specify the network placement is running on. # Defaults to hiera('placement_network', undef) @@ -559,8 +551,6 @@ # 'neutron_api_ssl_port' (Defaults to 13696) # 'nova_api_port' (Defaults to 8774) # '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_novnc_port' (Defaults to 6080) # 'nova_novnc_ssl_port' (Defaults to 13080) @@ -634,7 +624,6 @@ class tripleo::haproxy ( $trove = hiera('trove_api_enabled', false), $glance_api = hiera('glance_api_enabled', false), $nova_osapi = hiera('nova_api_enabled', false), - $nova_placement = hiera('nova_placement_enabled', false), $placement = hiera('placement_enabled', false), $nova_metadata = hiera('nova_api_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_novncproxy_network = hiera('nova_vnc_proxy_network', undef), $nova_osapi_network = hiera('nova_api_network', undef), - $nova_placement_network = hiera('nova_placement_network', undef), $placement_network = hiera('placement_network', undef), $octavia_network = hiera('octavia_api_network', undef), $opendaylight_network = hiera('opendaylight_api_network', undef), @@ -752,8 +740,6 @@ class tripleo::haproxy ( neutron_api_ssl_port => 13696, nova_api_port => 8774, nova_api_ssl_port => 13774, - nova_placement_port => 8778, - nova_placement_ssl_port => 13778, nova_metadata_port => 8775, nova_novnc_port => 6080, 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) if $placement { ::tripleo::haproxy::endpoint { 'placement': diff --git a/manifests/profile/base/database/mysql.pp b/manifests/profile/base/database/mysql.pp index c9a541b60..e076a8355 100644 --- a/manifests/profile/base/database/mysql.pp +++ b/manifests/profile/base/database/mysql.pp @@ -244,9 +244,6 @@ class tripleo::profile::base::database::mysql ( if hiera('nova_api_enabled', false) { include ::nova::db::mysql_api } - if hiera('nova_placement_enabled', false) { - include ::nova::db::mysql_placement - } if hiera('placement_enabled', false) { include ::placement::db::mysql } diff --git a/manifests/profile/base/keystone.pp b/manifests/profile/base/keystone.pp index 9df40eca2..18a9a9741 100644 --- a/manifests/profile/base/keystone.pp +++ b/manifests/profile/base/keystone.pp @@ -390,9 +390,6 @@ class tripleo::profile::base::keystone ( if hiera('nova_api_enabled', false) { include ::nova::keystone::auth } - if hiera('nova_placement_enabled', false) { - include ::nova::keystone::auth_placement - } if hiera('placement_enabled', false) { include ::placement::keystone::auth } diff --git a/manifests/profile/base/nova/placement.pp b/manifests/profile/base/nova/placement.pp deleted file mode 100644 index a8cb0c6a9..000000000 --- a/manifests/profile/base/nova/placement.pp +++ /dev/null @@ -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: -# service_certificate: -# service_key: -# principal: "haproxy/" -# 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, - } - } - -} - diff --git a/spec/classes/tripleo_profile_base_nova_placement_spec.rb b/spec/classes/tripleo_profile_base_nova_placement_spec.rb deleted file mode 100644 index 574489e01..000000000 --- a/spec/classes/tripleo_profile_base_nova_placement_spec.rb +++ /dev/null @@ -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 diff --git a/spec/classes/tripleo_profile_base_nova_spec.rb b/spec/classes/tripleo_profile_base_nova_spec.rb index c6878c63d..75bdf3c0f 100644 --- a/spec/classes/tripleo_profile_base_nova_spec.rb +++ b/spec/classes/tripleo_profile_base_nova_spec.rb @@ -49,7 +49,6 @@ describe 'tripleo::profile::base::nova' do :default_transport_url => 'rabbit://nova:foo@localhost:5672/?ssl=0' ) is_expected.to contain_class('nova::config') - is_expected.to contain_class('nova::placement') is_expected.to contain_class('nova::cache').with( :enabled => true, :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::config') is_expected.to_not contain_class('nova::cache') - is_expected.to_not contain_class('nova::placement') } end @@ -93,7 +91,6 @@ describe 'tripleo::profile::base::nova' do ) is_expected.to contain_class('nova::config') 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_file('/etc/nova/migration/authorized_keys') is_expected.to_not contain_file('/etc/nova/migration/identity')