[ceph][kubevirt] Allow to deploy specified volumes for Ceph related envs
Add new env file for Ceph tests.
Related-Prod: PRODX-54501
Change-Id: I1e6983ac8cd4b1aee332d9f7e11f7a53bf7a479c
diff --git a/hco/fragments/CinderVolumeVM.yaml b/hco/fragments/CinderVolumeVM.yaml
new file mode 100644
index 0000000..b0726f4
--- /dev/null
+++ b/hco/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: 30
+
+ 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 }
diff --git a/hco/fragments/VMInstanceCeph.yaml b/hco/fragments/VMInstanceCeph.yaml
index ad54722..642fba2 100644
--- a/hco/fragments/VMInstanceCeph.yaml
+++ b/hco/fragments/VMInstanceCeph.yaml
@@ -16,6 +16,9 @@
type: string
storage_backend_network:
type: string
+ storage_volumes_per_node:
+ type: number
+ default: 0
availability_zone:
type: string
default: nova
@@ -161,6 +164,15 @@
user_data_format: SOFTWARE_CONFIG
user_data: { get_resource: install_config_agent}
+ extra_volumes:
+ type: OS::Heat::ResourceGroup
+ properties:
+ count: { get_param: storage_volumes_per_node }
+ resource_def:
+ type: ./CinderVolumeVM.yaml
+ properties:
+ instance_id: { get_resource: server }
+
outputs:
server_public_ip:
description: Floating IP address of server in public network