How to use Infrastructure as Code tools on Virtuozzo Infrastructure
This guide describes how to use Infrastructure as Code (IaC) tools, such as Ansible and Terraform, to deploy complex workloads on Virtuozzo Infrastructure by leveraging the OpenStack API.
Using automation tools on Virtuozzo Infrastructure
Automation tools allows you to define your Infrastructure as Code (virtual machines running on Virtuozzo Infrastructure) and deploy complex architectures in an idempotent way (only perform changes that differ from the previous definition) by defining the IaC and application configuration as desired.
The IaC and application configuration definitions are created by using simple YAML files, which are very easy to read and understand.
As an example, you can have a repository to store the IaC and application configuration definitions for a web application by using such versioning tools as Git, GitLab, or Bitbucket. If you need to update or deploy a defined application in Virtuozzo Infrastructure Cloud, you can clone the repository locally to your machine (if you don’t have such a copy yet), create a branch, change any variable for the deployment customization, and then deploy the application. If you want to make any changes, for example, update a playbook in the YAML format that defines the installation of a package version, you can make this in your local repository, push the changes to your branch, and then seamlessly redeploy the application. Instead of pushing these changes directly to a production environment, you can have a staging project to test your changes before bringing them to production.
Using versioning tools as a source for your files will track changes and allow you to rollback to the previous version, if needed. Additionally, when working in a team, you will be able to track who made the changes and what has been changed.
Supported automation tools
Any automation tool that can leverage the OpenStack API can be used to automate workload deployment on Virtuozzo Infrastructure.
In this guide, you can find an example with Ansible and Terraform, as they are the most popular IaC tools. Chef, Puppet, Salt, and other tools, however, have modules that support OpenStack Cloud management.
To learn more about Ansible and Terraform, refer to these articles:
In this section: