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
|
# File 'modules/openstack/manifests/nova/api/service/caracal.pp', line 3
class openstack::nova::api::service::caracal(
Stdlib::Port $api_bind_port,
Stdlib::Port $metadata_bind_port,
Integer $compute_workers,
) {
# simple enough to don't require per-debian release split
require "openstack::serverpackages::caracal::${::lsbdistcodename}"
ensure_packages(['nova-api'])
file { '/etc/init.d/nova-api':
content => template('openstack/caracal/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
openstack::patch { '/usr/lib/python3/dist-packages/nova/api/openstack/compute/servers.py':
source => 'puppet:///modules/openstack/caracal/nova/hacks/servers.py.patch',
require => Package['nova-api'],
notify => Service['nova-api'],
}
file { '/etc/init.d/nova-api-metadata':
content => template('openstack/caracal/nova/api/nova-api-metadata'),
owner => 'root',
group => 'root',
mode => '0755',
notify => Service['nova-api-metadata'],
require => Package['nova-api'];
}
file { '/etc/nova/nova-api-metadata-uwsgi.ini':
content => template('openstack/caracal/nova/api/nova-api-metadata-uwsgi.ini.erb'),
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'];
}
file { '/etc/nova/nova-api-uwsgi.ini':
content => template('openstack/caracal/nova/api/nova-api-uwsgi.ini.erb'),
owner => 'root',
group => 'root',
mode => '0755',
notify => Service['nova-api-metadata'],
require => Package['nova-api'];
}
}
|