Infrastructure as code (IaC), sometimes referred to as programmable or software-defined infrastructure, is the process of managing IT infrastructure—including physical equipment such as bare metal servers and virtual machines—through code instead of manual processes.
So what is IaC is and how could it shift the way the industry manages storage?
Benefits of Infrastructure as Code
Infrastructure as code lets developers and operations teams automatically manage, monitor, and provision resources instead of having to manually configure different hardware devices and operating systems.
This translates into four major benefits:
Because infrastructure as code removes the manual component of resource management, it allows people to focus on other enterprise tasks.
Increased Speed, Efficiency, and Flexibility
Infrastructure as code also enables speed via faster execution and provides visibility that helps other teams across the enterprise work quickly and more efficiently. Deploying infrastructure as code also lets you divide your infrastructure into modular components that can then be combined in different ways through automation.
Infrastructure as code helps to remove the risk associated with human error. As a result, it can decrease downtime and increase reliability. Also, IaC aids configuration management and helps IT teams avoid undocumented, ad hoc configuration changes by codifying and documenting your configuration specifications.
Easier Management of Hybrid Cloud Environments
Managing bespoke hybrid cloud environments can be challenging and time-consuming and physical infrastructure and networks are usually barriers to velocity. Infrastructure as code removes these issues and makes it much easier to manage hybrid cloud environments.
There are two general approaches to IaC: declarative (functional) and imperative (procedural).
The declarative approach focuses on what the eventual target configuration should be, while the imperative approach focuses on how to get there.
In the declarative approach, you define the desired state and the system executes the required steps to achieve that desired state. In the imperative approach, you define the specific commands to be executed and their order.
The two IaC methods are push and pull, which define how the controlling server tells the other servers how to be configured.
With the pull method, the server that needs to be configured will get (i.e., pull) its configuration from the controlling server.
With the push method, the controlling server pushes the configuration to the destination system.
Why IaC Is Important for DevOps
IaC plays a key role in DevOps practices and particularly in continuous integration/continuous delivery (CI/CD) because it takes away most of the provisioning work from developers who can get on with deploying their code.
CI/CD’s reliance on automation and continuous monitoring through an application life cycle makes IaC a perfect fit for it. With IaC, infrastructure work or concerns won’t stall application deployments and time-consuming manual processes get eliminated.
IaC also helps with team alignment. Application deployment works best when the dev teams and operations teams are deploying applications and configuring environments in the same way, which means fewer errors, manual deployments, and inconsistencies. With IaC, both teams can use the same approach to application deployment. IaC also eliminates the need to run separate deployment environments with unique configurations that can’t be reproduced automatically.
How Pure Storage Implements IaC
To understand how we implement IaC, let’s first make sure we’re clear on what IaC means within the context of Pure Storage solutions.
IaC is about managing infrastructure in a declarative model. We define the desired state of the platform we’re managing and leverage source control for versioning the configurations applied to the environment. IaC uses tools built to take our declaration of the end state for our configuration, process the current state of the environment, and make the appropriate changes to set the configuration as we declared. These tools deliver an idempotent result, meaning that the result is the same whether we run the code 1 to 1,000 times and work to deliver our desired state.
Before IaC, we used an imperative model of defining each step in deploying infrastructure. These steps could be clicks in a GUI, commands at the CLI, or even a script run to make all the changes. Instead, IaC uses a declarative model where we define our configuration, and a tool makes the required changes to get to that final state. It’s a significant change to get out of handling our deployments with manual interaction or even scripts, which still had us responsible for all the logic and decision-making.
There are many benefits to leveraging IaC, but the most prominent benefit of this process is that we only need to concern ourselves with the configuration we need within our environment.
Automating data lifecycle management has historically been a challenge when lifting and shifting applications from on premises to the cloud or the other way around: On-premises and cloud APIs are different, thereby requiring DevOps professionals to maintain two different sets of scripts to essentially perform the exact same operations (such as provisioning a volume, extending a volume size, etc.).
Pure Cloud Block Store™ for AWS uses IaC to make it easy to deploy applications in hybrid cloud environments and to seamlessly move from one cloud to another. With Pure Cloud Block Store, you can use the exact same APIs, whether you’re dealing with an on-premises FlashArray™ or a Pure Cloud Block Store instance, meaning that any library, module, or tool that leverages the FlashArray REST API will work both on FlashArray and Pure Cloud Block Store.
To learn more, click here.