Merge "Allow Glance API and Registry to be split"
[apex-tripleo-heat-templates.git] / puppet / services / glance-registry.yaml
1 heat_template_version: 2016-04-08
2
3 description: >
4   OpenStack Glance Registry 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 worker processes for glance registry. If left unset (empty
33       string), the default value will result in the configuration being left
34       unset and a system-dependent default value will be chosen (e.g.: number of
35       processors). Please note that this will create a large number of processes
36       on systems with a large number of CPUs resulting in excess memory
37       consumption. It is recommended that a suitable non-default value be
38       selected on such systems.
39     type: string
40   MonitoringSubscriptionGlanceRegistry:
41     default: 'overcloud-glance-registry'
42     type: string
43   GlanceRegistryLoggingSource:
44     type: json
45     default:
46       tag: openstack.glance.registry
47       path: /var/log/glance/registry.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 Registry role.
60     value:
61       service_name: glance_registry
62       monitoring_subscription: {get_param: MonitoringSubscriptionGlanceRegistry}
63       logging_source: {get_param: GlanceRegistryLoggingSource}
64       logging_groups:
65         - glance
66       config_settings:
67         map_merge:
68           - get_attr: [GlanceBase, role_data, config_settings]
69
70           - glance::registry::database_connection:
71               list_join:
72                 - ''
73                 - - {get_param: [EndpointMap, MysqlInternal, protocol]}
74                   - '://glance:'
75                   - {get_param: GlancePassword}
76                   - '@'
77                   - {get_param: [EndpointMap, MysqlInternal, host]}
78                   - '/glance'
79             glance::registry::authtoken::password: {get_param: GlancePassword}
80             glance::registry::authtoken::project_name: 'service'
81             glance::registry::pipeline: 'keystone'
82             glance::registry::authtoken::auth_uri: {get_param: [EndpointMap, KeystoneInternal, uri] }
83             glance::registry::authtoken::auth_url: { get_param: [EndpointMap, KeystoneAdmin, uri_no_suffix] }
84             glance::registry::debug: {get_param: Debug}
85             glance::registry::workers: {get_param: GlanceWorkers}
86             tripleo.glance_registry.firewall_rules:
87               '112 glance_registry':
88                 dport:
89                   - 9191
90             # NOTE: bind IP is found in Heat replacing the network name with the
91             # local node IP for the given network; replacement examples
92             # (eg. for internal_api):
93             # internal_api -> IP
94             # internal_api_uri -> [IP]
95             # internal_api_subnet - > IP/CIDR
96             glance::registry::bind_host: {get_param: [ServiceNetMap, GlanceRegistryNetwork]}
97       step_config: |
98         include ::tripleo::profile::base::glance::registry
99       service_config_settings:
100           get_attr: [GlanceBase, role_data, config_settings]