From 8e30817a93667c9ce62eb0e6ea0f8561f0a40c9a Mon Sep 17 00:00:00 2001 From: Zane Bitter Date: Sun, 15 Jul 2012 17:04:45 -0400 Subject: [PATCH] Account for XML output in Getting Started script The output format of heat commands has changed from JSON to XML Change-Id: I68b4011e31fdb14306e88506dc6ff819b041b054 Signed-off-by: Zane Bitter --- docs/GettingStarted.rst | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/docs/GettingStarted.rst b/docs/GettingStarted.rst index d3805011f2..8219387ec6 100644 --- a/docs/GettingStarted.rst +++ b/docs/GettingStarted.rst @@ -232,16 +232,15 @@ After a few seconds, the ``StackStatus`` should change from ``IN_PROGRESS`` to ` .. # Wait for Stack creation - CREATING='"StackStatus": "IN_PROGRESS"' + CREATING="IN_PROGRESS" retries=24 - while $HEAT_DESCRIBE | grep -q '"StackStatus": "IN_PROGRESS"' && \ - ((retries-- > 0)) + while $HEAT_DESCRIBE | grep -q $CREATING && ((retries-- > 0)) do echo "Waiting for Stack creation to complete..." >&2 sleep 5 done - $HEAT_DESCRIBE | grep -q '"StackStatus": "CREATE_COMPLETE"' + $HEAT_DESCRIBE | grep -q "CREATE_COMPLETE" Verify instance creation @@ -250,11 +249,14 @@ Verify instance creation Because the software takes some time to install from the repository, it may be a few minutes before the Wordpress intance is in a running state. One way to check is to login via ssh and ``tail -f /var/log/yum.log``. Once ``mysql-server`` installs, the instance should be ready to go. .. - WebsiteURL=$($HEAT_DESCRIBE | sed -e '/"OutputKey": "WebsiteURL"/,/}/ {' \ - -e '/"OutputValue":/ {' \ - -e 's/[^:]*": "//' \ - -e 's/",\?[[:space:]]*$//' \ - -e p -e '}' -e '}' -e d) + WebsiteURL=$($HEAT_DESCRIBE | sed \ + -e '/WebsiteURL<\/OutputKey>/,/<\/member>/ {' \ + -e '// {' \ + -e 's/\([^<]*\)<\/OutputValue>/\1/' \ + -e p \ + -e '}' -e '}' \ + -e d \ + ) HOST=`echo $WebsiteURL | sed -r -e 's#http://([^/]+)/.*#\1#'` retries=9