Change flat network name for nosdn fdio scenario
[apex-tripleo-heat-templates.git] / puppet / services / swift-storage.yaml
1 heat_template_version: pike
2
3 description: >
4   OpenStack Swift Storage service configured with Puppet
5
6 parameters:
7   ServiceData:
8     default: {}
9     description: Dictionary packing service data
10     type: json
11   ServiceNetMap:
12     default: {}
13     description: Mapping of service_name -> network name. Typically set
14                  via parameter_defaults in the resource registry.  This
15                  mapping overrides those in ServiceNetMapDefaults.
16     type: json
17   DefaultPasswords:
18     default: {}
19     type: json
20   RoleName:
21     default: ''
22     description: Role name on which the service is applied
23     type: string
24   RoleParameters:
25     default: {}
26     description: Parameters specific to the role
27     type: json
28   EndpointMap:
29     default: {}
30     description: Mapping of service endpoint -> protocol. Typically set
31                  via parameter_defaults in the resource registry.
32     type: json
33   Debug:
34     default: ''
35     description: Set to True to enable debugging on all services.
36     type: string
37   SwiftMountCheck:
38     default: false
39     description: Value of mount_check in Swift account/container/object -server.conf
40     type: boolean
41   SwiftRawDisks:
42     default: {}
43     description: 'A hash of additional raw devices to use as Swift backend (eg. {sdb: {}})'
44     type: json
45   MonitoringSubscriptionSwiftStorage:
46     default: 'overcloud-swift-storage'
47     type: string
48
49   # DEPRECATED options for compatibility with overcloud.yaml
50   # This should be removed and manipulation of the ControllerServices list
51   # used instead, but we need client support for that first
52   ControllerEnableSwiftStorage:
53     default: true
54     description: Whether to enable Swift Storage on the Controller
55     type: boolean
56
57 parameter_groups:
58 - label: deprecated
59   description: Do not use deprecated params, they will be removed.
60   parameters:
61   - ControllerEnableSwiftStorage
62
63 resources:
64   SwiftBase:
65     type: ./swift-base.yaml
66     properties:
67       ServiceData: {get_param: ServiceData}
68       ServiceNetMap: {get_param: ServiceNetMap}
69       DefaultPasswords: {get_param: DefaultPasswords}
70       EndpointMap: {get_param: EndpointMap}
71       RoleName: {get_param: RoleName}
72       RoleParameters: {get_param: RoleParameters}
73
74 conditions:
75   swift_mount_check:
76     or:
77     - equals:
78       - get_param: SwiftMountCheck
79       - true
80     - not:
81         equals:
82         - get_param: SwiftRawDisks
83         - {}
84
85 outputs:
86   role_data:
87     description: Role data for the Swift Proxy role.
88     value:
89       service_name: swift_storage
90       monitoring_subscription: {get_param: MonitoringSubscriptionSwiftStorage}
91       config_settings:
92         map_merge:
93           - get_attr: [SwiftBase, role_data, config_settings]
94           - swift::storage::all::mount_check: {if: [swift_mount_check, true, false]}
95             tripleo::profile::base::swift::storage::enable_swift_storage: {get_param: ControllerEnableSwiftStorage}
96             tripleo.swift_storage.firewall_rules:
97               '123 swift storage':
98                 dport:
99                   - 873
100                   - 6000
101                   - 6001
102                   - 6002
103             swift::storage::all::incoming_chmod: 'Du=rwx,g=rx,o=rx,Fu=rw,g=r,o=r'
104             swift::storage::all::outgoing_chmod: 'Du=rwx,g=rx,o=rx,Fu=rw,g=r,o=r'
105             swift::storage::all::object_pipeline:
106               - healthcheck
107               - recon
108               - object-server
109             swift::storage::all::container_pipeline:
110               - healthcheck
111               - container-server
112             swift::storage::all::account_pipeline:
113               - healthcheck
114               - account-server
115             swift::storage::disks::args: {get_param: SwiftRawDisks}
116             swift::storage::all::storage_local_net_ip: {get_param: [ServiceNetMap, SwiftStorageNetwork]}
117       step_config: |
118         include ::tripleo::profile::base::swift::storage
119       upgrade_tasks:
120         - name: Stop swift storage services
121           tags: step1
122           service: name={{ item }} state=stopped
123           with_items:
124             - openstack-swift-account-auditor
125             - openstack-swift-account-reaper
126             - openstack-swift-account-replicator
127             - openstack-swift-account
128             - openstack-swift-container-auditor
129             - openstack-swift-container-replicator
130             - openstack-swift-container-updater
131             - openstack-swift-container
132             - openstack-swift-object-auditor
133             - openstack-swift-object-expirer
134             - openstack-swift-object-replicator
135             - openstack-swift-object-updater
136             - openstack-swift-object