Puppet Class: openstack::glance::service::caracal

Defined in:
modules/openstack/manifests/glance/service/caracal.pp

Overview

Parameters:

  • db_user (Any)
  • db_pass (Any)
  • db_name (Any)
  • db_host (Any)
  • glance_data_dir (Any)
  • ldap_user_pass (Any)
  • keystone_fqdn (Any)
  • api_bind_port (Stdlib::Port)
  • glance_backends (Array[String])
  • ceph_pool (String)
  • memcached_nodes (Array[Stdlib::Fqdn])
  • 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
# File 'modules/openstack/manifests/glance/service/caracal.pp', line 3

class openstack::glance::service::caracal(
    $db_user,
    $db_pass,
    $db_name,
    $db_host,
    $glance_data_dir,
    $ldap_user_pass,
    $keystone_fqdn,
    Stdlib::Port $api_bind_port,
    Array[String] $glance_backends,
    String $ceph_pool,
    Array[Stdlib::Fqdn] $memcached_nodes,
    Boolean $enforce_policy_scope,
    Boolean $enforce_new_policy_defaults,
) {
    require "openstack::serverpackages::caracal::${::lsbdistcodename}"

    package { 'glance':
        ensure => 'present',
    }

    $keystone_auth_username = 'novaadmin'
    $keystone_auth_project = 'admin'
    $version = inline_template("<%= @title.split(':')[-1] -%>")
    file {
        '/etc/glance/glance-api.conf':
            content   => template('openstack/caracal/glance/glance-api.conf.erb'),
            owner     => 'glance',
            group     => 'nogroup',
            mode      => '0440',
            show_diff => false,
            notify    => Service['glance-api'],
            require   => Package['glance'];
        '/etc/glance/policy.yaml':
            source  => 'puppet:///modules/openstack/caracal/glance/policy.yaml',
            owner   => 'root',
            group   => 'root',
            mode    => '0644',
            notify  => Service['glance-api'],
            require => Package['glance'];
        '/etc/init.d/glance-api':
            content => template('openstack/caracal/glance/glance-api'),
            owner   => 'root',
            group   => 'root',
            mode    => '0755',
            notify  => Service['glance-api'],
            require => Package['glance'];
        '/etc/glance/glance-api-uwsgi.ini':
            content => template('openstack/caracal/glance/glance-api-uwsgi.ini.erb'),
            owner   => 'root',
            group   => 'root',
            mode    => '0755',
            notify  => Service['glance-api'],
            require => Package['glance'];
    }

    systemd::sysuser { 'glance':
        description => 'glance system user',
    }

    # Apply https://review.opendev.org/c/openstack/glance_store/+/885581
    openstack::patch { '/usr/lib/python3/dist-packages/glance_store/_drivers/rbd.py':
        source  => 'puppet:///modules/openstack/caracal/glance/hacks/rbd.py.patch',
        require => Package['glance'],
        notify  => Service['glance-api'],
    }
}