Puppet Class: openstack::profile::glance::api

Defined in:
manifests/profile/glance/api.pp

Overview

The profile to install the Glance API and Registry services Note that for this configuration API controls the storage, so it is on the storage node instead of the control node



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
# File 'manifests/profile/glance/api.pp', line 4

class openstack::profile::glance::api {
  $api_network = hiera('openstack::network::api')
  $api_address = ip_for_network($api_network)

  $management_network = hiera('openstack::network::management')
  $management_address = ip_for_network($management_network)

  $explicit_management_address = hiera('openstack::storage::address::management')
  $explicit_api_address = hiera('openstack::storage::address::api')

  $controller_address = hiera('openstack::controller::address::management')

  if $management_address != $explicit_management_address {
    fail("Glance Auth setup failed. The inferred location of Glance from
    the openstack::network::management hiera value is
    ${management_address}. The explicit address from
    openstack::storage::address::management is ${explicit_management_address}.
    Please correct this difference.")
  }

  if $api_address != $explicit_api_address {
    fail("Glance Auth setup failed. The inferred location of Glance from
    the openstack::network::management hiera value is
    ${api_address}. The explicit address from
    openstack::storage::address::api is ${explicit_api_address}.
    Please correct this difference.")
  }

  openstack::resources::firewall { 'Glance API': port      => '9292', }
  openstack::resources::firewall { 'Glance Registry': port => '9191', }

  include ::openstack::common::glance

  class { '::glance::backend::file': }

  class { '::glance::registry':
    keystone_password => hiera('openstack::glance::password'),
    sql_connection    => $::openstack::resources::connectors::glance,
    auth_host         => hiera('openstack::controller::address::management'),
    keystone_tenant   => 'services',
    keystone_user     => 'glance',
    verbose           => hiera('openstack::verbose'),
    debug             => hiera('openstack::debug'),
    mysql_module      => '2.2',
  }

  class { '::glance::notify::rabbitmq': 
    rabbit_password => hiera('openstack::rabbitmq::password'),
    rabbit_userid   => hiera('openstack::rabbitmq::user'),
    rabbit_host     => hiera('openstack::controller::address::management'),
  }
}