Puppet Class: profile::openstack::base::nova::api::service

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

Overview

SPDX-License-Identifier: Apache-2.0

Parameters:

  • version (Any) (defaults to: lookup('profile::openstack::base::version'))
  • region (String) (defaults to: lookup('profile::openstack::base::region'))
  • api_bind_port (Stdlib::Port) (defaults to: lookup('profile::openstack::base::nova::osapi_compute_listen_port'))
  • metadata_bind_port (Stdlib::Port) (defaults to: lookup('profile::openstack::base::nova::metadata_listen_port'))
  • dhcp_domain (String) (defaults to: lookup('profile::openstack::base::nova::dhcp_domain', {default_value => 'example.com'}))
  • compute_workers (Integer) (defaults to: lookup('profile::openstack::base::nova::compute_workers'))
  • haproxy_nodes (Array[Stdlib::Host]) (defaults to: lookup('profile::openstack::base::haproxy_nodes'))


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

class profile::openstack::base::nova::api::service(
    $version = lookup('profile::openstack::base::version'),
    String $region = lookup('profile::openstack::base::region'),
    Stdlib::Port $api_bind_port = lookup('profile::openstack::base::nova::osapi_compute_listen_port'),
    Stdlib::Port $metadata_bind_port = lookup('profile::openstack::base::nova::metadata_listen_port'),
    String       $dhcp_domain               = lookup('profile::openstack::base::nova::dhcp_domain',
                                                      {default_value => 'example.com'}),
    Integer      $compute_workers = lookup('profile::openstack::base::nova::compute_workers'),
    Array[Stdlib::Host] $haproxy_nodes = lookup('profile::openstack::base::haproxy_nodes'),
) {
    class {'::openstack::nova::api::service':
        version            => $version,
        active             => true,
        api_bind_port      => $api_bind_port,
        metadata_bind_port => $metadata_bind_port,
        dhcp_domain        => $dhcp_domain,
        compute_workers    => $compute_workers,
    }
    contain '::openstack::nova::api::service'

    ferm::service { 'nova-api-backend':
        proto  => 'tcp',
        port   => $api_bind_port,
        srange => "@resolve((${haproxy_nodes.join(' ')}))",
    }

    ferm::service { 'nova-metadata-backend':
        proto  => 'tcp',
        port   => $metadata_bind_port,
        srange => "@resolve((${haproxy_nodes.join(' ')}))",
    }
}