Puppet Class: profile::openstack::base::heat

Defined in:
modules/profile/manifests/openstack/base/heat.pp

Overview

SPDX-License-Identifier: Apache-2.0

Provision the Openstack Heat service

As with all OpenStack services, actually installing the service

requres some by-hand steps after the packages and config
are set up. Steps are fully enumerated at
  https://docs.openstack.org/heat/latest/install/install-debian.html

In brief, the post-puppet steps are:

- Create database, add accounts and access (the specific access details
    are added to /etc/heat by puppet)
- Create the 'heat' service domain
- Create the 'heat' service user and add it to the 'heat' domain
- Create service and endpoints in Keystone
- Create heat_stack_user and heat_stack_owner roles

Parameters:

  • version (String) (defaults to: lookup('profile::openstack::base::version'))
  • active (Boolean) (defaults to: lookup('profile::openstack::base::heat::active'))
  • openstack_controllers (Array[Stdlib::Fqdn]) (defaults to: lookup('profile::openstack::base::openstack_controllers'))
  • rabbitmq_nodes (Array[Stdlib::Fqdn]) (defaults to: lookup('profile::openstack::base::rabbitmq_nodes'))
  • keystone_fqdn (Stdlib::Fqdn) (defaults to: lookup('profile::openstack::base::keystone_api_fqdn'))
  • auth_port (Stdlib::Port) (defaults to: lookup('profile::openstack::base::keystone::auth_port'))
  • internal_auth_port (Stdlib::Port) (defaults to: lookup('profile::openstack::base::keystone::internal_port'))
  • region (String) (defaults to: lookup('profile::openstack::base::region'))
  • db_user (String) (defaults to: lookup('profile::openstack::base::heat::db_user'))
  • db_name (String) (defaults to: lookup('profile::openstack::base::heat::db_name'))
  • db_pass (String) (defaults to: lookup('profile::openstack::base::heat::db_pass'))
  • ldap_user_pass (String) (defaults to: lookup('profile::openstack::base::heat::service_user_pass'))
  • domain_admin_pass (String) (defaults to: lookup('profile::openstack::base::heat::domain_admin_pass'))
  • db_host (Stdlib::Fqdn) (defaults to: lookup('profile::openstack::base::heat::db_host'))
  • api_bind_port (Stdlib::Port) (defaults to: lookup('profile::openstack::base::heat::api_bind_port'))
  • cfn_api_bind_port (Stdlib::Port) (defaults to: lookup('profile::openstack::base::heat::api_bind_port'))
  • rabbit_user (String) (defaults to: lookup('profile::openstack::base::heat::rabbit_user'))
  • rabbit_pass (String) (defaults to: lookup('profile::openstack::base::heat::rabbit_pass'))
  • auth_encryption_key (String[32]) (defaults to: lookup('profile::openstack::base::heat::auth_encryption_key'))


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
74
75
76
77
78
79
80
# File 'modules/profile/manifests/openstack/base/heat.pp', line 19

class profile::openstack::base::heat(
    String $version = lookup('profile::openstack::base::version'),
    Boolean $active = lookup('profile::openstack::base::heat::active'),
    Array[Stdlib::Fqdn] $openstack_controllers = lookup('profile::openstack::base::openstack_controllers'),
    Array[Stdlib::Fqdn] $rabbitmq_nodes = lookup('profile::openstack::base::rabbitmq_nodes'),
    Stdlib::Fqdn $keystone_fqdn = lookup('profile::openstack::base::keystone_api_fqdn'),
    Stdlib::Port $auth_port = lookup('profile::openstack::base::keystone::auth_port'),
    Stdlib::Port $internal_auth_port = lookup('profile::openstack::base::keystone::internal_port'),
    String $region = lookup('profile::openstack::base::region'),
    String $db_user = lookup('profile::openstack::base::heat::db_user'),
    String $db_name = lookup('profile::openstack::base::heat::db_name'),
    String $db_pass = lookup('profile::openstack::base::heat::db_pass'),
    String $ldap_user_pass = lookup('profile::openstack::base::heat::service_user_pass'),
    String $domain_admin_pass = lookup('profile::openstack::base::heat::domain_admin_pass'),
    Stdlib::Fqdn $db_host = lookup('profile::openstack::base::heat::db_host'),
    Stdlib::Port $api_bind_port = lookup('profile::openstack::base::heat::api_bind_port'),
    Stdlib::Port $cfn_api_bind_port = lookup('profile::openstack::base::heat::api_bind_port'),
    String $rabbit_user = lookup('profile::openstack::base::heat::rabbit_user'),
    String $rabbit_pass = lookup('profile::openstack::base::heat::rabbit_pass'),
    String[32] $auth_encryption_key = lookup('profile::openstack::base::heat::auth_encryption_key'),
    ) {

    $keystone_admin_uri = "https://${keystone_fqdn}:${auth_port}"
    $keystone_internal_uri = "https://${keystone_fqdn}:${internal_auth_port}"

    class { '::openstack::heat::service':
        version               => $version,
        openstack_controllers => $openstack_controllers,
        rabbitmq_nodes        => $rabbitmq_nodes,
        keystone_admin_uri    => $keystone_admin_uri,
        keystone_internal_uri => $keystone_internal_uri,
        db_user               => $db_user,
        db_pass               => $db_pass,
        db_name               => $db_name,
        db_host               => $db_host,
        api_bind_port         => $api_bind_port,
        cfn_api_bind_port     => $cfn_api_bind_port,
        ldap_user_pass        => $ldap_user_pass,
        rabbit_user           => $rabbit_user,
        rabbit_pass           => $rabbit_pass,
        auth_encryption_key   => $auth_encryption_key,
        region                => $region,
        domain_admin_pass     => $domain_admin_pass,
    }

    include ::network::constants
    $prod_networks = join($network::constants::production_networks, ' ')
    $labs_networks = join($network::constants::labs_networks, ' ')

    ferm::rule {'heat_api_all':
        ensure => 'present',
        rule   => "saddr (${prod_networks} ${labs_networks}
                             ) proto tcp dport (28004) ACCEPT;",
    }

    openstack::db::project_grants { 'heat':
        access_hosts => $openstack_controllers,
        db_name      => $db_name,
        db_user      => $db_user,
        db_pass      => $db_pass,
    }
}