Alexandra Ferguson
2013-Jun-03 16:17 UTC
[Puppet Users] Puppet Tutorial: Learning - Manifests
Fellow Puppet Users, I was assigned to learn how puppet works to integrate it into our department and I am trying to go through the tutorial. I am a beginner in IT work and am slowly starting to understand these processes. Right now I am stuck on the last part of the Manifests tutorial, found at the bottom of this page: http://docs.puppetlabs.com/learning/manifests.html. I am on the first exercise, where it instructs the user to write and apply a manifest to install tge Apache package (httpd), then make sure the Apache service (also httpd) is running. I feel as if I am on the right track, but after hours of googling and research, I was pulled in a few different directions. If anyone could explain this in as detailed and simple of a way possible to help me through this, it would be extremely appreciated. Attempt 1: # /root/learning-manifests/1.apache.pp package {‘httpd’: ensure => latest, } Service {httpd’: ensure => stopped, enable => false, } Attempt 2: # /root/learning-manifests/2.apache.pp package {‘apache’: ensure => present, } service {‘httpd’: ensure => running, } Attempt 3: # /root/learning-manfiests/3.apache.pp class {‘apache’: } -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Ellison Marks
2013-Jun-03 17:30 UTC
[Puppet Users] Re: Puppet Tutorial: Learning - Manifests
Attempt 2 is on the right track. What OS are you on and what error messages in particular are you running into? On Monday, June 3, 2013 9:17:35 AM UTC-7, Alexandra Ferguson wrote:> > Fellow Puppet Users, > > I was assigned to learn how puppet works to integrate it into our > department and I am trying to go through the tutorial. I am a beginner in > IT work and am slowly starting to understand these processes. Right now I > am stuck on the last part of the Manifests tutorial, found at the bottom of > this page: http://docs.puppetlabs.com/learning/manifests.html. > > I am on the first exercise, where it instructs the user to write and apply > a manifest to install tge Apache package (httpd), then make sure the Apache > service (also httpd) is running. I feel as if I am on the right track, but > after hours of googling and research, I was pulled in a few different > directions. If anyone could explain this in as detailed and simple of a way > possible to help me through this, it would be extremely appreciated. > > > Attempt 1: > > # /root/learning-manifests/1.apache.pp > > > > package {‘httpd’: > > ensure => latest, > > } > > Service {httpd’: > > ensure => stopped, > > enable => false, > > } > > > > Attempt 2: > > # /root/learning-manifests/2.apache.pp > > > > package {‘apache’: > > ensure => present, > > } > > service {‘httpd’: > > ensure => running, > > } > > > > Attempt 3: > > # /root/learning-manfiests/3.apache.pp > > > > class {‘apache’: } > > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Nick Fagerlund
2013-Jun-03 18:47 UTC
[Puppet Users] Re: Puppet Tutorial: Learning - Manifests
Hi Alexandra, Attempt 2 is on the right track. The thing to keep in mind here is that the package and service types both rely on the platform''s own naming conventions, so you''ll often have to do a bit of research when you''re first starting to automate a new service or whatever. In this case, you must find out what names your target platform uses for the Apache package, and the Apache service. On CentOS, I believe they''re both called "httpd", so in that case, your package resource currently has the wrong title. (On Debian-like systems, I think the package and service names are "apache2" instead.) Also, there''s a 50% chance that the manifest you''re writing will fail on the first run and then succeed on the second run, so be ready for that. The reason for this is covered in the NEXT learning puppet chapter, "Ordering." Good luck, N -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Alexandra Ferguson
2013-Jun-04 13:16 UTC
[Puppet Users] Re: Puppet Tutorial: Learning - Manifests
Thank you for the help, I got it after changing ''apache'' to ''httpd''. I''m still working on seeing the whole picture and learning command line as I go. I really appreciate it. On the ssh_authorized_key! On Monday, June 3, 2013 1:47:43 PM UTC-5, Nick Fagerlund wrote:> > Hi Alexandra, > > Attempt 2 is on the right track. > > The thing to keep in mind here is that the package and service types both > rely on the platform''s own naming conventions, so you''ll often have to do a > bit of research when you''re first starting to automate a new service or > whatever. In this case, you must find out what names your target platform > uses for the Apache package, and the Apache service. On CentOS, I believe > they''re both called "httpd", so in that case, your package resource > currently has the wrong title. (On Debian-like systems, I think the package > and service names are "apache2" instead.) > > Also, there''s a 50% chance that the manifest you''re writing will fail on > the first run and then succeed on the second run, so be ready for that. The > reason for this is covered in the NEXT learning puppet chapter, "Ordering." > > Good luck, > N > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Francisco Reyes
2013-Jun-08 17:26 UTC
[Puppet Users] Re: Puppet Tutorial: Learning - Manifests
On Tuesday, June 4, 2013 9:16:59 AM UTC-4, Alexandra Ferguson wrote: Thank you for the help, I got it after changing ''apache'' to ''httpd''. I''m still working on seeing the whole picture and learning command line as I go. I really appreciate it. On the ssh_authorized_key! I am learning puppet myself and I have found that looking for ready made modules to look how others have done helps. It is specially interesting to see the different approaches that different people take to the same module (i.e. apache). Also may want to look at these two URLs: https://github.com/puppetlabs http://forge.puppetlabs.com Modules in the forge you can install with: puppet module install ModuleName Modules in github you would have to download. Notice that sometimes modules have dependencies. If you use puppet module install it tries to pull in dependencies for you. Getting code from github you can look at the file Modulefile for dependencies. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.