puppet: install Horizon on overcloud-controller
authorEmilien Macchi <emilien@redhat.com>
Sat, 14 Mar 2015 03:19:30 +0000 (23:19 -0400)
committerGiulio Fidente <gfidente@redhat.com>
Mon, 27 Apr 2015 12:15:35 +0000 (14:15 +0200)
Install OpenStack Dashboad (Horizon) on the Overcloud Controller with
Puppet.

Co-Authored-By: Giulio Fidente <gfidente@redhat.com>
Depends-On: If9b12d373e407be8be8428d77145f131eb450e88
Change-Id: I254e895014f58a51dade3dcdc63eabbb5dc458ac

controller.yaml
overcloud-without-mergepy.yaml
puppet/all-nodes-config.yaml
puppet/controller-puppet.yaml
puppet/hieradata/controller.yaml
puppet/manifests/overcloud_controller.pp

index 483ecc8..a69d2d0 100644 (file)
@@ -157,6 +157,9 @@ parameters:
   HeatAuthEncryptionKey:
     description: Auth encryption key for heat-engine
     type: string
+  HorizonSecret:
+    description: Secret key for Django
+    type: string
   Image:
     type: string
     default: overcloud-control
index 142e502..88f26ac 100644 (file)
@@ -534,6 +534,11 @@ resources:
     properties:
       length: 16
 
+  HorizonSecret:
+    type: OS::Heat::RandomString
+    properties:
+      length: 10
+
   Controller:
     type: OS::Heat::ResourceGroup
     properties:
@@ -568,6 +573,7 @@ resources:
           HeatPassword: {get_param: HeatPassword}
           HeatStackDomainAdminPassword: {get_param: HeatStackDomainAdminPassword}
           HeatAuthEncryptionKey: {get_resource: HeatAuthEncryptionKey}
+          HorizonSecret: {get_resource: HorizonSecret}
           Image: {get_param: controllerImage}
           ImageUpdatePolicy: {get_param: ImageUpdatePolicy}
           KeyName: {get_param: KeyName}
index 7a4df79..09882c1 100644 (file)
@@ -66,6 +66,10 @@ resources:
                   list_join:
                   - ','
                   - {get_param: controller_ips}
+                memcache_node_ips:
+                  list_join:
+                  - ','
+                  - {get_param: controller_ips}
 
 outputs:
   config_id:
index d395546..64b1a92 100644 (file)
@@ -157,6 +157,9 @@ parameters:
   HeatAuthEncryptionKey:
     description: Auth encryption key for heat-engine
     type: string
+  HorizonSecret:
+    description: Secret key for Django
+    type: string
   Image:
     type: string
     default: overcloud-control
@@ -469,6 +472,7 @@ resources:
               - {get_param: VirtualIP}
               - ':8000/v1/waitcondition'
         heat_auth_encryption_key: {get_param: HeatAuthEncryptionKey}
+        horizon_secret: {get_param: HorizonSecret}
         admin_password: {get_param: AdminPassword}
         admin_token: {get_param: AdminToken}
         neutron_public_interface_ip: {get_param: NeutronPublicInterfaceIP}
@@ -816,6 +820,12 @@ resources:
                 nova::network::neutron::neutron_url: {get_input: neutron_url}
                 nova::network::neutron::neutron_admin_auth_url: {get_input: neutron_admin_auth_url}
 
+                # Horizon
+                horizon::django_debug: {get_input: debug}
+                horizon::secret_key: {get_input: horizon_secret}
+                horizon::bind_address: {get_input: controller_host}
+                horizon::keystone_url: {get_input: keystone_auth_uri}
+
                 # Rabbit
                 rabbitmq::node_ip_address: {get_input: controller_host}
                 rabbitmq::erlang_cookie: {get_input: rabbit_cookie}
index 5cf9f35..e4ddf65 100644 (file)
@@ -81,6 +81,9 @@ heat::engine::trusts_delegated_roles: []
 pacemaker::corosync::cluster_name: 'tripleo_cluster'
 pacemaker::corosync::manage_fw: false
 
+# horizon
+horizon::allowed_hosts: '*'
+
 mysql::server::manage_config_file: true
 
 tripleo::loadbalancer::keystone_admin: true
index b1ccf3d..ad10cd3 100644 (file)
@@ -409,6 +409,13 @@ if hiera('step') >= 3 {
   include ::heat::api_cloudwatch
   include ::heat::engine
 
+  # Horizon
+  $vhost_params = { add_listen => false }
+  class { 'horizon':
+    cache_server_ip    => split(hiera('memcache_node_ips', '127.0.0.1'), ','),
+    vhost_extra_params => $vhost_params,
+  }
+
   $snmpd_user = hiera('snmpd_readonly_user_name')
   snmp::snmpv3_user { $snmpd_user:
     authtype => 'MD5',