You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
592 B
26 lines
592 B
#!/bin/bash
|
|
SERVERNAME=coreos
|
|
echo "Creating VM ${SERVERNAME}"
|
|
|
|
nova boot ${SERVERNAME} \
|
|
--image CoreOS-1068 \
|
|
--availability-zone nuczone \
|
|
--user-data ${SERVERNAME}.yaml \
|
|
--key-name "Sebastian Rojo" \
|
|
--flavor m1.medium.md \
|
|
--min-count 1 \
|
|
--max-count 3 \
|
|
--security-groups default,docker,CoreOS \
|
|
--nic net-id=7a9ae8e9-8425-4084-94cc-fb70c069e957
|
|
|
|
for RUN in {1..50}; do
|
|
if [ "$(nova show ${SERVERNAME} | awk '/status/ {print $4}')" == "ACTIVE" ]
|
|
then
|
|
nova show ${SERVERNAME}
|
|
exit 0
|
|
else
|
|
echo "VM ${SERVERNAME} is not active yet"
|
|
sleep 2
|
|
fi
|
|
done
|