aboutsummaryrefslogtreecommitdiffstats
path: root/puppet/services/swift-storage.yaml
blob: 08df928dd3c6fb2a87c5f69d10b17419a6bf9e18 (plain)
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
heat_template_version: ocata

description: >
  OpenStack Swift Storage service configured with Puppet

parameters:
  ServiceNetMap:
    default: {}
    description: Mapping of service_name -> network name. Typically set
                 via parameter_defaults in the resource registry.  This
                 mapping overrides those in ServiceNetMapDefaults.
    type: json
  DefaultPasswords:
    default: {}
    type: json
  EndpointMap:
    default: {}
    description: Mapping of service endpoint -> protocol. Typically set
                 via parameter_defaults in the resource registry.
    type: json
  Debug:
    default: ''
    description: Set to True to enable debugging on all services.
    type: string
  SwiftMountCheck:
    default: false
    description: Value of mount_check in Swift account/container/object -server.conf
    type: boolean
  SwiftRawDisks:
    default: {}
    description: 'A hash of additional raw devices to use as Swift backend (eg. {sdb: {}})'
    type: json
  MonitoringSubscriptionSwiftStorage:
    default: 'overcloud-swift-storage'
    type: string

  # DEPRECATED options for compatibility with overcloud.yaml
  # This should be removed and manipulation of the ControllerServices list
  # used instead, but we need client support for that first
  ControllerEnableSwiftStorage:
    default: true
    description: Whether to enable Swift Storage on the Controller
    type: boolean

parameter_groups:
- label: deprecated
  description: Do not use deprecated params, they will be removed.
  parameters:
  - ControllerEnableSwiftStorage

resources:
  SwiftBase:
    type: ./swift-base.yaml
    properties:
      ServiceNetMap: {get_param: ServiceNetMap}
      DefaultPasswords: {get_param: DefaultPasswords}
      EndpointMap: {get_param: EndpointMap}

outputs:
  role_data:
    description: Role data for the Swift Proxy role.
    value:
      service_name: swift_storage
      monitoring_subscription: {get_param: MonitoringSubscriptionSwiftStorage}
      config_settings:
        map_merge:
          - get_attr: [SwiftBase, role_data, config_settings]
          - swift::storage::all::mount_check: {get_param: SwiftMountCheck}
            tripleo::profile::base::swift::storage::enable_swift_storage: {get_param: ControllerEnableSwiftStorage}
            tripleo.swift_storage.firewall_rules:
              '123 swift storage':
                dport:
                  - 873
                  - 6000
                  - 6001
                  - 6002
            swift::storage::all::incoming_chmod: 'Du=rwx,g=rx,o=rx,Fu=rw,g=r,o=r'
            swift::storage::all::outgoing_chmod: 'Du=rwx,g=rx,o=rx,Fu=rw,g=r,o=r'
            swift::storage::all::object_pipeline:
              - healthcheck
              - recon
              - object-server
            swift::storage::all::container_pipeline:
              - healthcheck
              - container-server
            swift::storage::all::account_pipeline:
              - healthcheck
              - account-server
            swift::storage::disks::args: {get_param: SwiftRawDisks}
            swift::storage::all::storage_local_net_ip: {get_param: [ServiceNetMap, SwiftStorageNetwork]}
      step_config: |
        include ::tripleo::profile::base::swift::storage
      upgrade_tasks:
        - name: Stop swift storage services
          tags: step2
          service: name={{ item }} state=stopped
          with_items:
            - openstack-swift-account-auditor
            - openstack-swift-account-reaper
            - openstack-swift-account-replicator
            - openstack-swift-account
            - openstack-swift-container-auditor
            - openstack-swift-container-replicator
            - openstack-swift-container-updater
            - openstack-swift-container
            - openstack-swift-object-auditor
            - openstack-swift-object-replicator
            - openstack-swift-object-updater
            - openstack-swift-object