Enable object versioning in Swift proxy
[apex-tripleo-heat-templates.git] / puppet / services / swift-proxy.yaml
1 heat_template_version: 2016-04-08
2
3 description: >
4   OpenStack Swift Proxy 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   SwiftPassword:
26     description: The password for the swift service account, used by the swift proxy services.
27     type: string
28     hidden: true
29   SwiftProxyNodeTimeout:
30     default: 60
31     description: Timeout for requests going from swift-proxy to swift a/c/o services.
32     type: number
33   SwiftWorkers:
34     default: 0
35     description: Number of workers for Swift service.
36     type: number
37   KeystoneRegion:
38     type: string
39     default: 'regionOne'
40     description: Keystone region for endpoint
41   MonitoringSubscriptionSwiftProxy:
42     default: 'overcloud-swift-proxy'
43     type: string
44
45 resources:
46   SwiftBase:
47     type: ./swift-base.yaml
48     properties:
49       ServiceNetMap: {get_param: ServiceNetMap}
50       DefaultPasswords: {get_param: DefaultPasswords}
51       EndpointMap: {get_param: EndpointMap}
52
53 outputs:
54   role_data:
55     description: Role data for the Swift proxy service.
56     value:
57       service_name: swift_proxy
58       monitoring_subscription: {get_param: MonitoringSubscriptionSwiftProxy}
59       config_settings:
60         map_merge:
61           - get_attr: [SwiftBase, role_data, config_settings]
62
63           - swift::proxy::authtoken::auth_uri: {get_param: [EndpointMap, KeystoneInternal, uri]}
64             swift::proxy::authtoken::auth_url: {get_param: [EndpointMap, KeystoneAdmin, uri_no_suffix]}
65             swift::proxy::authtoken::password: {get_param: SwiftPassword}
66             swift::proxy::authtoken::project_name: 'service'
67             swift::proxy::node_timeout: {get_param: SwiftProxyNodeTimeout}
68             swift::proxy::workers: {get_param: SwiftWorkers}
69             tripleo.swift_proxy.firewall_rules:
70               '122 swift proxy':
71                 dport:
72                   - 8080
73                   - 13808
74             swift::proxy::keystone::operator_roles:
75               - admin
76               - swiftoperator
77               - ResellerAdmin
78             swift::proxy::versioned_writes::allow_versioned_writes: true
79             swift::proxy::pipeline:
80               - 'catch_errors'
81               - 'healthcheck'
82               - 'proxy-logging'
83               - 'cache'
84               - 'ratelimit'
85               - 'bulk'
86               - 'tempurl'
87               - 'formpost'
88               - 'authtoken'
89               - 'keystone'
90               - 'staticweb'
91               - 'versioned_writes'
92               - 'proxy-logging'
93               - 'proxy-server'
94             swift::proxy::account_autocreate: true
95             # NOTE: bind IP is found in Heat replacing the network name with the
96             # local node IP for the given network; replacement examples
97             # (eg. for internal_api):
98             # internal_api -> IP
99             # internal_api_uri -> [IP]
100             # internal_api_subnet - > IP/CIDR
101             swift::proxy::proxy_local_net_ip: {get_param: [ServiceNetMap, SwiftProxyNetwork]}
102       step_config: |
103         include ::tripleo::profile::base::swift::proxy
104       service_config_settings:
105         keystone:
106           swift::keystone::auth::public_url: {get_param: [EndpointMap, SwiftPublic, uri]}
107           swift::keystone::auth::internal_url: {get_param: [EndpointMap, SwiftInternal, uri]}
108           swift::keystone::auth::admin_url: {get_param: [EndpointMap, SwiftAdmin, uri]}
109           swift::keystone::auth::public_url_s3: {get_param: [EndpointMap, SwiftS3Public, uri]}
110           swift::keystone::auth::internal_url_s3: {get_param: [EndpointMap, SwiftS3Internal, uri]}
111           swift::keystone::auth::admin_url_s3: {get_param: [EndpointMap, SwiftS3Admin, uri]}
112           swift::keystone::auth::password: {get_param: SwiftPassword}
113           swift::keystone::auth::region: {get_param: KeystoneRegion}
114           swift::keystone::auth::tenant: 'service'
115           swift::keystone::auth::configure_s3_endpoint: false
116           swift::keystone::auth::operator_roles:
117             - admin
118             - swiftoperator
119             - ResellerAdmin