Add Ceph related templates needed to configure Cinder with Ceph
[apex-tripleo-heat-templates.git] / ceph-source.yaml
1 heat_template_version: 2013-05-23
2 description: 'Common Ceph Storage Configuration'
3 parameters:
4   CephStorageImage:
5     type: string
6     default: overcloud-ceph-storage
7   OvercloudCephStorageFlavor:
8     default: baremetal
9     description: Flavor for Ceph storage nodes to request when deploying.
10     type: string
11   CephClusterFSID:
12     default: ''
13     type: string
14     description: The Ceph cluster FSID.
15   CephMonKey:
16     default: ''
17     description: The Ceph monitors key.
18     type: string
19   CephAdminKey:
20     default: ''
21     description: The Ceph admin client key.
22     type: string
23 resources:
24   CephStorage0:
25     type: OS::Nova::Server
26     properties:
27       image:
28         {get_param: CephStorageImage}
29       flavor: {get_param: OvercloudCephStorageFlavor}
30       key_name: {get_param: KeyName}
31       user_data_format: SOFTWARE_CONFIG
32   CephStorage0AllNodesDeployment:
33     depends_on: [CephStorage0Deployment,controller0CephDeployment]
34     type: OS::Heat::StructuredDeployment
35     properties:
36       server: {get_resource: CephStorage0}
37       config: {get_resource: allNodesConfig}
38       signal_transport: {get_param: DefaultSignalTransport}
39   CephStorage0Deployment:
40     type: OS::Heat::StructuredDeployment
41     properties:
42       server: {get_resource: CephStorage0}
43       config: {get_resource: CephStorage0Config}
44       signal_transport: NO_SIGNAL
45   CephStorage0Config:
46     type: OS::Heat::StructuredConfig
47     properties:
48       group: os-apply-config
49       config:
50         ceph:
51           fsid: {get_param: CephClusterFSID}
52           keyrings:
53             admin:
54               key: {get_param: CephAdminKey}
55           mon_nodes:
56             Merge::Map:
57               controller0:
58                 ip: {get_attr: [controller0, networks, ctlplane, 0]}
59                 name: {get_attr: [controller0, name]}
60   controller0CephDeployment:
61     type: OS::Heat::StructuredDeployment
62     properties:
63       server: {get_resource: controller0}
64       config: {get_resource: controller0CephConfig}
65       signal_transport: NO_SIGNAL
66   controller0CephConfig:
67     type: OS::Heat::StructuredConfig
68     properties:
69       group: os-apply-config
70       config:
71         cinder:
72           include_ceph_backend: true
73         ceph:
74           fsid: {get_param: CephClusterFSID}
75           keyrings:
76             mon:
77               key: {get_param: CephMonKey}
78             admin:
79               key: {get_param: CephAdminKey}
80           mon_nodes:
81             Merge::Map:
82               controller0:
83                 ip: {get_attr: [controller0, networks, ctlplane, 0]}
84                 name: {get_attr: [controller0, name]}
85   NovaCompute0CephDeployment:
86     depends_on: [controller0CephDeployment]
87     type: OS::Heat::StructuredDeployment
88     properties:
89       server: {get_resource: NovaCompute0}
90       config: {get_resource: NovaCompute0CephConfig}
91       signal_transport: NO_SIGNAL
92   NovaCompute0CephConfig:
93     type: OS::Heat::StructuredConfig
94     properties:
95       group: os-apply-config
96       config:
97         ceph:
98           fsid: {get_param: CephClusterFSID}
99           keyrings:
100             admin:
101               key: {get_param: CephAdminKey}
102           mon_nodes:
103             Merge::Map:
104               controller0:
105                 ip: {get_attr: [controller0, networks, ctlplane, 0]}
106                 name: {get_attr: [controller0, name]}