{"id":285,"date":"2014-01-20T19:23:00","date_gmt":"2014-01-20T19:23:00","guid":{"rendered":"https:\/\/questy.org\/?p=285"},"modified":"2024-09-26T19:09:13","modified_gmt":"2024-09-26T19:09:13","slug":"puppet-i-server-installation","status":"publish","type":"post","link":"https:\/\/questy.org\/index.php\/2014\/01\/20\/puppet-i-server-installation\/","title":{"rendered":"Puppet I &#8211; Server Installation"},"content":{"rendered":"\n<p>Ok, so you\u2019re interested in this whole Puppet thing, and you want to get a full install in your test environment, or on a set of VMs to work and play with the product. &nbsp;PuppetLabs has a ton of really cool documentation, and you should certainly avail yourself of it, but I wanted to give you a quick \u201ccookbook\u201d style set of instructions to get you rolling.<\/p>\n\n\n\n<p><strong>Puppet Master<\/strong><\/p>\n\n\n\n<p>There is a lot of documentation surrounding the Puppet Master installation at Puppet Labs, but I find a bit of obfuscation when trying to parse through the huge pile of meat that is there, when all we\u2019re looking for is the best of it\u2026 you know, the bacon. &nbsp;\ud83d\ude42<\/p>\n\n\n\n<p><strong><em>Puppet Code Repository &amp; Package Source<\/em><\/strong><\/p>\n\n\n\n<p>Puppet Labs provides a myriad of repositories and methods by which to install Puppet. &nbsp;I tend to stick with the main PuppetLabs repository whenever possible. &nbsp;I also tend to like RedHat derivatives, so I\u2019ll be talking about RHEL here, but the same applies to CentOS, Scientific Linux, and other RHEL \u201cchildren\u201d in the ecosystem. &nbsp;In short, if you\u2019re using something else other than RHEL, you may find yourself hunting packages and repos that contain packages you\u2019ll need that the repositories I list here have by default. &nbsp;As with any web-based documentation, YMMV.<\/p>\n\n\n\n<p><em><strong>Installing the Puppet Master<\/strong><\/em><\/p>\n\n\n\n<p>First, you\u2019ll need a functioning Installation of RHEL upon which to install and configure Puppet. &nbsp;I like to include only the \u201cBase Install\u201d and take the \u201cDefaults\u201d when doing a \u201cspecial purpose\u201d server, as it doesn\u2019t muddy the waters and it gives you the cleanest slate possible upon which to build your Puppet platform.<\/p>\n\n\n\n<p><em><strong>Enabling the RHEL Yum Repo<\/strong><\/em><\/p>\n\n\n\n<p>As I\u2019m sure you\u2019re aware, to use RedHat\u2019s repositories, you have to register and have active a subscription with RedHat. &nbsp;To do a simple connection\/attachment to the RedHat repositories, I\u2019ve found a mixture of success with the Subscription Manager. &nbsp;However, by performing the following commands (some are redundant), I\u2019ve been able to get the configuration working with 100% reliability:<\/p>\n\n\n\n<p><em><strong>sudo subscription-manager register<\/strong><\/em>&nbsp;<em><strong>sudo subscription-manager auto-attach<\/strong><\/em>&nbsp;<em><strong>sudo subscription-manager attach \u2013auto<\/strong><\/em>&nbsp;<em><strong>sudo subscription-manager refresh<\/strong><\/em><\/p>\n\n\n\n<p>Obviously, this is a RedHat topic, and not a Puppet one, so if you\u2019re having issues with this process, contact Redhat for help. &nbsp;The crux of this, however, is to just register your instance.<\/p>\n\n\n\n<p><em><strong>Installing the Puppet Labs Software Repository<\/strong><\/em><\/p>\n\n\n\n<p>Since I\u2019m working with the current 6.10 release of Puppet, the package you need to install can be added by running:<\/p>\n\n\n\n<p>_**sudo rpm -ivh&nbsp;<a href=\"https:\/\/yum.puppetlabs.com\/el\/6\/products\/x86_64\/puppetlabs-release-6-10.noarch.rpm**_\">https:\/\/yum.puppetlabs.com\/el\/6\/products\/x86_64\/puppetlabs-release-6-10.noarch.rpm**_<\/a><\/p>\n\n\n\n<p>This will install the current 6.10 release of the Puppet repo from which we can continue with the Puppet Master installation.<\/p>\n\n\n\n<p><em><strong>Enabling Additional Packages<\/strong><\/em><\/p>\n\n\n\n<p>Next, we need to have the \u201coptional\u201d set of packages from RedHat and the development packages from Puppet Labs. &nbsp;There are two ways to do this. &nbsp;First, you can edit each repo file in \/etc\/yum.repos.d (red hat.repo and puppet labs.repo respectively) and change the \u201cenable\u201d flag on each repository from \u201c0\u201d to \u201c1\u201d, or you can simply run the provided RedHat Yum configuration manager tool to do it for you as follows.<\/p>\n\n\n\n<p><em><strong>sudo yum -y install yum-utils sudo yum-config-manager \u2013enable rhel-6-server-optional-rpms<\/strong><\/em>&nbsp;<em><strong>sudo yum-config-manager \u2013enable puppetlabs-devel<\/strong><\/em><\/p>\n\n\n\n<p><em><strong>Get Current!<\/strong><\/em><\/p>\n\n\n\n<p>Bring your current host completely up to date by querying the repositories and running the yum updater:<\/p>\n\n\n\n<p><strong><em>sudo yum -y update<\/em><\/strong><\/p>\n\n\n\n<p>As I\u2019m sure you\u2019re aware, depending on the updates released since the current major version of your repositories, the update time can vary from very short to quite some time. &nbsp;Just be patient and get up to date before proceeding.<\/p>\n\n\n\n<p><em><strong>Install the Puppet Prerequisite Packages<\/strong><\/em><\/p>\n\n\n\n<p>This step name is a&nbsp;<em>bit<\/em>&nbsp;of a misnomer in that I am including a ton of packages that aren\u2019t necessary for a \u201cbase\u201d install of Puppet Server, but they do support later installations you may wish to do (like PuppetDB, Dashboard, Passenger, etc.). &nbsp;I just wanted to give a complete list so there\u2019s no after-installation required just to get moving with the next component. &nbsp;Simply install the following via Yum:<\/p>\n\n\n\n<p><em><strong>sudo yum -y install gcc libcurl-devel gcc-c++ openssl openssl-devel ruby-devel httpd httpd-devel &nbsp;mod_ssl policycoreutils-python apr-devel apr-utils-devel<\/strong><\/em><\/p>\n\n\n\n<p><em><strong>Prep Your Firewall<\/strong><\/em><\/p>\n\n\n\n<p>You may or may not be using the IPTables Firewall, but you\u2019ll want the following rule in place to support the Puppet Master port. &nbsp;Simply insert the following line into your&nbsp;<em>\/etc\/sysconfig\/iptables<\/em>&nbsp;file.<\/p>\n\n\n\n<p><em><strong>-A INPUT -m state \u2013state NEW -m tcp -p tcp \u2013dport 8140 -j ACCEPT<\/strong><\/em><\/p>\n\n\n\n<p>Note that if you intend to install the Puppet Dashboard as well, you can add that port here too.<\/p>\n\n\n\n<p><strong><em>-A INPUT -m state \u2013state NEW -m tcp -p tcp \u2013dport 3000 -j ACCEPT<\/em><\/strong><\/p>\n\n\n\n<p>Make sure you place your firewall rules in the appropriate place in the file. &nbsp;While outside the scope of this article, IPTables has an order and a format you should follow. &nbsp;You can find out more&nbsp;<a href=\"http:\/\/www.netfilter.org\">here<\/a>.<\/p>\n\n\n\n<p>Lastly, restart your firewall to pick up the new rules:<\/p>\n\n\n\n<p><em><strong>sudo service iptables reload<\/strong><\/em><\/p>\n\n\n\n<p><em><strong>Install Puppet Server<\/strong><\/em><\/p>\n\n\n\n<p>After all the above work, if you\u2019ve had no repository or package errors, your system should be ready to install Puppet Server. &nbsp;Simply run the following:<\/p>\n\n\n\n<p><em><strong>yum -y install puppet-server<\/strong><\/em><\/p>\n\n\n\n<p><em><strong>Conclusion<\/strong><\/em><\/p>\n\n\n\n<p>And that should be it. &nbsp;All packages installed, base RedHat updated with all the latest Ruby &amp; RedHat goodness, and the bad Puppet Server installed and ready for action.<\/p>\n\n\n\n<p>Next time: &nbsp;Installing the Puppet Client.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ok, so you\u2019re interested in this whole Puppet thing, and you want to get a full install in your test environment, or on a set of VMs to work and play with the product. &nbsp;PuppetLabs has a ton of really cool documentation, and you should certainly avail yourself of it, but I wanted to give [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[4],"tags":[],"class_list":["post-285","post","type-post","status-publish","format-standard","hentry","category-puppet-education"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_likes_enabled":true,"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/questy.org\/index.php\/wp-json\/wp\/v2\/posts\/285","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/questy.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/questy.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/questy.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/questy.org\/index.php\/wp-json\/wp\/v2\/comments?post=285"}],"version-history":[{"count":1,"href":"https:\/\/questy.org\/index.php\/wp-json\/wp\/v2\/posts\/285\/revisions"}],"predecessor-version":[{"id":286,"href":"https:\/\/questy.org\/index.php\/wp-json\/wp\/v2\/posts\/285\/revisions\/286"}],"wp:attachment":[{"href":"https:\/\/questy.org\/index.php\/wp-json\/wp\/v2\/media?parent=285"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/questy.org\/index.php\/wp-json\/wp\/v2\/categories?post=285"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/questy.org\/index.php\/wp-json\/wp\/v2\/tags?post=285"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}