on 23-Aug-201609:45 - edited on 05-Jun-202322:49 by JimmyPackets
This article is a follow-up to the previous article I posted about using packer.io to build BIG-IP images. In the previous article, we built a custom image in BIG-IP. You may have added spice to the default packer template I provided, or not. Either way, now you're interested in booting it up in Vagrant. That's what this article will cover.
There are a couple of tools that you'll need to have installed before continuing. They are
Additionally, you'll need a license to use during startup of said BIG-IP.
Booting a VM
Vagrant provides you with the ability to create reproducible development environments. So, with that in mind, the BIG-IPs that we instantiate here are only relevant for development purposes. I use them for the Python f5-sdk as well as the Ansible modules. With Vagrant and Virtualbox, I can snapshot my VMs before I turf them. This is super handy and a major time saver when you're in the thick of it debugging some new integration with BIG-IP. I'll frequently get my BIG-IP in a situation where it is easier to just restore a snapshot than delete the whole thing, re-build it, etc etc. Such a waste of time!
So let's open up a CLI and change to any of the given directories that come in the
repo. We'll use bigip-12.1.0 for the sake of argument.
$> cd bigip-12.1.0
Now, I am assuming here that you have already done the grunt work of using our packer templates to create a Vagrant box for yourself. With this box in hand, you have two choices.
Copy/move the box into the current working directory
line to point to some other location (on disk, a URL, etc)
We'll just use a local copy on disk. I'll leave the other forms as an exercise for the user.
The Vagrantfile, by default, looks for the Vagrant box in our current working directory, so let's put it there if you have not yet done that.
BIGIP-188.8.131.52.0.1434.box README.md Vagrantfile
Ok, with that out of the way, and our license key in hand, we can boot up an instance of the BIG-IP with vagrant using the following command. Note that I am going to use the super-secret-squirrel-developer license key
to boot mine because that's what super-secret-squirrel-developers do. Replace my key with your key.
$> BIGIP_LICENSE=xxxx-xxxx-xxxx-xxxx-xxxxxxx vagrant up
That one command is all that is necessary to bring up the BIG-IP.
So what do I get?
Once booted, the BIG-IP that I pre-create for you will have the following characteristics
The Setup utility will have been disabled, so you'll land right in the familiar BIG-IP UI
Two interfaces for connecting things.
The first has IP address 10.2.2.2/24
The second has IP address 10.2.3.2/24
Two VLANs on those 2 interfaces, named
4 gig of RAM allocated to the device
No shared volume mounted. This is a limitation of BIG-IP since it does not come with the developer tools needed to install the Virtualbox Guest Additions (gcc, kernel headers, etc).
Additionally, you can use
to connect to it, or open the Virtualbox UI and connect directly to the console with the insecure credentials
By now you should have a good idea of how to connect to your BIG-IP and do "stuff" with it. The sort of "stuff" I do is related to integrations, and so I only ever use this form of BIG-IP as a development tool. It would likely be a bad idea to use this form of kicking a BIG-IP to roll something out to production.
If you do not want to repeatedly provide a license key, you can set the Vagrantfile's
variable that you see at the top to be your key. One would frown upon this method though, unless one could guarantee that that Vagrantfile would never leave your organization. Doing so might expose your license key to unwanted parties.