From 7fb95d178aa6e0a31ff37798af2a531ef473deac Mon Sep 17 00:00:00 2001 From: kairat_kushaev Date: Wed, 4 Feb 2015 15:51:12 +0300 Subject: [PATCH] Add "update-inplace/replace resource" cases The patch adds the following test cases to create-update-delete stack scenario: Case 1: - Heat creates a new stack - Heat updates the stack and one of stack resources without replacing the resource itself - Heat deletes the stack Case 2: - Heat creates a stack - Heat updates the stack and replaces one of stack resource with the new resource - Heat deletes the stack. Change-Id: I9a263a6ee5832cd039f574d4515167eb691ec19f --- .../extra/autoscaling_policy.yaml.template | 17 ++++++++++ ...d_autoscaling_policy_inplace.yaml.template | 23 +++++++++++++ ...dated_random_strings_replace.yaml.template | 19 +++++++++++ rally-jobs/rally.yaml | 32 +++++++++++++++++++ .../create-update-delete-stack-inplace.json | 21 ++++++++++++ .../create-update-delete-stack-inplace.yaml | 14 ++++++++ .../create-update-delete-stack-replace.json | 21 ++++++++++++ .../create-update-delete-stack-replace.yaml | 14 ++++++++ .../autoscaling_policy.yaml.template | 17 ++++++++++ ...d_autoscaling_policy_inplace.yaml.template | 23 +++++++++++++ ...dated_random_strings_replace.yaml.template | 19 +++++++++++ 11 files changed, 220 insertions(+) create mode 100644 rally-jobs/extra/autoscaling_policy.yaml.template create mode 100644 rally-jobs/extra/updated_autoscaling_policy_inplace.yaml.template create mode 100644 rally-jobs/extra/updated_random_strings_replace.yaml.template create mode 100644 samples/tasks/scenarios/heat/create-update-delete-stack-inplace.json create mode 100644 samples/tasks/scenarios/heat/create-update-delete-stack-inplace.yaml create mode 100644 samples/tasks/scenarios/heat/create-update-delete-stack-replace.json create mode 100644 samples/tasks/scenarios/heat/create-update-delete-stack-replace.yaml create mode 100644 samples/tasks/scenarios/heat/templates/autoscaling_policy.yaml.template create mode 100644 samples/tasks/scenarios/heat/templates/updated_autoscaling_policy_inplace.yaml.template create mode 100644 samples/tasks/scenarios/heat/templates/updated_random_strings_replace.yaml.template diff --git a/rally-jobs/extra/autoscaling_policy.yaml.template b/rally-jobs/extra/autoscaling_policy.yaml.template new file mode 100644 index 0000000000..a22487e339 --- /dev/null +++ b/rally-jobs/extra/autoscaling_policy.yaml.template @@ -0,0 +1,17 @@ +heat_template_version: 2013-05-23 + +resources: + test_group: + type: OS::Heat::AutoScalingGroup + properties: + desired_capacity: 0 + max_size: 0 + min_size: 0 + resource: + type: OS::Heat::RandomString + test_policy: + type: OS::Heat::ScalingPolicy + properties: + adjustment_type: change_in_capacity + auto_scaling_group_id: { get_resource: test_group } + scaling_adjustment: 1 \ No newline at end of file diff --git a/rally-jobs/extra/updated_autoscaling_policy_inplace.yaml.template b/rally-jobs/extra/updated_autoscaling_policy_inplace.yaml.template new file mode 100644 index 0000000000..cf34879ca7 --- /dev/null +++ b/rally-jobs/extra/updated_autoscaling_policy_inplace.yaml.template @@ -0,0 +1,23 @@ +heat_template_version: 2013-05-23 + +description: > + Test template for create-update-delete-stack scenario in rally. + The template updates resource parameters without resource re-creation(replacement) + in the stack defined by autoscaling_policy.yaml.template. It allows to measure + performance of "pure" resource update operation only. + +resources: + test_group: + type: OS::Heat::AutoScalingGroup + properties: + desired_capacity: 0 + max_size: 0 + min_size: 0 + resource: + type: OS::Heat::RandomString + test_policy: + type: OS::Heat::ScalingPolicy + properties: + adjustment_type: change_in_capacity + auto_scaling_group_id: { get_resource: test_group } + scaling_adjustment: -1 \ No newline at end of file diff --git a/rally-jobs/extra/updated_random_strings_replace.yaml.template b/rally-jobs/extra/updated_random_strings_replace.yaml.template new file mode 100644 index 0000000000..46d8bff4cb --- /dev/null +++ b/rally-jobs/extra/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 \ No newline at end of file diff --git a/rally-jobs/rally.yaml b/rally-jobs/rally.yaml index bf26aa97c2..2c06d8b5e5 100755 --- a/rally-jobs/rally.yaml +++ b/rally-jobs/rally.yaml @@ -521,6 +521,38 @@ failure_rate: max: 0 + - + args: + template_path: "/home/jenkins/.rally/extra/autoscaling_policy.yaml.template" + updated_template_path: "/home/jenkins/.rally/extra/updated_autoscaling_policy_inplace.yaml.template" + runner: + type: "constant" + times: 6 + concurrency: 3 + context: + users: + tenants: 2 + users_per_tenant: 3 + sla: + failure_rate: + max: 0 + + - + args: + template_path: "/home/jenkins/.rally/extra/random_strings.yaml.template" + updated_template_path: "/home/jenkins/.rally/extra/updated_random_strings_replace.yaml.template" + runner: + type: "constant" + times: 6 + concurrency: 3 + context: + users: + tenants: 2 + users_per_tenant: 3 + sla: + failure_rate: + max: 0 + Authenticate.keystone: - runner: diff --git a/samples/tasks/scenarios/heat/create-update-delete-stack-inplace.json b/samples/tasks/scenarios/heat/create-update-delete-stack-inplace.json new file mode 100644 index 0000000000..c4affc8d70 --- /dev/null +++ b/samples/tasks/scenarios/heat/create-update-delete-stack-inplace.json @@ -0,0 +1,21 @@ +{ + "HeatStacks.create_update_delete_stack": [ + { + "args": { + "template_path": "templates/autoscaling_policy.yaml.template", + "updated_template_path": "templates/updated_autoscaling_policy_inplace.yaml.template" + }, + "runner": { + "type": "constant", + "times": 10, + "concurrency": 2 + }, + "context": { + "users": { + "tenants": 2, + "users_per_tenant": 3 + } + } + } + ] +} diff --git a/samples/tasks/scenarios/heat/create-update-delete-stack-inplace.yaml b/samples/tasks/scenarios/heat/create-update-delete-stack-inplace.yaml new file mode 100644 index 0000000000..bace8f6d63 --- /dev/null +++ b/samples/tasks/scenarios/heat/create-update-delete-stack-inplace.yaml @@ -0,0 +1,14 @@ +--- + HeatStacks.create_update_delete_stack: + - + args: + template_path: "templates/autoscaling_policy.yaml.template" + updated_template_path: "templates/updated_autoscaling_policy_inplace.yaml.template" + runner: + type: "constant" + times: 10 + concurrency: 2 + context: + users: + tenants: 2 + users_per_tenant: 3 diff --git a/samples/tasks/scenarios/heat/create-update-delete-stack-replace.json b/samples/tasks/scenarios/heat/create-update-delete-stack-replace.json new file mode 100644 index 0000000000..ffe59364e9 --- /dev/null +++ b/samples/tasks/scenarios/heat/create-update-delete-stack-replace.json @@ -0,0 +1,21 @@ +{ + "HeatStacks.create_update_delete_stack": [ + { + "args": { + "template_path": "templates/random_strings.yaml.template", + "updated_template_path": "templates/updated_random_strings_replace.yaml.template" + }, + "runner": { + "type": "constant", + "times": 10, + "concurrency": 2 + }, + "context": { + "users": { + "tenants": 2, + "users_per_tenant": 3 + } + } + } + ] +} diff --git a/samples/tasks/scenarios/heat/create-update-delete-stack-replace.yaml b/samples/tasks/scenarios/heat/create-update-delete-stack-replace.yaml new file mode 100644 index 0000000000..4c60677e3e --- /dev/null +++ b/samples/tasks/scenarios/heat/create-update-delete-stack-replace.yaml @@ -0,0 +1,14 @@ +--- + HeatStacks.create_update_delete_stack: + - + args: + template_path: "templates/random_strings.yaml.template" + updated_template_path: "templates/updated_random_strings_replace.yaml.template" + runner: + type: "constant" + times: 10 + concurrency: 2 + context: + users: + tenants: 2 + users_per_tenant: 3 diff --git a/samples/tasks/scenarios/heat/templates/autoscaling_policy.yaml.template b/samples/tasks/scenarios/heat/templates/autoscaling_policy.yaml.template new file mode 100644 index 0000000000..a22487e339 --- /dev/null +++ b/samples/tasks/scenarios/heat/templates/autoscaling_policy.yaml.template @@ -0,0 +1,17 @@ +heat_template_version: 2013-05-23 + +resources: + test_group: + type: OS::Heat::AutoScalingGroup + properties: + desired_capacity: 0 + max_size: 0 + min_size: 0 + resource: + type: OS::Heat::RandomString + test_policy: + type: OS::Heat::ScalingPolicy + properties: + adjustment_type: change_in_capacity + auto_scaling_group_id: { get_resource: test_group } + scaling_adjustment: 1 \ No newline at end of file diff --git a/samples/tasks/scenarios/heat/templates/updated_autoscaling_policy_inplace.yaml.template b/samples/tasks/scenarios/heat/templates/updated_autoscaling_policy_inplace.yaml.template new file mode 100644 index 0000000000..cf34879ca7 --- /dev/null +++ b/samples/tasks/scenarios/heat/templates/updated_autoscaling_policy_inplace.yaml.template @@ -0,0 +1,23 @@ +heat_template_version: 2013-05-23 + +description: > + Test template for create-update-delete-stack scenario in rally. + The template updates resource parameters without resource re-creation(replacement) + in the stack defined by autoscaling_policy.yaml.template. It allows to measure + performance of "pure" resource update operation only. + +resources: + test_group: + type: OS::Heat::AutoScalingGroup + properties: + desired_capacity: 0 + max_size: 0 + min_size: 0 + resource: + type: OS::Heat::RandomString + test_policy: + type: OS::Heat::ScalingPolicy + properties: + adjustment_type: change_in_capacity + auto_scaling_group_id: { get_resource: test_group } + scaling_adjustment: -1 \ No newline at end of file diff --git a/samples/tasks/scenarios/heat/templates/updated_random_strings_replace.yaml.template b/samples/tasks/scenarios/heat/templates/updated_random_strings_replace.yaml.template new file mode 100644 index 0000000000..46d8bff4cb --- /dev/null +++ b/samples/tasks/scenarios/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 \ No newline at end of file