This repository has been archived by the owner on Feb 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 180
/
glance-api-edge-container-puppet.yaml
88 lines (83 loc) · 3.01 KB
/
glance-api-edge-container-puppet.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
heat_template_version: wallaby
description: >
OpenStack Glance service for DCN/Edge configured with Puppet
parameters:
ServiceData:
default: {}
description: Dictionary packing service data
type: json
ServiceNetMap:
default: {}
description: Mapping of service_name -> network name. Typically set
via parameter_defaults in the resource registry. Use
parameter_merge_strategies to merge it with the defaults.
type: json
RoleName:
default: ''
description: Role name on which the service is applied
type: string
RoleParameters:
default: {}
description: Parameters specific to the role
type: json
EndpointMap:
default: {}
description: Mapping of service endpoint -> protocol. Typically set
via parameter_defaults in the resource registry.
type: json
EnableInternalTLS:
type: boolean
default: false
GlanceEnabledImportMethods:
default: 'web-download'
description: >
List of enabled Image Import Methods. Valid values in the list are
'glance-direct', 'web-download', or 'copy-image'
type: comma_delimited_list
resources:
GlanceApiInternal:
type: ./glance-api-internal-container-puppet.yaml
properties:
ServiceData: {get_param: ServiceData}
ServiceNetMap: {get_param: ServiceNetMap}
EndpointMap: {get_param: EndpointMap}
RoleName: {get_param: RoleName}
RoleParameters: {get_param: RoleParameters}
EnableInternalTLS: {get_param: EnableInternalTLS}
outputs:
glance_api_edge_uri:
description: URI of the glance-api service runing at the edge site.
value: &glance_api_edge_uri
if:
- {get_param: EnableInternalTLS}
- str_replace:
template:
"https://%{hiera('fqdn_NETWORK')}:PORT"
params:
NETWORK: {get_param: [ServiceNetMap, GlanceApiEdgeNetwork]}
PORT: {get_param: [EndpointMap, GlanceInternal, port]}
- str_replace:
template:
"http://%{hiera('NETWORK_uri')}:PORT"
params:
NETWORK: {get_param: [ServiceNetMap, GlanceApiEdgeNetwork]}
PORT: {get_param: [EndpointMap, GlanceInternal, port]}
role_data:
description: Role data for the Glance API role for DCN/Edge.
value:
map_merge:
- get_attr: [GlanceApiInternal, role_data]
- service_name: glance_api_edge
service_config_settings:
map_merge:
- get_attr: [GlanceApiInternal, role_data, service_config_settings]
- cinder_volume:
cinder::glance::glance_api_servers: *glance_api_edge_uri
nova_compute:
nova::glance::endpoint_override: *glance_api_edge_uri
config_settings:
map_merge:
- get_attr: [GlanceApiInternal, role_data, config_settings]
- if:
- contains: ['glance-direct', {get_param: GlanceEnabledImportMethods}]
- glance::api::worker_self_reference_url: *glance_api_edge_uri