Puppet Class: profile::openstack::base::placement

Defined in:
modules/profile/manifests/openstack/base/placement.pp

Overview

SPDX-License-Identifier: Apache-2.0

Parameters:

  • version (String) (defaults to: lookup('profile::openstack::base::version'))
  • openstack_control_nodes (Array[OpenStack::ControlNode]) (defaults to: lookup('profile::openstack::base::openstack_control_nodes'))
  • keystone_fqdn (Stdlib::Fqdn) (defaults to: lookup('profile::openstack::base::keystone_api_fqdn'))
  • db_user (String) (defaults to: lookup('profile::openstack::base::placement::db_user'))
  • db_name (String) (defaults to: lookup('profile::openstack::base::placement::db_name'))
  • db_pass (String) (defaults to: lookup('profile::openstack::base::placement::db_pass'))
  • db_host (Stdlib::Fqdn) (defaults to: lookup('profile::openstack::base::placement::db_host'))
  • ldap_user_pass (String) (defaults to: lookup('profile::openstack::base::ldap_user_pass'))
  • api_bind_port (Stdlib::Port) (defaults to: lookup('profile::openstack::base::placement::api_bind_port'))
  • haproxy_nodes (Array[Stdlib::Fqdn]) (defaults to: lookup('profile::openstack::base::haproxy_nodes'))


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

class profile::openstack::base::placement(
    String $version = lookup('profile::openstack::base::version'),
    Array[OpenStack::ControlNode] $openstack_control_nodes = lookup('profile::openstack::base::openstack_control_nodes'),
    Stdlib::Fqdn $keystone_fqdn = lookup('profile::openstack::base::keystone_api_fqdn'),
    String $db_user = lookup('profile::openstack::base::placement::db_user'),
    String $db_name = lookup('profile::openstack::base::placement::db_name'),
    String $db_pass = lookup('profile::openstack::base::placement::db_pass'),
    Stdlib::Fqdn $db_host = lookup('profile::openstack::base::placement::db_host'),
    String $ldap_user_pass = lookup('profile::openstack::base::ldap_user_pass'),
    Stdlib::Port $api_bind_port = lookup('profile::openstack::base::placement::api_bind_port'),
    Array[Stdlib::Fqdn] $haproxy_nodes = lookup('profile::openstack::base::haproxy_nodes'),
) {
    class { '::openstack::placement::service':
        memcached_nodes => $openstack_control_nodes.map |$node| { $node['cloud_private_fqdn'] },
        version         => $version,
        keystone_fqdn   => $keystone_fqdn,
        db_user         => $db_user,
        db_pass         => $db_pass,
        db_name         => $db_name,
        db_host         => $db_host,
        ldap_user_pass  => $ldap_user_pass,
        api_bind_port   => $api_bind_port,
    }

    ferm::service { 'placement-api-backend':
        proto  => 'tcp',
        port   => $api_bind_port,
        srange => "@resolve((${haproxy_nodes.join(' ')}))",
    }

    openstack::db::project_grants { 'placement':
        access_hosts => $haproxy_nodes,
        db_name      => 'placement',
        db_user      => $db_user,
        db_pass      => $db_pass,
        require      => Package['placement-api'],
    }
}