Merge "Configure DPDK options to isolate PMD cores and ovs process cores"
[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       OctaviaApiNetwork: internal_api
45       HeatApiNetwork: internal_api
46       HeatApiCfnNetwork: internal_api
47       HeatApiCloudwatchNetwork: internal_api
48       NovaApiNetwork: internal_api
49       NovaPlacementNetwork: internal_api
50       NovaMetadataNetwork: internal_api
51       NovaVncProxyNetwork: internal_api
52       Ec2ApiNetwork: internal_api
53       Ec2ApiMetadataNetwork: internal_api
54       SwiftStorageNetwork: storage_mgmt
55       SwiftProxyNetwork: storage
56       SaharaApiNetwork: internal_api
57       HorizonNetwork: internal_api
58       MemcachedNetwork: internal_api
59       RabbitmqNetwork: internal_api
60       RedisNetwork: internal_api
61       MysqlNetwork: internal_api
62       CephClusterNetwork: storage_mgmt
63       CephMonNetwork: storage
64       CephRgwNetwork: storage
65       PublicNetwork: external
66       OpendaylightApiNetwork: internal_api
67       OvnDbsNetwork: internal_api
68       MistralApiNetwork: internal_api
69       ZaqarApiNetwork: internal_api
70       PacemakerRemoteNetwork: internal_api
71       # We special-case the default ResolveNetwork for the CephStorage role
72       # for backwards compatibility, all other roles default to internal_api
73       CephStorageHostnameResolveNetwork: storage
74       EtcdNetwork: internal_api
75 {% for role in roles if role.name != 'CephStorage' %}
76       {{role.name}}HostnameResolveNetwork: internal_api
77 {% endfor %}
78     description: Mapping of service_name -> network name. Typically set
79                  via parameter_defaults in the resource registry.
80     type: json
81
82   # We define mappings to work around names that break when doing the
83   # CamelCase to snake_case conversion to align with service_names
84   ServiceNetMapDeprecatedMapping:
85     default:
86       MongoDbNetwork: MongodbNetwork
87       RabbitMqNetwork: RabbitmqNetwork
88       CephPublicNetwork: CephMonNetwork
89       SwiftMgmtNetwork: SwiftStorageNetwork
90     description: Mapping older deprecated service names, intended for
91                  internal use only, this will be removed in future.
92     type: json
93
94   InternalApiNetName:
95     default: internal_api
96     description: The name of the internal API network.
97     type: string
98   ExternalNetName:
99     default: external
100     description: The name of the external network.
101     type: string
102   ManagementNetName:
103     default: management
104     description: The name of the management network.
105     type: string
106   StorageNetName:
107     default: storage
108     description: The name of the storage network.
109     type: string
110   StorageMgmtNetName:
111     default: storage_mgmt
112     description: The name of the Storage management network.
113     type: string
114   TenantNetName:
115     default: tenant
116     description: The name of the tenant network.
117     type: string
118
119
120 parameter_groups:
121 - label: deprecated
122   description: Do not use deprecated params, they will be removed.
123   parameters:
124   - ServiceNetMapDeprecatedMapping
125
126 resources:
127   ServiceNetMapValue:
128     type: OS::Heat::Value
129     properties:
130       type: json
131       value:
132         map_merge:
133           - map_replace:
134              - {get_param: ServiceNetMapDefaults}
135              - values:
136                  external: {get_param: ExternalNetName}
137                  internal_api: {get_param: InternalApiNetName}
138                  storage: {get_param: StorageNetName}
139                  storage_mgmt: {get_param: StorageMgmtNetName}
140                  tenant: {get_param: TenantNetName}
141                  management: {get_param: ManagementNetName}
142           - map_replace:
143              - {get_param: ServiceNetMap}
144              - keys: {get_param: ServiceNetMapDeprecatedMapping}
145
146
147 outputs:
148   service_net_map:
149     value: {get_attr: [ServiceNetMapValue, value]}
150
151   service_net_map_lower:
152     value:
153       # This does a conversion from CamelCase to snake_case,
154       # e.g HeatApiNetwork becomes heat_api_network so it
155       # matches the service names.
156       yaql:
157         expression: dict($.data.map.items().select([ regex(`([a-z0-9])([A-Z])`).replace($[0], '\\1_\\2').toLower(), $[1]]))
158         data:
159           map: {get_attr: [ServiceNetMapValue, value]}