heat/heat_integrationtests/scenario/templates/netcat-webapp.yaml
Pavlo Shchelokovskyy 1bc886c89d Merge Neutron AutoScaling and LoadBalancer tests
The tested use case is an autoscaling group of web app servers
behind a loadbalancer.

Test template was rewritten to use AutoScalingGroup, wait conditions and
outputs, so no other client than heat one is used.
Now there is no need to check for VM connectivity,
as stack/resources status COMPLETE now quite reliably means
that the listening servers are running.

This patch should probably also help with narrowing down the causes of
bug 1437203, since it does not checks instance connectivity with SSH.

Change-Id: Iec8e8061f9ab3f3841fa221722b7b7805760cdf7
Related-Bug: #1437203
Closes-Bug: #1435285
2015-08-28 08:39:47 +00:00

36 lines
827 B
YAML

heat_template_version: 2015-10-15
description: |
Simplest web-app using netcat reporting only hostname.
Specifically tailored for minimal Cirros image.
parameters:
app_port:
type: number
wc_curl_cli:
type: string
resources:
webapp_nc:
type: OS::Heat::SoftwareConfig
properties:
group: ungrouped
config:
str_replace:
template: |
#! /bin/sh -v
Body=$(hostname)
Response="HTTP/1.1 200 OK\r\nContent-Length: ${#Body}\r\n\r\n$Body"
wc_notify --data-binary '{"status": "SUCCESS"}'
while true ; do echo -e $Response | nc -llp PORT; done
params:
PORT: { get_param: app_port }
wc_notify: { get_param: wc_curl_cli }
outputs:
OS::stack_id:
value: { get_resource: webapp_nc }