Ensures mongodb configuration only happens if mongodb is needed
[apex-tripleo-heat-templates.git] / ceph-storage.yaml
1 heat_template_version: 2014-10-16
2 description: 'Common Ceph Storage Configuration'
3 parameters:
4   Image:
5     type: string
6     default: overcloud-ceph-storage
7   KeyName:
8     default: default
9     description: Name of an existing EC2 KeyPair to enable SSH access to the instances
10     type: string
11   Flavor:
12     default: baremetal
13     description: Flavor for block storage nodes to request when deploying.
14     type: string
15   CephClusterFSID:
16     default: ''
17     type: string
18     description: The Ceph cluster FSID. Must be a UUID.
19   CephMonKey:
20     default: ''
21     description: The Ceph monitors key. Can be created with ceph-authtool --gen-print-key.
22     type: string
23   CephAdminKey:
24     default: ''
25     description: The Ceph admin client key. Can be created with ceph-authtool --gen-print-key.
26     type: string
27   CephMonitors:
28     default: ''
29     description: The list of ip/names to use as Ceph monitors
30     type: json
31
32 resources:
33   CephStorage:
34     type: OS::Nova::Server
35     properties:
36       image:
37         {get_param: Image}
38       flavor: {get_param: OvercloudCephStorageFlavor}
39       key_name: {get_param: KeyName}
40       networks:
41         - network: ctlplane
42       user_data_format: SOFTWARE_CONFIG
43       user_data: {get_resource: NodeUserData}
44
45   NodeUserData:
46     type: OS::TripleO::NodeUserData
47
48   NetworkConfig:
49     type: OS::TripleO::CephStorage::Net::SoftwareConfig
50
51   NetworkDeployment:
52     type: OS::TripleO::SoftwareDeployment
53     properties:
54       config: {get_attr: [NetworkConfig, config_id]}
55       server: {get_resource: CephStorage}
56
57   CephStorageDeployment:
58     type: OS::Heat::StructuredDeployment
59     properties:
60       server: {get_resource: CephStorage}
61       config: {get_resource: CephStorageConfig}
62       signal_transport: NO_SIGNAL
63   CephStorageConfig:
64     type: OS::Heat::StructuredConfig
65     properties:
66       group: os-apply-config
67       config:
68         ceph:
69           fsid: {get_param: CephClusterFSID}
70           keyrings:
71             admin:
72               key: {get_param: CephAdminKey}
73           mon_nodes: {get_param: CephMonitors}
74   ControllerCephDeployment:
75     type: OS::Heat::StructuredDeployment
76     properties:
77       server: {get_resource: Controller}
78       config: {get_resource: ControllerCephConfig}
79       signal_transport: NO_SIGNAL
80   ControllerCephConfig:
81     type: OS::Heat::StructuredConfig
82     properties:
83       group: os-apply-config
84       config:
85         cinder:
86           include_ceph_backend: true
87         ceph:
88           fsid: {get_param: CephClusterFSID}
89           keyrings:
90             mon:
91               key: {get_param: CephMonKey}
92             admin:
93               key: {get_param: CephAdminKey}
94           mon_nodes: {get_param: CephMonitors}
95   NovaComputeCephDeployment:
96     depends_on: [ControllerCephDeployment]
97     type: OS::Heat::StructuredDeployment
98     properties:
99       server: {get_resource: NovaCompute}
100       config: {get_resource: NovaComputeCephConfig}
101       signal_transport: NO_SIGNAL
102   NovaComputeCephConfig:
103     type: OS::Heat::StructuredConfig
104     properties:
105       group: os-apply-config
106       config:
107         ceph:
108           fsid: {get_param: CephClusterFSID}
109           keyrings:
110             admin:
111               key: {get_param: CephAdminKey}
112           mon_nodes: {get_param: CephMonitors}
113 outputs:
114   hosts_entry:
115     value:
116       str_replace:
117         template: "IP HOST"
118         params:
119           IP: {get_attr: [CephStorage, networks, ctlplane, 0]}
120           HOST: {get_attr: [CephStorage, name]}