Infrastructure as code(IaC).

DevOps and Infrastructure as code;

Infrastructure as code is the way to manage your infrastructure in DevOps way. IaC is just a key DevOps practice, using the best software engineering practices to manage the infrastructure, getting benefits from automation, tests and management.

IaC is just an essential DevOps practice, using the best software engineering methods to address the Infrastructure.

Automation fear;

Lots of people get scared when start the automation process, which is normal! Don’t get desperate, it’s a part of the process, slowly will change your life. Do not look into the automation process as a problem or a glitch maker, but as a future time saver.

History (Different ages);

The history os IaC bring us old times, in the old times we have a thing called “Iron Age”. We had:

  • Physical Hardware;
  • Provisioning was painful and take too much time to get things done.
  • We had too many concerns, opening tickets with different teams, to enable sufficient power, routers, Ethernet cabling etc.
  • It was often hard to do not to go into the manual process, getting configuration mistakes, and more trouble.

And then we got into the “clouds”, which is called “Cloud Age

  • Everything is virtualized
  • Provision is pretty easy and fast, a few minutes and we get a service done.
  • Automation is almost an obligation, easy to bring automation.
  • Scale-Up or Scale-Down, Scale-In, or Scale-Out. All in minutes. we can bring 20… 30 servers, we can add memory or processors in just a few minutes.

Iron Age vs Cloud Age:

TopicIron AgeCloud Age
CostHighLow
ChangesCraziness momentsCool let’s learn!
OpportunitiesNever try, It can break!Let’s Improve.. And FAST!
DeliverLarge batches and testing on the flySmall changes, let’s test it again.
ReleasesLongShort
ArchitectureMonolithicMicroservices
ConfigurationGUI or PhysicalConfiguration as code

Three core practices for infrastructure as code;

  • Define everything as code – All stuff should be as code, then you can make change fast and reliably. When you define everything as code you should get Re-usability, Consistency, Transparency.
  • Continuously validate all work in progress – We should use automation to deploy and test each system component of their system. Here we can see two DevOps process:
    • Continuous Integration (CI) – involves merging and testing everyone’s code throughout development.
    • Continuous Delivery (CD) – takes this further, keeping the merged code always production-ready.
  • Build small, simple pieces that you can change independently – To reduce complexity and make the system more reliable. You gonna get a system:
    • A large system its harder to change and breaks easily.
    • An extensive network its harder to change and breaks easily.
    • Easy to make maintenance.
    • Easy to understand.

Full IAC example.

The best infrastructure as code book: https://amzn.to/3kNfRjt