BlueXP Blog

Infrastructure as Code: DevOps Done Right

Written by Yifat Perry, Technical Content Manager | Jan 13, 2020 5:00:00 AM

Infrastructure as Code (IaC) is one of the key enablers of the DevOps revolution. Together with cloud automation technology, It provides the ability to turn complex systems and environments into a few lines of code, which can be deployed at the click of a button. This enables automated dev/test pipelines which provide a rapid feedback loop for developers, and rapid deployment of new features for end-users.

In this post, we’ll explain how IaC is one of the four steps to achieving an agile, DevOps-friendly environment, how IaC dramatically changes operations work, and which technologies you can use to implement it. In addition, we show how NetApp Cloud Volumes ONTAP can help automate the storage element of your DevOps environment.

In this article, you will learn:


DevOps Principles: Achieving Agility in Four Steps

When most of us think about DevOps, we think about cooperation between teams—developers and operations working together. While this is true, it’s not the full story. Even if developers and ops work in perfect harmony, they will fail to deliver DevOps benefits without agility.

DevOps is based on practices and technologies that allow development, testing and deployment to move at high velocity. Infrastructure as Code (IaC) takes a central role. Let’s have a look at four steps that allow agile teams to achieve an agile development workflow.

1. Agile planning

In the waterfall approach, teams would meticulously plan a project for weeks or months, and then start building software to detailed specs. In a DevOps environment, teams set forward high level objectives and start building software in small iterations. Each iteration is a usable product that provides value to the customer, and can easily be tested in a realistic environment, and deployed to production.

2. Agile infrastructure

Agile planning would be meaningless without the infrastructure to support it. Virtualization was a big step forward from single-occupancy machines, but it was cumbersome to automate and scale. Organizations transitioning to DevOps are adopting technologies that make it easy to develop, test and deploy applications in small, manageable pieces: 

  • Microservices—instead of building huge monolithic applications, systems are separated into smaller services, each of which does one thing well. Microservices are self-sufficient and communicate with each other using APIs.
  • Containerization—each microservice is packaged as one or more Docker container, which can be quickly and easily deployed on any environment with consistent results. Orchestrators like Kubernetes are used to manage large groups of containers.
  • Cloud—organizations are using public cloud providers like AWS, and also private cloud infrastructure, to dynamically provision resources for development, testing and production deployments. 
3. Infrastructure as Code

Let's take a look at infrastructure as code, DevOps teams' key ingredient that allows organizations to run microservices on agile infrastructure. IaC tools make it possible to define a software stack using a simple text-based configuration file, and launch that stack automatically, ensuring it runs exactly the same each time and in any environment. Configuration files are stored in version control, meaning that an entire system, from the operating system to application configuration, can be treated as code. It can be tweaked, tested, and deployed at will whenever required.

4. Continuous Delivery

Combining agile planning, infrastructure, and IaC with a robust Continuous Integration system enables organizations to do Continuous Delivery. Continuous Delivery means the development pipeline is fully automated—developers commit new code, it passes automatic sanity checks and if it passes, promoted to a testing environment. After being tested in a realistic environment, it can be instantly pushed to production. This is how the world’s biggest development organizations deploy to production dozens, hundreds or even thousands of times every day.

Infrastructure as Code: DevOps Before and After

IaC is essential to DevOps. It enables teams to create stable, consistent systems that can easily be replicated and deployed on development, testing and production environments. Using infrastructure as code, DevOps teams can provision and control all aspects of the environment including VMs, operating systems, containers, application config, storage, networking, and integrations between different components.

The following table summarizes the difference between ops work before and after Infrastructure as Code.

Before IaC After IaC
Ops need to manually specify machines, configuration and networking for each deployment Ops specify the stack once as a declarative configuration file, and deploy as many times as needed
Deployment is slow, does not provide fast feedback to dev teams Deployment can occur instantly on every commit
Ops need to manually perform deployments and tear down systems when no longer needed Deployments automatically built and torn down as part of the development pipeline
Ops need to know the “correct” way to deploy each system, deployment is error prone The best way to deploy each system is represented as code in version control
Best practices need to be maintained by ops using documentation or tribal knowledge Best practices can be implemented directly into configuration and applied to all deployments
Rollbacks are difficult, require manual work and troubleshooting Rollbacks are instant, simply deploy the previous known good configuration

Infrastructure as Code Tools

DevOps teams cannot practice IaC without tools. Following are a few Infrastructure as Code tools commonly used in DevOps workflows.

For a deeper review of IaC technical approaches and tools offered by leading cloud providers, see our articles about Infrastructure as Code on AWS and Infrastructure as Code on Azure.


AWS CloudFormation

CloudFormation is an Amazon tool enabling teams to define templates representing software stacks and automatically deploy them to cloud environments. Templates use a simple, human-readable format and are simple text files you can check into version control. CloudFormation lets you automatically spin up anything from a single EC2 machine to a complex application using multiple AWS services.

Azure Resource Manager
Azure Resource Manager is Azure’s central mechanism for automating cloud resources. Azure provides a simple declarative template syntax that provides direct access to this automation engine, ensuring systems are deployed in exactly the same way as if they were deployed using the Azure Console or CLI. 

Puppet
Puppet Enterprise enables teams to deploy hug-scale cloud workloads, with up to 20,000 Puppet nodes. It supports multiple public clouds, private cloud systems and hybrid cloud environments. It allows infrastructure automation using a GUI and Domain Specific Language (DSL).

Terraform
Terraform works together with tools like Puppet or Chef, taking their configuration files and creating a deployment plan that shows how to adapt the current infrastructure to reach the desired state. It manages everything from machines, storage and networking, to fine-grained application features and DNS configurations.

Storage Automation with Cloud Volumes ONTAP

NetApp Cloud Volumes ONTAP, the leading enterprise-grade storage management solution, delivers secure, proven storage management services on AWS, Azure and Google Cloud. Cloud Volumes ONTAP supports up to a capacity of 368TB, and supports various use cases such as file services, databases, DevOps or any other enterprise workload.

In particular, Cloud Volumes ONTAP provides BlueXP Console, a UI and APIs for management, automation and orchestration, supporting hybrid & multi-cloud architectures, and letting you treat pools of storage as one more element in your Infrastructure as Code setup.