Merge "Make UpdateDeployment depend on NetworkDeployment"
[apex-tripleo-heat-templates.git] / puppet / services / swift-storage.yaml
1 heat_template_version: ocata
2
3 description: >
4   OpenStack Swift Storage 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   SwiftMountCheck:
26     default: false
27     description: Value of mount_check in Swift account/container/object -server.conf
28     type: boolean
29   SwiftRawDisks:
30     default: {}
31     description: 'A hash of additional raw devices to use as Swift backend (eg. {sdb: {}})'
32     type: json
33   MonitoringSubscriptionSwiftStorage:
34     default: 'overcloud-swift-storage'
35     type: string
36
37   # DEPRECATED options for compatibility with overcloud.yaml
38   # This should be removed and manipulation of the ControllerServices list
39   # used instead, but we need client support for that first
40   ControllerEnableSwiftStorage:
41     default: true
42     description: Whether to enable Swift Storage on the Controller
43     type: boolean
44
45 parameter_groups:
46 - label: deprecated
47   description: Do not use deprecated params, they will be removed.
48   parameters:
49   - ControllerEnableSwiftStorage
50
51 resources:
52   SwiftBase:
53     type: ./swift-base.yaml
54     properties:
55       ServiceNetMap: {get_param: ServiceNetMap}
56       DefaultPasswords: {get_param: DefaultPasswords}
57       EndpointMap: {get_param: EndpointMap}
58
59 conditions:
60   swift_mount_check:
61     or:
62     - equals:
63       - get_param: SwiftMountCheck
64       - true
65     - not:
66         equals:
67         - get_param: SwiftRawDisks
68         - {}
69
70 outputs:
71   role_data:
72     description: Role data for the Swift Proxy role.
73     value:
74       service_name: swift_storage
75       monitoring_subscription: {get_param: MonitoringSubscriptionSwiftStorage}
76       config_settings:
77         map_merge:
78           - get_attr: [SwiftBase, role_data, config_settings]
79           - swift::storage::all::mount_check: {if: [swift_mount_check, true, false]}
80             tripleo::profile::base::swift::storage::enable_swift_storage: {get_param: ControllerEnableSwiftStorage}
81             tripleo.swift_storage.firewall_rules:
82               '123 swift storage':
83                 dport:
84                   - 873
85                   - 6000
86                   - 6001
87                   - 6002
88             swift::storage::all::incoming_chmod: 'Du=rwx,g=rx,o=rx,Fu=rw,g=r,o=r'
89             swift::storage::all::outgoing_chmod: 'Du=rwx,g=rx,o=rx,Fu=rw,g=r,o=r'
90             swift::storage::all::object_pipeline:
91               - healthcheck
92               - recon
93               - object-server
94             swift::storage::all::container_pipeline:
95               - healthcheck
96               - container-server
97             swift::storage::all::account_pipeline:
98               - healthcheck
99               - account-server
100             swift::storage::disks::args: {get_param: SwiftRawDisks}
101             swift::storage::all::storage_local_net_ip: {get_param: [ServiceNetMap, SwiftStorageNetwork]}
102       step_config: |
103         include ::tripleo::profile::base::swift::storage
104       upgrade_tasks:
105         - name: Stop swift storage services
106           tags: step1
107           service: name={{ item }} state=stopped
108           with_items:
109             - openstack-swift-account-auditor
110             - openstack-swift-account-reaper
111             - openstack-swift-account-replicator
112             - openstack-swift-account
113             - openstack-swift-container-auditor
114             - openstack-swift-container-replicator
115             - openstack-swift-container-updater
116             - openstack-swift-container
117             - openstack-swift-object-auditor
118             - openstack-swift-object-replicator
119             - openstack-swift-object-updater
120             - openstack-swift-object