Merge "Add redis ordering with ceilometer-central"
[apex-tripleo-heat-templates.git] / ceph-storage.yaml
1 heat_template_version: 2015-04-30
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   ServiceNetMap:
32     default: {}
33     description: Mapping of service_name -> network name. Typically set
34                  via parameter_defaults in the resource registry.
35     type: json
36   UpdateIdentifier:
37     default: ''
38     type: string
39     description: >
40       Setting to a previously unused value during stack-update will trigger
41       package update on all nodes
42   Hostname:
43     type: string
44     default: '' # Defaults to Heat created hostname
45   ExtraConfig:
46     default: {}
47     description: |
48       Additional configuration to inject into the cluster. Note
49       that CephStorageExtraConfig takes precedence over ExtraConfig.
50     type: json
51   CephStorageExtraConfig:
52     default: {}
53     description: |
54       Role specific additional configuration to inject into the cluster.
55     type: json
56
57
58 resources:
59   CephStorage:
60     type: OS::Nova::Server
61     properties:
62       image:
63         {get_param: Image}
64       flavor: {get_param: OvercloudCephStorageFlavor}
65       key_name: {get_param: KeyName}
66       networks:
67         - network: ctlplane
68       user_data_format: SOFTWARE_CONFIG
69       user_data: {get_resource: NodeUserData}
70       name: {get_param: Hostname}
71
72   NodeUserData:
73     type: OS::TripleO::NodeUserData
74
75   StoragePort:
76     type: OS::TripleO::CephStorage::Ports::StoragePort
77     properties:
78       ControlPlaneIP: {get_attr: [CephStorage, networks, ctlplane, 0]}
79
80   StorageMgmtPort:
81     type: OS::TripleO::CephStorage::Ports::StorageMgmtPort
82     properties:
83       ControlPlaneIP: {get_attr: [CephStorage, networks, ctlplane, 0]}
84
85   NetworkConfig:
86     type: OS::TripleO::CephStorage::Net::SoftwareConfig
87     properties:
88       ControlPlaneIp: {get_attr: [CephStorage, networks, ctlplane, 0]}
89       StorageIpSubnet: {get_attr: [StoragePort, ip_subnet]}
90       StorageMgmtIpSubnet: {get_attr: [StorageMgmtPort, ip_subnet]}
91
92   NetworkDeployment:
93     type: OS::TripleO::SoftwareDeployment
94     properties:
95       config: {get_resource: NetworkConfig}
96       server: {get_resource: CephStorage}
97
98   CephStorageDeployment:
99     type: OS::Heat::StructuredDeployment
100     properties:
101       server: {get_resource: CephStorage}
102       config: {get_resource: CephStorageConfig}
103       signal_transport: NO_SIGNAL
104   CephStorageConfig:
105     type: OS::Heat::StructuredConfig
106     properties:
107       group: os-apply-config
108       config:
109         ceph:
110           fsid: {get_param: CephClusterFSID}
111           keyrings:
112             admin:
113               key: {get_param: CephAdminKey}
114           mon_nodes: {get_param: CephMonitors}
115   ControllerCephDeployment:
116     type: OS::Heat::StructuredDeployment
117     properties:
118       server: {get_resource: Controller}
119       config: {get_resource: ControllerCephConfig}
120       signal_transport: NO_SIGNAL
121   ControllerCephConfig:
122     type: OS::Heat::StructuredConfig
123     properties:
124       group: os-apply-config
125       config:
126         cinder:
127           include_ceph_backend: true
128         ceph:
129           fsid: {get_param: CephClusterFSID}
130           keyrings:
131             mon:
132               key: {get_param: CephMonKey}
133             admin:
134               key: {get_param: CephAdminKey}
135           mon_nodes: {get_param: CephMonitors}
136   NovaComputeCephDeployment:
137     depends_on: [ControllerCephDeployment]
138     type: OS::Heat::StructuredDeployment
139     properties:
140       server: {get_resource: NovaCompute}
141       config: {get_resource: NovaComputeCephConfig}
142       signal_transport: NO_SIGNAL
143   NovaComputeCephConfig:
144     type: OS::Heat::StructuredConfig
145     properties:
146       group: os-apply-config
147       config:
148         ceph:
149           fsid: {get_param: CephClusterFSID}
150           keyrings:
151             admin:
152               key: {get_param: CephAdminKey}
153           mon_nodes: {get_param: CephMonitors}
154 outputs:
155   hosts_entry:
156     value:
157       str_replace:
158         template: "IP HOST"
159         params:
160           IP: {get_attr: [CephStorage, networks, ctlplane, 0]}
161           HOST: {get_attr: [CephStorage, name]}
162   storage_ip_address:
163     description: IP address of the server in the storage network
164     value: {get_attr: [StoragePort, ip_address]}
165   storage_mgmt_ip_address:
166     description: IP address of the server in the storage_mgmt network
167     value: {get_attr: [StorageMgmtPort, ip_address]}
168   config_identifier:
169     description: identifier which changes if the node configuration may need re-applying
170     value: "None - NO_SIGNAL"