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