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
This commit is contained in:
kairat_kushaev 2015-02-04 15:51:12 +03:00
parent 2fe25740bb
commit 7fb95d178a
11 changed files with 220 additions and 0 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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:

View File

@ -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
}
}
}
]
}

View File

@ -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

View File

@ -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
}
}
}
]
}

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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