Infrastructure automation Template

Automate your Public Cloud deployments and save time

Do you want to easily maintain multiple environments of your B2B application or dynamically provision compute and storage resources for your ecommerce applications? By choosing OVHcloud public cloud, you benefit from infrastructures and platforms that are controllable via standard and open APIs.

Two approaches to increasing efficiency and robustness

Once you have adopted an automation tool, you can treat your infrastructure resources (virtual servers, storage disks, private networks) as commodities and focus on your software added value. You will also accelerate software improvements and make your production environments more robust.

Here are the business advantages of automation, regardless of the tool chosen:

  • Get identical environments quickly
  • History and versioning of your environments
  • Facilitation of infrastructure audits and certifications
  • Facilitation of business continuity or recovery plans
  • Simplified scaling of your infrastructures

Start automating your infrastructure with Terraform

Terraform

OVHcloud maintains an official Terraform provider to interact with our API. Here are the 3 key steps to getting started with Terraform:

1 - Download the Terraform CLI and the Terraform OpenStack and OVHcloud providers
2 - Create an OpenStack user for public cloud, configure it in Terraform

3 - Describe your desired infrastructure in Terraform HCL format, then apply it.

You can now upgrade or duplicate your environments by editing your HCL file and only with 3 command lines!

Terraform-logo

When should I choose infrastructure-as-code?

The infrastructure-as-code approach focuses on the lower layers of your platform. It is agnostic to your software architecture. Most Public Cloud resources can be deployed with Terraform (instances, block storage, private networks, etc.) and others will be added soon (databases).

Terraform is particularly recommended when:

  • You often need to deploy identical environments.
  • You have no experience with software containers.
  • You are already familiar with the concept of post-installation scripts or snapshots/images.

Before adopting Terraform, please note that:

  • You must continue to maintain the operating systems of your virtual machines.
  • Terraform does not manage recovery during incidents.
  • Terraform does not manage automatic scaling.

+ OVHcloud

Terraform also allows the deployment of resources outside of the Public Cloud, such as 'BareMetal essentials powered by VMware' or 'Hosted Private Cloud Premier', exposing vSphere APIs. It is also possible to combine the two approaches, for example by using Terraform to create new Kubernetes clusters on the fly!

Automate a containerized infrastructure with Kubernetes

Kubernetes

OVHcloud offers you a free, fully-managed Kubernetes service, free of charge.

Here are the 3 key steps to getting started with Kubernetes:

1 - Store your containerized applications in a registry or use public images.
2 - Create a Managed Kubernetes cluster via your Control Panel then use kubectl.
3 - Define the desired status of the containers with Kubernetes, then apply it.

 

You can also provision and re-configure instances, block storage and load balancers through Kubernetes autoscaling.

Kubernetes

When to choose container orchestration?

The orchestrators are initially focused on the high layers of the platform, which you need to containerize. Some managed Kubernetes offerings (including OVHcloud) also allow you to orchestrate the infrastructure to dynamically scale according to the usage of your containers.

Kubernetes is particularly recommended for:

  • autohealing (automatic recovery: if a component fails, it is restarted)
  • autoscaling (automatic load balancing and scaling)
  • multi-cloud, hybrid cloud approaches and microservices organization.

Before adopting Kubernetes, please note that:

  • Your applications must be modern or containerized (not very suitable for large monolithic applications)
  • There is a large learning curve to containerization.
  • Kubernetes is complex to maintain (but OVHcloud provides it to you as a service!)

+ OVHcloud

This means you don't have to worry about deploying Kubernetes components (called Control plane and Kubelet) or even the operating systems installed on the virtual machines orchestrated by Kubernetes. All are installed and updated (security patches, version upgrades) by our teams.

Standard APIs and a wide range of tools

There are many tools to automate deployments, and most are natively compatible with the OpenStack API exposed by the OVHcloud public cloud. You can also deploy your own private cloud with the same APIs.

We could mention Kubespray, Ansible and many others. We have chosen to present Terraform and Kubernetes in more detail. These two technologies are the most popular, and they are very well documented, ensuring total reversibility.

In addition to these two infrastructure-agnostic approaches to automating your applications, OVHcloud offers fully managed solutions for artificial intelligence and machine learning. They will allow you to develop, train and run according to your data business needs, without having to worry about maintaining infrastructure layers.