Puppet Class: profile::openstack::base::keystone::db

Defined in:
modules/profile/manifests/openstack/base/keystone/db.pp

Overview

this class is currently unused. Perhaps worth reallocating code to profile::openstack::codfw1dev::db

Parameters:

  • labs_hosts_range (Any) (defaults to: hiera('profile::openstack::base::labs_hosts_range'))
  • labs_hosts_range_v6 (Any) (defaults to: hiera('profile::openstack::base::labs_hosts_range_v6'))
  • puppetmaster_hostname (Any) (defaults to: hiera('profile::openstack::base::puppetmaster_hostname'))
  • designate_host (Any) (defaults to: hiera('profile::openstack::base::designate_host'))
  • osm_host (Any) (defaults to: hiera('profile::openstack::base::osm_host'))
  • mysql_root_clients (Array[String]) (defaults to: hiera('mysql_root_clients', []))


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
# File 'modules/profile/manifests/openstack/base/keystone/db.pp', line 3

class profile::openstack::base::keystone::db(
    $labs_hosts_range = hiera('profile::openstack::base::labs_hosts_range'),
    $labs_hosts_range_v6 = hiera('profile::openstack::base::labs_hosts_range_v6'),
    $puppetmaster_hostname = hiera('profile::openstack::base::puppetmaster_hostname'),
    $designate_host = hiera('profile::openstack::base::designate_host'),
    $osm_host = hiera('profile::openstack::base::osm_host'),
    Array[String] $mysql_root_clients = hiera('mysql_root_clients', []),
    ) {

    # mysql monitoring and administration from root clients/tendril
    $mysql_root_clients_str = join($mysql_root_clients, ' ')
    ferm::service { 'mysql_admin_standard':
        proto  => 'tcp',
        port   => '3306',
        srange => "(${mysql_root_clients_str})",
    }
    ferm::service { 'mysql_admin_alternative':
        proto  => 'tcp',
        port   => '3307',
        srange => "(${mysql_root_clients_str})",
    }

    ferm::rule{'mysql_nova':
        ensure => 'present',
        rule   => "saddr ${labs_hosts_range} proto tcp dport (3306) ACCEPT;",
    }

    ferm::rule{'mysql_nova_v6':
        ensure => 'present',
        rule   => "saddr ${labs_hosts_range_v6} proto tcp dport (3306) ACCEPT;",
    }

    ferm::rule{'mysql_designate':
        ensure => 'present',
        rule   => "saddr (@resolve((${designate_host})) @resolve((${designate_host}), AAAA)) proto tcp dport (3306) ACCEPT;",
    }

    ferm::rule{'mysql_puppetmaster':
        ensure => 'present',
        rule   => "saddr (@resolve(${puppetmaster_hostname}) @resolve(${puppetmaster_hostname}, AAAA)) proto tcp dport (3306) ACCEPT;",
    }

    ferm::rule{'mysql_wikitech':
        ensure => 'present',
        rule   => "saddr (@resolve(${osm_host}) @resolve(${osm_host}, AAAA)) proto tcp dport (3306) ACCEPT;",
    }
}