Our customers build some pretty amazing things, and we love promoting the work they do—especially when it’s open-source so that it can be used and made even better by others! Check out the Python module that Fulcrum Technologies uses to automate a variety of tasks around environment management and to monitor their Skytap consumption.
Back in the summer of 2012, shortly after we started using Skytap, we were asked to create a series of training environments that refreshed on a complex schedule so that our trainers could go into the field and have known good working environments for the purpose of training 3,500 folks on the use of our software. We needed to stand up an environment for each classroom that both instructors and students could use during the course, and then refresh that environment at the end to make way for the next class. We turned to what was then a reasonably flushed out API for Skytap. Using that, and a crazy cron file we were able to produce what our team needed in order to have a successful summer training. Four years, three major revisions, and two more sets of eyes has since transformed that little script that we called “Skynet” into a full fledged python module that we use to manipulate many aspects of our Skytap infrastructure.
With the current version of that script, we now can do a variety of tasks automatically, from suspending environments, deleting environments, maintaining users and groups, documenting our servers automatically in Confluence, and displaying Skytap VM statistics for users to easily access.
After the summer, we continued using a modified version of Skynet to manage the suspension of all of our Skytap systems each evening in an effort to conserve our Skytap resources. This worked well and we began to look at other uses for the Skytap API. When we realized that the API exposed all the metrics that Skytap uses to bill us, we began work on a dashboard for our Network Operations Center that allows us to keep an eye on our Skytap usage.
Up to this point we were documenting each of our Skytap environments in Atlassian’s Confluence Cloud, and, like many of you, this was done by hand “when we had time.” That was not a workable solution, so we brought in an intern who quickly demonstrated an aptitude with working with APIs. The next round of edits to Skynet gave him all that he needed to make our Skytap systems self-document in Confluence. Nearly overnight we started getting requests from users asking for improvements to these pages as they were already providing significant value and we were excited about what else the pages could show users. This is even more important due to the dynamic nature of Skytap, as we create and destroy servers throughout the development process, we have confidence that our systems are accurately documented in a central location.
As our intern was completing this work, we began working with Okta for authentication of our users here at Fulcrum. Okta also has an API and we thought it would be exciting to integrate the creation of users in Okta with those same users in Skytap. With this new task we decided to step back and rethink the design of the Skynet script.
The Skynet script, rebranded as the python module ‘skytap’, is intended as a full Python wrapper of the Skytap API allowing more flexible use of future projects. This redesign also succeeded at our internal goal of being able to open source this work to potentially help other companies that work with Skytap.
Now you can get this Skynet script both from its GitHub repository if you want to see the source, or from pip (
pip install skytap) if you want to just dive in and use it.
- Skytap module GitHub repository: https://github.com/FulcrumIT/skytap
- Skytap module documentation: http://skytap.readthedocs.org
- pypi (pip) page: https://pypi.python.org/pypi/skytap
If you want to enhance this to do something new, please send us a pull request so we can use it as well!