[ceph] Add ability to spawn osds with additional volumes
Related-Prod: PRODX-19091
Change-Id: I1a53a35906f0596be3d186182aca5f9301f88df8
diff --git a/de/heat-templates/fragments/CinderVolumeVM.yaml b/de/heat-templates/fragments/CinderVolumeVM.yaml
new file mode 100644
index 0000000..f0dc1a9
--- /dev/null
+++ b/de/heat-templates/fragments/CinderVolumeVM.yaml
@@ -0,0 +1,30 @@
+heat_template_version: queens
+
+parameters:
+ volume_size:
+ type: number
+ description: Size of volume to attach to instance
+ default: 50
+
+ volume_type:
+ type: string
+ description: The type of the volume mapping to a backend, if any.
+ default: standard-iops
+
+ instance_id:
+ type: string
+ description: Server to attach volume to
+
+resources:
+ volume:
+ type: OS::Cinder::Volume
+ properties:
+ volume_type: { get_param: volume_type }
+ size: { get_param: volume_size }
+ description: Volume for stack
+
+ volume_attachment:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: { get_resource: volume }
+ instance_uuid: { get_param: instance_id }
\ No newline at end of file
diff --git a/de/heat-templates/fragments/SrvInstancesBMCephOSD.yaml b/de/heat-templates/fragments/SrvInstancesBMCephOSD.yaml
index ba089d2..42e7f47 100644
--- a/de/heat-templates/fragments/SrvInstancesBMCephOSD.yaml
+++ b/de/heat-templates/fragments/SrvInstancesBMCephOSD.yaml
@@ -91,6 +91,9 @@
description: Comma separated list of IP of BGP neighbors
default: ''
type: string
+ num_volumes:
+ type: number
+ default: 0
resources:
diff --git a/de/heat-templates/fragments/SrvInstancesVMCephOSD.yaml b/de/heat-templates/fragments/SrvInstancesVMCephOSD.yaml
index 227f299..e5b4d9a 100644
--- a/de/heat-templates/fragments/SrvInstancesVMCephOSD.yaml
+++ b/de/heat-templates/fragments/SrvInstancesVMCephOSD.yaml
@@ -111,6 +111,9 @@
cinder_lvm_loop_device_size:
type: number
default: 0
+ num_volumes:
+ type: number
+ default: 0
resources:
@@ -194,6 +197,15 @@
user_data: { get_resource: install_config_agent}
metadata: { get_param: metadata }
+ extra_volumes:
+ type: OS::Heat::ResourceGroup
+ properties:
+ count: { get_param: num_volumes }
+ resource_def:
+ type: ./CinderVolumeVM.yaml
+ properties:
+ instance_id: { get_resource: server }
+
accessible_server_port:
type: OS::Neutron::Port
properties: