{"id":672,"date":"2017-07-26T06:52:52","date_gmt":"2017-07-26T06:52:52","guid":{"rendered":"http:\/\/www.scmgalaxy.com\/tutorials\/2017\/07\/26\/top-questions-on-server-configuration-management-tools-chef-puppet-and-ansible\/"},"modified":"2021-11-19T05:56:16","modified_gmt":"2021-11-19T05:56:16","slug":"top-questions-on-server-configuration-management-tools-chef-puppet-and-ansible","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/top-questions-on-server-configuration-management-tools-chef-puppet-and-ansible\/","title":{"rendered":"Top Interview Questions on Server Configuration Management Tools Chef, Puppet, and Ansible"},"content":{"rendered":"<p style=\"box-sizing: border-box; margin: 0px 0px 10px; font-size: 15px; color: #3b3b3b; font-family: Roboto, sans-serif;\"><span style=\"box-sizing: border-box;\"><span style=\"color: #3b3b3b; font-family: Roboto, sans-serif;\"><span style=\"font-size: 15px;\"><strong>Source &#8211; <a href=\"http:\/\/hub.scalr.com\/blog\/top-questions-on-server-configuration-management-tools-chef-puppet-and-ansible-2\" target=\"_blank\" rel=\"noopener\">http:\/\/hub.scalr.com\/blog\/top-questions-on-server-configuration-management-tools-chef-puppet-and-ansible-2<\/a><\/strong><br>\n<\/span><\/span><br>\n<span style=\"color: #3b3b3b; font-family: Roboto, sans-serif;\"><span style=\"font-size: 15px;\">As a quick recap, configuration management tools enable companies to standardize and automate their infrastructure. Through standardization, you can build systems that are platform independent (i.e. instead of relying on AMIs or provider specific toolsets). These tools also make it easy reproduce servers for scaling or testing, and recover from disaster quickly by defining a proper application state. For example, if servers are not in that defined state when each server is checked, they are restored to their proper state. In addition, this standardization makes it easy to onboard new developers.<\/span><\/span><\/span><\/p>\n<p style=\"box-sizing: border-box; margin: 0px 0px 10px; font-size: 15px; color: #3b3b3b; font-family: Roboto, sans-serif;\"><span style=\"box-sizing: border-box;\">While the language across configuration management tools is different, the concepts are the same. At the fundamental level in each configuration tool, a&nbsp;<\/span><span style=\"box-sizing: border-box; font-weight: bold;\">resource&nbsp;<\/span><span style=\"box-sizing: border-box;\">represents a part of the system and its desired state, such as a package that should be installed, a service that should be running, or a file that should be generated.<\/span><span style=\"box-sizing: border-box;\"><br style=\"box-sizing: border-box;\"><\/span><span style=\"box-sizing: border-box;\"><br style=\"box-sizing: border-box;\"><\/span><span style=\"box-sizing: border-box;\">In Chef, a&nbsp;<\/span><span style=\"box-sizing: border-box; font-weight: bold;\">recipe<\/span><span style=\"box-sizing: border-box;\">&nbsp;is a collection of resources that describes a particular configuration or policy. These collections are called&nbsp;<\/span><span style=\"box-sizing: border-box; font-weight: bold;\">playbooks<\/span><span style=\"box-sizing: border-box;\">&nbsp;in Ansible, and&nbsp;<\/span><span style=\"box-sizing: border-box; font-weight: bold;\">manifests&nbsp;<\/span><span style=\"box-sizing: border-box;\">in Puppet. These collections describe everything that is required to configure part of a system.&nbsp;<\/span><span style=\"box-sizing: border-box; font-weight: bold;\">Collections<\/span><span style=\"box-sizing: border-box;\">&nbsp;install and configure software components, manage files, deploy applications, and execute other recipes.&nbsp;<\/span><span style=\"box-sizing: border-box;\">We go into more detail in our blog post&nbsp;<a style=\"box-sizing: border-box; color: #5bc0de; background-color: transparent; outline: 0px;\" href=\"https:\/\/www.scalr.com\/blog\/chef-vs-puppet-vs-ansible-comparing-leading-cloud-configuration\/orchestration-systems\" target=\"_blank\" rel=\"noopener noreferrer\" data-internal=\"false\">here<\/a>.<\/span><\/p>\n<p style=\"box-sizing: border-box; margin: 0px 0px 10px; font-size: 15px; color: #3b3b3b; font-family: Roboto, sans-serif;\"><span style=\"box-sizing: border-box; font-weight: bold;\">Here are the top questions we got from the community:<\/span><\/p>\n<p style=\"box-sizing: border-box; margin: 0px 0px 10px; font-size: 15px; color: #3b3b3b; font-family: Roboto, sans-serif;\"><span style=\"box-sizing: border-box; font-weight: bold;\">How is the concept of master\/agent configuration better (or not) than agentless, when it comes to infrastructure as code?<\/span><\/p>\n<p style=\"box-sizing: border-box; margin: 0px 0px 10px; font-size: 15px; color: #3b3b3b; font-family: Roboto, sans-serif;\"><span style=\"box-sizing: border-box;\">Chef and Puppet are master\/agent configuration systems, while Ansible is an agentless system. The historic argument is that the agent-based installation process is difficult &#8211; &nbsp;you have to set up the master, and then set up the agents on your nodes so that they know about the master. If you\u2019ve got servers with diverse linux distros, on different versions of Windows, etc., installation can get tricky. Though, because they\u2019re logging every few minutes, agent-based systems are powerful for advanced monitoring. At the end of the day this really is based on personal preference and what company requires. If your infrastructure is beefy and heavily standardized, installation on nodes isn\u2019t complicated so use agent-based systems. If you have servers that run Python, try agentless.<\/span><\/p>\n<p style=\"box-sizing: border-box; margin: 0px 0px 10px; font-size: 15px; color: #3b3b3b; font-family: Roboto, sans-serif;\"><span style=\"box-sizing: border-box; font-weight: bold;\">Are these configuration management systems like&nbsp;<span style=\"box-sizing: border-box;\">MicroSoft System Center Configuration Manager (SCCM)<\/span>&nbsp;but used for local and cloud?<\/span><\/p>\n<p style=\"box-sizing: border-box; margin: 0px 0px 10px; font-size: 15px; color: #3b3b3b; font-family: Roboto, sans-serif;\"><span style=\"box-sizing: border-box;\">This is like MS SCCM, but open-source and paid for per node. For those who haven\u2019t used it, MicroSoft System Center Configuration Manager (SCCM) is used for infrastructure provisioning, monitoring, and automating workflow processes (usually sysadmin stuff). SCCM is a powerhouse in the enterprise space. While it can manage end clients on non-Windows servers, the server console portion of SCCM must be hosted and run on a Windows server machine. The reason other orchestration\/configuration systems win here is that you pay on a per-node basis and you\u2019re not totally tied into Windows Server\u2019s licensing agreements. In other words, open-source vs proprietary. And with Chef\/Puppet\/Ansible the thinking is more in resources as opposed to SCCM, which is more in files and terminal commands.<\/span><\/p>\n<p style=\"box-sizing: border-box; margin: 0px 0px 10px; font-size: 15px; color: #3b3b3b; font-family: Roboto, sans-serif;\"><span style=\"box-sizing: border-box;\"><span style=\"box-sizing: border-box; font-weight: bold;\">An attendee&nbsp;commented on using SCCM<\/span>:<\/span><\/p>\n<p style=\"box-sizing: border-box; margin: 0px 0px 10px; font-size: 15px; color: #3b3b3b; font-family: Roboto, sans-serif;\">&nbsp;<span style=\"box-sizing: border-box;\">\u201c<em style=\"box-sizing: border-box;\">We really like Ansible because of the none-agent requirement. For Windows patching we utilize System Center Configuration Manager, and even though System Center can provide patching to Linux we have run into issues with SCCM agent staying healthy and running on our Linux systems. We have also run into when the SCCM admins have made changes it broke SCCM agent on a majority of our Linux servers. Our Linux patching process has been highly manual up to this point but we are seeking to automate this to free up staff time to be better directed at other support tasks, which is why were are reviewing several solutions. The non-agent aspect is highly desirable in our situation because of past experience with SCCM agent. I just wanted to provide that feedback so others that have not experienced agent issues with other deployment solutions may want to keep that in mind<\/em>.\u201d<\/span><\/p>\n<p style=\"box-sizing: border-box; margin: 0px 0px 10px; font-size: 15px; color: #3b3b3b; font-family: Roboto, sans-serif;\"><span style=\"box-sizing: border-box; font-weight: bold;\">If we have to pick a tool dependent on whether we deploy&nbsp;on cloud or&nbsp;on-premise &#8211; which of these tools would be a better choice?<\/span><\/p>\n<p style=\"box-sizing: border-box; margin: 0px 0px 10px; font-size: 15px; color: #3b3b3b; font-family: Roboto, sans-serif;\"><span style=\"box-sizing: border-box;\">We would recommend looking into network access requirements for each tool. If you have an agent that checks in periodically with a central master management piece, that is likely to work better then SSH which requires direct path \/ path through lots of proxies.&nbsp;<\/span><\/p>\n<p style=\"box-sizing: border-box; margin: 0px 0px 10px; font-size: 15px; color: #3b3b3b; font-family: Roboto, sans-serif;\"><span style=\"box-sizing: border-box;\">One attendee mentioned in the comments: &#8220;[In regards to]&nbsp;<em style=\"box-sizing: border-box;\">SSH vs Agent &#8211; Agent is more secure where SSH not an option.<\/em>\u201d<\/span><\/p>\n<p style=\"box-sizing: border-box; margin: 0px 0px 10px; font-size: 15px; color: #3b3b3b; font-family: Roboto, sans-serif;\"><span style=\"box-sizing: border-box; font-weight: bold;\">What happened to cfengine? This tool used to be mentioned alongside Chef and Puppet.&nbsp;<\/span><span style=\"box-sizing: border-box;\"><br style=\"box-sizing: border-box;\"><\/span><span style=\"box-sizing: border-box;\">Version 3 of cfengine is a complete revamp, but it compared to other configuration management tools the brand and community outreach isn\u2019t strong, and does little the others don&#8217;t do better.<\/span><span style=\"box-sizing: border-box;\"><br style=\"box-sizing: border-box;\"><br style=\"box-sizing: border-box;\"><\/span><\/p>\n<p style=\"box-sizing: border-box; margin: 0px 0px 10px; font-size: 15px; color: #3b3b3b; font-family: Roboto, sans-serif;\"><span style=\"box-sizing: border-box; font-weight: bold;\">How does StackStorm compare to the other orchestrators being reviewed?<\/span><span style=\"box-sizing: border-box;\"><br style=\"box-sizing: border-box;\"><\/span><span style=\"box-sizing: border-box;\">StackStorm labels itself more of an&nbsp;<em style=\"box-sizing: border-box;\">automation platform<\/em>, or a DevOps workflow tool that handles provisioning and configuring servers but also leans on automatic and event driven services that plugs into Jenkins and other CI\/CD workflows.<\/span><\/p>\n<p style=\"box-sizing: border-box; margin: 0px 0px 10px; font-size: 15px; color: #3b3b3b; font-family: Roboto, sans-serif;\"><span style=\"box-sizing: border-box;\">From one&nbsp;attendee that had used all three: \u201cFor us, getting the Server engineers to adopt Chef has been very difficult. It grew organically on the Dev side of the house. Ansible appears to be something that guys without Dev skills could pick up more easily. Just [my] perception.\u201d<\/span><\/p>\n<p style=\"box-sizing: border-box; margin: 0px 0px 10px; font-size: 15px; color: #3b3b3b; font-family: Roboto, sans-serif;\"><span style=\"box-sizing: border-box; font-weight: bold;\">Can I run tasks in parallel with Ansible rather than running it serially (say 50 servers being updated with a patch)?<\/span><\/p>\n<p style=\"box-sizing: border-box; margin: 0px 0px 10px; font-size: 15px; color: #3b3b3b; font-family: Roboto, sans-serif;\"><span style=\"box-sizing: border-box;\">The default method is to run each task across all servers in parallel, meaning that it will run the first task (e.g. installing Git) on all servers in a group, and once all servers respond with a success, failure, or unchanged response, Ansible will move to the next task on all servers. It doesn\u2019t run on a server, wait, move on to the next, it will run on all servers at once over SSH. If you want to deploy updates in batches, you can run a percentage of servers in a group (e.g. 50%, by listing it in the playbook as serial: 50%).<\/span><\/p>\n<p style=\"box-sizing: border-box; margin: 0px 0px 10px; font-size: 15px; color: #3b3b3b; font-family: Roboto, sans-serif;\"><span style=\"box-sizing: border-box;\">An attendee&nbsp;made this comment as we mentioned Ansible:<\/span><\/p>\n<p style=\"box-sizing: border-box; margin: 0px 0px 10px; font-size: 15px; color: #3b3b3b; font-family: Roboto, sans-serif;\"><span style=\"box-sizing: border-box;\">\u201c<em style=\"box-sizing: border-box;\">I have attended a presentation from RedHat regarding Ansible that states [that Ansible scales well]. They have large scale hosting companies that on the fly spin up servers and perform patching for their servers via Ansible. The one mentioned had over 50,000 servers and it seemed to handle the volume \/ scale fine. I of course don\u2019t know everything about Puppet or Chef or Salt, but one thing I find really nice about Ansible is the ability to perform rolling updates \/ tasks. So if you say had 1000 servers you can say you want to run 10% or 100 at a time and keep it rolling until all 1000 are done. It can be stated by percentage or defined number&#8230;I am sure I sound a bit biased but one of the main reasons Ansible is high on our list right now is the fact that it is agentless and does not really consume resources<\/em>.\u201d<\/span><\/p>\n<p style=\"box-sizing: border-box; margin: 0px 0px 10px; font-size: 15px; color: #3b3b3b; font-family: Roboto, sans-serif;\"><span style=\"box-sizing: border-box; font-weight: bold;\">With Ansible, how can we handle the&nbsp;security implications about allowing passwordless ssh to a root account on all systems? What mechanisms are there for access control and auditing?<\/span><\/p>\n<p style=\"box-sizing: border-box; margin: 0px 0px 10px; font-size: 15px; color: #3b3b3b; font-family: Roboto, sans-serif;\"><span style=\"box-sizing: border-box;\">There are definitely security implications if you are going to allow passwordless ssh. So it\u2019s on the company to ensure that security groups or NSGs are well defined. We should also mention that the passwordless ssh is only enabled on the machine you are running Ansible commands and playbooks from, so if anything consider that workstation to be your weak point. Make sure SSH access is only permissible through your IP. As an alternative solution to connecting via SSH, if you use docker, Ansible allows you to deploy playbooks directly into Docker containers using the local Docker client. All you need is a user inside that container.<\/span><\/p>\n<p style=\"box-sizing: border-box; margin: 0px 0px 10px; font-size: 15px; color: #3b3b3b; font-family: Roboto, sans-serif;\"><span style=\"box-sizing: border-box; font-weight: bold;\">Does ansible run single-threaded or is it addressing multiple servers in a group asynchronously?<\/span><span style=\"box-sizing: border-box;\"><br style=\"box-sizing: border-box;\"><\/span><span style=\"box-sizing: border-box;\">Ansible runs on each host in parallel. This means that it attempts to run your tasks on all servers defined at the top of the playbook before moving on to the next task.<\/span><\/p>\n<p style=\"box-sizing: border-box; margin: 0px 0px 10px; font-size: 15px; color: #3b3b3b; font-family: Roboto, sans-serif;\"><span style=\"box-sizing: border-box;\">One user said in regards to all three tools: \u201c<em style=\"box-sizing: border-box;\">Ansible seems better for &#8220;orchestration&#8221; and Puppet\/Chef are really good for &#8220;Configuration Management&#8221;. &nbsp;Ansible can be used to stop applications and databases and then run Puppet and then start applications and databases.<\/em>\u201d<\/span><\/p>\n<p style=\"box-sizing: border-box; margin: 0px 0px 10px; font-size: 15px; color: #3b3b3b; font-family: Roboto, sans-serif;\"><span style=\"box-sizing: border-box; font-weight: bold;\">Lastly, we got a surprise question from the audience on Jenkins, a CI\/CD pipeline tool that can be used in conjunction with tools like Chef to completely automate the infrastructure behind your applications.<\/span><\/p>\n<p style=\"box-sizing: border-box; margin: 0px 0px 10px; font-size: 15px; color: #3b3b3b; font-family: Roboto, sans-serif;\"><span style=\"box-sizing: border-box; font-weight: bold;\">What is the alternative of Jenkins?<\/span><span style=\"box-sizing: border-box;\"><br style=\"box-sizing: border-box;\"><\/span><span style=\"box-sizing: border-box;\">While we recommend Jenkins, If you\u2019re a Ruby shop, Capistrano is geared towards your deployments. If you live in the AWS world, you can try using the CodeCommit\/CodeDeploy\/CodePipeline toolset. If you\u2019re looking for a provider agnostic solution, CircleCI is great. If your workflows revolve around Atlassian, try Bamboo.&nbsp;<\/span><span style=\"box-sizing: border-box;\"><br style=\"box-sizing: border-box;\"><\/span><\/p>\n<p style=\"box-sizing: border-box; margin: 0px 0px 10px; font-size: 15px; color: #3b3b3b; font-family: Roboto, sans-serif;\"><span style=\"box-sizing: border-box;\">If you are unsure of what CI\/CD pipeline tool to use, or how they work, we will be hosting a webinar on Jenkins as part of our on-going series on infrastructure-as-code.<\/span><\/p>\n\n<div class=\"epyt-gallery\" data-currpage=\"1\" id=\"epyt_gallery_54172\"><figure class=\"wp-block-embed wp-block-embed-youtube is-type-video is-provider-youtube epyt-figure\"><div class=\"wp-block-embed__wrapper\"><iframe loading=\"lazy\"  id=\"_ytid_71589\"  width=\"760\" height=\"427\"  data-origwidth=\"760\" data-origheight=\"427\" src=\"https:\/\/www.youtube.com\/embed\/?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=0&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=1&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;\" class=\"__youtube_prefs__  no-lazyload\" title=\"YouTube player\"  data-epytgalleryid=\"epyt_gallery_54172\"  allow=\"fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen data-no-lazy=\"1\" data-skipgform_ajax_framebjll=\"\"><\/iframe><\/div><\/figure><div class=\"epyt-gallery-list\"><div>Sorry, there was a YouTube error.<\/div><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>Source &#8211; http:\/\/hub.scalr.com\/blog\/top-questions-on-server-configuration-management-tools-chef-puppet-and-ansible-2 As a quick recap, configuration management tools enable companies to standardize and automate their infrastructure. Through standardization, you can build systems that are platform independent (i.e. instead of relying on AMIs or provider specific toolsets). These tools also make it easy reproduce servers for scaling or testing, and recover from disaster quickly&#8230;<\/p>\n","protected":false},"author":1,"featured_media":2876,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","_joinchat":[],"footnotes":""},"categories":[2],"tags":[639,641,407,159,482,638,637,640],"class_list":["post-672","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorised","tag-ansible","tag-answers","tag-chef","tag-puppet","tag-questions","tag-server-configuration-management-tools","tag-top","tag-top-questions"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/672","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=672"}],"version-history":[{"count":3,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/672\/revisions"}],"predecessor-version":[{"id":25759,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/672\/revisions\/25759"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media\/2876"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=672"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=672"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=672"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}