From 07727d2a4f5fef5ab91d77e4f1a76209388106e9 Mon Sep 17 00:00:00 2001 From: kairat_kushaev Date: Wed, 4 Feb 2015 15:05:19 +0300 Subject: [PATCH] Add create-update-delete stack scenario The create-update-delete stack scenario executes the following actions with using Heat: - creates the new stack (with some resources) - updates the stack and stack resoruces with the new template - deletes the stack. Unit-tests for the changes above are also included into patch. Patch also adds rally test cases for stack create-update-delete stack scenario (because rally tests require test scenario to be used by test case samples): Case 1: - Heat creates a new stack - Heat updates the stack with adding additional resource to the stack - Heat deletes the stack Case 2: - Heat creates a stack - Heat updates the stack with deleting some resource from the stack - Heat deletes the stack. Change-Id: I4c0ff24d0651434450a281a62670f1bd6c2a0000 --- rally-jobs/extra/random_strings.yaml.template | 13 +++++++ .../updated_random_strings_add.yaml.template | 19 ++++++++++ ...pdated_random_strings_delete.yaml.template | 11 ++++++ rally-jobs/rally.yaml | 35 ++++++++++++++++++- .../create-update-delete-stack-add-res.json | 21 +++++++++++ .../create-update-delete-stack-add-res.yaml | 14 ++++++++ .../create-update-delete-stack-del-res.json | 21 +++++++++++ .../create-update-delete-stack-del-res.yaml | 14 ++++++++ 8 files changed, 147 insertions(+), 1 deletion(-) create mode 100644 rally-jobs/extra/random_strings.yaml.template create mode 100644 rally-jobs/extra/updated_random_strings_add.yaml.template create mode 100644 rally-jobs/extra/updated_random_strings_delete.yaml.template create mode 100644 samples/tasks/scenarios/heat/create-update-delete-stack-add-res.json create mode 100644 samples/tasks/scenarios/heat/create-update-delete-stack-add-res.yaml create mode 100644 samples/tasks/scenarios/heat/create-update-delete-stack-del-res.json create mode 100644 samples/tasks/scenarios/heat/create-update-delete-stack-del-res.yaml diff --git a/rally-jobs/extra/random_strings.yaml.template b/rally-jobs/extra/random_strings.yaml.template new file mode 100644 index 00000000..2dd676c1 --- /dev/null +++ b/rally-jobs/extra/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 \ No newline at end of file diff --git a/rally-jobs/extra/updated_random_strings_add.yaml.template b/rally-jobs/extra/updated_random_strings_add.yaml.template new file mode 100644 index 00000000..e06d42e0 --- /dev/null +++ b/rally-jobs/extra/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 \ No newline at end of file diff --git a/rally-jobs/extra/updated_random_strings_delete.yaml.template b/rally-jobs/extra/updated_random_strings_delete.yaml.template new file mode 100644 index 00000000..d02593e3 --- /dev/null +++ b/rally-jobs/extra/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 \ No newline at end of file diff --git a/rally-jobs/rally.yaml b/rally-jobs/rally.yaml index 84a74171..bf26aa97 100755 --- a/rally-jobs/rally.yaml +++ b/rally-jobs/rally.yaml @@ -475,7 +475,7 @@ - args: - template_path: '/home/jenkins/.rally/extra/server_with_volume.yaml.template' + template_path: "/home/jenkins/.rally/extra/server_with_volume.yaml.template" runner: type: "constant" times: 2 @@ -488,6 +488,39 @@ failure_rate: max: 0 + HeatStacks.create_update_delete_stack: + - + args: + template_path: "/home/jenkins/.rally/extra/random_strings.yaml.template" + updated_template_path: "/home/jenkins/.rally/extra/updated_random_strings_add.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_delete.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-add-res.json b/samples/tasks/scenarios/heat/create-update-delete-stack-add-res.json new file mode 100644 index 00000000..c36f759a --- /dev/null +++ b/samples/tasks/scenarios/heat/create-update-delete-stack-add-res.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_add.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-add-res.yaml b/samples/tasks/scenarios/heat/create-update-delete-stack-add-res.yaml new file mode 100644 index 00000000..6a66d70a --- /dev/null +++ b/samples/tasks/scenarios/heat/create-update-delete-stack-add-res.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_add.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-del-res.json b/samples/tasks/scenarios/heat/create-update-delete-stack-del-res.json new file mode 100644 index 00000000..5e460cc1 --- /dev/null +++ b/samples/tasks/scenarios/heat/create-update-delete-stack-del-res.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_delete.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-del-res.yaml b/samples/tasks/scenarios/heat/create-update-delete-stack-del-res.yaml new file mode 100644 index 00000000..13e5432a --- /dev/null +++ b/samples/tasks/scenarios/heat/create-update-delete-stack-del-res.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_delete.yaml.template" + runner: + type: "constant" + times: 10 + concurrency: 2 + context: + users: + tenants: 2 + users_per_tenant: 3