Answers: <p>Generally, things like Packer and Terraform handle most straight infra requirements best in the cloud.  Of course, if you have kubernetes up already, it’s the same deal.  A packer (or other AMI) image and a docker image are both similar in that they can/should be configured to come up ready for use.</p>
  <p>Ansible can still be useful though.  As much as we’d all like to avoid it, it is hard to get rid of 100% of long running servers.  Ansible is helpful to manage servers already around.  Some people also like it for the same kind of thing you would script bash for sometimes; it can be cleaner and more extensible.</p>
  <p>In cloud there are other options though.  You could happily use AWS SSM for anything you’d use ansible for (and SSM has way more options).</p>
  
Answers: CC BY-SA 4.0
Answers: 2022-05-09T21:57:15.607Z
Answers: Thank you! And SSM seems interesting, I'll read further on it. I'd upvote this post, but I need 15 reputation and unfortunately don't have it yet...
Answers: user34926
Answers: CC BY-SA 4.0
Answers: 2022-05-09T22:03:45.030Z
Answers: All good =).  And welcome to stack exchange!
Answers: John Humphreys
Answers: CC BY-SA 4.0
Answers: 2022-05-09T14:16:01.063Z
Answers: 2022-05-09T22:02:23.803Z
Answers: 2022-05-09T22:02:23.803Z
Answers: John Humphreys
Answers: <h1>What value does Ansible have in a modern cloud environment?</h1>
  <p>As the comments say, it depends on your needs.  But I think there is value in considering this sort of thing, so I'm going to answer this from two angles.  I've spent the last dozen years working in large scale cloud environments and I've seen ansible used for all sorts of weird yet handy things.</p>
  <h2>Does ansible make sense in the example you cited?</h2>
  <p>Your guide from  Dhruvin Soni is using ansible to manage which services are running in your kubernetes environment.  This is a problem that should be solved with some tool. I would not try to maintain all of my kubernetes services with a shell script.  I'm a fan of the shell, but building a bespoke solution for this seems like a waste of time.</p>
  <p>So we have a problem and we need a tool.  Is ansible a good tool for this? I'd say yes.  I haven't seen it used that way in any of the places I've worked, but I wouldn't object to maintaining the state of kubernetes this way.</p>
  <p>If you're looking for something more cloud-native then I'd recommend <a href="https://kustomize.io/" rel="nofollow noreferrer">kustomize</a>.  They even describe themselves as &quot;Kubernetes native configuration management&quot; and it provides features for patching your YML configs to add tags, namespaces, or whatever you need.  This sort of power is definitely handy when managing complex kubernetes environments.</p>
  <h2>Does ansible still have a place in modern cloud environments?</h2>
  <p>So let's say you're using kustomize or Argo to manage your kubernetes environments.  Wouldn't that eliminate the need for ansible?  Not necessarily.  I've seen a few places that ansible would still be a good tool to choose:</p>
  <ol>
  <li>You're going to want to build your own docker images to run in the cloud and ansible is a perfectly valid and helpful tool for being able to get those built.</li>
  <li>Maintaining developer desktop environments.  This is like the old servers as pets model.  The developer doesn't want to lose all of their files every time there is an upgrade.  Running ansible works fine in Macs or Windows or Linux and can act differently in those OS's where needed.</li>
  <li>Almost everybody has some legacy servers or some service they're managing outside of the &quot;modern cloud&quot;.  Ansible is still a great choice for the legacy stuff.</li>
  </ol>
  
Answers: CC BY-SA 4.0
Answers: 2022-05-09T21:58:07.750Z
Answers: Thank you chicks! This is super helpful. Wish I can upvote this post, but I need 15 reputation and unfortunately don't have it yet...
Answers: user34926
Answers: CC BY-SA 4.0
Answers: 2022-05-10T00:08:31.803Z
Answers: You have more rep now that you've accepted an answer and got another upvote on your question.  :). Welcome to DevOps StackExchange.
Answers: chicks
Answers: CC BY-SA 4.0
Answers: 2022-05-08T14:28:40.633Z
Answers: 2022-05-08T14:28:40.633Z
Answers: chicks
Body: <p>Configuration management tools like Ansible, Chef, Puppet, and Saltstack allows us to configure a cluster of blank machines to help install and deploy an application. For example, with Ansible, we can set up a cluster of newly provisioned compute servers to e.g. install a specific version of Go, edit O.S. properties, or modify the firewall.</p>
  <p>Are these tools still needed in today's world where we have cloud providers that offer managed k8s, docker registries, and machine images for us? For example, on AWS:</p>
  <ul>
  <li>We can configure an OS environment manually once and save it as an AMI, then simply just use this AMI for the cluster. Alternatively, we can just use Fargate.</li>
  <li>The Docker image will contain all needed dependencies, and will also have an entrypoint to run the application itself.</li>
  <li>Managed k8s like EKS mean we don't have to worry about setting up the control plane, and updating the cluster is as simple as issuing a kubectl command to the control plane.</li>
  </ul>
  <p>Assuming one uses EKS + ECR + something like Terraform to provision the resources, what value would Ansible, Chef, etc. provide? Why would we want to include them into our stack? Or does modern cloud services make them unneccesary?</p>
  <p>My question is inspired from <a href="https://medium.com/geekculture/how-to-deploy-the-kubernetes-application-to-aws-eks-using-terraform-and-ansible-7679a3a207a8" rel="nofollow noreferrer">this guide</a>, which recommends using EKS + Terraform + Ansible... but the Ansible playbook is just 2 kubectl commands that can just be replaced by a shellscript, right? Why introduce an entirely new technology in our stack?</p>
  
