Update the template_version alias for all the templates to pike.
[apex-tripleo-heat-templates.git] / puppet / services / ceph-rgw.yaml
1 heat_template_version: pike
2
3 description: >
4   Ceph RadosGW service.
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   RoleName:
17     default: ''
18     description: Role name on which the service is applied
19     type: string
20   RoleParameters:
21     default: {}
22     description: Parameters specific to the role
23     type: json
24   EndpointMap:
25     default: {}
26     description: Mapping of service endpoint -> protocol. Typically set
27                  via parameter_defaults in the resource registry.
28     type: json
29   AdminToken:
30     description: The keystone auth secret and db password.
31     type: string
32     hidden: true
33   CephRgwKey:
34     description: The cephx key for the radosgw client. Can be created
35                  with ceph-authtool --gen-print-key.
36     type: string
37     hidden: true
38   SwiftPassword:
39     description: The password for the swift service account, used by the Ceph RGW services.
40     type: string
41     hidden: true
42   KeystoneRegion:
43     type: string
44     default: 'regionOne'
45     description: Keystone region for endpoint
46
47 resources:
48   CephBase:
49     type: ./ceph-base.yaml
50     properties:
51       ServiceNetMap: {get_param: ServiceNetMap}
52       DefaultPasswords: {get_param: DefaultPasswords}
53       EndpointMap: {get_param: EndpointMap}
54       RoleName: {get_param: RoleName}
55       RoleParameters: {get_param: RoleParameters}
56
57 outputs:
58   role_data:
59     description: Role data for the Ceph RadosGW service.
60     value:
61       service_name: ceph_rgw
62       config_settings:
63         map_merge:
64           - get_attr: [CephBase, role_data, config_settings]
65           - tripleo::profile::base::ceph::rgw::rgw_key: {get_param: CephRgwKey}
66             tripleo::profile::base::ceph::rgw::keystone_admin_token: {get_param: AdminToken}
67             tripleo::profile::base::ceph::rgw::keystone_url: {get_param: [EndpointMap, KeystoneInternal, uri_no_suffix]}
68             tripleo::profile::base::ceph::rgw::civetweb_bind_ip: {get_param: [ServiceNetMap, CephRgwNetwork]}
69             tripleo::profile::base::ceph::rgw::civetweb_bind_port: {get_param: [EndpointMap, CephRgwInternal, port]}
70             tripleo::profile::base::ceph::rgw::rgw_keystone_version: v3
71             ceph::profile::params::rgw_keystone_admin_domain: default
72             ceph::profile::params::rgw_keystone_admin_project: service
73             ceph::profile::params::rgw_keystone_admin_user: swift
74             ceph::profile::params::rgw_keystone_admin_password: {get_param: SwiftPassword}
75             tripleo.ceph_rgw.firewall_rules:
76               '122 ceph rgw':
77                 dport: {get_param: [EndpointMap, CephRgwInternal, port]}
78       step_config: |
79         include ::tripleo::profile::base::ceph::rgw
80       service_config_settings:
81         keystone:
82           ceph::rgw::keystone::auth::public_url: {get_param: [EndpointMap, CephRgwPublic, uri]}
83           ceph::rgw::keystone::auth::internal_url: {get_param: [EndpointMap, CephRgwInternal, uri]}
84           ceph::rgw::keystone::auth::admin_url: {get_param: [EndpointMap, CephRgwAdmin, uri]}
85           ceph::rgw::keystone::auth::region: {get_param: KeystoneRegion}
86           ceph::rgw::keystone::auth::roles: [ 'admin', 'Member', '_member_' ]
87           ceph::rgw::keystone::auth::tenant: service
88           ceph::rgw::keystone::auth::user: swift
89           ceph::rgw::keystone::auth::password: {get_param: SwiftPassword}
90       upgrade_tasks:
91         - name: Gather RGW instance ID
92           tags: common
93           shell: hiera -c /etc/puppet/hiera.yaml ceph::profile::params::rgw_name radosgw.gateway
94           register: rgw_id
95         - name: Check if ceph_rgw is deployed
96           command: systemctl is-enabled ceph-radosgw@{{rgw_id.stdout}}
97           tags: common
98           ignore_errors: True
99           register: ceph_rgw_enabled
100         - name: Check status
101           shell: /usr/bin/systemctl show ceph-radosgw@{{rgw_id.stdout}} --property ActiveState | grep '\bactive\b'
102           when: ceph_rgw_enabled.rc == 0
103           tags: step0,validation
104         - name: Stop RGW instance
105           tags: step1
106           when: ceph_rgw_enabled.rc == 0
107           service:
108             name: ceph-radosgw@{{rgw_id.stdout}}
109             state: stopped