Puppet Class: openstack::nova::common

Defined in:
modules/openstack/manifests/nova/common.pp

Overview

Parameters:

  • version (Any)
  • region (Any)
  • db_user (Any)
  • db_pass (Any)
  • db_host (Any)
  • db_name (Any)
  • db_name_api (Any)
  • openstack_controllers (Array[Stdlib::Fqdn])
  • rabbitmq_nodes (Array[Stdlib::Fqdn])
  • keystone_fqdn (Stdlib::Fqdn)
  • scheduler_filters (Any)
  • ldap_user_pass (Any)
  • rabbit_user (Any)
  • rabbit_pass (Any)
  • metadata_proxy_shared_secret (Any)
  • compute_workers (Any)
  • metadata_listen_port (Stdlib::Port)
  • osapi_compute_listen_port (Stdlib::Port)
  • is_control_node (Boolean)


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
# File 'modules/openstack/manifests/nova/common.pp', line 1

class openstack::nova::common(
    $version,
    $region,
    $db_user,
    $db_pass,
    $db_host,
    $db_name,
    $db_name_api,
    Array[Stdlib::Fqdn] $openstack_controllers,
    Array[Stdlib::Fqdn] $rabbitmq_nodes,
    Stdlib::Fqdn $keystone_fqdn,
    $scheduler_filters,
    $ldap_user_pass,
    $rabbit_user,
    $rabbit_pass,
    $metadata_proxy_shared_secret,
    $compute_workers,
    Stdlib::Port $metadata_listen_port,
    Stdlib::Port $osapi_compute_listen_port,
    Boolean $is_control_node,
) {

    class { "openstack::nova::common::${version}::${::lsbdistcodename}": }

    file { '/etc/nova/policy.yaml':
        source  => "puppet:///modules/openstack/${version}/nova/common/policy.yaml",
        mode    => '0644',
        owner   => 'root',
        group   => 'root',
        require => Package['nova-common'],
    }

    $keystone_auth_username = 'novaadmin'
    $keystone_auth_project = 'admin'
    file { '/etc/nova/nova.conf':
        content   => template("openstack/${version}/nova/common/nova.conf.erb"),
        owner     => 'nova',
        group     => 'nogroup',
        mode      => '0440',
        show_diff => false,
        require   => Package['nova-common'];
    }

    if debian::codename::ge('buster') {
        # The Buster version of the Rocky packages creates the nova user
        #  with a weird high-number uid.  Try to head it off by creating here
        #  ahead of time.
        group { 'nova':
            ensure => 'present',
            name   => 'nova',
            system => true,
        }

        user { 'nova':
            ensure     => 'present',
            name       => 'nova',
            comment    => 'nova system user',
            gid        => 'nova',
            home       => '/var/lib/nova',
            managehome => false,
            before     => Package['nova-common'],
            system     => true,
        }
    }

}