Merge "Increase libvirt/qemu.conf max_files and max_processes"
[apex-tripleo-heat-templates.git] / puppet / services / glance-api.yaml
1 heat_template_version: ocata
2
3 description: >
4   OpenStack Glance 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   Debug:
22     default: ''
23     description: Set to True to enable debugging on all services.
24     type: string
25   GlancePassword:
26     description: The password for the glance service and db account, used by the glance services.
27     type: string
28     hidden: true
29   GlanceWorkers:
30     default: ''
31     description: |
32       Number of API worker processes for Glance. If left unset (empty string), the
33       default value will result in the configuration being left unset and a
34       system-dependent default value will be chosen (e.g.: number of
35       processors). Please note that this will create a large number of
36       processes on systems with a large number of CPUs resulting in excess
37       memory consumption. It is recommended that a suitable non-default value
38       be selected on such systems.
39     type: string
40   MonitoringSubscriptionGlanceApi:
41     default: 'overcloud-glance-api'
42     type: string
43   GlanceApiLoggingSource:
44     type: json
45     default:
46       tag: openstack.glance.api
47       path: /var/log/glance/api.log
48
49 resources:
50   GlanceBase:
51     type: ./glance-base.yaml
52     properties:
53       ServiceNetMap: {get_param: ServiceNetMap}
54       DefaultPasswords: {get_param: DefaultPasswords}
55       EndpointMap: {get_param: EndpointMap}
56
57 outputs:
58   role_data:
59     description: Role data for the Glance API role.
60     value:
61       service_name: glance_api
62       monitoring_subscription: {get_param: MonitoringSubscriptionGlanceApi}
63       logging_source: {get_param: GlanceApiLoggingSource}
64       logging_groups:
65         - glance
66       config_settings:
67         map_merge:
68           - get_attr: [GlanceBase, role_data, config_settings]
69           - glance::api::database_connection:
70               list_join:
71                 - ''
72                 - - {get_param: [EndpointMap, MysqlInternal, protocol]}
73                   - '://glance:'
74                   - {get_param: GlancePassword}
75                   - '@'
76                   - {get_param: [EndpointMap, MysqlInternal, host]}
77                   - '/glance'
78             glance::api::bind_port: {get_param: [EndpointMap, GlanceInternal, port]}
79             glance::api::authtoken::auth_uri: {get_param: [EndpointMap, KeystoneInternal, uri] }
80             glance::api::authtoken::auth_url: { get_param: [EndpointMap, KeystoneAdmin, uri_no_suffix] }
81             glance::api::registry_host:
82               str_replace:
83                 template: "'REGISTRY_HOST'"
84                 params:
85                   REGISTRY_HOST: {get_param: [EndpointMap, GlanceRegistryInternal, host]}
86             glance::api::registry_client_protocol: {get_param: [EndpointMap, GlanceRegistryInternal, protocol] }
87             glance::api::authtoken::password: {get_param: GlancePassword}
88             glance::api::enable_proxy_headers_parsing: true
89             glance::api::debug: {get_param: Debug}
90             glance::api::workers: {get_param: GlanceWorkers}
91             tripleo.glance_api.firewall_rules:
92               '112 glance_api':
93                 dport:
94                   - 9292
95                   - 13292
96             glance::api::authtoken::project_name: 'service'
97             glance::api::pipeline: 'keystone'
98             glance::api::show_image_direct_url: true
99             # NOTE: bind IP is found in Heat replacing the network name with the
100             # local node IP for the given network; replacement examples
101             # (eg. for internal_api):
102             # internal_api -> IP
103             # internal_api_uri -> [IP]
104             # internal_api_subnet - > IP/CIDR
105             glance::api::bind_host: {get_param: [ServiceNetMap, GlanceApiNetwork]}
106       step_config: |
107         include ::tripleo::profile::base::glance::api
108       service_config_settings:
109         get_attr: [GlanceBase, role_data, service_config_settings]