Repustate’s API is great for 95% of our customers – but for that other 5%, we needed something else. The reason being is that the 5% are enterprise customers who cannot transmit their data (for both legal and security reasons) across the public internet, even with HTTPS. So we created the Repustate Server product which is our API housed within a virtual appliance, distributed for either VMware or VirtualBox. Since it’s a virtual appliance, we’re really just shipping out a self-contained OS with all the bits & pieces installed, configured and ready to use. No installation, no compilation, just download the Server instance, fire it up, and you’re off. Sounds great, right, what’s the problem? Well, provisioning demos, assigning static IPs, and provisioning multiple instances can get tricky and tedious.
Many customers request demos of the Repustate Server. Our demos need to be configured with some data to disable the virtual appliance after a certain date. (Since one of our selling points is that the Repustate Server requires no external internet access, all configurations must be included, no “phoning-home” allowed).
Furthermore, details about the customer need to be embedded into the virtual appliance. At first, we would clone a “base” virtual machine, edit the various files, package it up, upload it somewhere and then send a link. Yuck. It took way too long and we had to keep making sure the virtual appliance was up-to-date with all of the recent changes to the Repustate code base (multiple code repositories, precompiled binaries etc.)
Many customers could not just fire up a virtual appliance and use DHCP to assign the IP to the virtual appliance. So there was a need for static IPs. A customer would specify the various network settings they needed, we would configure the virtual appliance, and repeat the previous steps of packaging, uploading, and sending out a link to download. Yuck, even more manual, tedious fiddling around.
(Note: I know there’s a tool called VMware Network Editor but apparently it is not included with VM Player, only VM Workstation and some customers for whatever reason don’t have access to the Editor tool, hence the need for us to configure static IPs for them within the guest OS)
Our larger customers use multiple Repustate Servers in parallel to form a cluster of machines for the purposes of increasing throughput. If you’re trying to consume and analyze a steady stream of text you’re going to need some decent processing power to keep up, especially if you want things to be synchronous. To that end, our customers put a load balancer up in front of several Repustate Server instances and now they have their own text analytics cluster chugging away with little-to-no maintenance. Ah, but when our customers want a new instance to throw into the cluster? They can’t just clone an existing one because of the static IP issue described above. So they have to ask us for a new instance. Yuck.
Vagrant to the rescue
Alright, this was a long setup for the payoff – Vagrant. Vagrant allows you to programmatically (i.e. from the shell, no GUI required) create new instances of a virtual machine, for either VirtualBox or VMware. You can completely configure the new instances using Chef or Puppet to download whatever code you need, compile any packages you want etc. It completely automates the role of server admin – well, at least the server setup part. With Vagrant, all customizations Repustate needs to perform for each customer are just automated with Chef. For example, say we need to know when a demo expires. We have a chef recipe that queries our database for the license expiration date, retrieves it, and then stores it in the new virtual appliance.
Customers can now create their Repustate Server instances on their own using a simple form in the Repustate dashboard:
This includes setting their own IP settings for those who can’t use DHCP. Once the customer requests their new instance, Vagrant fires up (asynchronously, just like asking Amazon EC2 for a new instance) and begins provisioning the new instance. Once finished, an email is fired off with a link to download the new virtual appliance. Eventually, we’ll add an API call to this so it can all be programmatically done without the need to log in to the dashboard.
A massive time saver for us at Repustate – big thanks to Mitchell for putting Vagrant together.