Puppet Class: profile::openstack::base::puppetmaster::backend

Defined in:
modules/profile/manifests/openstack/base/puppetmaster/backend.pp

Overview

Parameters:

  • designate_host (Any) (defaults to: hiera('profile::openstack::base::designate_host'))
  • second_region_designate_host (Any) (defaults to: hiera('profile::openstack::base::second_region_designate_host'))
  • puppetmaster_webhostname (Any) (defaults to: hiera('profile::openstack::base::puppetmaster::web_hostname'))
  • puppetmaster_hostname (Any) (defaults to: hiera('profile::openstack::base::puppetmaster_hostname'))
  • puppetmaster_ca (Any) (defaults to: hiera('profile::openstack::base::puppetmaster::ca'))
  • puppetmasters (Any) (defaults to: hiera('profile::openstack::base::puppetmaster::servers'))
  • encapi_db_host (Any) (defaults to: hiera('profile::openstack::base::puppetmaster::encapi::db_host'))
  • encapi_db_name (Any) (defaults to: hiera('profile::openstack::base::puppetmaster::encapi::db_name'))
  • encapi_db_user (Any) (defaults to: hiera('profile::openstack::base::puppetmaster::encapi::db_user'))
  • encapi_db_pass (Any) (defaults to: hiera('profile::openstack::base::puppetmaster::encapi::db_pass'))
  • encapi_statsd_prefix (Any) (defaults to: hiera('profile::openstack::base::puppetmaster::encapi::statsd_prefix'))
  • statsd_host (Any) (defaults to: hiera('profile::openstack::base::statsd_host'))
  • labweb_hosts (Any) (defaults to: hiera('profile::openstack::base::labweb_hosts'))
  • nova_controller (Any) (defaults to: hiera('profile::openstack::base::nova_controller'))


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
# File 'modules/profile/manifests/openstack/base/puppetmaster/backend.pp', line 1

class profile::openstack::base::puppetmaster::backend(
    $designate_host = hiera('profile::openstack::base::designate_host'),
    $second_region_designate_host = hiera('profile::openstack::base::second_region_designate_host'),
    $puppetmaster_webhostname = hiera('profile::openstack::base::puppetmaster::web_hostname'),
    $puppetmaster_hostname = hiera('profile::openstack::base::puppetmaster_hostname'),
    $puppetmaster_ca = hiera('profile::openstack::base::puppetmaster::ca'),
    $puppetmasters = hiera('profile::openstack::base::puppetmaster::servers'),
    $encapi_db_host = hiera('profile::openstack::base::puppetmaster::encapi::db_host'),
    $encapi_db_name = hiera('profile::openstack::base::puppetmaster::encapi::db_name'),
    $encapi_db_user = hiera('profile::openstack::base::puppetmaster::encapi::db_user'),
    $encapi_db_pass = hiera('profile::openstack::base::puppetmaster::encapi::db_pass'),
    $encapi_statsd_prefix = hiera('profile::openstack::base::puppetmaster::encapi::statsd_prefix'),
    $statsd_host = hiera('profile::openstack::base::statsd_host'),
    $labweb_hosts = hiera('profile::openstack::base::labweb_hosts'),
    $nova_controller = hiera('profile::openstack::base::nova_controller'),
    ) {

    require ::profile::conftool::client
    include ::network::constants
    class {'profile::openstack::base::puppetmaster::common':
        designate_host               => $designate_host,
        second_region_designate_host => $second_region_designate_host,
        puppetmaster_webhostname     => $puppetmaster_webhostname,
        puppetmaster_hostname        => $puppetmaster_hostname,
        puppetmasters                => $puppetmasters,
        encapi_db_host               => $encapi_db_host,
        encapi_db_name               => $encapi_db_name,
        encapi_db_user               => $encapi_db_user,
        encapi_db_pass               => $encapi_db_pass,
        encapi_statsd_prefix         => $encapi_statsd_prefix,
        statsd_host                  => $statsd_host,
        labweb_hosts                 => $labweb_hosts,
        nova_controller              => $nova_controller,
    }

    # Only allow puppet access from the instances
    $labs_networks = join($network::constants::labs_networks, ' ')
    $allow_from = flatten([$network::constants::labs_networks, '.wikimedia.org'])

    $config = {
        'node_terminus'     => 'exec',
        'external_nodes'    => '/usr/local/bin/puppet-enc',
        'thin_storeconfigs' => false,
        'autosign'          => true,
    }

    # urls are different in v4 so we need to modify our auth rules accordingly
    $puppet_major_version = hiera('puppet_major_version', 3)
    $extra_auth_rules_template = $puppet_major_version ? {
        4       => 'extra_auth_rules_v4.conf.erb',
        default => 'extra_auth_rules.conf.erb',
    }

    class { '::profile::puppetmaster::backend':
        config           => $config,
        secure_private   => false,
        allow_from       => $allow_from,
        puppetmasters    => $puppetmasters,
        ca_server        => $puppetmaster_ca,
        extra_auth_rules => template("profile/openstack/base/puppetmaster/${extra_auth_rules_template}"),
    }
}