Puppet Class: profile::openstack::base::barbican

Defined in:
modules/profile/manifests/openstack/base/barbican.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::barbican::db_user'))
  • db_name (String) (defaults to: lookup('profile::openstack::base::barbican::db_name'))
  • db_pass (String) (defaults to: lookup('profile::openstack::base::barbican::db_pass'))
  • db_host (Stdlib::Fqdn) (defaults to: lookup('profile::openstack::base::barbican::db_host'))
  • ldap_user_pass (String) (defaults to: lookup('profile::openstack::base::ldap_user_pass'))
  • bind_port (Stdlib::Port) (defaults to: lookup('profile::openstack::base::barbican::bind_port'))
  • crypto_kek (String) (defaults to: lookup('profile::openstack::base::barbican::kek'))
  • 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
40
41
42
# File 'modules/profile/manifests/openstack/base/barbican.pp', line 2

class profile::openstack::base::barbican(
    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::barbican::db_user'),
    String $db_name = lookup('profile::openstack::base::barbican::db_name'),
    String $db_pass = lookup('profile::openstack::base::barbican::db_pass'),
    Stdlib::Fqdn $db_host = lookup('profile::openstack::base::barbican::db_host'),
    String $ldap_user_pass = lookup('profile::openstack::base::ldap_user_pass'),
    Stdlib::Port $bind_port = lookup('profile::openstack::base::barbican::bind_port'),
    String $crypto_kek = lookup('profile::openstack::base::barbican::kek'),
    Array[Stdlib::Fqdn] $haproxy_nodes = lookup('profile::openstack::base::haproxy_nodes'),
) {

    class { '::openstack::barbican::service':
        version         => $version,
        memcached_nodes => $openstack_control_nodes.map |OpenStack::ControlNode $node| { $node['cloud_private_fqdn'] },
        keystone_fqdn   => $keystone_fqdn,
        db_user         => $db_user,
        db_pass         => $db_pass,
        crypto_kek      => $crypto_kek,
        db_name         => $db_name,
        db_host         => $db_host,
        ldap_user_pass  => $ldap_user_pass,
        bind_port       => $bind_port,
    }

    firewall::service { 'barbican-api-backend':
        proto  => 'tcp',
        port   => $bind_port,
        srange => $haproxy_nodes,
    }

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