Puppet Class: openstack::nova::api::service::victoria

Defined in:
modules/openstack/manifests/nova/api/service/victoria.pp

Overview

Parameters:

  • api_bind_port (Stdlib::Port)
  • metadata_bind_port (Stdlib::Port)


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

class openstack::nova::api::service::victoria(
    Stdlib::Port $api_bind_port,
    Stdlib::Port $metadata_bind_port,
) {
    # simple enough to don't require per-debian release split
    require "openstack::serverpackages::victoria::${::lsbdistcodename}"

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

    file { '/etc/init.d/nova-api':
        content => template('openstack/victoria/nova/api/nova-api'),
        owner   => 'root',
        group   => 'root',
        mode    => '0755',
        notify  => Service['nova-api'],
        require => Package['nova-api'];
    }

    # Hack in regex validation for instance names.
    #  Context can be found in T207538
    file { '/usr/lib/python3/dist-packages/nova/api/openstack/compute/servers.py':
        ensure  => 'present',
        owner   => 'root',
        group   => 'root',
        mode    => '0644',
        source  => 'puppet:///modules/openstack/victoria/nova/hacks/servers.py',
        require => Package['nova-api'];
    }

    file { '/etc/init.d/nova-api-metadata':
        content => template('openstack/victoria/nova/api/nova-api-metadata'),
        owner   => 'root',
        group   => 'root',
        mode    => '0755',
        notify  => Service['nova-api-metadata'],
        require => Package['nova-api'];
    }
    service { 'nova-api-metadata':
        ensure    => 'running',
        subscribe => [
                      File['/etc/nova/nova.conf'],
                      File['/etc/nova/policy.yaml'],
            ],
        require   => Package['nova-api'];
    }
}