From 430d833469a25d2d928bbc922ba0a3aaba7132a6 Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Wed, 23 Apr 2014 10:11:28 +0200 Subject: [PATCH 1/5] splitting: Glance services Split Glance into 2 subclasses: cloud::image::api and cloud::image::registry Backward compatibility is maintained by keeping old parameters and calling the new classes from cloud::image class. Also, warn the end-user about the new class and let know about the deprecation. Bug #346 --- manifests/image.pp | 138 +++++++----------------------- manifests/image/api.pp | 162 ++++++++++++++++++++++++++++++++++++ manifests/image/registry.pp | 119 ++++++++++++++++++++++++++ 3 files changed, 313 insertions(+), 106 deletions(-) create mode 100644 manifests/image/api.pp create mode 100644 manifests/image/registry.pp diff --git a/manifests/image.pp b/manifests/image.pp index a37aa57a..76f20598 100644 --- a/manifests/image.pp +++ b/manifests/image.pp @@ -16,6 +16,7 @@ # == Class: cloud::image # # Install Image Server (Glance) +# This class is deprecated for cloud::image::api and cloud::image::registry # # === Parameters: # @@ -89,113 +90,38 @@ class cloud::image( $use_syslog = true ) { - # Disable twice logging if syslog is enabled - if $use_syslog { - $log_dir = false - $log_file_api = false - $log_file_registry = false - } else { - $log_dir = '/var/log/glance' - $log_file_api = '/var/log/glance/api.log' - $log_file_registry = '/var/log/glance/registry.log' + warning('This class is deprecated. You should use cloud::image::api and cloud::image::registry.') + + # Maintain backward compatibility with H.1.2.0 + class { 'cloud::image::api': + glance_db_host => $glance_db_host, + glance_db_user => $glance_db_user, + glance_db_password => $glance_db_password, + openstack_vip => $openstack_vip, + ks_glance_registry_internal_port => $ks_glance_registry_internal_port, + verbose => $verbose, + debug => $debug, + ks_keystone_internal_host => $ks_keystone_internal_host, + ks_glance_password => $ks_glance_password, + log_facility => $log_facility, + api_eth => $api_eth, + ks_glance_api_internal_port => $ks_glance_api_internal_port, + use_syslog => $use_syslog, + glance_rbd_pool => $glance_rbd_pool, + glance_rbd_user => $glance_rbd_user, } - - $encoded_glance_user = uriescape($glance_db_user) - $encoded_glance_password = uriescape($glance_db_password) - - class { 'glance::api': - sql_connection => "mysql://${encoded_glance_user}:${encoded_glance_password}@${glance_db_host}/glance", - registry_host => $openstack_vip, - registry_port => $ks_glance_registry_internal_port, - verbose => $verbose, - debug => $debug, - auth_host => $ks_keystone_internal_host, - keystone_password => $ks_glance_password, - keystone_tenant => 'services', - keystone_user => 'glance', - show_image_direct_url => true, - log_dir => $log_dir, - log_file => $log_file_api, - log_facility => $log_facility, - bind_host => $api_eth, - bind_port => $ks_glance_api_internal_port, - use_syslog => $use_syslog, - } - - class { 'glance::registry': - sql_connection => "mysql://${encoded_glance_user}:${encoded_glance_password}@${glance_db_host}/glance", - verbose => $verbose, - debug => $debug, - auth_host => $ks_keystone_internal_host, - keystone_password => $ks_glance_password, - keystone_tenant => 'services', - keystone_user => 'glance', - bind_host => $api_eth, - log_dir => $log_dir, - log_file => $log_file_registry, - bind_port => $ks_glance_registry_internal_port, - use_syslog => $use_syslog, - log_facility => $log_facility, - } - - # TODO(EmilienM) Disabled for now - # Follow-up: https://github.com/enovance/puppet-openstack-cloud/issues/160 - # - # class { 'glance::notify::rabbitmq': - # rabbit_password => $rabbit_password, - # rabbit_userid => 'glance', - # rabbit_host => $rabbit_host, - # } - glance_api_config { - # TODO(EmilienM) Will be deprecated in Icehouse for notification_driver. - 'DEFAULT/notifier_strategy': value => 'noop'; - } - - class { 'glance::backend::rbd': - rbd_store_user => $glance_rbd_user, - rbd_store_pool => $glance_rbd_pool - } - - Ceph::Key <<| title == $glance_rbd_user |>> - file { '/etc/ceph/ceph.client.glance.keyring': - owner => 'glance', - group => 'glance', - mode => '0400', - require => Ceph::Key[$glance_rbd_user] - } - Concat::Fragment <<| title == 'ceph-client-os' |>> - - class { 'glance::cache::cleaner': } - class { 'glance::cache::pruner': } - - # Note(EmilienM): - # We check if DB tables are created, if not we populate Glance DB. - # It's a hack to fit with our setup where we run MySQL/Galera - # TODO(Gonéri) - # We have to do this only on the primary node of the galera cluster to avoid race condition - # https://github.com/enovance/puppet-openstack-cloud/issues/156 - exec {'glance_db_sync': - command => 'glance-manage db_sync', - user => 'glance', - path => '/usr/bin', - unless => "/usr/bin/mysql glance -h ${glance_db_host} -u ${encoded_glance_user} -p${encoded_glance_password} -e \"show tables\" | /bin/grep Tables" - } - - # TODO(EmilienM) For later, I'll also add internal network support in HAproxy for all OpenStack API, to optimize North / South network traffic - @@haproxy::balancermember{"${::fqdn}-glance_api": - listening_service => 'glance_api_cluster', - server_names => $::hostname, - ipaddresses => $api_eth, - ports => $ks_glance_api_internal_port, - options => 'check inter 2000 rise 2 fall 5' - } - -@@haproxy::balancermember{"${::fqdn}-glance_registry": - listening_service => 'glance_registry_cluster', - server_names => $::hostname, - ipaddresses => $api_eth, - ports => $ks_glance_registry_internal_port, - options => 'check inter 2000 rise 2 fall 5' + class { 'cloud::image::registry': + glance_db_host => $glance_db_host, + glance_db_user => $glance_db_user, + glance_db_password => $glance_db_password, + verbose => $verbose, + debug => $debug, + ks_keystone_internal_host => $ks_keystone_internal_host, + ks_glance_password => $ks_glance_password, + api_eth => $api_eth, + ks_glance_registry_internal_port => $ks_glance_registry_internal_port, + use_syslog => $use_syslog, + log_facility => $log_facility, } } diff --git a/manifests/image/api.pp b/manifests/image/api.pp new file mode 100644 index 00000000..37f7ee0f --- /dev/null +++ b/manifests/image/api.pp @@ -0,0 +1,162 @@ +# +# Copyright (C) 2014 eNovance SAS +# +# 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: cloud::image::api +# +# Install API Image Server (Glance API) +# +# === Parameters: +# +# [*glance_db_host*] +# (optional) Hostname or IP address to connect to glance database +# Default value in params +# +# [*glance_db_user*] +# (optional) Username to connect to glance database +# Default value in params +# +# [*glance_db_password*] +# (optional) Password to connect to glance database +# Default value in params +# +# [*ks_keystone_internal_host*] +# (optional) Internal Hostname or IP to connect to Keystone API +# Default value in params +# +# [*ks_glance_api_internal_port*] +# (optional) TCP port to connect to Glance API from internal network +# Default value in params +# +# [*ks_glance_registry_internal_port*] +# (optional) TCP port to connect to Glance Registry from internal network +# Default value in params +# +# [*ks_glance_password*] +# (optional) Password used by Glance to connect to Keystone API +# Default value in params +# +# [*rabbit_hosts*] +# (optional) List of RabbitMQ servers. Should be an array. +# Default value in params +# +# [*rabbit_password*] +# (optional) Password to connect to nova queues. +# Default value in params +# +# [*api_eth*] +# (optional) Which interface we bind the Glance API server. +# Default value in params +# +# [*use_syslog*] +# (optional) Use syslog for logging +# Defaults value in params +# +# [*log_facility*] +# (optional) Syslog facility to receive log lines +# Defaults value in params +# + +class cloud::image::api( + $glance_db_host = $os_params::glance_db_host, + $glance_db_user = $os_params::glance_db_user, + $glance_db_password = $os_params::glance_db_password, + $ks_keystone_internal_host = $os_params::ks_keystone_internal_host, + $ks_glance_internal_host = $os_params::ks_glance_internal_host, + $ks_glance_api_internal_port = $os_params::ks_glance_api_internal_port, + $ks_glance_registry_internal_port = $os_params::ks_glance_registry_internal_port, + $ks_glance_password = $os_params::ks_glance_password, + $rabbit_password = $os_params::rabbit_password, + $rabbit_host = $os_params::rabbit_host, + $api_eth = $os_params::api_eth, + $openstack_vip = $os_params::vip_public_ip, + $glance_rbd_pool = $os_params::glance_rbd_pool, + $glance_rbd_user = $os_params::glance_rbd_user, + $verbose = $os_params::verbose, + $debug = $os_params::debug, + $log_facility = $os_params::log_facility, + $use_syslog = $os_params::use_syslog +) { + + # Disable twice logging if syslog is enabled + if $use_syslog { + $log_dir = false + $log_file_api = false + $log_file_registry = false + } else { + $log_dir = '/var/log/glance' + $log_file_api = '/var/log/glance/api.log' + $log_file_registry = '/var/log/glance/registry.log' + } + + $encoded_glance_user = uriescape($glance_db_user) + $encoded_glance_password = uriescape($glance_db_password) + + class { 'glance::api': + sql_connection => "mysql://${encoded_glance_user}:${encoded_glance_password}@${glance_db_host}/glance", + registry_host => $openstack_vip, + registry_port => $ks_glance_registry_internal_port, + verbose => $verbose, + debug => $debug, + auth_host => $ks_keystone_internal_host, + keystone_password => $ks_glance_password, + keystone_tenant => 'services', + keystone_user => 'glance', + show_image_direct_url => true, + log_dir => $log_dir, + log_file => $log_file_api, + log_facility => $log_facility, + bind_host => $api_eth, + bind_port => $ks_glance_api_internal_port, + use_syslog => $use_syslog, + } + + # TODO(EmilienM) Disabled for now + # Follow-up: https://github.com/enovance/puppet-openstack-cloud/issues/160 + # + # class { 'glance::notify::rabbitmq': + # rabbit_password => $rabbit_password, + # rabbit_userid => 'glance', + # rabbit_host => $rabbit_host, + # } + glance_api_config { + # TODO(EmilienM) Will be deprecated in Icehouse for notification_driver. + 'DEFAULT/notifier_strategy': value => 'noop'; + } + + class { 'glance::backend::rbd': + rbd_store_user => $glance_rbd_user, + rbd_store_pool => $glance_rbd_pool + } + + Ceph::Key <<| title == $glance_rbd_user |>> + file { '/etc/ceph/ceph.client.glance.keyring': + owner => 'glance', + group => 'glance', + mode => '0400', + require => Ceph::Key[$glance_rbd_user] + } + Concat::Fragment <<| title == 'ceph-client-os' |>> + + class { 'glance::cache::cleaner': } + class { 'glance::cache::pruner': } + + @@haproxy::balancermember{"${::fqdn}-glance_api": + listening_service => 'glance_api_cluster', + server_names => $::hostname, + ipaddresses => $api_eth, + ports => $ks_glance_api_internal_port, + options => 'check inter 2000 rise 2 fall 5' + } +} \ No newline at end of file diff --git a/manifests/image/registry.pp b/manifests/image/registry.pp new file mode 100644 index 00000000..ddb9d0ba --- /dev/null +++ b/manifests/image/registry.pp @@ -0,0 +1,119 @@ +# +# Copyright (C) 2014 eNovance SAS +# +# 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: cloud::image::registry +# +# Install Registry Image Server (Glance Registry) +# +# === Parameters: +# +# [*glance_db_host*] +# (optional) Hostname or IP address to connect to glance database +# Default value in params +# +# [*glance_db_user*] +# (optional) Username to connect to glance database +# Default value in params +# +# [*glance_db_password*] +# (optional) Password to connect to glance database +# Default value in params +# +# [*ks_keystone_internal_host*] +# (optional) Internal Hostname or IP to connect to Keystone API +# Default value in params +# +# [*ks_glance_registry_internal_port*] +# (optional) TCP port to connect to Glance Registry from internal network +# Default value in params +# +# [*ks_glance_password*] +# (optional) Password used by Glance to connect to Keystone API +# Default value in params +# +# [*api_eth*] +# (optional) Which interface we bind the Glance API server. +# Default value in params +# +# [*use_syslog*] +# (optional) Use syslog for logging +# Defaults value in params +# +# [*log_facility*] +# (optional) Syslog facility to receive log lines +# Defaults value in params +# + + +class cloud::image::registry( + $glance_db_host = $os_params::glance_db_host, + $glance_db_user = $os_params::glance_db_user, + $glance_db_password = $os_params::glance_db_password, + $ks_keystone_internal_host = $os_params::ks_keystone_internal_host, + $ks_glance_internal_host = $os_params::ks_glance_internal_host, + $ks_glance_registry_internal_port = $os_params::ks_glance_registry_internal_port, + $ks_glance_password = $os_params::ks_glance_password, + $api_eth = $os_params::api_eth, + $verbose = $os_params::verbose, + $debug = $os_params::debug, + $log_facility = $os_params::log_facility, + $use_syslog = $os_params::use_syslog +) { + + # Disable twice logging if syslog is enabled + if $use_syslog { + $log_dir = false + $log_file_api = false + $log_file_registry = false + } else { + $log_dir = '/var/log/glance' + $log_file_api = '/var/log/glance/api.log' + $log_file_registry = '/var/log/glance/registry.log' + } + + $encoded_glance_user = uriescape($glance_db_user) + $encoded_glance_password = uriescape($glance_db_password) + + class { 'glance::registry': + sql_connection => "mysql://${encoded_glance_user}:${encoded_glance_password}@${glance_db_host}/glance", + verbose => $verbose, + debug => $debug, + auth_host => $ks_keystone_internal_host, + keystone_password => $ks_glance_password, + keystone_tenant => 'services', + keystone_user => 'glance', + bind_host => $api_eth, + log_dir => $log_dir, + log_file => $log_file_registry, + bind_port => $ks_glance_registry_internal_port, + use_syslog => $use_syslog, + log_facility => $log_facility, + } + + exec {'glance_db_sync': + command => 'glance-manage db_sync', + user => 'glance', + path => '/usr/bin', + unless => "/usr/bin/mysql glance -h ${glance_db_host} -u ${encoded_glance_user} -p${encoded_glance_password} -e \"show tables\" | /bin/grep Tables" + } + + @@haproxy::balancermember{"${::fqdn}-glance_registry": + listening_service => 'glance_registry_cluster', + server_names => $::hostname, + ipaddresses => $api_eth, + ports => $ks_glance_registry_internal_port, + options => 'check inter 2000 rise 2 fall 5' + } +} From 8bcb5315a2a45e9ec7b1d07a64efcc7f8faa2278 Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Wed, 23 Apr 2014 11:26:27 +0200 Subject: [PATCH 2/5] Splitting: Compute Controller services Split cloud::compute::controller in * cloud::compute::api * cloud::compute::cert * cloud::compute::conductor * cloud::compute::consoleauth * cloud::compute::consoleproxy * cloud::compute::scheduler Also maintains backward compatibility and informs the end user about the new classes. Bug #346 --- manifests/compute/api.pp | 63 ++++++++++++++++++++++++++++ manifests/compute/cert.pp | 27 ++++++++++++ manifests/compute/conductor.pp | 27 ++++++++++++ manifests/compute/consoleauth.pp | 27 ++++++++++++ manifests/compute/consoleproxy.pp | 38 +++++++++++++++++ manifests/compute/controller.pp | 69 ++++++++----------------------- manifests/compute/scheduler.pp | 27 ++++++++++++ manifests/image/api.pp | 2 +- 8 files changed, 228 insertions(+), 52 deletions(-) create mode 100644 manifests/compute/api.pp create mode 100644 manifests/compute/cert.pp create mode 100644 manifests/compute/conductor.pp create mode 100644 manifests/compute/consoleauth.pp create mode 100644 manifests/compute/consoleproxy.pp create mode 100644 manifests/compute/scheduler.pp diff --git a/manifests/compute/api.pp b/manifests/compute/api.pp new file mode 100644 index 00000000..d653dfd9 --- /dev/null +++ b/manifests/compute/api.pp @@ -0,0 +1,63 @@ +# +# Copyright (C) 2014 eNovance SAS +# +# 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. +# +# Compute API node +# + +class cloud::compute::api( + $ks_keystone_internal_host = '127.0.0.1', + $ks_nova_password = 'novapassword', + $neutron_metadata_proxy_shared_secret = 'metadatapassword', + $api_eth = '127.0.0.1', + $ks_nova_public_port = '8774', + $ks_ec2_public_port = '8773', + $ks_metadata_public_port = '8775' +){ + + include 'cloud::compute' + + class { 'nova::api': + enabled => true, + auth_host => $ks_keystone_internal_host, + admin_password => $ks_nova_password, + api_bind_address => $api_eth, + metadata_listen => $api_eth, + neutron_metadata_proxy_shared_secret => $neutron_metadata_proxy_shared_secret, + } + + @@haproxy::balancermember{"${::fqdn}-compute_api_ec2": + listening_service => 'ec2_api_cluster', + server_names => $::hostname, + ipaddresses => $api_eth, + ports => $ks_ec2_public_port, + options => 'check inter 2000 rise 2 fall 5' + } + + @@haproxy::balancermember{"${::fqdn}-compute_api_nova": + listening_service => 'nova_api_cluster', + server_names => $::hostname, + ipaddresses => $api_eth, + ports => $ks_nova_public_port, + options => 'check inter 2000 rise 2 fall 5' + } + + @@haproxy::balancermember{"${::fqdn}-compute_api_metadata": + listening_service => 'metadata_api_cluster', + server_names => $::hostname, + ipaddresses => $api_eth, + ports => $ks_metadata_public_port, + options => 'check inter 2000 rise 2 fall 5' + } +} diff --git a/manifests/compute/cert.pp b/manifests/compute/cert.pp new file mode 100644 index 00000000..75c37f29 --- /dev/null +++ b/manifests/compute/cert.pp @@ -0,0 +1,27 @@ +# +# Copyright (C) 2014 eNovance SAS +# +# 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. +# +# Compute Certificate node +# + +class cloud::compute::cert { + + include 'cloud::compute' + + class { 'nova::cert': + enabled => true, + } + +} diff --git a/manifests/compute/conductor.pp b/manifests/compute/conductor.pp new file mode 100644 index 00000000..75267ea9 --- /dev/null +++ b/manifests/compute/conductor.pp @@ -0,0 +1,27 @@ +# +# Copyright (C) 2014 eNovance SAS +# +# 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. +# +# Compute Conductor node +# + +class cloud::compute::conductor { + + include 'cloud::compute' + + class { 'nova::conductor': + enabled => true, + } + +} diff --git a/manifests/compute/consoleauth.pp b/manifests/compute/consoleauth.pp new file mode 100644 index 00000000..f805247b --- /dev/null +++ b/manifests/compute/consoleauth.pp @@ -0,0 +1,27 @@ +# +# Copyright (C) 2014 eNovance SAS +# +# 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. +# +# Compute Authenfication Console node +# + +class cloud::compute::consoleauth { + + include 'cloud::compute' + + class { 'nova::consoleauth': + enabled => true, + } + +} diff --git a/manifests/compute/consoleproxy.pp b/manifests/compute/consoleproxy.pp new file mode 100644 index 00000000..cef616a1 --- /dev/null +++ b/manifests/compute/consoleproxy.pp @@ -0,0 +1,38 @@ +# +# Copyright (C) 2014 eNovance SAS +# +# 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. +# +# Compute Proxy Console node +# + +class cloud::compute::consoleproxy( + $api_eth = '127.0.0.1', + $spice_port = '6082' +){ + + include 'cloud::compute' + + class { 'nova::spicehtml5proxy': + enabled => true, + host => $api_eth + } + + @@haproxy::balancermember{"${::fqdn}-compute_spice": + listening_service => 'spice_cluster', + server_names => $::hostname, + ipaddresses => $api_eth, + ports => $spice_port, + options => 'check inter 2000 rise 2 fall 5' + } +} diff --git a/manifests/compute/controller.pp b/manifests/compute/controller.pp index ab4b53b9..925a5d08 100644 --- a/manifests/compute/controller.pp +++ b/manifests/compute/controller.pp @@ -27,61 +27,28 @@ class cloud::compute::controller( $ks_metadata_public_port = 8775 ){ + warning('This class is deprecated. You should use cloud::compute::api,scheduler,conductor,consoleauth,consoleproxy,cert classes') + include 'cloud::compute' - class { [ - 'nova::scheduler', - 'nova::cert', - 'nova::consoleauth', - 'nova::conductor' - ]: - enabled => true, + class { 'cloud::compute::cert': } + class { 'cloud::compute::conductor': } + class { 'cloud::compute::consoleauth': } + class { 'cloud::compute::scheduler': } + + class { 'cloud::compute::api': + ks_keystone_internal_host => $ks_keystone_internal_host, + ks_nova_password => $ks_nova_password, + api_eth => $api_eth, + neutron_metadata_proxy_shared_secret => $neutron_metadata_proxy_shared_secret, + ks_nova_public_port => $ks_nova_public_port, + ks_ec2_public_port => $ks_ec2_public_port, + ks_metadata_public_port => $ks_metadata_public_port, } - class { 'nova::api': - enabled => true, - auth_host => $ks_keystone_internal_host, - admin_password => $ks_nova_password, - api_bind_address => $api_eth, - metadata_listen => $api_eth, - neutron_metadata_proxy_shared_secret => $neutron_metadata_proxy_shared_secret, - } - - class { 'nova::spicehtml5proxy': - enabled => true, - host => $api_eth - } - - @@haproxy::balancermember{"${::fqdn}-compute_api_ec2": - listening_service => 'ec2_api_cluster', - server_names => $::hostname, - ipaddresses => $api_eth, - ports => $ks_ec2_public_port, - options => 'check inter 2000 rise 2 fall 5' - } - - @@haproxy::balancermember{"${::fqdn}-compute_api_nova": - listening_service => 'nova_api_cluster', - server_names => $::hostname, - ipaddresses => $api_eth, - ports => $ks_nova_public_port, - options => 'check inter 2000 rise 2 fall 5' - } - - @@haproxy::balancermember{"${::fqdn}-compute_api_metadata": - listening_service => 'metadata_api_cluster', - server_names => $::hostname, - ipaddresses => $api_eth, - ports => $ks_metadata_public_port, - options => 'check inter 2000 rise 2 fall 5' - } - - @@haproxy::balancermember{"${::fqdn}-compute_spice": - listening_service => 'spice_cluster', - server_names => $::hostname, - ipaddresses => $api_eth, - ports => $spice_port, - options => 'check inter 2000 rise 2 fall 5' + class { 'cloud::compute::consoleproxy': + api_eth => $api_eth, + spice_port => $spice_port, } } diff --git a/manifests/compute/scheduler.pp b/manifests/compute/scheduler.pp new file mode 100644 index 00000000..a837db8b --- /dev/null +++ b/manifests/compute/scheduler.pp @@ -0,0 +1,27 @@ +# +# Copyright (C) 2014 eNovance SAS +# +# 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. +# +# Compute Scheduler node +# + +class cloud::compute::scheduler { + + include 'cloud::compute' + + class { 'nova::scheduler': + enabled => true, + } + +} diff --git a/manifests/image/api.pp b/manifests/image/api.pp index 37f7ee0f..c8a19f72 100644 --- a/manifests/image/api.pp +++ b/manifests/image/api.pp @@ -159,4 +159,4 @@ class cloud::image::api( ports => $ks_glance_api_internal_port, options => 'check inter 2000 rise 2 fall 5' } -} \ No newline at end of file +} From 4881139ec6c346435fdddeaf1b9049a270758419 Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Wed, 23 Apr 2014 12:08:26 +0200 Subject: [PATCH 3/5] splitting: Telemetry services Split cloud::telemetry::server to * cloud::telemetry::api * cloud::telemetry::collector * cloud::telemetry::alarmevaluator * cloud::telemetry::alarmnotifier Maintains backward compatibility. Also warn the end user about deprecation. Bug #346 --- manifests/telemetry/alarmevaluator.pp | 26 +++++++++++ manifests/telemetry/alarmnotifier.pp | 26 +++++++++++ manifests/telemetry/api.pp | 66 +++++++++++++++++++++++++++ manifests/telemetry/collector.pp | 26 +++++++++++ manifests/telemetry/server.pp | 59 +++++------------------- 5 files changed, 156 insertions(+), 47 deletions(-) create mode 100644 manifests/telemetry/alarmevaluator.pp create mode 100644 manifests/telemetry/alarmnotifier.pp create mode 100644 manifests/telemetry/api.pp create mode 100644 manifests/telemetry/collector.pp diff --git a/manifests/telemetry/alarmevaluator.pp b/manifests/telemetry/alarmevaluator.pp new file mode 100644 index 00000000..4308850b --- /dev/null +++ b/manifests/telemetry/alarmevaluator.pp @@ -0,0 +1,26 @@ +# +# Copyright (C) 2014 eNovance SAS +# +# 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. +# +# Telemetry Alarm Evaluator nodes +# + +class cloud::telemetry::alarmevaluator( +){ + + include 'cloud::telemetry' + + class { 'ceilometer::alarm::evaluator': } + +} diff --git a/manifests/telemetry/alarmnotifier.pp b/manifests/telemetry/alarmnotifier.pp new file mode 100644 index 00000000..f07ca932 --- /dev/null +++ b/manifests/telemetry/alarmnotifier.pp @@ -0,0 +1,26 @@ +# +# Copyright (C) 2014 eNovance SAS +# +# 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. +# +# Telemetry Alarm Notifier nodes +# + +class cloud::telemetry::alarmnotifier( +){ + + include 'cloud::telemetry' + + class { 'ceilometer::alarm::notifier': } + +} diff --git a/manifests/telemetry/api.pp b/manifests/telemetry/api.pp new file mode 100644 index 00000000..a7c5acf5 --- /dev/null +++ b/manifests/telemetry/api.pp @@ -0,0 +1,66 @@ +# +# Copyright (C) 2014 eNovance SAS +# +# 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. +# +# Telemetry API nodes +# + +class cloud::telemetry::api( + $ks_keystone_internal_host = '127.0.0.1', + $ks_keystone_internal_proto = 'http', + $ks_ceilometer_internal_port = '8777', + $ks_ceilometer_password = 'ceilometerpassword', + $api_eth = '127.0.0.1', + $mongo_nodes = ['127.0.0.1:27017'], +){ + + include 'cloud::telemetry' + + $s_mongo_nodes = join($mongo_nodes, ',') + $db_conn = "mongodb://${s_mongo_nodes}/ceilometer?replicaSet=ceilometer" + + class { 'ceilometer::db': + database_connection => $db_conn, + sync_db => true, + require => Anchor['mongodb setup done'], + } + + class { 'ceilometer::api': + keystone_password => $ks_ceilometer_password, + keystone_host => $ks_keystone_internal_host, + keystone_protocol => $ks_keystone_internal_proto, + host => $api_eth + } + +# Configure TTL for samples +# Purge datas older than one month +# Run the script once a day but with a random time to avoid +# issues with MongoDB access + class { 'ceilometer::expirer': + time_to_live => '2592000', + minute => '0', + hour => '0', + } + + Cron <<| title == 'ceilometer-expirer' |>> { command => "sleep $((\$RANDOM % 86400)) && ${::ceilometer::params::expirer_command}" } + + @@haproxy::balancermember{"${::fqdn}-ceilometer_api": + listening_service => 'ceilometer_api_cluster', + server_names => $::hostname, + ipaddresses => $api_eth, + ports => $ks_ceilometer_internal_port, + options => 'check inter 2000 rise 2 fall 5' + } + +} diff --git a/manifests/telemetry/collector.pp b/manifests/telemetry/collector.pp new file mode 100644 index 00000000..3a731c8f --- /dev/null +++ b/manifests/telemetry/collector.pp @@ -0,0 +1,26 @@ +# +# Copyright (C) 2014 eNovance SAS +# +# 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. +# +# Telemetry Collector nodes +# + +class cloud::telemetry::collector( +){ + + include 'cloud::telemetry' + + class { 'ceilometer::collector': } + +} diff --git a/manifests/telemetry/server.pp b/manifests/telemetry/server.pp index aa9ebacf..962ac69f 100644 --- a/manifests/telemetry/server.pp +++ b/manifests/telemetry/server.pp @@ -19,59 +19,24 @@ class cloud::telemetry::server( $ks_keystone_internal_host = '127.0.0.1', $ks_keystone_internal_proto = 'http', - $ks_ceilometer_internal_port = '5000', + $ks_ceilometer_internal_port = '8777', $ks_ceilometer_password = 'ceilometerpassword', $api_eth = '127.0.0.1', $mongo_nodes = ['127.0.0.1:27017'], ){ - include 'cloud::telemetry' + warning('This class is deprecated. You should use cloud::telemetry::api,collector,alarmnotifier,alarmevaluator.') - $s_mongo_nodes = join($mongo_nodes, ',') - $db_conn = "mongodb://${s_mongo_nodes}/ceilometer?replicaSet=ceilometer" - - # Install MongoDB database - class { 'ceilometer::db': - database_connection => $db_conn, - sync_db => true, - require => Anchor['mongodb setup done'], - } - -# Install Ceilometer-collector - class { 'ceilometer::collector': } - -# Install Ceilometer-evaluator - class { 'ceilometer::alarm::evaluator': } - -# Install Ceilometer-notifier - class { 'ceilometer::alarm::notifier': } - -# Install Ceilometer-API - class { 'ceilometer::api': - keystone_password => $ks_ceilometer_password, - keystone_host => $ks_keystone_internal_host, - keystone_protocol => $ks_keystone_internal_proto, - host => $api_eth - } - -# Configure TTL for samples -# Purge datas older than one month -# Run the script once a day but with a random time to avoid -# issues with MongoDB access - class { 'ceilometer::expirer': - time_to_live => '2592000', - minute => '0', - hour => '0', - } - - Cron <<| title == 'ceilometer-expirer' |>> { command => "sleep $((\$RANDOM % 86400)) && ${::ceilometer::params::expirer_command}" } - - @@haproxy::balancermember{"${::fqdn}-ceilometer_api": - listening_service => 'ceilometer_api_cluster', - server_names => $::hostname, - ipaddresses => $api_eth, - ports => $ks_ceilometer_internal_port, - options => 'check inter 2000 rise 2 fall 5' + class { 'cloud::telemetry::api': + ks_keystone_internal_host => $ks_keystone_internal_host, + ks_keystone_internal_proto => $ks_keystone_internal_proto, + ks_ceilometer_internal_port => $ks_ceilometer_internal_port, + ks_ceilometer_password => $ks_ceilometer_password, + api_eth => $api_eth, + mongo_nodes => $mongo_nodes, } + class { 'cloud::telemetry::alarmevaluator': } + class { 'cloud::telemetry::alarmnotifier': } + class { 'cloud::telemetry::collector': } } From 3ea47e873bb43b2e1606c1ed4ad616a81d23a593 Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Wed, 23 Apr 2014 14:19:24 +0200 Subject: [PATCH 4/5] splitting: Volume services Split cloud::volume::controller to * cloud::volume::api * cloud::volume::backup * cloud::volume::scheduler Maintains backward compatibility and warn the end user about deprecation. Bug #346 --- manifests/volume/api.pp | 63 ++++++++++++++++++++++++++++++++ manifests/volume/backup.pp | 35 ++++++++++++++++++ manifests/volume/controller.pp | 66 ++++++++++------------------------ manifests/volume/scheduler.pp | 36 +++++++++++++++++++ 4 files changed, 153 insertions(+), 47 deletions(-) create mode 100644 manifests/volume/api.pp create mode 100644 manifests/volume/backup.pp create mode 100644 manifests/volume/scheduler.pp diff --git a/manifests/volume/api.pp b/manifests/volume/api.pp new file mode 100644 index 00000000..34a88399 --- /dev/null +++ b/manifests/volume/api.pp @@ -0,0 +1,63 @@ +# +# Copyright (C) 2014 eNovance SAS +# +# 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. +# +# Volume API node +# + +class cloud::volume::api( + $ks_cinder_internal_port = 8776, + $ks_cinder_password = 'cinderpassword', + $ks_keystone_internal_host = '127.0.0.1', + $ks_glance_internal_host = '127.0.0.1', + $ks_glance_api_internal_port = 9292, + $api_eth = '127.0.0.1', + $default_volume_type = undef, + # Maintain backward compatibility for multi-backend + $volume_multi_backend = false +) { + + include 'cloud::volume' + + if ! $volume_multi_backend { + $default_volume_type_real = undef + } else { + if ! $default_volume_type { + fail('when using multi-backend, you should define a default_volume_type value in cloud::volume::controller') + } else { + $default_volume_type_real = $default_volume_type + } + } + + class { 'cinder::api': + keystone_password => $ks_cinder_password, + keystone_auth_host => $ks_keystone_internal_host, + bind_host => $api_eth, + default_volume_type => $default_volume_type_real + } + + class { 'cinder::glance': + glance_api_servers => "${ks_glance_internal_host}:${ks_glance_api_internal_port}", + glance_request_timeout => '10' + } + + @@haproxy::balancermember{"${::fqdn}-cinder_api": + listening_service => 'cinder_api_cluster', + server_names => $::hostname, + ipaddresses => $api_eth, + ports => $ks_cinder_internal_port, + options => 'check inter 2000 rise 2 fall 5' + } + +} diff --git a/manifests/volume/backup.pp b/manifests/volume/backup.pp new file mode 100644 index 00000000..881c3c9e --- /dev/null +++ b/manifests/volume/backup.pp @@ -0,0 +1,35 @@ +# +# Copyright (C) 2014 eNovance SAS +# +# 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. +# +# Volume Backup node +# + +class cloud::volume::backup( + # TODO(EmilienM) Disabled for now: http://git.io/kfTmcA + # $backup_ceph_pool = $os_params::cinder_rbd_backup_pool, + # $backup_ceph_user = $os_params::cinder_rbd_backup_user +) { + + include 'cloud::volume' + + class { 'cinder::backup': } + + # TODO(EmilienM) Disabled for now: http://git.io/kfTmcA + # class { 'cinder::backup::ceph': + # backup_ceph_user => $backup_ceph_user, + # backup_ceph_pool => $backup_ceph_pool + # } + +} \ No newline at end of file diff --git a/manifests/volume/controller.pp b/manifests/volume/controller.pp index eb19ae6d..a19fe6e3 100644 --- a/manifests/volume/controller.pp +++ b/manifests/volume/controller.pp @@ -23,59 +23,31 @@ class cloud::volume::controller( $ks_glance_internal_host = '127.0.0.1', $ks_glance_api_internal_port = 9292, $api_eth = '127.0.0.1', - # Maintain backward compatibility for multi-backend - $volume_multi_backend = false, $default_volume_type = undef, - # TODO(EmilienM) Disabled for now: http://git.io/kfTmcA - # $backup_ceph_pool = 'backup', - # $backup_ceph_user = 'cinder' + # Maintain backward compatibility for multi-backend + $volume_multi_backend = false ) { + warning('This class is deprecated. You should use cloud::volume::api,backup,scheduler.') + include 'cloud::volume' - if ! $volume_multi_backend { - $scheduler_driver_real = false - $default_volume_type_real = undef - } else { - $scheduler_driver_real = 'cinder.scheduler.filter_scheduler.FilterScheduler' - - if ! $default_volume_type { - fail('when using multi-backend, you should define a default_volume_type value in cloud::volume::controller') - } else { - $default_volume_type_real = $default_volume_type - } + # Maintain backward compatibility + class { 'cloud::volume::api': + ks_cinder_internal_port => $ks_cinder_internal_port, + ks_cinder_password => $ks_cinder_password, + ks_keystone_internal_host => $ks_keystone_internal_host, + ks_glance_internal_host => $ks_glance_internal_host, + ks_glance_api_internal_port => $ks_glance_api_internal_port, + api_eth => $api_eth, + default_volume_type => $default_volume_type, + # Maintain backward compatibility for multi-backend + volume_multi_backend => $volume_multi_backend + } + class { 'cloud::volume::scheduler': + volume_multi_backend => $volume_multi_backend } - class { 'cinder::scheduler': - scheduler_driver => $scheduler_driver_real - } - - class { 'cinder::api': - keystone_password => $ks_cinder_password, - keystone_auth_host => $ks_keystone_internal_host, - bind_host => $api_eth, - default_volume_type => $default_volume_type_real - } - - class { 'cinder::backup': } - - # TODO(EmilienM) Disabled for now: http://git.io/kfTmcA - # class { 'cinder::backup::ceph': - # backup_ceph_user => $backup_ceph_user, - # backup_ceph_pool => $backup_ceph_pool - # } - - class { 'cinder::glance': - glance_api_servers => "${ks_glance_internal_host}:${ks_glance_api_internal_port}", - glance_request_timeout => '10' - } - - @@haproxy::balancermember{"${::fqdn}-cinder_api": - listening_service => 'cinder_api_cluster', - server_names => $::hostname, - ipaddresses => $api_eth, - ports => $ks_cinder_internal_port, - options => 'check inter 2000 rise 2 fall 5' - } + class { 'cloud::volume::backup': } } diff --git a/manifests/volume/scheduler.pp b/manifests/volume/scheduler.pp new file mode 100644 index 00000000..dafcede5 --- /dev/null +++ b/manifests/volume/scheduler.pp @@ -0,0 +1,36 @@ +# +# Copyright (C) 2014 eNovance SAS +# +# 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. +# +# Volume Scheduler node +# + +class cloud::volume::scheduler( + # Maintain backward compatibility for multi-backend + $volume_multi_backend = false +) { + + include 'cloud::volume' + + if ! $volume_multi_backend { + $scheduler_driver_real = false + } else { + $scheduler_driver_real = 'cinder.scheduler.filter_scheduler.FilterScheduler' + } + + class { 'cinder::scheduler': + scheduler_driver => $scheduler_driver_real + } + +} From c4a9fa628235a4c8c9a2ab0b9aebe64d365bbfdd Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Thu, 24 Apr 2014 09:11:11 +0200 Subject: [PATCH 5/5] default values: rebase after splitting set default values for splitted subclasses. Bug #346 --- manifests/image/api.pp | 66 ++++++++++++++++++------------------- manifests/image/registry.pp | 43 ++++++++++++------------ manifests/volume/backup.pp | 7 ++-- 3 files changed, 57 insertions(+), 59 deletions(-) diff --git a/manifests/image/api.pp b/manifests/image/api.pp index c8a19f72..eadef089 100644 --- a/manifests/image/api.pp +++ b/manifests/image/api.pp @@ -21,72 +21,72 @@ # # [*glance_db_host*] # (optional) Hostname or IP address to connect to glance database -# Default value in params +# Defaults to '127.0.0.1' # # [*glance_db_user*] # (optional) Username to connect to glance database -# Default value in params +# Defaults to 'glance' # # [*glance_db_password*] # (optional) Password to connect to glance database -# Default value in params +# Defaults to 'glancepassword' # # [*ks_keystone_internal_host*] # (optional) Internal Hostname or IP to connect to Keystone API -# Default value in params +# Defaults to '127.0.0.1' # # [*ks_glance_api_internal_port*] # (optional) TCP port to connect to Glance API from internal network -# Default value in params +# Defaults to '9292' # # [*ks_glance_registry_internal_port*] # (optional) TCP port to connect to Glance Registry from internal network -# Default value in params +# Defaults to '9191' # # [*ks_glance_password*] # (optional) Password used by Glance to connect to Keystone API -# Default value in params +# Defaults to 'glancepassword' # -# [*rabbit_hosts*] -# (optional) List of RabbitMQ servers. Should be an array. -# Default value in params +# [*rabbit_host*] +# (optional) IP or Hostname of one RabbitMQ server. +# Defaults to '127.0.0.1' # # [*rabbit_password*] -# (optional) Password to connect to nova queues. -# Default value in params +# (optional) Password to connect to glance queue. +# Defaults to 'rabbitpassword' # # [*api_eth*] # (optional) Which interface we bind the Glance API server. -# Default value in params +# Defaults to '127.0.0.1' # # [*use_syslog*] # (optional) Use syslog for logging -# Defaults value in params +# Defaults to true # # [*log_facility*] # (optional) Syslog facility to receive log lines -# Defaults value in params +# Defaults to 'LOG_LOCAL0' # class cloud::image::api( - $glance_db_host = $os_params::glance_db_host, - $glance_db_user = $os_params::glance_db_user, - $glance_db_password = $os_params::glance_db_password, - $ks_keystone_internal_host = $os_params::ks_keystone_internal_host, - $ks_glance_internal_host = $os_params::ks_glance_internal_host, - $ks_glance_api_internal_port = $os_params::ks_glance_api_internal_port, - $ks_glance_registry_internal_port = $os_params::ks_glance_registry_internal_port, - $ks_glance_password = $os_params::ks_glance_password, - $rabbit_password = $os_params::rabbit_password, - $rabbit_host = $os_params::rabbit_host, - $api_eth = $os_params::api_eth, - $openstack_vip = $os_params::vip_public_ip, - $glance_rbd_pool = $os_params::glance_rbd_pool, - $glance_rbd_user = $os_params::glance_rbd_user, - $verbose = $os_params::verbose, - $debug = $os_params::debug, - $log_facility = $os_params::log_facility, - $use_syslog = $os_params::use_syslog + $glance_db_host = '127.0.0.1', + $glance_db_user = 'glance', + $glance_db_password = 'glancepassword', + $ks_keystone_internal_host = '127.0.0.1', + $ks_glance_internal_host = '127.0.0.1', + $ks_glance_api_internal_port = '9292', + $ks_glance_registry_internal_port = '9191', + $ks_glance_password = 'glancepassword', + $rabbit_password = 'rabbit_password', + $rabbit_host = '127.0.0.1', + $api_eth = '127.0.0.1', + $openstack_vip = '127.0.0.1', + $glance_rbd_pool = 'images', + $glance_rbd_user = 'glance', + $verbose = true, + $debug = true, + $log_facility = 'LOG_LOCAL0', + $use_syslog = true ) { # Disable twice logging if syslog is enabled diff --git a/manifests/image/registry.pp b/manifests/image/registry.pp index ddb9d0ba..1cddea29 100644 --- a/manifests/image/registry.pp +++ b/manifests/image/registry.pp @@ -21,55 +21,54 @@ # # [*glance_db_host*] # (optional) Hostname or IP address to connect to glance database -# Default value in params +# Defaults to '127.0.0.1' # # [*glance_db_user*] # (optional) Username to connect to glance database -# Default value in params +# Defaults to 'glance' # # [*glance_db_password*] # (optional) Password to connect to glance database -# Default value in params +# Defaults to 'glancepassword' # # [*ks_keystone_internal_host*] # (optional) Internal Hostname or IP to connect to Keystone API -# Default value in params +# Defaults to '127.0.0.1' # # [*ks_glance_registry_internal_port*] # (optional) TCP port to connect to Glance Registry from internal network -# Default value in params +# Defaults to '9191' # # [*ks_glance_password*] # (optional) Password used by Glance to connect to Keystone API -# Default value in params +# Defaults to 'glancepassword' # # [*api_eth*] # (optional) Which interface we bind the Glance API server. -# Default value in params +# Defaults to '127.0.0.1' # # [*use_syslog*] # (optional) Use syslog for logging -# Defaults value in params +# Defaults to true # # [*log_facility*] # (optional) Syslog facility to receive log lines -# Defaults value in params +# Defaults to 'LOG_LOCAL0' # - class cloud::image::registry( - $glance_db_host = $os_params::glance_db_host, - $glance_db_user = $os_params::glance_db_user, - $glance_db_password = $os_params::glance_db_password, - $ks_keystone_internal_host = $os_params::ks_keystone_internal_host, - $ks_glance_internal_host = $os_params::ks_glance_internal_host, - $ks_glance_registry_internal_port = $os_params::ks_glance_registry_internal_port, - $ks_glance_password = $os_params::ks_glance_password, - $api_eth = $os_params::api_eth, - $verbose = $os_params::verbose, - $debug = $os_params::debug, - $log_facility = $os_params::log_facility, - $use_syslog = $os_params::use_syslog + $glance_db_host = '127.0.0.1', + $glance_db_user = 'glance', + $glance_db_password = 'glancepassword', + $ks_keystone_internal_host = '127.0.0.1', + $ks_glance_internal_host = '127.0.0.1', + $ks_glance_registry_internal_port = '9191', + $ks_glance_password = 'glancepassword', + $api_eth = '127.0.0.1', + $verbose = true, + $debug = true, + $log_facility = 'LOG_LOCAL0', + $use_syslog = true ) { # Disable twice logging if syslog is enabled diff --git a/manifests/volume/backup.pp b/manifests/volume/backup.pp index 881c3c9e..d8645e3b 100644 --- a/manifests/volume/backup.pp +++ b/manifests/volume/backup.pp @@ -17,9 +17,8 @@ # class cloud::volume::backup( - # TODO(EmilienM) Disabled for now: http://git.io/kfTmcA - # $backup_ceph_pool = $os_params::cinder_rbd_backup_pool, - # $backup_ceph_user = $os_params::cinder_rbd_backup_user + $backup_ceph_pool = 'backup', + $backup_ceph_user = 'cinder' ) { include 'cloud::volume' @@ -32,4 +31,4 @@ class cloud::volume::backup( # backup_ceph_pool => $backup_ceph_pool # } -} \ No newline at end of file +}