Add role specific information to the service template
[apex-tripleo-heat-templates.git] / puppet / services / network / contrail-vrouter.yaml
1 heat_template_version: ocata
2
3 description: >
4   OpenStack Neutron Compute OpenContrail plugin
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     hidden: true
33   ContrailVrouterPhysicalInterface:
34     default: 'eth0'
35     description: vRouter physical interface
36     type: string
37   ContrailVrouterGateway:
38     default: '192.168.24.1'
39     description: vRouter default gateway
40     type: string
41   ContrailVrouterNetmask:
42     default: '255.255.255.0'
43     description: vRouter netmask
44     type: string
45
46 resources:
47   ContrailBase:
48     type: ./contrail-base.yaml
49     properties:
50       ServiceNetMap: {get_param: ServiceNetMap}
51       DefaultPasswords: {get_param: DefaultPasswords}
52       EndpointMap: {get_param: EndpointMap}
53       RoleName: {get_param: RoleName}
54       RoleParameters: {get_param: RoleParameters}
55
56 outputs:
57   role_data:
58     description: Role data for the Neutron Compute OpenContrail plugin
59     value:
60       service_name: contrail_vrouter
61       config_settings:
62         map_merge:
63           - get_attr: [ContrailBase, role_data, config_settings]
64           - contrail::vrouter::host_ip: {get_param: [ServiceNetMap, NeutronCorePluginOpencontrailNetwork]}
65             contrail::vrouter::physical_interface: {get_param: ContrailVrouterPhysicalInterface}
66             contrail::vrouter::gateway: {get_param: ContrailVrouterGateway}
67             contrail::vrouter::netmask: {get_param: ContrailVrouterNetmask}
68             contrail::vrouter::metadata_proxy_shared_secret: {get_param: NeutronMetadataProxySharedSecret}
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