Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- "Agent Group.yaml"
- heat_template_version: 2013-05-23
- parameters:
- agent_network:
- type: string
- constraints:
- - custom_constraint: neutron.network
- flavor:
- type: string
- default: "m1.small"
- key_name:
- type: string
- default: StorPerf
- security_group_name:
- type: string
- default: StorPerf
- 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.
- agent_count:
- type: number
- default: 1
- constraints:
- - range: { min: 1, max: 512 }
- description: must be between 1 and 512 agents.
- resources:
- slaves:
- type: OS::Heat::ResourceGroup
- properties:
- count: {get_param: agent_count}
- resource_def: {
- type: "storperf-agent.yaml",
- properties: {
- agent_network: {get_param: agent_network},
- flavor: {get_param: flavor},
- key_name: {get_param: key_name},
- volume_size: {get_param: volume_size},
- security_group_name: {get_param: security_group_name}
- }
- }
- storperf_security_group:
- type: OS::Neutron::SecurityGroup
- properties:
- description: An open security group to allow all access to the StorPerf slaves
- name: {get_param: security_group_name}
- rules:
- - remote_ip_prefix: 0.0.0.0/0
- protocol: tcp
- direction: ingress
- - remote_ip_prefix: 0.0.0.0/0
- protocol: icmp
- direction: ingress
- outputs:
- slave_ips: {
- description: "Slave addresses",
- value: { get_attr: [ slaves, storperf_agent_ip] }
- }
- =================================================================================================
- "storperf-agent.yaml"
- heat_template_version: 2013-05-23
- parameters:
- flavor:
- type: string
- default: m1.small
- image:
- type: string
- default: 'StorPerf Ubuntu 14.04'
- key_name:
- type: string
- default: StorPerf
- username:
- type: string
- default: storperf
- security_group_name:
- type: string
- default: StorPerf
- 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.
- agent_network:
- type: string
- constraints:
- - custom_constraint: neutron.network
- resources:
- storperf_agent:
- type: "OS::Nova::Server"
- properties:
- name: storperf-agent
- image: { get_param: image }
- flavor: { get_param: flavor }
- key_name: { get_param: key_name }
- networks:
- - port: { get_resource: storperf_agent_port }
- user_data: { get_resource: storperf_agent_config }
- user_data_format: RAW
- storperf_agent_config:
- type: "OS::Heat::CloudConfig"
- properties:
- cloud_config:
- users:
- - name: { get_param: username }
- - default
- package_update: false
- package_upgrade: false
- manage_etc_hosts: localhost
- storperf_agent_port:
- type: "OS::Neutron::Port"
- properties:
- network_id: { get_param: agent_network }
- security_groups:
- - { get_param: security_group_name }
- agent_volume:
- type: OS::Cinder::Volume
- properties:
- size: { get_param: volume_size }
- agent_volume_att:
- type: OS::Cinder::VolumeAttachment
- properties:
- instance_uuid: { get_resource: storperf_agent }
- volume_id: { get_resource: agent_volume}
- outputs:
- storperf_agent_ip:
- description: The IP address of the agent on the StorPerf network
- value: { get_attr: [ storperf_agent, first_address ] }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement