| 1 |
heat_template_version: pike |
| 2 |
parameters: |
| 3 |
app_port: |
| 4 |
type: number |
| 5 |
default: 8080 |
| 6 |
flavor: |
| 7 |
type: string |
| 8 |
default: m1.nano |
| 9 |
image: |
| 10 |
type: string |
| 11 |
default: cirros-0.3.5-x86_64-disk |
| 12 |
lb_port: |
| 13 |
type: number |
| 14 |
default: 80 |
| 15 |
network: |
| 16 |
type: string |
| 17 |
default: heat-net |
| 18 |
subnet: |
| 19 |
type: string |
| 20 |
default: heat-subnet |
| 21 |
member_count: |
| 22 |
type: number |
| 23 |
default: 1 |
| 24 |
lb_algorithm: |
| 25 |
type: string |
| 26 |
default: ROUND_ROBIN |
| 27 |
|
| 28 |
resources: |
| 29 |
sec_group: |
| 30 |
type: OS::Neutron::SecurityGroup |
| 31 |
properties: |
| 32 |
rules: |
| 33 |
- remote_ip_prefix: 0.0.0.0/0 |
| 34 |
protocol: tcp |
| 35 |
port_range_min: {get_param: app_port} |
| 36 |
port_range_max: {get_param: app_port} |
| 37 |
|
| 38 |
pool_members: |
| 39 |
type: OS::Heat::ResourceGroup |
| 40 |
properties: |
| 41 |
count: {get_param: member_count} |
| 42 |
resource_def: |
| 43 |
type: OS::Test::PoolMember |
| 44 |
properties: |
| 45 |
image: {get_param: image} |
| 46 |
flavor: {get_param: flavor} |
| 47 |
pool: {get_resource: pool} |
| 48 |
app_port: {get_param: app_port} |
| 49 |
network: {get_param: network} |
| 50 |
sec_group: {get_resource: sec_group} |
| 51 |
subnet: {get_param: subnet} |
| 52 |
|
| 53 |
monitor: |
| 54 |
type: OS::Octavia::HealthMonitor |
| 55 |
properties: |
| 56 |
delay: 3 |
| 57 |
type: HTTP |
| 58 |
timeout: 3 |
| 59 |
max_retries: 3 |
| 60 |
pool: {get_resource: pool} |
| 61 |
|
| 62 |
pool: |
| 63 |
type: OS::Octavia::Pool |
| 64 |
properties: |
| 65 |
lb_algorithm: {get_param: lb_algorithm} |
| 66 |
protocol: HTTP |
| 67 |
listener: {get_resource: listener} |
| 68 |
|
| 69 |
listener: |
| 70 |
type: OS::Octavia::Listener |
| 71 |
properties: |
| 72 |
loadbalancer: {get_resource: loadbalancer} |
| 73 |
protocol: HTTP |
| 74 |
protocol_port: {get_param: lb_port} |
| 75 |
|
| 76 |
loadbalancer: |
| 77 |
type: OS::Octavia::LoadBalancer |
| 78 |
properties: |
| 79 |
vip_subnet: {get_param: subnet} |
| 80 |
outputs: |
| 81 |
loadbalancer: |
| 82 |
value: {get_attr: [loadbalancer, show]} |
| 83 |
pool: |
| 84 |
value: {get_attr: [pool, show]} |
| 85 |
listener: |
| 86 |
value: {get_attr: [listener, show]} |