Add role specific information to the service template
[apex-tripleo-heat-templates.git] / puppet / services / network / contrail-tsn.yaml
1 heat_template_version: ocata
2
3 description: >
4   Contrail TSN Service
5
6 parameters:
7   ServiceNetMap:
8     default: {}
9     description: Mapping of service_name -> network name. Typically set
10                  via parameter_defaults in the resource registry.  This
11                  mapping overrides those in ServiceNetMapDefaults.
12     type: json
13   DefaultPasswords:
14     default: {}
15     type: json
16   RoleName:
17     default: ''
18     description: Role name on which the service is applied
19     type: string
20   RoleParameters:
21     default: {}
22     description: Parameters specific to the role
23     type: json
24   EndpointMap:
25     default: {}
26     description: Mapping of service endpoint -> protocol. Typically set
27                  via parameter_defaults in the resource registry.
28     type: json
29   NeutronMetadataProxySharedSecret:
30     description: Metadata Secret
31     type: string
32   VrouterPhysicalInterface:
33     default: 'eth0'
34     description: vRouter physical interface
35     type: string
36   VrouterGateway:
37     default: '192.168.24.1'
38     description: vRouter default gateway
39     type: string
40   VrouterNetmask:
41     default: '255.255.255.0'
42     description: vRouter netmask
43     type: string
44
45 resources:
46   ContrailBase:
47     type: ./contrail-base.yaml
48     properties:
49       ServiceNetMap: {get_param: ServiceNetMap}
50       DefaultPasswords: {get_param: DefaultPasswords}
51       EndpointMap: {get_param: EndpointMap}
52       RoleName: {get_param: RoleName}
53       RoleParameters: {get_param: RoleParameters}
54
55 outputs:
56   role_data:
57     description: Role data for the Contrail TSN Service
58     value:
59       service_name: contrail_tsn
60       config_settings:
61         map_merge:
62           - get_attr: [ContrailBase, role_data, config_settings]
63           - contrail::vrouter::host_ip: {get_param: [ServiceNetMap, NeutronCorePluginOpencontrailNetwork]}
64             contrail::vrouter::physical_interface: {get_param: VrouterPhysicalInterface}
65             contrail::vrouter::gateway: {get_param: VrouterGateway}
66             contrail::vrouter::netmask: {get_param: VrouterNetmask}
67             contrail::vrouter::metadata_proxy_shared_secret: {get_param: NeutronMetadataProxySharedSecret}
68             contrail::vrouter::is_tsn: 'true'
69             tripleo.neutron_compute_plugin_opencontrail.firewall_rules:
70               '111 neutron_compute_plugin_opencontrail proxy':
71                 dport: 8097
72                 proto: tcp
73       step_config: |
74         include ::tripleo::network::contrail::vrouter