diff --git a/browbeat-config.yaml b/browbeat-config.yaml index 5c3796f29..81eec34b2 100644 --- a/browbeat-config.yaml +++ b/browbeat-config.yaml @@ -267,6 +267,31 @@ workloads: batches: 5 file: rally/neutron/neutron-boot-server-and-batch-add-subports.yml + - name: heat + enabled: false + type: rally + rally_deployment: overcloud + concurrency: + - 8 + times: 16 + scenarios: + - name: create-and-delete-stack-resource-group + enabled: false + num_instances: 2 + instance_image: cirros + instance_volume_size: 1 + instance_flavor: m1.tiny + instance_availability_zone: nova + file: rally/heat/create-and-delete-stack-resource-group.yaml + # specify the updated_template_path as per the use case from "rally/heat/templates/" + # use 'updated-random-strings-add.yaml.template' for adding resources to the existing stack + # use 'updated-random-strings-delete.yaml.template' for delete + # use 'updated-random-strings-replace.yaml.template' for replace + - name: create-update-delete-stack + enabled: false + updated_template_path: rally/heat/templates/updated-random-strings-replace.yaml.template + file: rally/heat/create-update-delete-stack.yaml + - name: nova enabled: false type: rally diff --git a/rally/heat/create-and-delete-stack-resource-group.yaml b/rally/heat/create-and-delete-stack-resource-group.yaml new file mode 100644 index 000000000..534ac30fc --- /dev/null +++ b/rally/heat/create-and-delete-stack-resource-group.yaml @@ -0,0 +1,35 @@ +--- + HeatStacks.create_and_delete_stack: + - + args: + template_path: "rally/heat/templates/resource-group-server-with-volume.yaml.template" + parameters: + num_instances: {{num_instances}} + instance_image: {{instance_image}} + instance_volume_size: {{instance_volume_size}} + instance_flavor: {{instance_flavor}} + instance_availability_zone: {{instance_availability_zone}} + files: ["rally/heat/templates/server-with-volume.yaml.template"] + runner: + type: "constant" + times: {{times}} + concurrency: {{concurrency}} + context: + users: + tenants: 2 + users_per_tenant: 3 + quotas: + neutron: + network: -1 + port: -1 + nova: + instances: -1 + cores: -1 + ram: -1 + cinder: + gigabytes: -1 + volumes: -1 + + sla: + failure_rate: + max: 0 diff --git a/rally/heat/create-update-delete-stack.yaml b/rally/heat/create-update-delete-stack.yaml new file mode 100644 index 000000000..a2c5b4bea --- /dev/null +++ b/rally/heat/create-update-delete-stack.yaml @@ -0,0 +1,17 @@ +--- + HeatStacks.create_update_delete_stack: + - + args: + template_path: "rally/heat/templates/random-strings.yaml.template" + updated_template_path: {{updated_template_path}} + runner: + type: "constant" + times: {{times}} + concurrency: {{concurrency}} + context: + users: + tenants: 2 + users_per_tenant: 3 + sla: + failure_rate: + max: 0 diff --git a/rally/heat/templates/random-strings.yaml.template b/rally/heat/templates/random-strings.yaml.template new file mode 100644 index 000000000..7486ddd95 --- /dev/null +++ b/rally/heat/templates/random-strings.yaml.template @@ -0,0 +1,13 @@ +heat_template_version: 2014-10-16 + +description: Test template for rally create-update-delete scenario + +resources: + test_string_one: + type: OS::Heat::RandomString + properties: + length: 20 + test_string_two: + type: OS::Heat::RandomString + properties: + length: 20 diff --git a/rally/heat/templates/resource-group-server-with-volume.yaml.template b/rally/heat/templates/resource-group-server-with-volume.yaml.template new file mode 100644 index 000000000..4b804ca8a --- /dev/null +++ b/rally/heat/templates/resource-group-server-with-volume.yaml.template @@ -0,0 +1,44 @@ +heat_template_version: 2014-10-16 + +description: > + Test template that creates a resource group with servers and volumes. + The template allows to create a lot of nested stacks with standard + configuration: nova instance, cinder volume attached to that instance + +parameters: + + num_instances: + type: number + description: number of instances that should be created in resource group + constraints: + - range: {min: 1} + instance_image: + type: string + default: cirros + instance_volume_size: + type: number + description: Size of volume to attach to instance + default: 1 + constraints: + - range: {min: 1, max: 1024} + instance_flavor: + type: string + description: Type of the instance to be created. + default: m1.tiny + instance_availability_zone: + type: string + description: The Availability Zone to launch the instance. + default: nova + +resources: + group_of_volumes: + type: OS::Heat::ResourceGroup + properties: + count: {get_param: num_instances} + resource_def: + type: rally/heat/templates/server-with-volume.yaml.template + properties: + image: {get_param: instance_image} + volume_size: {get_param: instance_volume_size} + flavor: {get_param: instance_flavor} + availability_zone: {get_param: instance_availability_zone} diff --git a/rally/heat/templates/server-with-volume.yaml.template b/rally/heat/templates/server-with-volume.yaml.template new file mode 100644 index 000000000..8bb1bde1c --- /dev/null +++ b/rally/heat/templates/server-with-volume.yaml.template @@ -0,0 +1,55 @@ +heat_template_version: 2013-05-23 + +parameters: + # set all correct defaults for parameters before launch test + image: + type: string + default: cirros + flavor: + type: string + default: m1.tiny + availability_zone: + type: string + description: The Availability Zone to launch the instance. + default: nova + volume_size: + type: number + description: Size of the volume to be created. + default: 1 + constraints: + - range: { min: 1, max: 1024 } + description: must be between 1 and 1024 Gb. + cidr: + type: string + default: 11.11.11.0/24 + +resources: + server: + type: OS::Nova::Server + properties: + image: {get_param: image} + flavor: {get_param: flavor} + networks: + - port: { get_resource: server_port } + server_port: + type: OS::Neutron::Port + properties: + network_id: {get_resource: private_net} + private_net: + type: OS::Neutron::Net + private_subnet: + type: OS::Neutron::Subnet + properties: + network_id: { get_resource: private_net } + cidr: {get_param: cidr} + cinder_volume: + type: OS::Cinder::Volume + properties: + size: { get_param: volume_size } + availability_zone: { get_param: availability_zone } + volume_attachment: + type: OS::Cinder::VolumeAttachment + properties: + volume_id: { get_resource: cinder_volume } + instance_uuid: { get_resource: server} + mountpoint: /dev/vdc diff --git a/rally/heat/templates/updated-random-strings-add.yaml.template b/rally/heat/templates/updated-random-strings-add.yaml.template new file mode 100644 index 000000000..03f9a885d --- /dev/null +++ b/rally/heat/templates/updated-random-strings-add.yaml.template @@ -0,0 +1,19 @@ +heat_template_version: 2014-10-16 + +description: > + Test template for create-update-delete-stack scenario in rally. + The template updates the stack defined by random-strings.yaml.template with additional resource. + +resources: + test_string_one: + type: OS::Heat::RandomString + properties: + length: 20 + test_string_two: + type: OS::Heat::RandomString + properties: + length: 20 + test_string_three: + type: OS::Heat::RandomString + properties: + length: 20 diff --git a/rally/heat/templates/updated-random-strings-delete.yaml.template b/rally/heat/templates/updated-random-strings-delete.yaml.template new file mode 100644 index 000000000..414d90d58 --- /dev/null +++ b/rally/heat/templates/updated-random-strings-delete.yaml.template @@ -0,0 +1,11 @@ +heat_template_version: 2014-10-16 + +description: > + Test template for create-update-delete-stack scenario in rally. + The template deletes one resource from the stack defined by random-strings.yaml.template. + +resources: + test_string_one: + type: OS::Heat::RandomString + properties: + length: 20 diff --git a/rally/heat/templates/updated-random-strings-replace.yaml.template b/rally/heat/templates/updated-random-strings-replace.yaml.template new file mode 100644 index 000000000..780fcc168 --- /dev/null +++ b/rally/heat/templates/updated-random-strings-replace.yaml.template @@ -0,0 +1,19 @@ +heat_template_version: 2014-10-16 + +description: > + Test template for create-update-delete-stack scenario in rally. + The template deletes one resource from the stack defined by + random-strings.yaml.template and re-creates it with the updated parameters + (so-called update-replace). That happens because some parameters cannot be + changed without resource re-creation. The template allows to measure performance + of update-replace operation. + +resources: + test_string_one: + type: OS::Heat::RandomString + properties: + length: 20 + test_string_two: + type: OS::Heat::RandomString + properties: + length: 40