Meet Infrastructure as Code

Maybe you have already heard the terms “Programmable Infrastructure” and “Infrastructure as code”.  But even if you have not, if you are interested in DevOps it’s something you need to know.   Most new lingo causes me to roll my eyes.  But in this case, it’s not just new lingo, it’s an entirely new concept. Besides making the nerdy feel cool when they say it, these terms describe a new idea of what an application consists of. Oh great yet another term for something we have done for years.  Often I decide to use a term just to stay relevant, so I start calling the “Web” the “Cloud” just so I can have a conversation with someone about it. Sometimes I surprise myself and fully latch onto a term after I spend time getting to know it, and what it really means.  But rarer yet do I find terminology that really makes me re-think how things are done. Programmable Infrastructure and Infrastructure as Code are such terms.

infrastructureascode

Infrastructure as Code visualized

OK, maybe it’s not entirely new

The idea of automating things is not new.  Hell I’ve been using BAT files and more recently PowerShell scripts to do all sorts of things on my infrastructure for many years now.  But when this automation meets virtalization, and languages especially designed to describe the orchestration of infrastructure.  We are not just talking about re-packaging technologies and calling them something new.  We are talking about a whole new concept that will change who does it, how they do it, and how effective they can be. So what is Programmable Infrastructure?  Programmable Infrastructure and Infrastructure as code are synonymous.  I learned of “Programmable Infrastructure” from an analyst at Gartner, which I suspect is the origin, and “Infrastructure as code” from the land of blogs.  The later uses an “as ______” which seems to be the magic recipe for creating a new term these days.  What they both mean is that, instead of manually configuring infrastructure you can write scripts to do it.  But not just scripts, you can actually fully incorporate the configuration in your applications code. This has been possible for a long time, but it has been limited. You almost always hit a wall on the types of things you can do. But new tools such as Vagrant, Ansible, Docker, Chef, and Puppet either independently or when combined together make it possible to do just about anything you could do manually, automatically with the infrastructure layer, and operating system layer.  Even once you have created the infrastructure you can use these tools to run yet more scripts, even your trusty old BAT and ps1 files on what you just built.  It’s a kind of reflection for infrastructure orchestration.

Full control for the Developer

One could argue that this is just configuration management.  And in a sense it is, just fully automated.  But there is another big difference.  It also means that the developer can do it all.  Where as in the past all this orchestration and automation belonged to the sysadmin, now the developer at the very least has to advise, but in many cases fully take over the process.  Making the relationship to application code and the infrastructure it runs on even tighter, almost indistinguishable. Now the developer can not only write the applications code, they can write the infrastructure that the code runs on.  It’s not un-common in the web development world to see developers creating things like a “deploy.php” which lays out infrastructure for the entire application to run on.  The script starts with creation of VMs and ends with a pull request from a source repository. My current opinion is that the organization should form a small team responsible for these scripts, as the developers time should be spent on bug fixes and enhanced functionality.  But in any case there cannot be such a divide between IT and development to make this work.

Show me the value

Despite all the benefits of efficiency, and repeat-ability that you get with configuration management. Infrastructure as code offers  other things. First of, Essentially the scripts can serve also as documentation for the applications infrastructure.  This is a great side benefit.  Because you have put the effort to create the scripts, its nice that it also reads like a network diagram for your infrastructure.  Perhaps someone can take this to the next step and actually create laymen friendly content, diagrams and documents, from the scripts. Next because everything is initiated from the scripts you have a consistent place to start all deployments from.  So you know that each deployment comes with the same flavor of infrastructure.  This is the idea, but in practice I’ve seen many organizations pollute their scripts by running them on existing infrastructure, or making manual modifications to the configuration after the automation has run, and not being consistent about doing so. It also builds in infrastructure independence.  Done correctly the scripts can be run on any cloud, public, private, hybrid, who cares.  Once the world of software defined networks SDNs dominates the physical world of routers, there wont just be 90% independence it will be 100%. This independence is powerful for organizations to avoid cloud Lock-In and/or increase redundancy by running on multiple clouds.  Not only that different use cases can be run on specific clouds.  For example there could be an integration testing cloud that is separate from the production cloud which is separate from say a beta-release cloud. And finally because it’s repeatable, deployments can be more then just copying of assets and running code.  Deployments can be the infrastructure as well.  So with every deploy there is a new set of infrastructure that the code is deployed on.  This avoids contamination.  Helps QA avoid the “It worked on my machine” problem. And allowing the full suite of tests unit to integration to functional to be run on brand new instances of infrastructure.  Which has the added benefit of being able to snapshot complete deployments, code and infrastructure, where issues occur.  Instead of sending cryptic screenshots and text bug descriptions. To make it even more interesting most of the public clouds themselves all now have limited, or full blown REST based APIs that allow you to code against their Cloud.  So I can make a REST call to my production cloud to spin up a front-end and database server, right before I do a pull from github to those servers.

