Infrastructure as Code (IaC)
Nowadays, Infrastructure can be created and managed using code – you can create 100 servers with prebaked software using a for loop to manage and tag the servers. All of this is created by a CI/CD server triggered by a single commit on a given repository. With this in mind, all the infrastructure for the new application can be created and managed using IaC tools such as Terraform or Pulumi, which are cloud agnostic, or cloud vendor’s proprietary solutions. Cloud providers are now enabling SDKs for a more developer experience/oriented development with more compatibility and capabilities than a given “Provider” on Terraform or even their main IaC solutions.
Choosing the right IaC tool/product will fully depend on the application logic and the level of automation that is needed (which should be the entire stack), but in the end, having a complete pipeline for the Infrastructure should be one of the main goals of having our applications running on the cloud as it allows to have complete control of our systems. Soon after this, we will end up using GitOps methodologies, which will increase our agility to deploy not just our applications but also the entire infrastructure.
As soon as you have developed your entire infrastructure on any IaC, you are ready to deploy it “n” times with the same precision, without any need for human intervention on any of the configurations that your application needs in terms of inventory management or infrastructure requirements. You will be creating all the environments on where the application will live, which normally tends to be development, staging/UAT, and production. Sometimes you will also need other environments for testing, experimenting, or even innovating. This will be just as easy as running the scripts to repeatedly create the same infrastructure without worrying about drifts in the configurations.
When using Terraform, you can input the code to a Terraform module and reuse that module in multiple places throughout your code. Instead of having the same code in the staging and production environments, you will have both environments reuse code from the same module and then spin up “n” environments with the same set of resources and configurations.
This is a game-changer. Modules are the foundation of writing reusable, maintainable, and testable Terraform code and, as a result, writing infrastructure. With this in mind, teams can now develop their own modules that can be published via the Terraform registry or GitHub. Furthermore, anyone in the world can use the module and create the infrastructure or components needed by an application.
VEXXHOST’s Terraform Project
At VEXXHOST, we are advocates of sharing technology. Hence, most of our offerings and solutions are open source, and we have done the same with this project as well. Please refer to the public repository to access the Terraform code.
This module allows you to bootstrap an OpenStack cloud by adding images to some of the most common Linux distributions from their official release sites. You can also use this module to build a collection of the most recent and popular images into your OpenStack cloud, either public or private.
Additionally, this the same tooling used to deploy OS images for the VEXXHOST’s public cloud and private cloud offerings. Therefore, if you want to add an image to our public catalog, you can submit a pull request to our repository, and once it is approved and merged, the image should appear in our clouds.
To summarize the offering, you have a module that will allow you and your team to add different Linux images into your existing OpenStack clouds, be it public or private. This will increase your ability to use and install custom solutions that are needed or restricted in some cases by the Linux distribution and version that your servers run on.
Anyone with an OpenStack cloud can take advantage of this module. As mentioned earlier, it allows users to make PRs for changes, and then if approved, the new images will appear on their OpenStack clouds. At the end of the day, it truly serves as a testament to VEXXHOST’s commitment as an open source cloud provider and contributor.
The Takeaway – IaC
Infrastructure as Code is here to stay. With Terraform, modules are now the main foundation of all resources for public and private cloud providers as they contribute to a better methodology when writing Infrastructure.
VEXXHOST provides a variety of OpenStack-based cloud solutions, including highly secure private clouds. The advanced level of customization possibilities make private cloud a favorite among enterprises, without the burden of licensing fees or vendor lock-ins. Learn more about VEXXHOST’s cloud offerings by contacting our team. Check out our private cloud resource page to improve your knowledge on the topic.