Simplify init-runonce boot command
openstack cli now supports --network foo rather than having to find the network uuid. Thanks to mgoddard for the tip. Change-Id: I9ce94a86c6950b81ef3ec70fe10ee565cc1f1171
This commit is contained in:
@@ -128,8 +128,6 @@ if ! openstack flavor list | grep -q m1.tiny; then
|
|||||||
openstack flavor create --id 5 --ram 16384 --disk 160 --vcpus 8 m1.xlarge
|
openstack flavor create --id 5 --ram 16384 --disk 160 --vcpus 8 m1.xlarge
|
||||||
fi
|
fi
|
||||||
|
|
||||||
DEMO_NET_ID=$(openstack network list | awk '/ demo-net / {print $2}')
|
|
||||||
|
|
||||||
cat << EOF
|
cat << EOF
|
||||||
|
|
||||||
Done.
|
Done.
|
||||||
@@ -140,6 +138,6 @@ openstack server create \\
|
|||||||
--image ${IMAGE_NAME} \\
|
--image ${IMAGE_NAME} \\
|
||||||
--flavor m1.tiny \\
|
--flavor m1.tiny \\
|
||||||
--key-name mykey \\
|
--key-name mykey \\
|
||||||
--nic net-id=${DEMO_NET_ID} \\
|
--network demo-net \\
|
||||||
demo1
|
demo1
|
||||||
EOF
|
EOF
|
||||||
|
Reference in New Issue
Block a user