diff options
| author | Jenkins <jenkins@review.openstack.org> | 2015-05-13 12:56:16 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2015-05-13 12:56:16 +0000 |
| commit | abe4a9ccb25b171122f424e548215fe20eff459e (patch) | |
| tree | 473f4c207a973b5b5e4580f29ee529ce4fc4680e | |
| parent | 4911917805924d5640d030311bd7542119937f85 (diff) | |
| parent | e65e059852fa45f53810c9d47296f2938b502510 (diff) | |
| download | kolla-abe4a9ccb25b171122f424e548215fe20eff459e.tar.gz kolla-abe4a9ccb25b171122f424e548215fe20eff459e.zip | |
Merge "Improves Heat Demo Functionality"
| -rw-r--r-- | demos/heat/README.md | 13 | ||||
| -rwxr-xr-x | demos/heat/launch | 4 | ||||
| -rw-r--r-- | demos/heat/steak-rg.yaml | 19 | ||||
| -rw-r--r-- | demos/heat/steak.yaml | 14 |
4 files changed, 47 insertions, 3 deletions
diff --git a/demos/heat/README.md b/demos/heat/README.md new file mode 100644 index 000000000..78236ac1f --- /dev/null +++ b/demos/heat/README.md @@ -0,0 +1,13 @@ +A Kolla Demo using Heat +======================= + +By default, the launch script will spawn 3 Nova instances on a +Neutron network created from the tools/init-runonce script. Edit +the VM_COUNT parameter in the launch script if you would like to +spawn a different amount of Nova instances. Edit the IMAGE_FLAVOR +if you would like to launch images using a flavor other than +m1.tiny. + +Then run the script: + + $ ./launch diff --git a/demos/heat/launch b/demos/heat/launch index d46e69f1d..768b69eb0 100755 --- a/demos/heat/launch +++ b/demos/heat/launch @@ -1,3 +1,5 @@ +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}') @@ -6,4 +8,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 -heat stack-create steak --template-file steak-rg.yaml --parameters="public_net_id=$PUBLIC_NET_ID;demo_net_id=$DEMO_NET_ID;demo_subnet_id=$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" diff --git a/demos/heat/steak-rg.yaml b/demos/heat/steak-rg.yaml index 8ecd3f3da..4c0a1db93 100644 --- a/demos/heat/steak-rg.yaml +++ b/demos/heat/steak-rg.yaml @@ -13,14 +13,31 @@ parameters: type: string description: uuid of a subnet on the fixed network to use for creating ports + vm_count: + type: string + description: Number of VMs to launch + + image_flavor: + type: string + description: Image flavor to use when launching VMs + resources: steak: type: OS::Heat::ResourceGroup properties: - count: 2 + count: + get_param: vm_count resource_def: type: steak.yaml properties: + image_flavor: {get_param: image_flavor} public_net_id: {get_param: public_net_id} demo_net_id: {get_param: demo_net_id} demo_subnet_id: {get_param: demo_subnet_id} + +outputs: + eth0: + value: {get_attr: [steak, eth0]} + + float: + value: {get_attr: [steak, float]} diff --git a/demos/heat/steak.yaml b/demos/heat/steak.yaml index 37fad0eb6..9b9bd9fc7 100644 --- a/demos/heat/steak.yaml +++ b/demos/heat/steak.yaml @@ -13,13 +13,18 @@ parameters: type: string description: uuid of a subnet on the fixed network to use for creating ports + image_flavor: + type: string + description: Number of VMs to launch + resources: steak_node: type: "OS::Nova::Server" properties: key_name: mykey image: cirros - flavor: m1.small + flavor: + get_param: image_flavor networks: - port: get_resource: steak_node_eth0 @@ -40,3 +45,10 @@ resources: get_param: public_net_id port_id: get_resource: steak_node_eth0 + +outputs: + eth0: + value: {get_attr: [steak_node_eth0, fixed_ips, 0, ip_address]} + + float: + value: {get_attr: [steak_node_floating, floating_ip_address]} |
