Puppet Class: profile::openstack::base::cinder

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

Overview

Parameters:

  • version (String) (defaults to: lookup('profile::openstack::base::version'))
  • openstack_controllers (Array[Stdlib::Fqdn]) (defaults to: lookup('profile::openstack::base::openstack_controllers'))
  • keystone_fqdn (Stdlib::Fqdn) (defaults to: lookup('profile::openstack::base::keystone_api_fqdn'))
  • auth_port (Stdlib::Port) (defaults to: lookup('profile::openstack::base::keystone::auth_port'))
  • region (String) (defaults to: lookup('profile::openstack::base::region'))
  • db_user (String) (defaults to: lookup('profile::openstack::base::cinder::db_user'))
  • db_name (String) (defaults to: lookup('profile::openstack::base::cinder::db_name'))
  • db_pass (String) (defaults to: lookup('profile::openstack::base::cinder::db_pass'))
  • ldap_user_pass (String) (defaults to: lookup('profile::openstack::base::ldap_user_pass'))
  • db_host (Stdlib::Fqdn) (defaults to: lookup('profile::openstack::base::cinder::db_host'))
  • api_bind_port (Stdlib::Port) (defaults to: lookup('profile::openstack::base::cinder::api_bind_port'))
  • ceph_pool (String) (defaults to: lookup('profile::openstack::base::cinder::ceph_pool'))
  • rabbit_user (String) (defaults to: lookup('profile::openstack::base::nova::rabbit_user'))
  • rabbit_pass (String) (defaults to: lookup('profile::openstack::base::nova::rabbit_pass'))
  • libvirt_rbd_cinder_uuid (String) (defaults to: lookup('profile::ceph::client::rbd::libvirt_rbd_cinder_uuid'))
  • cinder_backup_volumes (Hash) (defaults to: lookup('profile::openstack::base::cinder_backup_volumes'))
  • active (Boolean) (defaults to: lookup('profile::openstack::base::cinder_active'))
  • backup_path (Stdlib::Unixpath) (defaults to: lookup('profile::openstack::base::cinder::backup::path'))
  • ceph_rbd_client_name (String) (defaults to: lookup('profile::openstack::base::cinder::ceph_rbd_client_name'))


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
69
70
71
72
73
74
75
76
77
78
79
80
81
# File 'modules/profile/manifests/openstack/base/cinder.pp', line 1

class profile::openstack::base::cinder(
    String $version = lookup('profile::openstack::base::version'),
    Array[Stdlib::Fqdn] $openstack_controllers = lookup('profile::openstack::base::openstack_controllers'),
    Stdlib::Fqdn $keystone_fqdn = lookup('profile::openstack::base::keystone_api_fqdn'),
    Stdlib::Port $auth_port = lookup('profile::openstack::base::keystone::auth_port'),
    String $region = lookup('profile::openstack::base::region'),
    String $db_user = lookup('profile::openstack::base::cinder::db_user'),
    String $db_name = lookup('profile::openstack::base::cinder::db_name'),
    String $db_pass = lookup('profile::openstack::base::cinder::db_pass'),
    String $ldap_user_pass = lookup('profile::openstack::base::ldap_user_pass'),
    Stdlib::Fqdn $db_host = lookup('profile::openstack::base::cinder::db_host'),
    Stdlib::Port $api_bind_port = lookup('profile::openstack::base::cinder::api_bind_port'),
    String $ceph_pool = lookup('profile::openstack::base::cinder::ceph_pool'),
    String $rabbit_user = lookup('profile::openstack::base::nova::rabbit_user'),
    String $rabbit_pass = lookup('profile::openstack::base::nova::rabbit_pass'),
    String $libvirt_rbd_cinder_uuid = lookup('profile::ceph::client::rbd::libvirt_rbd_cinder_uuid'),
    Hash   $cinder_backup_volumes = lookup('profile::openstack::base::cinder_backup_volumes'),
    Boolean $active = lookup('profile::openstack::base::cinder_active'),
    Stdlib::Unixpath    $backup_path           = lookup('profile::openstack::base::cinder::backup::path'),
    String              $ceph_rbd_client_name  = lookup('profile::openstack::base::cinder::ceph_rbd_client_name'),
    ) {

    $keystone_admin_uri = "https://${keystone_fqdn}:${auth_port}"

    class { "::openstack::cinder::config::${version}":
        openstack_controllers   => $openstack_controllers,
        keystone_admin_uri      => $keystone_admin_uri,
        region                  => $region,
        db_user                 => $db_user,
        db_pass                 => $db_pass,
        db_name                 => $db_name,
        db_host                 => $db_host,
        ceph_pool               => $ceph_pool,
        ceph_rbd_client_name    => $ceph_rbd_client_name,
        api_bind_port           => $api_bind_port,
        ldap_user_pass          => $ldap_user_pass,
        rabbit_user             => $rabbit_user,
        rabbit_pass             => $rabbit_pass,
        libvirt_rbd_cinder_uuid => $libvirt_rbd_cinder_uuid,
        backup_path             => $backup_path,
    }

    class { '::openstack::cinder::service':
        version               => $version,
        active                => $active,
        api_bind_port         => $api_bind_port,
        cinder_backup_volumes => $cinder_backup_volumes,
    }

    class { '::openstack::cinder::monitor':
        active                => $active,
    }

    include ::network::constants
    $prod_networks = join($network::constants::production_networks, ' ')
    $labs_networks = join($network::constants::labs_networks, ' ')

    ferm::rule {'cinder_api_all':
        ensure => 'present',
        rule   => "saddr (${prod_networks} ${labs_networks}
                             ) proto tcp dport (8776 28776) ACCEPT;",
    }

    openstack::db::project_grants { 'cinder':
        access_hosts => $openstack_controllers,
        db_name      => 'cinder',
        db_user      => $db_user,
        db_pass      => $db_pass,
    }

    if debian::codename::eq('bullseye') {
        grub::bootparam { 'disable_unified_cgroup_hierarchy':
            key   => 'systemd.unified_cgroup_hierarchy',
            value => '0',
        }
        grub::bootparam { 'disable_legacy_systemd_cgroup_controller':
            key   => 'systemd.legacy_systemd_cgroup_controller',
            value => '0',
        }
    }
}