A new set of challenges

There are a few gaps preventing Infrastructure as Code / Programmable Infrastructure from being the norm.  They are:

  1. Still limited on the Microsoft Stack.  The full world of flexibility comes with Linux infrastructure.  While there is a lot of possibilities with the Microsoft stack , it’s still only say 40% there.  This is due to the closed nature of Windows, but also the lack of interest to create tools specific to it.  However when you talk about Azure PaaS it’s a different story.  It’s safe to say that if you are interested in Programmable Infrastructure for the Microsoft Stack you are going to pay more, and you will face new sort of lock-in using VIX with VMWare  or System Center Operations Manager SCOM for orchestration.
  2. Multi-tier applications make the scripting exponentially more complex.  And adding networking and security as a component can make it a nightmare.  When you start dealing with networked VMs and the setup and security of vLANs things get complex quickly when it comes to scripting out their deployments.  A vLAN can very easily be treated like a VM itself, but the orchestration languages do not have robust enough support for them today to make it a full solution.  The trend I see is finding ways to remove this variable from the applications system architecture.
  3. Infrastructure for the infrastructure tools has to be thought of first.   It’s a weird problem to have.  You have to figure out where and how your various orchestration tools are going to run, which requires infrastructure, or infrastructure planning to do.  Chicken or egg, and so on. And sometimes it is really annoying to plan out the hyper-visor, installing agents on VMs, having security and access to create VMs, etc.  This can be as simple as a small organizational change, or picking the right VM Templates on Azure or AWS.  While other times development teams just lacks the means to use the tools they want too.
  4. The various tools still require specialization.  Today all the tools that are available require a lot of effort to learn how they work, the syntax of their language, etc.  This is often too large of a barrier for many organizations to spend time and money on.
  5. When applications are all PaaS or combination of PaaS and infrastructure either in the cloud or on-prem, it becomes harder to make all encompassing scripts, and you have to consider several scripts.  This brings the added problem of combining their execution together.

These are the areas where I expect dramatic improvement in the market over the next two years.  And i’m confident that it will all become easier.  Eventually you will be surprised to hear that anyone is manually configuring any infrastructure. When I first started getting into virtualization, I was fond of saying “now whole machines are just documents”.  And really this is all an application is as well, a collection of files, and the files have instructions that are executed in some order. So eventually the idea that an applications code and the infrastructure it runs on are separate things, is out the window. Everything is all inclusive I’m not sure if it will end up being “Programmable Infrastructure”, or “Infrastructure as Code”. But I do know the idea that applications can now contain the infrastructure they run on furthers the movement of DevOps and builds in a lot more flexibility than every thought possible.

Comments

