octavia/devstack/samples/singlenode/webserver.sh
Miguel Angel Ajo b47fcb2834 Allow deploying secondary worker and API nodes
This commit introduces a new parameter "OCTAVIA_NODE", which
is standalone by default. Only the main (for ha) or standalone
nodes create resources like accounts, the management network,
images, etc.

We also introduce a multinode vagrant configuration.

A follow up patch will introduce an haproxy in front of the octavia
API endpoints.

Change-Id: I835ee7e0e925232b55f3c14eeed98aeb0f0ce463
2016-07-09 11:33:08 +00:00

10 lines
278 B
Bash

#!/bin/sh
MYIP=$(/sbin/ifconfig eth0|grep 'inet addr'|awk -F: '{print $2}'| awk '{print $1}');
OUTPUT_STR="Welcome to $MYIP\r"
OUTPUT_LEN=${#OUTPUT_STR}
while true; do
echo -e "HTTP/1.0 200 OK\r\nContent-Length: ${OUTPUT_LEN}\r\n\r\n${OUTPUT_STR}" | sudo nc -l -p 80
done