Comments: CC BY-SA 4.0
Comments: 2022-04-19T15:35:55.507Z
Comments: It seems for me this question leads to option based answers only, as everything will depend on the environment, tools available, staff, experience and so on. "_Why introduce an entirely new technology in our stack?_", if you have other tools available with which you are more familiar, there would be no need for. You may just use your tools available to achieve your goals.
Comments: U880D
Comments: CC BY-SA 4.0
Comments: 2022-04-20T04:39:38.040Z
Comments: @U880D if you are claiming that "configuration management tools are not necessary with EKS, and the only reason you would use them is if you are already familiar with them and it's easier for you", then that is the valid answer I am looking for. I want to confirm that there is no critical necessity that I am missing, and that it is only due to preference.
Comments: user34926
Comments: CC BY-SA 4.0
Comments: 2022-04-23T13:04:06.417Z
Comments: There is never ever any critical necessity to use a specific tool if you don't want to. I can summarize your entire question as: "I don't think using Ansible has any advantage, am I right ?" which is clearly opinion based as reported above by @U880D, hence off topic. See if you can rephrase your question to make it on-topic
Comments: Zeitounator
Comments: CC BY-SA 4.0
Comments: 2022-04-30T03:23:24.623Z
Comments: @Zeitounator  From a beginner in this space who is just trying to learn when to use or not use configuration management tools along with EKS, what would be a better way to phrase the question? "When should we use CMT along with EKS"? "What are the advantages of using CMT along with EKS"? I tried searching for guides, but none of them explain it directly. They either only show the CMT solution, or only show the non-CMT solution, and never explain the trade-offs or comparisons of using the CMT approach vs the non-CMT approach.
Comments: user34926
Comments: CC BY-SA 4.0
Comments: 2022-05-01T10:20:50.233Z
Comments: `When should we use CMT along with EKS?` <= when you feel like you need them and they have an added value in your workflow. If you have the impression they are not useful in your specific case, just don't. There is actually no way to clearly answer this question with facts as you will probably get one different answer per person giving an answer.
Comments: Zeitounator
Comments: CC BY-SA 4.0
Comments: 2022-05-01T21:50:42.803Z
Comments: @Zeitounator right... and I'm trying ask what value CMT gives so that I "feel like I need them and they have added value in my workflow". Is deploying using K8s on EKS with custom AMIs not specific enough for you to give an answer? If no, then it would be helpful to share some factors to consider then. Does programming language matter? Complexity of the app? Do you not see how unhelpful your replies are to a new beginner? "What value does CMT give" -> "ask a different way". "OK, when would we use CMT?" -> "when it gives value". "OK, so what value does CMT give" -> "ask a different way"?
Comments: user34926
Tags: <kubernetes><ansible><configuration-management><infrastructure-as-code><eks>
Title: Why use configuration management tools in the world of modern cloud?
UserDisplayName: user34926
ThreadText: # Why use configuration management tools in the world of modern cloud?
  
  (Asked by: username_0 on 2022-04-16)
  
  Configuration management tools like Ansible, Chef, Puppet, and Saltstack allows us to configure a cluster of blank machines to help install and deploy an application. For example, with Ansible, we can set up a cluster of newly provisioned compute servers to e.g. install a specific version of Go, edit O.S. properties, or modify the firewall.
  
  Are these tools still needed in today's world where we have cloud providers that offer managed k8s, docker registries, and machine images for us? For example, on AWS:
  
  * We can configure an OS environment manually once and save it as an AMI, then simply just use this AMI for the cluster. Alternatively, we can just use Fargate.
  * The Docker image will contain all needed dependencies, and will also have an entrypoint to run the application itself.
  * Managed k8s like EKS mean we don't have to worry about setting up the control plane, and updating the cluster is as simple as issuing a kubectl command to the control plane.
  
  Assuming one uses EKS + ECR + something like Terraform to provision the resources, what value would Ansible, Chef, etc. provide? Why would we want to include them into our stack? Or does modern cloud services make them unneccesary?
  
  My question is inspired from [this guide](https://medium.com/geekculture/how-to-deploy-the-kubernetes-application-to-aws-eks-using-terraform-and-ansible-7679a3a207a8), which recommends using EKS + Terraform + Ansible... but the Ansible playbook is just 2 kubectl commands that can just be replaced by a shellscript, right? Why introduce an entirely new technology in our stack?
  
  **Tags:** kubernetes, ansible, configuration-management, infrastructure-as-code, eks
  
  > **Comments:**
  > **username_1**: It seems for me this question leads to option based answers only, as everything will depend on the environment, tools available, staff, experience and so on. "_Why introduce an entirely new technology in our stack?_", if you have other tools available with which you are more familiar, there would be no need for. You may just use your tools available to achieve your goals.  
  > **username_0**: @username_1 if you are claiming that "configuration management tools are not necessary with EKS, and the only reason you would use them is if you are already familiar with them and it's easier for you", then that is the valid answer I am looking for. I want to confirm that there is no critical necessity that I am missing, and that it is only due to preference.  
  > **username_2**: There is never ever any critical necessity to use a specific tool if you don't want to. I can summarize your entire question as: "I don't think using Ansible has any advantage, am I right ?" which is clearly opinion based as reported above by @username_1, hence off topic. See if you can rephrase your question to make it on-topic  
  > **username_0**: @username_2  From a beginner in this space who is just trying to learn when to use or not use configuration management tools along with EKS, what would be a better way to phrase the question? "When should we use CMT along with EKS"? "What are the advantages of using CMT along with EKS"? I tried searching for guides, but none of them explain it directly. They either only show the CMT solution, or only show the non-CMT solution, and never explain the trade-offs or comparisons of using the CMT approach vs the non-CMT approach.  
  > **username_2**: `When should we use CMT along with EKS?` <= when you feel like you need them and they have an added value in your workflow. If you have the impression they are not useful in your specific case, just don't. There is actually no way to clearly answer this question with facts as you will probably get one different answer per person giving an answer.  
  > **username_0**: @username_2 right... and I'm trying ask what value CMT gives so that I "feel like I need them and they have added value in my workflow". Is deploying using K8s on EKS with custom AMIs not specific enough for you to give an answer? If no, then it would be helpful to share some factors to consider then. Does programming language matter? Complexity of the app? Do you not see how unhelpful your replies are to a new beginner? "What value does CMT give" -> "ask a different way". "OK, when would we use CMT?" -> "when it gives value". "OK, so what value does CMT give" -> "ask a different way"?  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_4 on 2022-05-08. Score: 3 | Accepted answer
  
  # What value does Ansible have in a modern cloud environment?
  
  As the comments say, it depends on your needs. But I think there is value in considering this sort of thing, so I'm going to answer this from two angles. I've spent the last dozen years working in large scale cloud environments and I've seen ansible used for all sorts of weird yet handy things.
  
  ## Does ansible make sense in the example you cited?
  
  Your guide from Dhruvin Soni is using ansible to manage which services are running in your kubernetes environment. This is a problem that should be solved with some tool. I would not try to maintain all of my kubernetes services with a shell script. I'm a fan of the shell, but building a bespoke solution for this seems like a waste of time.
  
  So we have a problem and we need a tool. Is ansible a good tool for this? I'd say yes. I haven't seen it used that way in any of the places I've worked, but I wouldn't object to maintaining the state of kubernetes this way.
  
  If you're looking for something more cloud-native then I'd recommend [kustomize](https://kustomize.io/). They even describe themselves as "Kubernetes native configuration management" and it provides features for patching your YML configs to add tags, namespaces, or whatever you need. This sort of power is definitely handy when managing complex kubernetes environments.
  
  ## Does ansible still have a place in modern cloud environments?
  
  So let's say you're using kustomize or Argo to manage your kubernetes environments. Wouldn't that eliminate the need for ansible? Not necessarily. I've seen a few places that ansible would still be a good tool to choose:
  
  1. You're going to want to build your own docker images to run in the cloud and ansible is a perfectly valid and helpful tool for being able to get those built.
  2. Maintaining developer desktop environments. This is like the old servers as pets model. The developer doesn't want to lose all of their files every time there is an upgrade. Running ansible works fine in Macs or Windows or Linux and can act differently in those OS's where needed.
  3. Almost everybody has some legacy servers or some service they're managing outside of the "modern cloud". Ansible is still a great choice for the legacy stuff.
  
  > **Comments:**
  > **username_0**: Thank you username_4! This is super helpful. Wish I can upvote this post, but I need 15 reputation and unfortunately don't have it yet...  
  > **username_4**: You have more rep now that you've accepted an answer and got another upvote on your question.  :). Welcome to DevOps StackExchange.  
  
  ---
  
  ### Answer by username_3 on 2022-05-09. Score: 3
  
  Generally, things like Packer and Terraform handle most straight infra requirements best in the cloud. Of course, if you have kubernetes up already, it’s the same deal. A packer (or other AMI) image and a docker image are both similar in that they can/should be configured to come up ready for use.
  
  Ansible can still be useful though. As much as we’d all like to avoid it, it is hard to get rid of 100% of long running servers. Ansible is helpful to manage servers already around. Some people also like it for the same kind of thing you would script bash for sometimes; it can be cleaner and more extensible.
  
  In cloud there are other options though. You could happily use AWS SSM for anything you’d use ansible for (and SSM has way more options).
  
  > **Comments:**
  > **username_0**: Thank you! And SSM seems interesting, I'll read further on it. I'd upvote this post, but I need 15 reputation and unfortunately don't have it yet...  
  > **username_3**: All good =).  And welcome to stack exchange!  
  
  ---
  
  