Fix Heat Kolla demo in contrib

Heat demo script actually use deprecated Openstack Heat client.
* script has been updated to use Openstack client.
* small log refactoring

Change-Id: I857bc1342e3b26c2bf299642ca5483b4ce78e303
This commit is contained in:
Bertrand Lallau 2017-03-07 10:56:44 +01:00
parent 2852af4376
commit 9d98f80503
1 changed files with 14 additions and 7 deletions

View File

@ -1,11 +1,18 @@
#!/bin/bash
VM_COUNT=3
IMAGE_FLAVOR=m1.small
PUBLIC_NET_ID=$(neutron net-list | grep public | awk '{print $2}')
DEMO_NET_ID=$(neutron net-list | grep demo | awk '{print $2}')
DEMO_SUBNET_ID=$(neutron net-list | grep demo | awk '{print $6}')
PUBLIC_NET_ID=$(openstack network show public1 | awk '/ id /{print $4}')
DEMO_NET_ID=$(openstack network show demo-net | awk '/ id /{print $4}')
DEMO_SUBNET_ID=$(openstack subnet show demo-subnet | awk '/ id /{print $4}')
echo Public net id is $PUBLIC_NET_ID
echo Demo net id is $DEMO_NET_ID
echo Demo subnet id is $DEMO_SUBNET_ID
echo "Public net id is $PUBLIC_NET_ID"
echo "Demo net id is $DEMO_NET_ID"
echo "Demo subnet id is $DEMO_SUBNET_ID"
heat stack-create steak --template-file steak-rg.yaml --parameters="vm_count=$VM_COUNT;image_flavor=$IMAGE_FLAVOR;public_net_id=$PUBLIC_NET_ID;demo_net_id=$DEMO_NET_ID;demo_subnet_id=$DEMO_SUBNET_ID"
openstack stack create --parameter vm_count=$VM_COUNT \
--parameter image_flavor=$IMAGE_FLAVOR \
--parameter public_net_id=$PUBLIC_NET_ID \
--parameter demo_net_id=$DEMO_NET_ID \
--parameter demo_subnet_id=$DEMO_SUBNET_ID \
-t steak-rg.yaml steak