From 901013edac28bf5d7b29315e37b655b592cdec38 Mon Sep 17 00:00:00 2001 From: Pete Birley Date: Sat, 31 Mar 2018 09:20:30 -0500 Subject: [PATCH] Rally: Move all heat templates to be directly values driven. This PS moves all the heat templates to be directly values driven, both simplifying over-ride and allowing configs to be targeted to pods in future work. Change-Id: Iebe382bd7945abe9bfbb30c4cf48c53f17fcb1f4 --- rally/templates/configmap-test-templates.yaml | 34 +- .../_autoscaling-group.yaml.template.tpl | 46 -- .../_autoscaling-policy.yaml.template.tpl | 17 - .../test-templates/_default.yaml.template.tpl | 1 - .../_random-strings.yaml.template.tpl | 13 - ...group-server-with-volume.yaml.template.tpl | 44 -- ...ce-group-with-constraint.yaml.template.tpl | 21 - ...ource-group-with-outputs.yaml.template.tpl | 37 -- .../_resource-group.yaml.template.tpl | 13 - .../_server-with-ports.yaml.template.tpl | 64 --- .../_server-with-volume.yaml.template.tpl | 39 -- ...toscaling-policy-inplace.yaml.template.tpl | 23 - ...dated-random-strings-add.yaml.template.tpl | 19 - ...ed-random-strings-delete.yaml.template.tpl | 11 - ...d-random-strings-replace.yaml.template.tpl | 19 - ...-resource-group-increase.yaml.template.tpl | 16 - ...ed-resource-group-reduce.yaml.template.tpl | 16 - rally/values.yaml | 484 +++++++++++++++--- 18 files changed, 423 insertions(+), 494 deletions(-) delete mode 100644 rally/templates/tasks/test-templates/_autoscaling-group.yaml.template.tpl delete mode 100644 rally/templates/tasks/test-templates/_autoscaling-policy.yaml.template.tpl delete mode 100644 rally/templates/tasks/test-templates/_default.yaml.template.tpl delete mode 100644 rally/templates/tasks/test-templates/_random-strings.yaml.template.tpl delete mode 100644 rally/templates/tasks/test-templates/_resource-group-server-with-volume.yaml.template.tpl delete mode 100644 rally/templates/tasks/test-templates/_resource-group-with-constraint.yaml.template.tpl delete mode 100644 rally/templates/tasks/test-templates/_resource-group-with-outputs.yaml.template.tpl delete mode 100644 rally/templates/tasks/test-templates/_resource-group.yaml.template.tpl delete mode 100644 rally/templates/tasks/test-templates/_server-with-ports.yaml.template.tpl delete mode 100644 rally/templates/tasks/test-templates/_server-with-volume.yaml.template.tpl delete mode 100644 rally/templates/tasks/test-templates/_updated-autoscaling-policy-inplace.yaml.template.tpl delete mode 100644 rally/templates/tasks/test-templates/_updated-random-strings-add.yaml.template.tpl delete mode 100644 rally/templates/tasks/test-templates/_updated-random-strings-delete.yaml.template.tpl delete mode 100644 rally/templates/tasks/test-templates/_updated-random-strings-replace.yaml.template.tpl delete mode 100644 rally/templates/tasks/test-templates/_updated-resource-group-increase.yaml.template.tpl delete mode 100644 rally/templates/tasks/test-templates/_updated-resource-group-reduce.yaml.template.tpl diff --git a/rally/templates/configmap-test-templates.yaml b/rally/templates/configmap-test-templates.yaml index ca4ef031fa..dd3ba30794 100644 --- a/rally/templates/configmap-test-templates.yaml +++ b/rally/templates/configmap-test-templates.yaml @@ -22,34 +22,8 @@ kind: ConfigMap metadata: name: heat-tasks-test-templates data: - random-strings.yaml: | -{{- tuple .Values.conf.rally_tasks.heat_tests.random_strings "tasks/test-templates/_random-strings.yaml.template.tpl" . | include "helm-toolkit.utils.configmap_templater" }} - updated-random-strings-replace.yaml: | -{{- tuple .Values.conf.rally_tasks.heat_tests.updated_random_strings_replace "tasks/test-templates/_updated-random-strings-replace.yaml.template.tpl" . | include "helm-toolkit.utils.configmap_templater" }} - updated-random-strings-add.yaml: | -{{- tuple .Values.conf.rally_tasks.heat_tests.updated_random_strings_add "tasks/test-templates/_updated-random-strings-add.yaml.template.tpl" . | include "helm-toolkit.utils.configmap_templater" }} - updated-random-strings-delete.yaml: | -{{- tuple .Values.conf.rally_tasks.heat_tests.updated_random_strings_delete "tasks/test-templates/_updated-random-strings-delete.yaml.template.tpl" . | include "helm-toolkit.utils.configmap_templater" }} - resource-group-with-constraint.yaml: | -{{- tuple .Values.conf.rally_tasks.heat_tests.resource_group_with_constraint "tasks/test-templates/_resource-group-with-constraint.yaml.template.tpl" . | include "helm-toolkit.utils.configmap_templater" }} - resource-group-with-outputs.yaml: | -{{- tuple .Values.conf.rally_tasks.heat_tests.resource_group_with_outputs "tasks/test-templates/_resource-group-with-outputs.yaml.template.tpl" . | include "helm-toolkit.utils.configmap_templater" }} - resource-group-server-with-volume.yaml: | -{{- tuple .Values.conf.rally_tasks.heat_tests.resource_group_server_with_volume "tasks/test-templates/_resource-group-server-with-volume.yaml.template.tpl" . | include "helm-toolkit.utils.configmap_templater" }} - resource-group.yaml: | -{{- tuple .Values.conf.rally_tasks.heat_tests.resource_group "tasks/test-templates/_resource-group.yaml.template.tpl" . | include "helm-toolkit.utils.configmap_templater" }} - default.yaml: | -{{- tuple .Values.conf.rally_tasks.heat_tests.default "tasks/test-templates/_default.yaml.template.tpl" . | include "helm-toolkit.utils.configmap_templater" }} - autoscaling-group.yaml: | -{{- tuple .Values.conf.rally_tasks.heat_tests.autoscaling_group "tasks/test-templates/_autoscaling-group.yaml.template.tpl" . | include "helm-toolkit.utils.configmap_templater" }} - autoscaling-policy.yaml: | -{{- tuple .Values.conf.rally_tasks.heat_tests.autoscaling_policy "tasks/test-templates/_autoscaling-policy.yaml.template.tpl" . | include "helm-toolkit.utils.configmap_templater" }} - server-with-ports.yaml: | -{{- tuple .Values.conf.rally_tasks.heat_tests.server_with_ports "tasks/test-templates/_server-with-ports.yaml.template.tpl" . | include "helm-toolkit.utils.configmap_templater" }} - server-with-volume.yaml: | -{{- tuple .Values.conf.rally_tasks.heat_tests.server_with_volume "tasks/test-templates/_server-with-volume.yaml.template.tpl" . | include "helm-toolkit.utils.configmap_templater" }} - updated-resource-group-increase.yaml: | -{{- tuple .Values.conf.rally_tasks.heat_tests.updated_resource_group_increase "tasks/test-templates/_updated-resource-group-increase.yaml.template.tpl" . | include "helm-toolkit.utils.configmap_templater" }} - updated-resource-group-reduce.yaml: | -{{- tuple .Values.conf.rally_tasks.heat_tests.updated_resource_group_reduce "tasks/test-templates/_updated-resource-group-reduce.yaml.template.tpl" . | include "helm-toolkit.utils.configmap_templater" }} +{{- range $key, $value := $envAll.Values.conf.rally_tasks.heat_tests }} +{{- $file := printf "%s.%s" (replace "_" "-" $key) "yaml" }} +{{- include "helm-toolkit.snippets.values_template_renderer" (dict "envAll" $envAll "template" (index $envAll.Values.conf.rally_tasks.heat_tests $key ) "key" $file ) | indent 2 }} +{{- end }} {{- end }} diff --git a/rally/templates/tasks/test-templates/_autoscaling-group.yaml.template.tpl b/rally/templates/tasks/test-templates/_autoscaling-group.yaml.template.tpl deleted file mode 100644 index f6f9f1240d..0000000000 --- a/rally/templates/tasks/test-templates/_autoscaling-group.yaml.template.tpl +++ /dev/null @@ -1,46 +0,0 @@ -heat_template_version: 2013-05-23 - -parameters: - flavor: - type: string - default: m1.tiny - constraints: - - custom_constraint: nova.flavor - image: - type: string - default: cirros-0.3.4-x86_64-uec - constraints: - - custom_constraint: glance.image - scaling_adjustment: - type: number - default: 1 - max_size: - type: number - default: 5 - constraints: - - range: {min: 1} - - -resources: - asg: - type: OS::Heat::AutoScalingGroup - properties: - resource: - type: OS::Nova::Server - properties: - image: { get_param: image } - flavor: { get_param: flavor } - min_size: 1 - desired_capacity: 3 - max_size: { get_param: max_size } - - scaling_policy: - type: OS::Heat::ScalingPolicy - properties: - adjustment_type: change_in_capacity - auto_scaling_group_id: {get_resource: asg} - scaling_adjustment: { get_param: scaling_adjustment } - -outputs: - scaling_url: - value: {get_attr: [scaling_policy, alarm_url]} diff --git a/rally/templates/tasks/test-templates/_autoscaling-policy.yaml.template.tpl b/rally/templates/tasks/test-templates/_autoscaling-policy.yaml.template.tpl deleted file mode 100644 index a22487e339..0000000000 --- a/rally/templates/tasks/test-templates/_autoscaling-policy.yaml.template.tpl +++ /dev/null @@ -1,17 +0,0 @@ -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/templates/tasks/test-templates/_default.yaml.template.tpl b/rally/templates/tasks/test-templates/_default.yaml.template.tpl deleted file mode 100644 index eb4f2f2dd8..0000000000 --- a/rally/templates/tasks/test-templates/_default.yaml.template.tpl +++ /dev/null @@ -1 +0,0 @@ -heat_template_version: 2014-10-16 \ No newline at end of file diff --git a/rally/templates/tasks/test-templates/_random-strings.yaml.template.tpl b/rally/templates/tasks/test-templates/_random-strings.yaml.template.tpl deleted file mode 100644 index 7486ddd950..0000000000 --- a/rally/templates/tasks/test-templates/_random-strings.yaml.template.tpl +++ /dev/null @@ -1,13 +0,0 @@ -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/templates/tasks/test-templates/_resource-group-server-with-volume.yaml.template.tpl b/rally/templates/tasks/test-templates/_resource-group-server-with-volume.yaml.template.tpl deleted file mode 100644 index 60905683a9..0000000000 --- a/rally/templates/tasks/test-templates/_resource-group-server-with-volume.yaml.template.tpl +++ /dev/null @@ -1,44 +0,0 @@ -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-0.3.4-x86_64-uec - 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: 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/templates/tasks/test-templates/_resource-group-with-constraint.yaml.template.tpl b/rally/templates/tasks/test-templates/_resource-group-with-constraint.yaml.template.tpl deleted file mode 100644 index 234e4237ff..0000000000 --- a/rally/templates/tasks/test-templates/_resource-group-with-constraint.yaml.template.tpl +++ /dev/null @@ -1,21 +0,0 @@ -heat_template_version: 2013-05-23 - -description: Template for testing caching. - -parameters: - count: - type: number - default: 40 - delay: - type: number - default: 0.1 - -resources: - rg: - type: OS::Heat::ResourceGroup - properties: - count: {get_param: count} - resource_def: - type: OS::Heat::TestResource - properties: - constraint_prop_secs: {get_param: delay} diff --git a/rally/templates/tasks/test-templates/_resource-group-with-outputs.yaml.template.tpl b/rally/templates/tasks/test-templates/_resource-group-with-outputs.yaml.template.tpl deleted file mode 100644 index f47d03ccc1..0000000000 --- a/rally/templates/tasks/test-templates/_resource-group-with-outputs.yaml.template.tpl +++ /dev/null @@ -1,37 +0,0 @@ -heat_template_version: 2013-05-23 -parameters: - attr_wait_secs: - type: number - default: 0.5 - -resources: - rg: - type: OS::Heat::ResourceGroup - properties: - count: 10 - resource_def: - type: OS::Heat::TestResource - properties: - attr_wait_secs: {get_param: attr_wait_secs} - -outputs: - val1: - value: {get_attr: [rg, resource.0.output]} - val2: - value: {get_attr: [rg, resource.1.output]} - val3: - value: {get_attr: [rg, resource.2.output]} - val4: - value: {get_attr: [rg, resource.3.output]} - val5: - value: {get_attr: [rg, resource.4.output]} - val6: - value: {get_attr: [rg, resource.5.output]} - val7: - value: {get_attr: [rg, resource.6.output]} - val8: - value: {get_attr: [rg, resource.7.output]} - val9: - value: {get_attr: [rg, resource.8.output]} - val10: - value: {get_attr: [rg, resource.9.output]} \ No newline at end of file diff --git a/rally/templates/tasks/test-templates/_resource-group.yaml.template.tpl b/rally/templates/tasks/test-templates/_resource-group.yaml.template.tpl deleted file mode 100644 index b3f505fa67..0000000000 --- a/rally/templates/tasks/test-templates/_resource-group.yaml.template.tpl +++ /dev/null @@ -1,13 +0,0 @@ -heat_template_version: 2014-10-16 - -description: Test template for rally create-update-delete scenario - -resources: - test_group: - type: OS::Heat::ResourceGroup - properties: - count: 2 - resource_def: - type: OS::Heat::RandomString - properties: - length: 20 \ No newline at end of file diff --git a/rally/templates/tasks/test-templates/_server-with-ports.yaml.template.tpl b/rally/templates/tasks/test-templates/_server-with-ports.yaml.template.tpl deleted file mode 100644 index 909f45d212..0000000000 --- a/rally/templates/tasks/test-templates/_server-with-ports.yaml.template.tpl +++ /dev/null @@ -1,64 +0,0 @@ -heat_template_version: 2013-05-23 - -parameters: - # set all correct defaults for parameters before launch test - public_net: - type: string - default: public - image: - type: string - default: cirros-0.3.4-x86_64-uec - flavor: - type: string - default: m1.tiny - 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 } - - router: - type: OS::Neutron::Router - properties: - external_gateway_info: - network: {get_param: public_net} - - router_interface: - type: OS::Neutron::RouterInterface - properties: - router_id: { get_resource: router } - subnet_id: { get_resource: private_subnet } - - private_net: - type: OS::Neutron::Net - - private_subnet: - type: OS::Neutron::Subnet - properties: - network: { get_resource: private_net } - cidr: {get_param: cidr} - - port_security_group: - type: OS::Neutron::SecurityGroup - properties: - name: default_port_security_group - description: > - Default security group assigned to port. The neutron default group is not - used because neutron creates several groups with the same name=default and - nova cannot chooses which one should it use. - - server_port: - type: OS::Neutron::Port - properties: - network: {get_resource: private_net} - fixed_ips: - - subnet: { get_resource: private_subnet } - security_groups: - - { get_resource: port_security_group } diff --git a/rally/templates/tasks/test-templates/_server-with-volume.yaml.template.tpl b/rally/templates/tasks/test-templates/_server-with-volume.yaml.template.tpl deleted file mode 100644 index 23c8827145..0000000000 --- a/rally/templates/tasks/test-templates/_server-with-volume.yaml.template.tpl +++ /dev/null @@ -1,39 +0,0 @@ -heat_template_version: 2013-05-23 - -parameters: - # set all correct defaults for parameters before launch test - image: - type: string - default: cirros-0.3.4-x86_64-uec - 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. - -resources: - server: - type: OS::Nova::Server - properties: - image: {get_param: image} - flavor: {get_param: flavor} - 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/templates/tasks/test-templates/_updated-autoscaling-policy-inplace.yaml.template.tpl b/rally/templates/tasks/test-templates/_updated-autoscaling-policy-inplace.yaml.template.tpl deleted file mode 100644 index cf34879ca7..0000000000 --- a/rally/templates/tasks/test-templates/_updated-autoscaling-policy-inplace.yaml.template.tpl +++ /dev/null @@ -1,23 +0,0 @@ -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/templates/tasks/test-templates/_updated-random-strings-add.yaml.template.tpl b/rally/templates/tasks/test-templates/_updated-random-strings-add.yaml.template.tpl deleted file mode 100644 index 03f9a885d5..0000000000 --- a/rally/templates/tasks/test-templates/_updated-random-strings-add.yaml.template.tpl +++ /dev/null @@ -1,19 +0,0 @@ -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/templates/tasks/test-templates/_updated-random-strings-delete.yaml.template.tpl b/rally/templates/tasks/test-templates/_updated-random-strings-delete.yaml.template.tpl deleted file mode 100644 index 414d90d583..0000000000 --- a/rally/templates/tasks/test-templates/_updated-random-strings-delete.yaml.template.tpl +++ /dev/null @@ -1,11 +0,0 @@ -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/templates/tasks/test-templates/_updated-random-strings-replace.yaml.template.tpl b/rally/templates/tasks/test-templates/_updated-random-strings-replace.yaml.template.tpl deleted file mode 100644 index 780fcc168e..0000000000 --- a/rally/templates/tasks/test-templates/_updated-random-strings-replace.yaml.template.tpl +++ /dev/null @@ -1,19 +0,0 @@ -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 diff --git a/rally/templates/tasks/test-templates/_updated-resource-group-increase.yaml.template.tpl b/rally/templates/tasks/test-templates/_updated-resource-group-increase.yaml.template.tpl deleted file mode 100644 index 94bc271f79..0000000000 --- a/rally/templates/tasks/test-templates/_updated-resource-group-increase.yaml.template.tpl +++ /dev/null @@ -1,16 +0,0 @@ -heat_template_version: 2014-10-16 - -description: > - Test template for create-update-delete-stack scenario in rally. - The template updates one resource from the stack defined by resource-group.yaml.template - and adds children resources to that resource. - -resources: - test_group: - type: OS::Heat::ResourceGroup - properties: - count: 3 - resource_def: - type: OS::Heat::RandomString - properties: - length: 20 diff --git a/rally/templates/tasks/test-templates/_updated-resource-group-reduce.yaml.template.tpl b/rally/templates/tasks/test-templates/_updated-resource-group-reduce.yaml.template.tpl deleted file mode 100644 index a076224a80..0000000000 --- a/rally/templates/tasks/test-templates/_updated-resource-group-reduce.yaml.template.tpl +++ /dev/null @@ -1,16 +0,0 @@ -heat_template_version: 2014-10-16 - -description: > - Test template for create-update-delete-stack scenario in rally. - The template updates one resource from the stack defined by resource-group.yaml.template - and deletes children resources from that resource. - -resources: - test_group: - type: OS::Heat::ResourceGroup - properties: - count: 1 - resource_def: - type: OS::Heat::RandomString - properties: - length: 20 diff --git a/rally/values.yaml b/rally/values.yaml index e4f7d1f9fa..b54987fd34 100644 --- a/rally/values.yaml +++ b/rally/values.yaml @@ -269,15 +269,6 @@ pvc: storage_class: general conf: - paste: - override: - append: - policy: - override: - append: - audit_map: - override: - append: rally: keystone_authtoken: auth_type: password @@ -288,62 +279,425 @@ conf: connection: rally_tasks: heat_tests: - random_strings: - override: - prefix: - append: - updated_random_strings_replace: - override: - prefix: - append: - updated_random_strings_add: - override: - prefix: - append: - updated_random_strings_delete: - override: - prefix: - append: - resource_group_with_constraint: - override: - prefix: - append: - resource_group_with_outputs: - override: - prefix: - append: - resource_group_server_with_volume: - override: - prefix: - append: - resource_group: - override: - prefix: - append: - default: - override: - prefix: - append: - autoscaling_group: - override: - prefix: - append: - server_with_ports: - override: - prefix: - append: - server_with_volume: - override: - prefix: - append: - updated_resource_group_increase: - override: - prefix: - append: - updated_resource_group_reduce: - override: - prefix: - append: + autoscaling_group: + heat_template_version: '2013-05-23' + outputs: + scaling_url: + value: + get_attr: + - scaling_policy + - alarm_url + parameters: + flavor: + constraints: + - custom_constraint: nova.flavor + default: m1.tiny + type: string + image: + constraints: + - custom_constraint: glance.image + default: cirros-0.3.4-x86_64-uec + type: string + max_size: + constraints: + - range: + min: 1 + default: 5 + type: number + scaling_adjustment: + default: 1 + type: number + resources: + asg: + properties: + desired_capacity: 3 + max_size: + get_param: max_size + min_size: 1 + resource: + properties: + flavor: + get_param: flavor + image: + get_param: image + type: 'OS::Nova::Server' + type: 'OS::Heat::AutoScalingGroup' + scaling_policy: + properties: + adjustment_type: change_in_capacity + auto_scaling_group_id: + get_resource: asg + scaling_adjustment: + get_param: scaling_adjustment + type: 'OS::Heat::ScalingPolicy' + autoscaling_policy: + heat_template_version: '2013-05-23' + resources: + test_group: + properties: + desired_capacity: 0 + max_size: 0 + min_size: 0 + resource: + type: 'OS::Heat::RandomString' + type: 'OS::Heat::AutoScalingGroup' + test_policy: + properties: + adjustment_type: change_in_capacity + auto_scaling_group_id: + get_resource: test_group + scaling_adjustment: 1 + type: 'OS::Heat::ScalingPolicy' + default: + heat_template_version: '2014-10-16' + random_strings: + description: Test template for rally create-update-delete scenario + heat_template_version: '2014-10-16' + resources: + test_string_one: + properties: + length: 20 + type: 'OS::Heat::RandomString' + test_string_two: + properties: + length: 20 + type: 'OS::Heat::RandomString' + resource_group: + description: Test template for rally create-update-delete scenario + heat_template_version: '2014-10-16' + resources: + test_group: + properties: + count: 2 + resource_def: + properties: + length: 20 + type: 'OS::Heat::RandomString' + type: 'OS::Heat::ResourceGroup' + resource_group_server_with_volume: + 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 + heat_template_version: '2014-10-16' + parameters: + instance_availability_zone: + default: nova + description: The Availability Zone to launch the instance. + type: string + instance_flavor: + default: m1.tiny + description: Type of the instance to be created. + type: string + instance_image: + default: cirros-0.3.4-x86_64-uec + type: string + instance_volume_size: + constraints: + - range: + max: 1024 + min: 1 + default: 1 + description: Size of volume to attach to instance + type: number + num_instances: + constraints: + - range: + min: 1 + description: number of instances that should be created in resource group + type: number + resources: + group_of_volumes: + properties: + count: + get_param: num_instances + resource_def: + properties: + availability_zone: + get_param: instance_availability_zone + flavor: + get_param: instance_flavor + image: + get_param: instance_image + volume_size: + get_param: instance_volume_size + type: templates/server-with-volume.yaml.template + type: 'OS::Heat::ResourceGroup' + resource_group_with_constraint: + description: Template for testing caching. + heat_template_version: '2013-05-23' + parameters: + count: + default: 40 + type: number + delay: + default: 0.1 + type: number + resources: + rg: + properties: + count: + get_param: count + resource_def: + properties: + constraint_prop_secs: + get_param: delay + type: 'OS::Heat::TestResource' + type: 'OS::Heat::ResourceGroup' + resource_group_with_outputs: + heat_template_version: '2013-05-23' + outputs: + val1: + value: + get_attr: + - rg + - resource.0.output + val10: + value: + get_attr: + - rg + - resource.9.output + val2: + value: + get_attr: + - rg + - resource.1.output + val3: + value: + get_attr: + - rg + - resource.2.output + val4: + value: + get_attr: + - rg + - resource.3.output + val5: + value: + get_attr: + - rg + - resource.4.output + val6: + value: + get_attr: + - rg + - resource.5.output + val7: + value: + get_attr: + - rg + - resource.6.output + val8: + value: + get_attr: + - rg + - resource.7.output + val9: + value: + get_attr: + - rg + - resource.8.output + parameters: + attr_wait_secs: + default: 0.5 + type: number + resources: + rg: + properties: + count: 10 + resource_def: + properties: + attr_wait_secs: + get_param: attr_wait_secs + type: 'OS::Heat::TestResource' + type: 'OS::Heat::ResourceGroup' + server_with_ports: + heat_template_version: '2013-05-23' + parameters: + cidr: + default: 11.11.11.0/24 + type: string + flavor: + default: m1.tiny + type: string + image: + default: cirros-0.3.4-x86_64-uec + type: string + public_net: + default: public + type: string + resources: + port_security_group: + properties: + description: | + Default security group assigned to port. The neutron default group + is not used because neutron creates several groups with the same name=default + and nova cannot chooses which one should it use. + name: default_port_security_group + type: 'OS::Neutron::SecurityGroup' + private_net: + type: 'OS::Neutron::Net' + private_subnet: + properties: + cidr: + get_param: cidr + network: + get_resource: private_net + type: 'OS::Neutron::Subnet' + router: + properties: + external_gateway_info: + network: + get_param: public_net + type: 'OS::Neutron::Router' + router_interface: + properties: + router_id: + get_resource: router + subnet_id: + get_resource: private_subnet + type: 'OS::Neutron::RouterInterface' + server: + properties: + flavor: + get_param: flavor + image: + get_param: image + networks: + - port: + get_resource: server_port + type: 'OS::Nova::Server' + server_port: + properties: + fixed_ips: + - subnet: + get_resource: private_subnet + network: + get_resource: private_net + security_groups: + - get_resource: port_security_group + type: 'OS::Neutron::Port' + server_with_volume: + heat_template_version: '2013-05-23' + parameters: + availability_zone: + default: nova + description: The Availability Zone to launch the instance. + type: string + flavor: + default: m1.tiny + type: string + image: + default: cirros-0.3.4-x86_64-uec + type: string + volume_size: + constraints: + - description: must be between 1 and 1024 Gb. + range: + max: 1024 + min: 1 + default: 1 + description: Size of the volume to be created. + type: number + resources: + cinder_volume: + properties: + availability_zone: + get_param: availability_zone + size: + get_param: volume_size + type: 'OS::Cinder::Volume' + server: + properties: + flavor: + get_param: flavor + image: + get_param: image + type: 'OS::Nova::Server' + volume_attachment: + properties: + instance_uuid: + get_resource: server + mountpoint: /dev/vdc + volume_id: + get_resource: cinder_volume + type: 'OS::Cinder::VolumeAttachment' + updated_random_strings_add: + 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. + heat_template_version: '2014-10-16' + resources: + test_string_one: + properties: + length: 20 + type: 'OS::Heat::RandomString' + test_string_three: + properties: + length: 20 + type: 'OS::Heat::RandomString' + test_string_two: + properties: + length: 20 + type: 'OS::Heat::RandomString' + updated_random_strings_delete: + 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. + heat_template_version: '2014-10-16' + resources: + test_string_one: + properties: + length: 20 + type: 'OS::Heat::RandomString' + updated_random_strings_replace: + 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. + heat_template_version: '2014-10-16' + resources: + test_string_one: + properties: + length: 20 + type: 'OS::Heat::RandomString' + test_string_two: + properties: + length: 40 + type: 'OS::Heat::RandomString' + updated_resource_group_increase: + description: | + Test template for create-update-delete-stack scenario in rally. The + template updates one resource from the stack defined by resource-group.yaml.template + and adds children resources to that resource. + heat_template_version: '2014-10-16' + resources: + test_group: + properties: + count: 3 + resource_def: + properties: + length: 20 + type: 'OS::Heat::RandomString' + type: 'OS::Heat::ResourceGroup' + updated_resource_group_reduce: + description: | + Test template for create-update-delete-stack scenario in rally. + The template updates one resource from the stack defined by resource-group.yaml.template + and deletes children resources from that resource. + heat_template_version: '2014-10-16' + resources: + test_group: + properties: + count: 1 + resource_def: + properties: + length: 20 + type: 'OS::Heat::RandomString' + type: 'OS::Heat::ResourceGroup' authenticate_task: Authenticate.keystone: -