Puppet Class: openstack::magnum::service::bobcat

Defined in:
modules/openstack/manifests/magnum/service/bobcat.pp

Overview

Parameters:

  • db_user (String)
  • region (String)
  • memcached_nodes (Array[Stdlib::Fqdn])
  • rabbitmq_nodes (Array[Stdlib::Fqdn])
  • db_pass (String)
  • db_name (String)
  • db_host (Stdlib::Fqdn)
  • etcd_discovery_host (Stdlib::Fqdn)
  • ldap_user_pass (String)
  • keystone_fqdn (Stdlib::Fqdn)
  • api_bind_port (Stdlib::Port)
  • rabbit_user (String)
  • rabbit_pass (String)
  • domain_admin_pass (String)
  • enforce_policy_scope (Boolean)
  • enforce_new_policy_defaults (Boolean)


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
# File 'modules/openstack/manifests/magnum/service/bobcat.pp', line 3

class openstack::magnum::service::bobcat(
    String $db_user,
    String $region,
    Array[Stdlib::Fqdn] $memcached_nodes,
    Array[Stdlib::Fqdn] $rabbitmq_nodes,
    String $db_pass,
    String $db_name,
    Stdlib::Fqdn $db_host,
    Stdlib::Fqdn $etcd_discovery_host,
    String $ldap_user_pass,
    Stdlib::Fqdn $keystone_fqdn,
    Stdlib::Port $api_bind_port,
    String $rabbit_user,
    String $rabbit_pass,
    String $domain_admin_pass,
    Boolean $enforce_policy_scope,
    Boolean $enforce_new_policy_defaults,
) {
    require "openstack::serverpackages::bobcat::${::lsbdistcodename}"

    package { 'magnum-api':
        ensure => 'present',
    }
    package { 'magnum-conductor':
        ensure => 'present',
    }

    $version = inline_template("<%= @title.split(':')[-1] -%>")
    $keystone_auth_username = 'magnum'
    $keystone_auth_project = 'service'
    $etcd_discovery_url = "https://${etcd_discovery_host}"
    file {
        '/etc/magnum/magnum.conf':
            content   => template('openstack/bobcat/magnum/magnum.conf.erb'),
            owner     => 'magnum',
            group     => 'magnum',
            mode      => '0440',
            show_diff => false,
            notify    => Service['magnum-api', 'magnum-conductor'],
            require   => Package['magnum-api', 'magnum-conductor'];
        '/etc/magnum/policy.yaml':
            source  => 'puppet:///modules/openstack/bobcat/magnum/policy.yaml',
            owner   => 'root',
            group   => 'root',
            mode    => '0644',
            notify  => Service['magnum-api', 'magnum-conductor'],
            require => Package['magnum-api', 'magnum-conductor'];
        '/etc/init.d/magnum-api':
            content => template('openstack/bobcat/magnum/magnum-api.erb'),
            owner   => 'root',
            group   => 'root',
            mode    => '0755',
    }


    # Hack in fix for log size
    #  https://phabricator.wikimedia.org/T336586
    #  https://review.opendev.org/c/openstack/magnum/+/885900
    # These next two files can be removed once the upstream patch is merged and
    # we catch up with it.
    openstack::patch { '/usr/lib/python3/dist-packages/magnum/drivers/common/templates/kubernetes/fragments/start-container-agent.sh':
        source  => 'puppet:///modules/openstack/bobcat/magnum/hacks/drivers/common/templates/kubernetes/fragments/start-container-agent.sh.patch',
        require => Package['magnum-api'],
        notify  => Service['magnum-api'],
    }
    openstack::patch { '/usr/lib/python3/dist-packages/magnum/drivers/k8s_fedora_coreos_v1/templates/fcct-config.yaml':
        source  => 'puppet:///modules/openstack/bobcat/magnum/hacks/drivers/k8s_fedora_coreos_v1/templates/fcct-config.yaml.patch',
        require => Package['magnum-api'],
        notify  => Service['magnum-api'],
    }
}