Merge "Add metadata settings for needed kerberos principals"
[apex-tripleo-heat-templates.git] / network / service_net_map.j2.yaml
1 heat_template_version: ocata
2
3 description: >
4   Mapping of service_name_network -> network name
5
6 parameters:
7   ServiceNetMap:
8     description: Mapping of service_name -> network name. Typically set
9                  via parameter_defaults in the resource registry.  This
10                  mapping overrides those in ServiceNetMapDefaults.
11                  Note that the key in this map must match the service_name
12                  in the service template, e.g if the service_name is heat_api
13                  the key must be either heat_api_network, or optionally
14                  HeatApiNetwork (which will be internally converted to
15                  transform captalization to underscores).
16     default: {}
17     type: json
18
19   # Note that the key in this map must match the service_name
20   # see the description above about conversion from CamelCase to
21   # snake_case - the names must still match when converted
22   ServiceNetMapDefaults:
23     default:
24       # Note the values in this map are replaced by *NetName
25       # to allow for sane defaults when the network names are
26       # overridden.
27       ApacheNetwork: internal_api
28       NeutronTenantNetwork: tenant
29       CeilometerApiNetwork: internal_api
30       AodhApiNetwork: internal_api
31       PankoApiNetwork: internal_api
32       BarbicanApiNetwork: internal_api
33       GnocchiApiNetwork: internal_api
34       MongodbNetwork: internal_api
35       CinderApiNetwork: internal_api
36       CinderIscsiNetwork: storage
37       GlanceApiNetwork: storage
38       IronicApiNetwork: ctlplane
39       IronicNetwork: ctlplane
40       KeystoneAdminApiNetwork: ctlplane # allows undercloud to config endpoints
41       KeystonePublicApiNetwork: internal_api
42       ManilaApiNetwork: internal_api
43       NeutronApiNetwork: internal_api
44       HeatApiNetwork: internal_api
45       HeatApiCfnNetwork: internal_api
46       HeatApiCloudwatchNetwork: internal_api
47       NovaApiNetwork: internal_api
48       NovaPlacementNetwork: internal_api
49       NovaMetadataNetwork: internal_api
50       NovaVncProxyNetwork: internal_api
51       SwiftStorageNetwork: storage_mgmt
52       SwiftProxyNetwork: storage
53       SaharaApiNetwork: internal_api
54       HorizonNetwork: internal_api
55       MemcachedNetwork: internal_api
56       RabbitmqNetwork: internal_api
57       RedisNetwork: internal_api
58       MysqlNetwork: internal_api
59       CephClusterNetwork: storage_mgmt
60       CephMonNetwork: storage
61       CephRgwNetwork: storage
62       PublicNetwork: external
63       OpendaylightApiNetwork: internal_api
64       OvnDbsNetwork: internal_api
65       MistralApiNetwork: internal_api
66       ZaqarApiNetwork: internal_api
67       PacemakerRemoteNetwork: internal_api
68       # We special-case the default ResolveNetwork for the CephStorage role
69       # for backwards compatibility, all other roles default to internal_api
70       CephStorageHostnameResolveNetwork: storage
71       EtcdNetwork: internal_api
72 {% for role in roles if role.name != 'CephStorage' %}
73       {{role.name}}HostnameResolveNetwork: internal_api
74 {% endfor %}
75     description: Mapping of service_name -> network name. Typically set
76                  via parameter_defaults in the resource registry.
77     type: json
78
79   # We define mappings to work around names that break when doing the
80   # CamelCase to snake_case conversion to align with service_names
81   ServiceNetMapDeprecatedMapping:
82     default:
83       MongoDbNetwork: MongodbNetwork
84       RabbitMqNetwork: RabbitmqNetwork
85       CephPublicNetwork: CephMonNetwork
86       SwiftMgmtNetwork: SwiftStorageNetwork
87     description: Mapping older deprecated service names, intended for
88                  internal use only, this will be removed in future.
89     type: json
90
91   InternalApiNetName:
92     default: internal_api
93     description: The name of the internal API network.
94     type: string
95   ExternalNetName:
96     default: external
97     description: The name of the external network.
98     type: string
99   ManagementNetName:
100     default: management
101     description: The name of the management network.
102     type: string
103   StorageNetName:
104     default: storage
105     description: The name of the storage network.
106     type: string
107   StorageMgmtNetName:
108     default: storage_mgmt
109     description: The name of the Storage management network.
110     type: string
111   TenantNetName:
112     default: tenant
113     description: The name of the tenant network.
114     type: string
115
116
117 parameter_groups:
118 - label: deprecated
119   description: Do not use deprecated params, they will be removed.
120   parameters:
121   - ServiceNetMapDeprecatedMapping
122
123 resources:
124   ServiceNetMapValue:
125     type: OS::Heat::Value
126     properties:
127       type: json
128       value:
129         map_merge:
130           - map_replace:
131              - {get_param: ServiceNetMapDefaults}
132              - values:
133                  external: {get_param: ExternalNetName}
134                  internal_api: {get_param: InternalApiNetName}
135                  storage: {get_param: StorageNetName}
136                  storage_mgmt: {get_param: StorageMgmtNetName}
137                  tenant: {get_param: TenantNetName}
138                  management: {get_param: ManagementNetName}
139           - map_replace:
140              - {get_param: ServiceNetMap}
141              - keys: {get_param: ServiceNetMapDeprecatedMapping}
142
143
144 outputs:
145   service_net_map:
146     value: {get_attr: [ServiceNetMapValue, value]}
147
148   service_net_map_lower:
149     value:
150       # This does a conversion from CamelCase to snake_case,
151       # e.g HeatApiNetwork becomes heat_api_network so it
152       # matches the service names.
153       yaql:
154         expression: dict($.data.map.items().select([ regex(`([a-z0-9])([A-Z])`).replace($[0], '\\1_\\2').toLower(), $[1]]))
155         data:
156           map: {get_attr: [ServiceNetMapValue, value]}