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
This commit is contained in:
parent
88d085b089
commit
901013edac
@ -22,34 +22,8 @@ kind: ConfigMap
|
|||||||
metadata:
|
metadata:
|
||||||
name: heat-tasks-test-templates
|
name: heat-tasks-test-templates
|
||||||
data:
|
data:
|
||||||
random-strings.yaml: |
|
{{- range $key, $value := $envAll.Values.conf.rally_tasks.heat_tests }}
|
||||||
{{- tuple .Values.conf.rally_tasks.heat_tests.random_strings "tasks/test-templates/_random-strings.yaml.template.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
|
{{- $file := printf "%s.%s" (replace "_" "-" $key) "yaml" }}
|
||||||
updated-random-strings-replace.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 }}
|
||||||
{{- 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" }}
|
{{- end }}
|
||||||
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" }}
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -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]}
|
|
@ -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
|
|
@ -1 +0,0 @@
|
|||||||
heat_template_version: 2014-10-16
|
|
@ -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
|
|
@ -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}
|
|
@ -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}
|
|
@ -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]}
|
|
@ -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
|
|
@ -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 }
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -269,15 +269,6 @@ pvc:
|
|||||||
storage_class: general
|
storage_class: general
|
||||||
|
|
||||||
conf:
|
conf:
|
||||||
paste:
|
|
||||||
override:
|
|
||||||
append:
|
|
||||||
policy:
|
|
||||||
override:
|
|
||||||
append:
|
|
||||||
audit_map:
|
|
||||||
override:
|
|
||||||
append:
|
|
||||||
rally:
|
rally:
|
||||||
keystone_authtoken:
|
keystone_authtoken:
|
||||||
auth_type: password
|
auth_type: password
|
||||||
@ -288,62 +279,425 @@ conf:
|
|||||||
connection:
|
connection:
|
||||||
rally_tasks:
|
rally_tasks:
|
||||||
heat_tests:
|
heat_tests:
|
||||||
random_strings:
|
autoscaling_group:
|
||||||
override:
|
heat_template_version: '2013-05-23'
|
||||||
prefix:
|
outputs:
|
||||||
append:
|
scaling_url:
|
||||||
updated_random_strings_replace:
|
value:
|
||||||
override:
|
get_attr:
|
||||||
prefix:
|
- scaling_policy
|
||||||
append:
|
- alarm_url
|
||||||
updated_random_strings_add:
|
parameters:
|
||||||
override:
|
flavor:
|
||||||
prefix:
|
constraints:
|
||||||
append:
|
- custom_constraint: nova.flavor
|
||||||
updated_random_strings_delete:
|
default: m1.tiny
|
||||||
override:
|
type: string
|
||||||
prefix:
|
image:
|
||||||
append:
|
constraints:
|
||||||
resource_group_with_constraint:
|
- custom_constraint: glance.image
|
||||||
override:
|
default: cirros-0.3.4-x86_64-uec
|
||||||
prefix:
|
type: string
|
||||||
append:
|
max_size:
|
||||||
resource_group_with_outputs:
|
constraints:
|
||||||
override:
|
- range:
|
||||||
prefix:
|
min: 1
|
||||||
append:
|
default: 5
|
||||||
resource_group_server_with_volume:
|
type: number
|
||||||
override:
|
scaling_adjustment:
|
||||||
prefix:
|
default: 1
|
||||||
append:
|
type: number
|
||||||
resource_group:
|
resources:
|
||||||
override:
|
asg:
|
||||||
prefix:
|
properties:
|
||||||
append:
|
desired_capacity: 3
|
||||||
default:
|
max_size:
|
||||||
override:
|
get_param: max_size
|
||||||
prefix:
|
min_size: 1
|
||||||
append:
|
resource:
|
||||||
autoscaling_group:
|
properties:
|
||||||
override:
|
flavor:
|
||||||
prefix:
|
get_param: flavor
|
||||||
append:
|
image:
|
||||||
server_with_ports:
|
get_param: image
|
||||||
override:
|
type: 'OS::Nova::Server'
|
||||||
prefix:
|
type: 'OS::Heat::AutoScalingGroup'
|
||||||
append:
|
scaling_policy:
|
||||||
server_with_volume:
|
properties:
|
||||||
override:
|
adjustment_type: change_in_capacity
|
||||||
prefix:
|
auto_scaling_group_id:
|
||||||
append:
|
get_resource: asg
|
||||||
updated_resource_group_increase:
|
scaling_adjustment:
|
||||||
override:
|
get_param: scaling_adjustment
|
||||||
prefix:
|
type: 'OS::Heat::ScalingPolicy'
|
||||||
append:
|
autoscaling_policy:
|
||||||
updated_resource_group_reduce:
|
heat_template_version: '2013-05-23'
|
||||||
override:
|
resources:
|
||||||
prefix:
|
test_group:
|
||||||
append:
|
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_task:
|
||||||
Authenticate.keystone:
|
Authenticate.keystone:
|
||||||
-
|
-
|
||||||
|
Loading…
x
Reference in New Issue
Block a user