Change flat network name for nosdn fdio scenario
[apex-tripleo-heat-templates.git] / puppet / services / nova-metadata.yaml
1 heat_template_version: pike
2
3 description: >
4   OpenStack Nova API service configured with Puppet
5
6 parameters:
7   ServiceData:
8     default: {}
9     description: Dictionary packing service data
10     type: json
11   ServiceNetMap:
12     default: {}
13     description: Mapping of service_name -> network name. Typically set
14                  via parameter_defaults in the resource registry.  This
15                  mapping overrides those in ServiceNetMapDefaults.
16     type: json
17   DefaultPasswords:
18     default: {}
19     type: json
20   RoleName:
21     default: ''
22     description: Role name on which the service is applied
23     type: string
24   RoleParameters:
25     default: {}
26     description: Parameters specific to the role
27     type: json
28   EndpointMap:
29     default: {}
30     description: Mapping of service endpoint -> protocol. Typically set
31                  via parameter_defaults in the resource registry.
32     type: json
33   NovaWorkers:
34     default: 0
35     description: Number of workers for Nova services.
36     type: number
37   EnableInternalTLS:
38     type: boolean
39     default: false
40
41 conditions:
42   nova_workers_zero: {equals : [{get_param: NovaWorkers}, 0]}
43
44   use_tls_proxy: {equals : [{get_param: EnableInternalTLS}, true]}
45
46 resources:
47
48   TLSProxyBase:
49     type: OS::TripleO::Services::TLSProxyBase
50     properties:
51       ServiceData: {get_param: ServiceData}
52       ServiceNetMap: {get_param: ServiceNetMap}
53       DefaultPasswords: {get_param: DefaultPasswords}
54       EndpointMap: {get_param: EndpointMap}
55       EnableInternalTLS: {get_param: EnableInternalTLS}
56
57 outputs:
58   role_data:
59     description: Role data for the Nova Metadata service.
60     value:
61       service_name: nova_metadata
62       config_settings:
63         map_merge:
64         - get_attr: [TLSProxyBase, role_data, config_settings]
65         - nova::api::metadata_listen:
66             if:
67             - use_tls_proxy
68             - 'localhost'
69             - {get_param: [ServiceNetMap, NovaMetadataNetwork]}
70         -
71           if:
72           - nova_workers_zero
73           - {}
74           - nova::api::metadata_workers: {get_param: NovaWorkers}
75         -
76           if:
77           - use_tls_proxy
78           - tripleo::profile::base::nova::api::metadata_tls_proxy_bind_ip:
79               get_param: [ServiceNetMap, NovaMetadataNetwork]
80             tripleo::profile::base::nova::api::metadata_tls_proxy_fqdn:
81               str_replace:
82                 template:
83                   "%{hiera('fqdn_$NETWORK')}"
84                 params:
85                   $NETWORK: {get_param: [ServiceNetMap, NovaMetadataNetwork]}
86           - {}
87       step_config: ""
88       metadata_settings:
89         get_attr: [TLSProxyBase, role_data, metadata_settings]