From 4ddc4bc1b45ba5e24c88bb4a6a6f20e19b9bec78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Charlier?= Date: Tue, 10 Jul 2012 20:01:45 +0200 Subject: [PATCH] Add the secret_key parameter to the Horizon class --- manifests/all.pp | 8 ++++++-- manifests/controller.pp | 9 ++++++--- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/manifests/all.pp b/manifests/all.pp index b503711..347ca0b 100644 --- a/manifests/all.pp +++ b/manifests/all.pp @@ -15,7 +15,7 @@ # [fixed_range] The fixed private ip range to be created for the private VM network. Optional. Defaults to '10.0.0.0/24'. # [network_manager] The network manager to use for the nova network service. # Optional. Defaults to 'nova.network.manager.FlatDHCPManager'. -# [auto_assign_floating_ip] Rather configured to automatically allocate and +# [auto_assign_floating_ip] Rather configured to automatically allocate and # assign a floating IP address to virtual instances when they are launched. # Defaults to false. # [network_config] Used to specify network manager specific parameters .Optional. Defualts to {}. @@ -30,6 +30,7 @@ # [nova_user_password] The password of the keystone user for the nova service. Optional. Defaults to nova_pass'. # [glance_db_password] The password for the db user for glance. Optional. Defaults to 'glance_pass'. # [glance_user_password] The password of the glance service user. Optional. Defaults to 'glance_pass'. +# [secret_key] The secret key for horizon. Optional. Defaults to 'dummy_secret_key'. # [verbose] If the services should log verbosely. Optional. Defaults to false. # [purge_nova_config] Whether unmanaged nova.conf entries should be purged. Optional. Defaults to true. # [libvirt_type] The virualization type being controlled by libvirt. Optional. Defaults to 'kvm'. @@ -73,6 +74,7 @@ class openstack::all( $nova_user_password = 'nova_pass', $glance_db_password = 'glance_pass', $glance_user_password = 'glance_pass', + $secret_key = 'dummy_secret_key', # config $verbose = false, $auto_assign_floating_ip = false, @@ -265,7 +267,9 @@ class openstack::all( listen_ip => '127.0.0.1', } - class { 'horizon': } + class { 'horizon': + secret_key => $secret_key, + } ######## End Horizon ##### diff --git a/manifests/controller.pp b/manifests/controller.pp index fe7d910..d9bf7bc 100644 --- a/manifests/controller.pp +++ b/manifests/controller.pp @@ -26,7 +26,7 @@ # [num_networks] Number of networks that fixed range should be split into. # [multi_host] Rather node should support multi-host networking mode for HA. # Optional. Defaults to false. -# [auto_assign_floating_ip] Rather configured to automatically allocate and +# [auto_assign_floating_ip] Rather configured to automatically allocate and # assign a floating IP address to virtual instances when they are launched. # Defaults to false. # [network_config] Hash that can be used to pass implementation specifc @@ -34,6 +34,7 @@ # [verbose] Rahter to log services at verbose. # [export_resources] Rather to export resources. # Horizon related config - assumes puppetlabs-horizon code +# [secret_key] secret key to encode cookies, … # [cache_server_ip] local memcached instance ip # [cache_server_port] local memcached instance port # [swift] (bool) is swift installed @@ -81,6 +82,7 @@ class openstack::controller( # I do not think that this needs a bridge? $verbose = false, $export_resources = true, + $secret_key = 'dummy_secret_key', $cache_server_ip = '127.0.0.1', $cache_server_port = '11211', $swift = false, @@ -158,7 +160,7 @@ class openstack::controller( class { 'keystone::config::mysql': password => $keystone_db_password, } - + if ($enabled) { # set up keystone admin users class { 'keystone::roles::admin': @@ -277,7 +279,7 @@ class openstack::controller( } if $enabled { - $really_create_networks = $create_networks + $really_create_networks = $create_networks } else { $really_create_networks = false } @@ -309,6 +311,7 @@ class openstack::controller( } class { 'horizon': + secret_key => $secret_key, cache_server_ip => $cache_server_ip, cache_server_port => $cache_server_port, swift => $swift,