Sometimes you need to make A LOT of devstack instances, and on different providers. That is, some in the cloud, others locally, and then some. At least, I keep finding myself in situations where this happens, so, I made a little Vagrantfile to handle the details for me. Here is the Vagrantfile I use to make that happen. After you look the file over, I’ll explain a few key spots and show you how to use it:
Now let’s talk about the interesting spots:
- Line 5: This defines the host name and number of devstacks you need (2 in this case). It also defines the starting IP if you are using this locally.
- Lines 8 – 71: These are the bit that gets you ready to do the devstacks.
- Lines 88 – 93: To make this work on the Rackspace cloud, modify these lines as needed.
- Lines 97 – 118: These are some VMware Fusion performance hacks. Note 116 sets it to 6gb. Change that if doing this locally.
If you intend to use the Rackspace provider, you’ll need it installed, you can get that from here
That’s about it for the interesting parts. Now to use this, you can bring up all the machines at once using:
vagrant up --provider=vmware_fusion or vagrant up --provider=rackspace
To bring them up one at a time:
vagrant up devstack-01 --provider=rackspace
Once things are online, you still need to access and run stack.sh. To do that:
vagrant ssh devstack-01 su stack - cd ~/devstack ./stack.sh