Merge "Wire Neutron VLAN ranges param as array to puppet"
[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
37 resources:
38   CephStorage:
39     type: OS::Nova::Server
40     properties:
41       image:
42         {get_param: Image}
43       flavor: {get_param: OvercloudCephStorageFlavor}
44       key_name: {get_param: KeyName}
45       networks:
46         - network: ctlplane
47       user_data_format: SOFTWARE_CONFIG
48       user_data: {get_resource: NodeUserData}
49
50   NodeUserData:
51     type: OS::TripleO::NodeUserData
52
53   StoragePort:
54     type: OS::TripleO::CephStorage::Ports::StoragePort
55     properties:
56       ControlPlaneIP: {get_attr: [CephStorage, networks, ctlplane, 0]}
57
58   StorageMgmtPort:
59     type: OS::TripleO::CephStorage::Ports::StorageMgmtPort
60     properties:
61       ControlPlaneIP: {get_attr: [CephStorage, networks, ctlplane, 0]}
62
63   NetworkConfig:
64     type: OS::TripleO::CephStorage::Net::SoftwareConfig
65     properties:
66       StorageIpSubnet: {get_attr: [StoragePort, ip_subnet]}
67       StorageMgmtIpSubnet: {get_attr: [StorageMgmtPort, ip_subnet]}
68
69   NetworkDeployment:
70     type: OS::TripleO::SoftwareDeployment
71     properties:
72       config: {get_resource: NetworkConfig}
73       server: {get_resource: CephStorage}
74
75   CephStorageDeployment:
76     type: OS::Heat::StructuredDeployment
77     properties:
78       server: {get_resource: CephStorage}
79       config: {get_resource: CephStorageConfig}
80       signal_transport: NO_SIGNAL
81   CephStorageConfig:
82     type: OS::Heat::StructuredConfig
83     properties:
84       group: os-apply-config
85       config:
86         ceph:
87           fsid: {get_param: CephClusterFSID}
88           keyrings:
89             admin:
90               key: {get_param: CephAdminKey}
91           mon_nodes: {get_param: CephMonitors}
92   ControllerCephDeployment:
93     type: OS::Heat::StructuredDeployment
94     properties:
95       server: {get_resource: Controller}
96       config: {get_resource: ControllerCephConfig}
97       signal_transport: NO_SIGNAL
98   ControllerCephConfig:
99     type: OS::Heat::StructuredConfig
100     properties:
101       group: os-apply-config
102       config:
103         cinder:
104           include_ceph_backend: true
105         ceph:
106           fsid: {get_param: CephClusterFSID}
107           keyrings:
108             mon:
109               key: {get_param: CephMonKey}
110             admin:
111               key: {get_param: CephAdminKey}
112           mon_nodes: {get_param: CephMonitors}
113   NovaComputeCephDeployment:
114     depends_on: [ControllerCephDeployment]
115     type: OS::Heat::StructuredDeployment
116     properties:
117       server: {get_resource: NovaCompute}
118       config: {get_resource: NovaComputeCephConfig}
119       signal_transport: NO_SIGNAL
120   NovaComputeCephConfig:
121     type: OS::Heat::StructuredConfig
122     properties:
123       group: os-apply-config
124       config:
125         ceph:
126           fsid: {get_param: CephClusterFSID}
127           keyrings:
128             admin:
129               key: {get_param: CephAdminKey}
130           mon_nodes: {get_param: CephMonitors}
131 outputs:
132   hosts_entry:
133     value:
134       str_replace:
135         template: "IP HOST"
136         params:
137           IP: {get_attr: [CephStorage, networks, ctlplane, 0]}
138           HOST: {get_attr: [CephStorage, name]}
139   storage_ip_address:
140     description: IP address of the server in the storage network
141     value: {get_attr: [StoragePort, ip_address]}
142   storage_mgmt_ip_address:
143     description: IP address of the server in the storage_mgmt network
144     value: {get_attr: [StorageMgmtPort, ip_address]}