Why Infrastructure as Code Matters

April 7, 2023 | 4 minute read
Text Size 100%:

What is Infrastructure as Code?

Infrastructure as code (IaC) means using code to define and manage your infrastructure. It sounds simple but this practice and the tools that support it is extremely consequential in today's cloud computing environments. Let's look at some of the reasons why...

Cloud Computing

It used to be that the infrastructure in 'infrastructure as code' was physical - real servers and hard drives. Today, more often than not, infrastructure refers to virtual entities hosted by your cloud provider. Because these resources are managed by APIs, programmers are able to write code to create, modify, and destroy these resources.

Flexibility

Cloud computing simplifies the steps required to provision infrastructure and reduces the time it takes to create and destroy these resources. One effect of this reduction in lifecycle friction is that resources can become more purpose-built and ephemeral and has given rise to cloud technologies including serverless, containers and Kubernetes. Typically these technologies and services require a more granular management. That means more infrastructure to be managed more often.

DevOps

The tools and techniques of IaC allow businesses to blur the lines between development and operations in their IT departments and create an environment for collaboration. DevOps practices are possible because infrastructure can be managed as code, and necessary due to the volume and frequency of infrastructure changes in modern cloud deployments.

What are the benefits of Infrastructure as Code?

When your business adopts the tools of IaC and the DevOps practices those tools enable, you can realize a number of benefits.

  • Cost reduction. By automating time consuming tasks like configuring compute instances and storage, businesses can focus on other critical tasks and minimize costs.
  • Speed. Infrastructure as code tools make it possible to automate just about every process you can run in the cloud which means everything can be delivered faster.
  • Consistency. IaC makes it possible to avoid human errors and inconsistency. Get it right the first time and every time.
  • Eliminate drift. If someone changes a resource to be out of sync with your IaC directives, you need to correct this and get the resources back to the correct state as fast as possible. IaC tools bake the correct configuration into the code, making it trivial to detect changes.
  • Stable and scalable environments. IaC enables teams to configure environments according to their specific needs and to rapidly scale out those environments as needed.
  • Self-documenting. IaC tools create detailed reports and documentation of every process.

How do I use Infrastructure as Code with Oracle?

Oracle Cloud Infrastructure is a next-generation public cloud that provides Infrastructure as a Service (IaaS). IaaS provides the ability to provision processing, storage, networks, and other fundamental computing resources on-demand through a console or APIs - the perfect way to manage resources via infrastructure as code tools.

Open Source IaC Tools

There are a number of open source infrastructure as code tools including:

  • Ansible: Developed by RedHat, Ansible enables users to execute playbooks to create and manage the required infrastructure resources.
  • Chef: Chef allows you to create recipes and cookbooks and uses a procedural style language where the user has to specify how to achieve the desired state.
  • Puppet: Puppet is another open-source configuration management tool that uses a Ruby-based language like chef, where you can describe your infrastructure's desired end state.
  • Terraform. HashiCorp Terraform is the most popular open-source tool for infrastructure automation. It uses a declarative approach to define the required infrastructure as code.

Resource Manager

Resource Manager is an Oracle Cloud Infrastructure service that allows you to automate the process of provisioning your Oracle Cloud Infrastructure resources. Resource Manager is based on open source Terraform software which allows you to work with popular industry standard tools and to deploy your infrastructure anywhere.

Resource Manager simplifies the process of creating and managing the declarative code needed to manage resources by including the Terraform Provider, which provides components that connect Terraform to the any of the OCI services that you want to manage.

Where can I learn more?

If you're interested in learning more about infrastructure as code and how Oracle's Resource Manager can help you automate your environment configurations, watch the Oracle Cloud Infrastructure Resource Manager: Overview video, which introduces you to the Resource Manager service.

To get hands on with the Resource Manager service, check out our solution playbook, Set up the basic infrastructure required for a cloud environment, in our Architecture Center for a glimpse at how easy it is to get started using Resource Manager.

For more advanced uses, check out our automated reference architectures for a machine learning platform on Autonomous Data Warehouse and how to deploy Container Engine for Kubernetes with Autonomous Transaction Processing in the cloud.

~sn

Shea Nolan