Infrastructure as Code DevOps principle: meaning, benefits, use cases

What is DevOps in general?

DevOps principles: Infrastructure as Code, Continuous Integration and Continuous Delivery

  1. Infrastructure as Code is the practice of describing all software runtime environment and networking settings and parameters in simple textual format, that can be stored in your Version Control System (VCS) and versioned on request. These text files are called manifests and are used by DevOps tools like Terraform and Kubernetes to automatically provision and configure build servers, testing, staging and production environments.
    Most importantly, all these operations are traceable through the VCS, which ensures the removal of decades-old “works fine on my computer” problem, where the code that worked in testing does not work in production. IaC ensures continuity, as all the environments are provisioned and configured automatically, with no room for human error, which greatly speeds up and simplifies the software development and infrastructure operations.
  2. Continuous Integration is another huge difference from the Waterfall model. Instead of working on new features in separate Git branches and merging them before release, all the developers always work on the same project trunk and integrate their code into it immediately after passing the tests. This way, every new successfully tested code commit becomes essentially a new product version and is ready for release.
    This allows the technology giants like Google, Facebook, Amazon and Microsoft update their products and offers nearly instantly, sometimes hundreds times a day. But this technology is not exclusive to the industry leaders, and any company can use the tools like Gitlab CI, CircleCI, Jenkins, Ansible or AWS Pipeline — if they have the required expertise at hand. CI shortens the time-to-market dramatically, sometimes speeding it up by more than 80%, as compared to Waterfall development. CI is based on IaC, as only due to rapid provisioning and configuration of the required environments the developers are able to produce and test code quickly and integrate it in the main project trunk successfully, without ever jeopardizing the product performance or delivery roadmaps.
  3. Continuous Delivery is the form of workflow implementation, where the output of the previous stage of software development life cycle becomes the input of the next stage automatically, based on scripts and tooling features. Thus said, when the developers commit a new batch of code, this action automatically spans a new build instance, where a new app version begins to pass the unit and integration tests. If the tests are successful, the new code version moves to the staging server, where the QA engineer performs the high-level testing — regression, functional, user acceptance and other methods.
    If the staging server tests are successful, the new product version is deployed to production systems using the practice of rolling updates or in-app updates, without ever interrupting the product availability, so the end-user experience is strictly positive. This is done using CircleCI, Jenkins, Ansible, AWS Pipeline, Google App Engine or any other cloud-specific or open-source tools fitting the requirements of your project. CD is based on IaC and CI, as these tools and approaches allow configuring so-called “CI/CD pipelines”, namely the fully-automated processes of rapidly deploying and configuring all the environments required to move the code from the commit to release to production.

IaC benefits for your business

  1. Immutable infrastructure. As all the environments are provisioned using automated manifests and CI/CD pipelines, there is no room for human error, This ensures system uniformity throughout the whole delivery process and removes the risk of configuration drift — a situation where different servers develop different configurations and software versions due to manual updates performed at various occasions over time.
  2. Deployment speed. DevOps tools working with virtualized infrastructure provide immense increase in environment provisioning and configuration speed. We are not talking about 30% here, we are talking about shortening the server delivery time from hours to seconds…
  3. Change management. Due to versioning the manifests and using identical environments throughout the whole software development process, it is easy to configure exactly the needed environment. This is crucial in speeding up bug fixing, which helps ensure quality and security of the resulting code.
  4. High scalability. When using Terraform and Kubernetes manifests and working with virtualized cloud resources, additional app instances can be provisioned with ease and in literally no time. They can also be freed up as soon as they are not needed, ensuring unparalleled cost-efficiency.
  5. Shorter feedback loops. Due to being able to deploy infrastructure rapidly, your developers will be able to develop new features more quickly in response to customer feedback. And when a customer feedback turns into a new feature in a couple of weeks, not a year — customer satisfaction skyrockets through the roof!

Use cases of IaC in real life projects

  • We described the usefulness of IaC approach for software development life cycle above. When the environments are uniform across the whole cycle, the chances of bugs arising are much lower, as well as the time required for deployment and configuration of all the required environments. Build, testing, staging and production environment deployments will be repeatable, predictable and error-free.
  • Cloud infrastructure management using IaC means that all actions that can be automated will be automated. In this case, multiple scenarios emerge, where provisioning and configuring the system components with Terraform and Kubernetes helps save time, money and effort. All kinds of tasks, from database backups to new feature releases can be done faster and better.
  • Finally, cloud monitoring, logging and alerting tools also need to run in some environments and deliver new system components. Solutions like ELK stack, FluentD, SumoLogic, Datadog, Prometheus + Grafana — all of these can be quickly provisioned and configured for your project using IaC best practices.

Final thoughts on Infrastructure as Code DevOps principle



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store