Perfect Sense is proud to introduce Gyro, an open source cloud automation and management tool that can multiply the productivity of your DevOps staff. Gyro allows you to describe your infrastructure and workflows using a domain-specific language designed specifically for building and managing cloud infrastructure.
At Perfect Sense, we have spent almost 10 years building and managing a significant amount of cloud infrastructure for our customers -- customers like Amazon, Johnson & Johnson, The Los Angeles Times, and Univision (just to name a few). And in the process, we have learned a lot about working with cloud infrastructure.
That's why we started to rethink our cloud tools. We wanted a multi-cloud tool, and we had very specific requirements:
- Hide as much infrastructure complexity as possible
- Codify common maintenance, such as code deployments
- Safe deployment of infrastructure changes
- Version controlled alongside our projects
- Tightly integrate with our other DevOps tooling (Chef, Service Discovery, etc)
With those requirements in hand, we built a brand-new tool, and that tool completely changed how we ran our Managed Services business.
It sped up infrastructure creation. It reduced discrepancies between projects. It reduced mistakes. Most important: It allowed us to do more with the same amount of staff. Our Managed Services business has grown significantly over the last five years but our DevOps team has remained the same size.
This tool has served us so well we decided to make it more widely available; and thus, Gyro was born.
Gyro uses domain-specific language designed specifically for cloud infrastructure. This language allows you to concisely describe your cloud infrastructure. Here's an example of resource definition:
This example shows how simple it is to define resources in Gyro. Once defined, this infrastructure can be created with a single command:
Cloud infrastructure never stays the same for long. Gyro makes updating cloud infrastructure safe and easy.
Gyro will always show you what changes it will make prior to executing those changes.
If we add a new security group rule to the example above, Gyro will detect and display the change for review:
As your cloud infrastructure becomes more complex, you’ll find yourself needing to add logic to your infrastructure definition. Gyro supports logic to allow you to simplify your infrastructure definition.
Gyro supports three main logic constructs:
- if logic allows you to conditionally create cloud resources
- for logic allows you to create many similar resources or loop over existing resources and build new resources based on them
- virtual resource logic allows you to group resources into a reusable component
Let’s say you want to launch an instance in every subnet. With Gyro, this is simple:
Updating cloud infrastructure can be complex and error prone. Sometimes you need more control over how infrastructure is updated.
Gyro workflows give you control over how Gyro creates, updates, and deletes cloud resources. You can prompt your users at each step so they can verify the changes were made correctly. You can roll back changes to a previous step quickly and easily if anything goes wrong.
Workflows in Gyro are great for many common cloud infrastructure tasks:
- You can deploy new website code using a blue/green model. You can create an entirely new set of front-end instances, verify the code is running correctly on them, once verified move those servers into a production load balancer and terminate the old instances.
- You can launch a new NAT instance without downtime by updating your route tables to point to different NAT instance during maintenance, moving the route back after maintenance is complete.
- These are only a few ways you can use workflows.
Our vision is to build a single tool that is the center of your Ops universe. To enable that vision, Gyro was built with extensibility in mind.
Gyro can be extended by adding new cloud providers, new CLI commands, or by adding directives to the Gyro language. Here are just some examples of what you can do with this extensibility:
- Implement a “provision” command to find hosts defined in your Gyro configuration and use your favorite configuration management tool such as Ansible or Chef to push configuration updates to those hosts.
- Implement custom authentication for a cloud provider. At Perfect Sense, we use this functionality to federate authentication to AWS using our corporate LDAP server, including two-factor authentication.
- Implement an “ssh” command to find hosts defined in your Gyro configuration and automatically ssh into the hosts. Never worry about what the name of your hosts are or where the jump host is.
These are just a few examples of how you can extend Gyro.