Created
January 21, 2014 12:24
-
-
Save dave-tucker/8539071 to your computer and use it in GitHub Desktop.
Create VMs for Devstack with ODL ML2
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 | |
. ./openrc admin admin | |
if ! nova keypair-list | grep "mykey"; then | |
nova keypair-add --pub-key ~/.ssh/id_rsa.pub mykey | |
fi | |
nova quota-update --instances 100 --cores 200 --ram 51200000 $(keystone tenant-list | grep -m1 'admin' | awk '{print $2}') | |
if ! neutron net-list | grep "my-private-net"; then | |
neutron net-create my-private-net | |
neutron subnet-create $(neutron net-list | grep 'my-private-net' | awk '{print $2}') 10.254.0.0/24 --name my-private-subnet --ip-version 4 --gateway 10.254.0.1 --allocation-pool start=10.254.0.2,end=10.254.0.254 | |
fi | |
nova boot --flavor m1.nano --image $(nova image-list | grep 'cirros-0.3.1-x86_64-uec\s' | awk '{print $2}') --nic net-id=$(neutron net-list | grep my-private-net | awk '{print $2}') --key-name mykey --num-instances $1 test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment