blob: 9f0481e1f14b05fdfaf0af803d3e31e245aec74c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
##############################################################################
# Copyright (c) 2015 EMC and others.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
heat_template_version: 2013-05-23
parameters:
flavor:
type: string
default: storperf
image:
type: string
default: 'Ubuntu 16.04'
key_name:
type: string
default: StorPerf
username:
type: string
default: storperf
storperf_open_security_group:
type: string
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
public_network:
type: string
constraints:
- custom_constraint: neutron.network
agent_zone:
type: string
default: nova
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
availability_zone: { get_param: agent_zone}
storperf_agent_config:
type: "OS::Heat::CloudConfig"
properties:
cloud_config:
users:
- name: { get_param: username }
groups: users
shell: /bin/bash
sudo: "ALL=(ALL) NOPASSWD:ALL"
ssh_authorized_keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDEbnDiqZ8RjQJJzJPf074J41XlYED+zYBzaUZ5UkkUquXzymyUmoWaFBXJP+XPu4Ns44U/S8614+JxGk96tjUdJlIjL0Ag8HP6KLtTNCabucKcEASpgJIVWqJvE3E9upZLIEiTGsF8I8S67T2qq1J1uvtxyeZmyjm7NMamjyFXE53dhR2EHqSutyKK1CK74NkRY9wr3qWUIt35kLdKSVSfrr4gOOicDALbIRu77skHIvrjt+wK1VWphBdMg6ytuq5mIE6pjWAU3Gwl4aTxOU0z43ARzCLq8HVf8s/dKjYMj8plNqaIfceMbaEUqpNHv/xbvtGNG7N0aB/a4pkUQL07
- 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: storperf_open_security_group }
storperf_floating_ip:
type: OS::Neutron::FloatingIP
properties:
floating_network_id: { get_param: public_network }
port_id: { get_resource: storperf_agent_port }
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 floating IP address of the agent on the public network
value: { get_attr: [ storperf_floating_ip, floating_ip_address ] }
|