Merge "Add docker templates for octavia services"
[apex-tripleo-heat-templates.git] / network / service_net_map.j2.yaml
1 heat_template_version: pike
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       ContrailAnalyticsNetwork: internal_api
31       ContrailAnalyticsDatabaseNetwork: internal_api
32       ContrailConfigNetwork: internal_api
33       ContrailControlNetwork: internal_api
34       ContrailDatabaseNetwork: internal_api
35       ContrailWebuiNetwork: internal_api
36       ContrailTsnNetwork: internal_api
37       AodhApiNetwork: internal_api
38       PankoApiNetwork: internal_api
39       BarbicanApiNetwork: internal_api
40       GnocchiApiNetwork: internal_api
41       MongodbNetwork: internal_api
42       CinderApiNetwork: internal_api
43       CinderIscsiNetwork: storage
44       CongressApiNetwork: internal_api
45       GlanceApiNetwork: internal_api
46       IronicApiNetwork: ctlplane
47       IronicNetwork: ctlplane
48       IronicInspectorNetwork: ctlplane
49       KeystoneAdminApiNetwork: ctlplane # allows undercloud to config endpoints
50       KeystonePublicApiNetwork: internal_api
51       ManilaApiNetwork: internal_api
52       NeutronApiNetwork: internal_api
53       OctaviaApiNetwork: internal_api
54       HeatApiNetwork: internal_api
55       HeatApiCfnNetwork: internal_api
56       HeatApiCloudwatchNetwork: internal_api
57       NovaApiNetwork: internal_api
58       NovaColdMigrationNetwork: ctlplane
59       NovaPlacementNetwork: internal_api
60       NovaMetadataNetwork: internal_api
61       NovaVncProxyNetwork: internal_api
62       NovaLibvirtNetwork: internal_api
63       Ec2ApiNetwork: internal_api
64       Ec2ApiMetadataNetwork: internal_api
65       TackerApiNetwork: internal_api
66       SwiftStorageNetwork: storage_mgmt
67       SwiftProxyNetwork: storage
68       SaharaApiNetwork: internal_api
69       HorizonNetwork: internal_api
70       MemcachedNetwork: internal_api
71       RabbitmqNetwork: internal_api
72       QdrNetwork: internal_api
73       RedisNetwork: internal_api
74       MysqlNetwork: internal_api
75       CephClusterNetwork: storage_mgmt
76       CephMonNetwork: storage
77       CephRgwNetwork: storage
78       PublicNetwork: external
79       OpendaylightApiNetwork: internal_api
80       OvnDbsNetwork: internal_api
81       MistralApiNetwork: internal_api
82       ZaqarApiNetwork: internal_api
83       PacemakerRemoteNetwork: internal_api
84       # We special-case the default ResolveNetwork for the CephStorage role
85       # for backwards compatibility, all other roles default to internal_api
86       CephStorageHostnameResolveNetwork: storage
87       EtcdNetwork: internal_api
88 {% for role in roles if role.name != 'CephStorage' %}
89       {{role.name}}HostnameResolveNetwork: internal_api
90 {% endfor %}
91     description: Mapping of service_name -> network name. Typically set
92                  via parameter_defaults in the resource registry.
93     type: json
94
95   # We define mappings to work around names that break when doing the
96   # CamelCase to snake_case conversion to align with service_names
97   ServiceNetMapDeprecatedMapping:
98     default:
99       MongoDbNetwork: MongodbNetwork
100       RabbitMqNetwork: RabbitmqNetwork
101       CephPublicNetwork: CephMonNetwork
102       SwiftMgmtNetwork: SwiftStorageNetwork
103     description: Mapping older deprecated service names, intended for
104                  internal use only, this will be removed in future.
105     type: json
106
107   InternalApiNetName:
108     default: internal_api
109     description: The name of the internal API network.
110     type: string
111   ExternalNetName:
112     default: external
113     description: The name of the external network.
114     type: string
115   ManagementNetName:
116     default: management
117     description: The name of the management network.
118     type: string
119   StorageNetName:
120     default: storage
121     description: The name of the storage network.
122     type: string
123   StorageMgmtNetName:
124     default: storage_mgmt
125     description: The name of the Storage management network.
126     type: string
127   TenantNetName:
128     default: tenant
129     description: The name of the tenant network.
130     type: string
131
132
133 parameter_groups:
134 - label: deprecated
135   description: Do not use deprecated params, they will be removed.
136   parameters:
137   - ServiceNetMapDeprecatedMapping
138
139 resources:
140   ServiceNetMapValue:
141     type: OS::Heat::Value
142     properties:
143       type: json
144       value:
145         map_merge:
146           - map_replace:
147              - {get_param: ServiceNetMapDefaults}
148              - values:
149                  external: {get_param: ExternalNetName}
150                  internal_api: {get_param: InternalApiNetName}
151                  storage: {get_param: StorageNetName}
152                  storage_mgmt: {get_param: StorageMgmtNetName}
153                  tenant: {get_param: TenantNetName}
154                  management: {get_param: ManagementNetName}
155           - map_replace:
156              - {get_param: ServiceNetMap}
157              - keys: {get_param: ServiceNetMapDeprecatedMapping}
158
159
160 outputs:
161   service_net_map:
162     value: {get_attr: [ServiceNetMapValue, value]}
163
164   service_net_map_lower:
165     value:
166       # This does a conversion from CamelCase to snake_case,
167       # e.g HeatApiNetwork becomes heat_api_network so it
168       # matches the service names.
169       yaql:
170         expression: dict($.data.map.items().select([ regex(`([a-z0-9])([A-Z])`).replace($[0], '\\1_\\2').toLower(), $[1]]))
171         data:
172           map: {get_attr: [ServiceNetMapValue, value]}