Merge "Move the rest of static roles resource registry entries to j2"
[apex-tripleo-heat-templates.git] / puppet / services / nova-api.yaml
1 heat_template_version: 2016-04-08
2
3 description: >
4   OpenStack Nova API service configured with Puppet
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   EndpointMap:
17     default: {}
18     description: Mapping of service endpoint -> protocol. Typically set
19                  via parameter_defaults in the resource registry.
20     type: json
21   NovaWorkers:
22     default: 0
23     description: Number of workers for Nova API service.
24     type: number
25   NovaPassword:
26     description: The password for the nova service and db account, used by nova-api.
27     type: string
28     hidden: true
29   KeystoneRegion:
30     type: string
31     default: 'regionOne'
32     description: Keystone region for endpoint
33   NeutronMetadataProxySharedSecret:
34     description: Shared secret to prevent spoofing
35     type: string
36     hidden: true
37   InstanceNameTemplate:
38     default: 'instance-%08x'
39     description: Template string to be used to generate instance names
40     type: string
41   NovaEnableDBPurge:
42     default: true
43     description: |
44         Whether to create cron job for purging soft deleted rows in Nova database.
45     type: boolean
46   MonitoringSubscriptionNovaApi:
47     default: 'overcloud-nova-api'
48     type: string
49   NovaApiLoggingSource:
50     type: json
51     default:
52       tag: openstack.nova.api
53       path: /var/log/nova/nova-api.log
54
55 resources:
56   NovaBase:
57     type: ./nova-base.yaml
58     properties:
59       ServiceNetMap: {get_param: ServiceNetMap}
60       DefaultPasswords: {get_param: DefaultPasswords}
61       EndpointMap: {get_param: EndpointMap}
62
63 outputs:
64   role_data:
65     description: Role data for the Nova API service.
66     value:
67       service_name: nova_api
68       monitoring_subscription: {get_param: MonitoringSubscriptionNovaApi}
69       logging_source: {get_param: NovaApiLoggingSource}
70       logging_groups:
71         - nova
72       config_settings:
73         map_merge:
74           - get_attr: [NovaBase, role_data, config_settings]
75           - nova::api::osapi_compute_workers: {get_param: NovaWorkers}
76             nova::api::metadata_workers: {get_param: NovaWorkers}
77             nova::cron::archive_deleted_rows::hour: '"*/12"'
78             nova::cron::archive_deleted_rows::destination: '"/dev/null"'
79             tripleo.nova_api.firewall_rules:
80               '113 nova_api':
81                 dport:
82                   - 6080
83                   - 13080
84                   - 8773
85                   - 3773
86                   - 8774
87                   - 13774
88                   - 8775
89             nova::keystone::authtoken::project_name: 'service'
90             nova::keystone::authtoken::password: {get_param: NovaPassword}
91             nova::keystone::authtoken::auth_uri: {get_param: [EndpointMap, KeystoneInternal, uri] }
92             nova::keystone::authtoken::auth_url: {get_param: [EndpointMap, KeystoneAdmin, uri_no_suffix]}
93             nova::api::enabled: true
94             nova::api::default_floating_pool: 'public'
95             nova::api::sync_db_api: true
96             nova::api::enable_proxy_headers_parsing: true
97             # NOTE: bind IP is found in Heat replacing the network name with the local node IP
98             # for the given network; replacement examples (eg. for internal_api):
99             # internal_api -> IP
100             # internal_api_uri -> [IP]
101             # internal_api_subnet - > IP/CIDR
102             nova::api::api_bind_address: {get_param: [ServiceNetMap, NovaApiNetwork]}
103             nova::api::metadata_listen: {get_param: [ServiceNetMap, NovaMetadataNetwork]}
104             nova::api::neutron_metadata_proxy_shared_secret: {get_param: NeutronMetadataProxySharedSecret}
105             nova::api::instance_name_template: {get_param: InstanceNameTemplate}
106             nova_enable_db_purge: {get_param: NovaEnableDBPurge}
107
108       step_config: |
109         include tripleo::profile::base::nova::api
110       service_config_settings:
111         keystone:
112           nova::keystone::auth::tenant: 'service'
113           nova::keystone::auth::public_url: {get_param: [EndpointMap, NovaPublic, uri]}
114           nova::keystone::auth::internal_url: {get_param: [EndpointMap, NovaInternal, uri]}
115           nova::keystone::auth::admin_url: {get_param: [EndpointMap, NovaAdmin, uri]}
116           nova::keystone::auth::password: {get_param: NovaPassword}
117           nova::keystone::auth::region: {get_param: KeystoneRegion}
118         mysql:
119           nova::db::mysql::password: {get_param: NovaPassword}
120           nova::db::mysql::user: nova
121           nova::db::mysql::host: {get_param: [EndpointMap, MysqlInternal, host_nobrackets]}
122           nova::db::mysql::dbname: nova
123           nova::db::mysql::allowed_hosts:
124             - '%'
125             - "%{hiera('mysql_bind_host')}"
126           nova::db::mysql_api::password: {get_param: NovaPassword}
127           nova::db::mysql_api::user: nova_api
128           nova::db::mysql_api::host: {get_param: [EndpointMap, MysqlInternal, host_nobrackets]}
129           nova::db::mysql_api::dbname: nova_api
130           nova::db::mysql_api::allowed_hosts:
131             - '%'
132             - "%{hiera('mysql_bind_host')}"