{"id":123979,"date":"2020-12-01T16:00:27","date_gmt":"2020-12-01T13:00:27","guid":{"rendered":"https:\/\/en.buradabiliyorum.com\/what-is-infrastructure-as-code-cloudsavvy-it\/"},"modified":"2020-12-01T16:00:27","modified_gmt":"2020-12-01T13:00:27","slug":"what-is-infrastructure-as-code-cloudsavvy-it","status":"publish","type":"post","link":"https:\/\/buradabiliyorum.com\/en\/what-is-infrastructure-as-code-cloudsavvy-it\/","title":{"rendered":"#What Is Infrastructure as Code? \u2013 CloudSavvy IT"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_84 counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-6a2f89d1d6ae8\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #dd3333;color:#dd3333\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #dd3333;color:#dd3333\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-6a2f89d1d6ae8\" checked aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/buradabiliyorum.com\/en\/what-is-infrastructure-as-code-cloudsavvy-it\/#How_Does_Infrastructure_as_Code_Work\" >How Does Infrastructure as Code Work?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/buradabiliyorum.com\/en\/what-is-infrastructure-as-code-cloudsavvy-it\/#Using_Infrastructure_as_Code\" >Using Infrastructure as Code<\/a><\/li><\/ul><\/nav><\/div>\n<p><strong>&#8220;#What Is Infrastructure as Code? \u2013 CloudSavvy IT&#8221;<\/strong><\/p>\n<div id=\"article-content-area\">\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3586\" src=\"https:\/\/www.cloudsavvyit.com\/thumbcache\/0\/0\/3f9a0331cc52c4ba16459aea6f511c25\/p\/uploads\/2020\/01\/68353483.png\" alt=\"\" width=\"700\" height=\"300\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>Managing IT infrastructure is a hard job, but in recent years cloud providers have been making it easier to automate every aspect of a sysadmin\u2019s life. Infrastructure as Code is the next step: defining all of your services in a configuration file which can be tracked through source control.<\/p>\n<h2 role=\"heading\" aria-level=\"2\"><span class=\"ez-toc-section\" id=\"How_Does_Infrastructure_as_Code_Work\"><\/span>How Does Infrastructure as Code Work?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Infrastructure as Code (IaC) is pretty simple in theory. All of your server deployments, cloud services, and their associated configuration are all stored in one centrally modifiable configuration file or set of configuration files, usually YAML or something similar. Each configuration file contains the necessary instructions and directives to recreate your entire cloud solution from scratch.<\/p>\n<p>This core principle means that modifications to this infrastructure can be tracked with source control. Want to launch a new server? You\u2019ll need to modify your deployment config and push an update. If something goes wrong, you can always revert to an earlier version of your deployment, which can be very useful for high availability systems where a misconfigured deployment can cost a lot of money.<\/p>\n<p>This means IaC is very all-or-nothing. It\u2019s not a good idea to run IaC alongside manually managed deployments, though you certainly can do so, especially if the systems are separate.<\/p>\n<p>In practice, infrastructure as code is quite complicated. If you thought regular sysadmining was a difficult job, converting your entire deployment to IaC will not be a simple task. But, once you\u2019ve done the hard part of setting it up, maintaining your deployment and making changes becomes much easier. No longer will all of your deployment settings live in your sysadmin\u2019s head\u2014with IaC, it\u2019s all clearly defined in code.<\/p>\n<p>And, since it\u2019s all defined in code, you can also easily automate the process of running development, staging, testing, and production environments. This way, you can test changes to your entire deployment before updating. You could even automate IaC unit tests if you desired.<\/p>\n<p>While it\u2019s quite complicated to set up, the benefits for larger projects certainly outweigh the potential headaches.<\/p>\n<h2 role=\"heading\" aria-level=\"2\"><span class=\"ez-toc-section\" id=\"Using_Infrastructure_as_Code\"><\/span>Using Infrastructure as Code<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Naturally, codifying your entire infrastructure can be an arduous process. You don\u2019t always have to create the YAML template manually though; AWS\u2019s <a rel=\"nofollow noopener noreferrer\" target=\"_blank\" href=\"https:\/\/aws.amazon.com\/cloudformation\/?tag=reviewgeek-20\">CloudFormation<\/a> IaC solution features a web based \u201cDesigner,\u201d which will display your whole product stack visually. For example, here is one of the sample templates, for an autoscaling, load balanced WordPress deployment using an RDS instance as the database.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3574\" src=\"https:\/\/www.cloudsavvyit.com\/thumbcache\/0\/0\/acf4c1609a0962192cb1290f0c1cdbed\/p\/uploads\/2020\/01\/dbd7d149.png\" alt=\"cloudformation wordpress instance\" width=\"700\" height=\"400\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>Each individual node requires configuring, but in the end, it will produce a template file that you can use to create the whole deployment from.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3577\" src=\"https:\/\/www.cloudsavvyit.com\/thumbcache\/0\/0\/f5f7fd922a2180a9a44009c2e55e0380\/p\/uploads\/2020\/01\/dbd7d149-1.png\" alt=\"cloudformation sample template\" width=\"700\" height=\"369\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>The exact implementation will vary depending on provider, but AWS CloudFormation will handle creating all resources in the proper order. For example, if you have an EC2 instance with a security group, CloudFormation will make sure to create the security group first, and then create the instance with that security group. All you have to do is link them together in the console.<\/p>\n<p>For more information on CloudFormation, you can read our guide to getting started with it.<\/p>\n<p><strong>RELATED:<\/strong> <strong><em>Codify Your AWS Infrastructure With CloudFormation<\/em><\/strong>\n<\/div>\n<blockquote><p><strong><span style=\"color: #ff6600;\">If you liked the article, do not forget to share it with your friends. Follow us on\u00a0<span style=\"color: #ff0000;\"><a style=\"color: #ff0000;\" href=\"https:\/\/news.google.com\/publications\/CAAqBwgKMLG0nwswvr63Aw\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Google News<\/a><\/span>\u00a0too, click on the star and choose us from your favorites.<\/span><\/strong><\/p><\/blockquote>\n<blockquote>\n<p style=\"text-align: center;\">For forums sites go to <span style=\"color: #ff9900;\"><a style=\"color: #ff9900;\" href=\"https:\/\/forum.buradabiliyorum.com\/\" target=\"_blank\" rel=\"noopener noreferrer\">Forum.BuradaBiliyorum.Com<\/a><\/span><\/strong><\/p>\n<\/blockquote>\n<blockquote>\n<p style=\"text-align: center;\"><strong>If you want to read more like this article, you can visit our <span style=\"color: #ff9900;\"><a style=\"color: #ff9900;\" href=\"https:\/\/en.buradabiliyorum.com\/technology\/\" target=\"_blank\" rel=\"noopener noreferrer\">Technology category.<\/a><\/span><\/strong><\/p>\n<\/blockquote>\n<p><span style=\"color: black;\"><a style=\"color: #ff9900;\" href=\"https:\/\/www.cloudsavvyit.com\/8290\/what-is-infrastructure-as-code\/\" target=\"_blank\" rel=\"noopener noreferrer\">Source<\/a><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#8220;#What Is Infrastructure as Code? \u2013 CloudSavvy IT&#8221; Managing IT infrastructure is a hard job, but in recent years cloud providers have been making it easier to automate every aspect of a sysadmin\u2019s life. Infrastructure as Code is the next step: defining all of your services in a configuration file which can be tracked through&#8230;<\/p>\n","protected":false},"author":1,"featured_media":123980,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"fifu_image_url":"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2020\/01\/68353483.png","fifu_image_alt":"","footnotes":""},"categories":[18],"tags":[],"class_list":["post-123979","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technology"],"_links":{"self":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts\/123979","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/comments?post=123979"}],"version-history":[{"count":0,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts\/123979\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/media\/123980"}],"wp:attachment":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/media?parent=123979"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/categories?post=123979"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/tags?post=123979"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}