Created
June 27, 2017 14:33
-
-
Save gpaterno/d8c7c4f15876665a0c8f506e25d4383e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Create massive volume + server, for testing | |
# Giuseppe "Gippa" Paterno' <gpaterno@gpaterno.com> | |
IMAGE="f1855ec3-4f49-427d-b62c-31c6bcc11752" | |
NET="9646954b-1d3a-48fd-a436-9bfdb3438ebc" | |
KEY=mykey | |
NAME=$(./randomname.py) | |
VOLUME_ID=$(openstack volume create --image $IMAGE --size 40 --bootable -f value -c id $NAME) | |
VOL_STATUS=$(openstack volume show $VOLUME_ID -c status -f value) | |
while [ $VOL_STATUS != "available" ] | |
do | |
sleep 30 | |
VOL_STATUS=$(openstack volume show $VOLUME_ID -c status -f value) | |
done | |
openstack server create --volume $VOLUME_ID --flavor m1.small --wait --security-group passthrough --nic net-id=$NET --key $KEY $NAME |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment