Merge "Describe use of Manila/CephFS in capabilites_map"
[apex-tripleo-heat-templates.git] / puppet / services / swift-proxy.yaml
1 heat_template_version: ocata
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   RabbitPassword:
45     description: The password for RabbitMQ
46     type: string
47     hidden: true
48   RabbitUserName:
49     default: guest
50     description: The username for RabbitMQ
51     type: string
52   SwiftCeilometerPipelineEnabled:
53     description: Set to False to disable the swift proxy ceilometer pipeline.
54     default: True
55     type: boolean
56   RabbitClientPort:
57     default: 5672
58     description: Set rabbit subscriber port, change this if using SSL
59     type: number
60   RabbitClientUseSSL:
61     default: false
62     description: >
63         Rabbit client subscriber parameter to specify
64         an SSL connection to the RabbitMQ host.
65     type: string
66
67 conditions:
68
69   ceilometer_pipeline_enabled: {equals : [{get_param: SwiftCeilometerPipelineEnabled}, True]}
70
71 resources:
72   SwiftBase:
73     type: ./swift-base.yaml
74     properties:
75       ServiceNetMap: {get_param: ServiceNetMap}
76       DefaultPasswords: {get_param: DefaultPasswords}
77       EndpointMap: {get_param: EndpointMap}
78
79 outputs:
80   role_data:
81     description: Role data for the Swift proxy service.
82     value:
83       service_name: swift_proxy
84       monitoring_subscription: {get_param: MonitoringSubscriptionSwiftProxy}
85       config_settings:
86         map_merge:
87           - get_attr: [SwiftBase, role_data, config_settings]
88
89           - swift::proxy::authtoken::auth_uri: {get_param: [EndpointMap, KeystoneInternal, uri]}
90             swift::proxy::authtoken::auth_url: {get_param: [EndpointMap, KeystoneInternal, uri_no_suffix]}
91             swift::proxy::authtoken::password: {get_param: SwiftPassword}
92             swift::proxy::authtoken::project_name: 'service'
93             swift::proxy::node_timeout: {get_param: SwiftProxyNodeTimeout}
94             swift::proxy::workers: {get_param: SwiftWorkers}
95             swift::proxy::ceilometer::rabbit_user: {get_param: RabbitUserName}
96             swift::proxy::ceilometer::rabbit_password: {get_param: RabbitPassword}
97             swift::proxy::staticweb::url_base: {get_param: [EndpointMap, SwiftPublic, uri_no_suffix]}
98             swift::proxy::ceilometer::nonblocking_notify: true
99             tripleo::profile::base::swift::proxy::rabbit_port: {get_param: RabbitClientPort}
100             tripleo::profile::base::swift::proxy::ceilometer_messaging_use_ssl: {get_param: RabbitClientUseSSL}
101             tripleo::profile::base::swift::proxy::ceilometer_enabled: {get_param: SwiftCeilometerPipelineEnabled}
102             tripleo.swift_proxy.firewall_rules:
103               '122 swift proxy':
104                 dport:
105                   - 8080
106                   - 13808
107             swift::proxy::keystone::operator_roles:
108               - admin
109               - swiftoperator
110               - ResellerAdmin
111             swift::proxy::versioned_writes::allow_versioned_writes: true
112             swift::proxy::pipeline:
113               yaql:
114                 expression: $.data.pipeline.where($ != '')
115                 data:
116                   pipeline:
117                   - 'catch_errors'
118                   - 'healthcheck'
119                   - 'proxy-logging'
120                   - 'cache'
121                   - 'ratelimit'
122                   - 'bulk'
123                   - 'tempurl'
124                   - 'formpost'
125                   - 'authtoken'
126                   - 'keystone'
127                   - 'staticweb'
128                   - 'copy'
129                   - 'container_quotas'
130                   - 'account_quotas'
131                   - 'slo'
132                   - 'dlo'
133                   - 'versioned_writes'
134                   -
135                     if:
136                     - ceilometer_pipeline_enabled
137                     - 'ceilometer'
138                     - ''
139                   - 'proxy-logging'
140                   - 'proxy-server'
141             swift::proxy::account_autocreate: true
142             # NOTE: bind IP is found in Heat replacing the network name with the
143             # local node IP for the given network; replacement examples
144             # (eg. for internal_api):
145             # internal_api -> IP
146             # internal_api_uri -> [IP]
147             # internal_api_subnet - > IP/CIDR
148             swift::proxy::proxy_local_net_ip: {get_param: [ServiceNetMap, SwiftProxyNetwork]}
149       step_config: |
150         include ::tripleo::profile::base::swift::proxy
151       service_config_settings:
152         keystone:
153           swift::keystone::auth::public_url: {get_param: [EndpointMap, SwiftPublic, uri]}
154           swift::keystone::auth::internal_url: {get_param: [EndpointMap, SwiftInternal, uri]}
155           swift::keystone::auth::admin_url: {get_param: [EndpointMap, SwiftAdmin, uri]}
156           swift::keystone::auth::public_url_s3: {get_param: [EndpointMap, SwiftS3Public, uri]}
157           swift::keystone::auth::internal_url_s3: {get_param: [EndpointMap, SwiftS3Internal, uri]}
158           swift::keystone::auth::admin_url_s3: {get_param: [EndpointMap, SwiftS3Admin, uri]}
159           swift::keystone::auth::password: {get_param: SwiftPassword}
160           swift::keystone::auth::region: {get_param: KeystoneRegion}
161           swift::keystone::auth::tenant: 'service'
162           swift::keystone::auth::configure_s3_endpoint: false
163           swift::keystone::auth::operator_roles:
164             - admin
165             - swiftoperator
166             - ResellerAdmin
167       upgrade_tasks:
168         - name: Stop swift_proxy service
169           tags: step2
170           service: name=openstack-swift-proxy state=stopped