Puppet Class: profile::openstack::base::horizon::dashboard_source_deploy

Defined in:
modules/profile/manifests/openstack/base/horizon/dashboard_source_deploy.pp

Overview

Parameters:

  • horizon_version (String) (defaults to: lookup('profile::openstack::base::horizon_version'))
  • openstack_version (String) (defaults to: lookup('profile::openstack::base::version'))
  • keystone_api_fqdn (Stdlib::Fqdn) (defaults to: lookup('profile::openstack::base::keystone_api_fqdn'))
  • dhcp_domain (String) (defaults to: lookup('profile::openstack::base::nova::dhcp_domain'))
  • instance_network_id (String) (defaults to: lookup('profile::openstack::base::horizon::instance_network_id'))
  • ldap_config (Hash) (defaults to: lookup('ldap'))
  • ldap_user_pass (String) (defaults to: lookup('profile::openstack::base::ldap_user_pass'))
  • webserver_hostname (Stdlib::Fqdn) (defaults to: lookup('profile::openstack::base::horizon::webserver_hostname'))
  • all_regions (Array[String]) (defaults to: lookup('profile::openstack::base::all_regions'))
  • puppet_git_repo_name (String) (defaults to: lookup('profile::openstack::base::horizon::puppet_git_repo_name'))
  • puppet_git_repo_user (String) (defaults to: lookup('profile::openstack::base::horizon::puppet_git_repo_user'))
  • maintenance_mode (Boolean) (defaults to: lookup('profile::openstack::base::horizon::maintenance_mode'))
  • secret_key (String) (defaults to: lookup('profile::openstack::base::horizon::secret_key'))


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# File 'modules/profile/manifests/openstack/base/horizon/dashboard_source_deploy.pp', line 1

class profile::openstack::base::horizon::dashboard_source_deploy(
    String          $horizon_version = lookup('profile::openstack::base::horizon_version'),
    String          $openstack_version = lookup('profile::openstack::base::version'),
    Stdlib::Fqdn    $keystone_api_fqdn = lookup('profile::openstack::base::keystone_api_fqdn'),
    String          $dhcp_domain = lookup('profile::openstack::base::nova::dhcp_domain'),
    String          $instance_network_id = lookup('profile::openstack::base::horizon::instance_network_id'),
    Hash            $ldap_config = lookup('ldap'),
    String          $ldap_user_pass = lookup('profile::openstack::base::ldap_user_pass'),
    Stdlib::Fqdn    $webserver_hostname = lookup('profile::openstack::base::horizon::webserver_hostname'),
    Array[String]   $all_regions = lookup('profile::openstack::base::all_regions'),
    String          $puppet_git_repo_name = lookup('profile::openstack::base::horizon::puppet_git_repo_name'),
    String          $puppet_git_repo_user = lookup('profile::openstack::base::horizon::puppet_git_repo_user'),
    Boolean         $maintenance_mode = lookup('profile::openstack::base::horizon::maintenance_mode'),
    String          $secret_key = lookup('profile::openstack::base::horizon::secret_key'),
) {

    $ldap_rw_host = $ldap_config['rw-server']

    ensure_packages('libapache2-mod-wsgi-py3')
    class { '::httpd':
        modules => [
          'alias',
          'expires',
          'headers',
          'proxy_fcgi',  # Needed by ::openstack::wikitech::web
          'rewrite',
          'ssl',
          'wsgi',
        ],
    }

    class { '::openstack::horizon::source_deploy':
        horizon_version      => $horizon_version,
        openstack_version    => $openstack_version,
        keystone_api_fqdn    => $keystone_api_fqdn,
        dhcp_domain          => $dhcp_domain,
        instance_network_id  => $instance_network_id,
        ldap_rw_host         => $ldap_rw_host,
        ldap_user_pass       => $ldap_user_pass,
        webserver_hostname   => $webserver_hostname,
        all_regions          => $all_regions,
        puppet_git_repo_name => $puppet_git_repo_name,
        puppet_git_repo_user => $puppet_git_repo_user,
        maintenance_mode     => $maintenance_mode,
        secret_key           => $secret_key,
    }

    contain '::openstack::horizon::source_deploy'

    ferm::service { 'horizon_http':
        proto  => 'tcp',
        port   => '80',
        srange => '$DOMAIN_NETWORKS'
    }

    # Horizon error logs to ELK.  The Apache log is called horizon_error
    #  but it contains anything that the Horizon python code logs.
    #
    # The arcane startmsg_regex is meant to detect continued lines
    #  in python stack-traces. It declares a new message to begine
    #  with a timestamp followed by a single space; two spaces
    #  is taken to be the indented continuation of a message.
    rsyslog::input::file { 'horizon_error':
        path           => '/var/log/apache2/horizon_error.log',
        syslog_tag     => 'horizon',
        startmsg_regex => '^[[:digit:]-]{10} [[:digit:]:]{8}.[[:digit:]]* [^ ]',
    }
}