28 responses to “Meet Infrastructure as Code”

  1. […] perhaps understated term is infrastructure as code (if you define infrastructure as used in IaaS). It essential to implementing your platform as an […]

  2. […] as code https://devopsy.kinsta.cloud/blogs/meet-infrastructure-code  , […]

  3. […] journée pour parler du DevOps et ses origines, puis pratiquer de l'IaaC ("Infrastructure as a Code"), Continuous Delivery (déploiement continu) et du Monitoring. Pour finalement terminer sur le rôle […]

  4. […] specifies their hardware profile, and lets you boot, reboot or terminate them at will. This takes infrastructure as code to a new […]

  5. […] dés que possible un outil d’Infrastructure As A Code. A titre personnel je recommande Ansible car SSH suffit pour le faire […]

  6. […] infrastructure is seen as code and handled as an application changes to the infrastructure, are immediately integrated and tested, […]

  7. Rechly parker Avatar

    thanks for this crucial information.

  8. […] things like Jenkins, Ansible, Chef, Puppet, SaltStack, and even tools like Hubot, and concepts like Infrastructure as Code and Test Driven Development and ChatOps. These tools have been a godsend to many a system […]

  9. Nick Wallace Avatar
    Nick Wallace

    Wow!!! This was a very
    MIND-BLOWING Read!!! You have conceptualized everything that I have been
    thinking of for years as I’ve been building my career around Infrastructure
    Virtualization!!! I am getting into DevOps conversations with many
    organizations these days, and everything you described IS THE FUTURE. Whether
    its 5 years or 10 years from now, this methodology will be spreading across
    many Enterprise IT organizations forcing IT professionals to adopt or die!!!
    …and in turn, many Startups will be building their IT org with this
    methodology in place, out the gate. It took VMware about 10 years before it was
    over 50% adopted world wide, this just proves the evolution. Now with Bi-Modal
    concepts, 3rd Platform and Next Gen Apps being developed, the days of the
    Infrastructure Admin manually provisioning and systems integrating are
    numbered. This can also be procured and purchased with Converged
    Infrastructure, then augmented with Infrastructure as Code to support DevOps.
    Check out things that HashiCorp are doing with Vagrant, Terraform & Atlas.

  10. […] Today I set out to build a multi-container service with Docker.  I needed to create a WordPress blog backed by mariaDB and fronted by nginx.  The tool for this job is docker-compose.  This tool fits the DevOps philosophy of infrastructure as code. […]

  11. […] am a firm believer in the concept of Infrastructure as Code. I do think technologies such as Chef and Windows PowerShell Desired State Configuration (DSC) will […]

  12. […] The automated development environments allowed the Ops team to share the configuration with developers in a way developers were used to seeing. This is often referred to as Infrastructure as Code https://devopsy.kinsta.cloud/2014/05/05/meet-infrastructure-code/. […]

  13. […] I still remember when in 2005, at the Portuguese Ministry of Justice we needed more servers to handle BAU and a provider could only supply within 2 to 3 weeks and had to send some spare kit for us to cope with demand, and it took 3 days to rack it up. Now we can do that in seconds and with code. […]

  14. […] requirements of applications and workloads.   Evidence of this need is the growing desire for “infrastructure as code” within the DevOps […]

  15. Mike Rosado Avatar

    Good article, but a lot has changed since that article was written 2 years ago. For example, Microsoft, Mark Russinovich and Jeffrey Snover have made great strides partnering up with a LOT of open source and just to name a few such as Chef Software, Puppet Labs, Inc., SaltStack, different flavors of Linux distros, etc… So think Chris Riley ☁ should consider updating or re-writing this article… Just my .02¢ worth… 😉

  16. […] devopsy.kinsta.cloud: Meet Infrastructure as Code […]

  17. […] of immemorial bash and bat files, Infrastructure as code incorporates new configuration capabilities to application code. With tools like Vagrant, Docker, […]

  18. […] Infrastructure as Code has defined the last five years of systems engineering, and will likely define the next five. But as we became better and better at manipulating infrastructure with declarative languages, we started to look beyond JSON to find more full-fledged, dynamic programming languages to create and configure cloud resources. […]

  19. […] source configuration management system dating back to 1993, laid the groundwork, while devopsy.kinsta.cloud introduced its readers to the concept back in May 2014. But what does the landscape look like in […]

  20. […] increased sophistication of cloud consumption and operation. Emerging trends around Microservices, Infrastructure as Code (IAS), DevOps, Hybrid Cloud Management, Software Defined Everything, and IT Operational Analytics are […]

  21. […] the conceptualization of what infrastructure will be in the future is emerging. Programmable infrastructure or infrastructure as code is a game changer for developers. This technology, which has been […]

  22. […] enterprises the ability to deploy and run service stacks in a matter of minutes. The notion of Infrastructure as Code (IAC)  allows modern IT organizations to deploy complete resource stacks and complex network topologies, […]

  23. […] for devopsy.kinsta.cloud, market analyst Chris Riley explained that this consistency helps organizations avoid potential issues like software performance varying between developers, QA and operations team because they're […]

  24. […] the conceptualization of what infrastructure will be in the future is emerging. Programmable infrastructure or infrastructure as code is a game changer for developers. This technology, which has been […]

  25. […] 11https://devopsy.kinsta.cloud/meet-infrastructure-code/ […]

  26. […] for devopsy.kinsta.cloud, market analyst Chris Riley explained that this consistency helps organizations avoid potential issues like software performance varying between developers, QA and operations team because they're […]

  27. […] 11https://devopsy.kinsta.cloud/meet-infrastructure-code/ […]

Leave a Reply