Sunday, November 30, 2014

From DevOps to Puppet Part 2

In part 1, we have looked at DevOps, Configuration Management Tools and a little bit of Puppet.  In this post we will continue to look into other aspect of Puppet.

Declarative vs Imperative
One important thing to know about Puppet is that it is a Declarative Language.  What it means is that user only specify the end state of the system that it is trying to configure.  User does not need to know the system specific.  A Puppet manifest can be applied n number of times and if the end state is already in the desire state, nothing will happen.

Another equally popular Configuration Management Tool - Chef, however, is an imperative language where user write out how to achieve the end result.

Puppet Terminology
Puppet looks at everything as a resource where each resource describes some aspect of a system
  • The block of Puppet code that describes a resource is called a Resource Declaration.
  • Each resource has a type, a title and a set of attributes
Example of a resource will be
  • Linux package such as MongoDB
  • Files
  • Users on a system
  • Services such as /etc/host entries; network interface or Windows registers
Example of a resource declaration:
As we can see there are 3 "file" type but the title and attributes are different.  The first example creates a file /tmp/test1 with content "Hi'.  The second one creates a file /tmp/test2 and the security mode is set to 0644 and the third example creates a symlink /tmp/test3 which links to the file /tmp/test1

As mentioned before Puppet is a declarative language.  If the file /tmp/test1 already existed and with content "Hi", nothing will happen even if user execute the manifest 100 times because the desired end state is reached.

There are built-in types for Puppet:

image source: https://docs.puppetlabs.com/references/latest/type.html

If you do not find what you need from the built-in types, take a look a the Puppet Forge and chances are someone else had already did the job for you and had developed a type that you can use or similar to what your needs are.


A Puppet Manifest is a Puppet program with the .pp file extension that contains the resource declaration.These are some of the operation/command that we can have on a Puppet Manifest:

puppet parser validate configWebSrv.pp

puppet apply –-noop configWebSrv.pp

puppet apply configWebSrv.pp

puppet-lint configWebSrv.pp

The "noop" parameter is a very useful command where we can test out the manifest without actually performing the action and Puppet will respond with what is the outcome when this manifest is executed.

Puppet can operate on a standalone device or it can operate on a "Master and Agent" model where the Puppet agent will pull from the Puppet Master on a regular interval.  The default pulling interval is 30 minutes. For emergency application of new configuration, user can trigger the pulling and I believe Puppet Enterprise has the option to trigger the pulling on the console.

Manifest is complied into catalog which is in the format that the Puppet Agent understand.  Puppet will configure the resource according to the content of the catalog to the desired system state.

In a standalone model it works this way:
 image source: https://docs.puppetlabs.com/learning/images/manifest_to_defined_state_unified.png

In a "Master and Agent" model, the manifests are stored in the Puppet Master and periodically, the agent will poll from the Puppet Master if there is any configuration changes.  If necessary, we can trigger the poll manually instead of waiting for the next poll interval.
image source: https://docs.puppetlabs.com/learning/images/manifest_to_defined_state_split.png

The difference between a standalone and "Master and Agent" model is how the manifests are store and where the catalog is complied.

Currently under preview is the Puppet Server.  This is to replace the Puppet Master and is to have many advantages in this new model because of a complete re-design.

May be in Part 3 we can look into this new Puppet Server.

85 comments:

  1. Good Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one, keep blogging…
    Devops Online Training

    ReplyDelete
    Replies
    1. Great Post. You have shared useful information for DevOps professional to upgrade them self. Thank you.

      Best Devops Course in Chennai
      Best DevOps Training institute in Chennai

      Delete
  2. very informative post you have been shared. really nice blog. before i read this blog i didn't have any knowledge about this but now i got some knowledge about this.so keep on sharing such kind of an interesting blogs.
    Devops Training in Bangalore

    ReplyDelete
  3. Hello Admin,
    I really enjoyed while reading your article, the information you have mentioned in this post was damn good. Keep sharing your blog with updated and useful information.
    Regards,
    Devops Training in Chennai

    ReplyDelete
  4. The great service in this blog and the nice technology is visible in this blog. I am really very happy for the nice approach is visible in this blog and thank you very much for using the nice technology in this blog

    Devops Training in Marathahalli|
    Devops Training in Bangalore|

    ReplyDelete
  5. Hello Admin,
    I really enjoyed while reading your article, the information you have mentioned in this post was damn good. Keep sharing your blog with updated and useful information.
    Regards,

    Devops Training in Chennai

    ReplyDelete
  6. nice blog. thanks for sharing Devops Tutorials. It’s really Helpful for me.

    ReplyDelete
  7. At devops training online, we're fixated on making an incentive for the associations who believe us as the single hotspot for the learning.

    ReplyDelete
  8. Needed to compose you a very little word to thank you yet again regarding the nice suggestions you’ve contributed here"Oracle Training in Chennai".

    ReplyDelete
  9. BlueHost is the best hosting provider for any hosting plans you might need.

    ReplyDelete
  10. Good Information, Check it once through Devops Online Training For more information.

    ReplyDelete
  11. Thanks for providing such a great information about devops, i need exact details about who providing devops online training.

    ReplyDelete
  12. The writer of this blog is really very professional. Every single line of this article is well written. New use of vocabulary is a great effort. At the same time tense, indirect speech was also sued in good manner.Dell Network N Series

    ReplyDelete
  13. I really appreciate for you provide this blog to get knowledge on Devops Online Training Hyderabad

    ReplyDelete
  14. Thanks a lot for sharing this amazing knowledge with us on Devops Online Training

    ReplyDelete
  15. I believe there are many more pleasurable opportunities ahead for individuals that looked at your site.

    devops training in bangalore

    ReplyDelete
  16. You made some good points there. I did a search on the topic and found most people will agree with your blog.Devops Training Institute in Chennai

    ReplyDelete
  17. You have shared wonderful information with us, Thanks for sharing keep share. Check it once through Devops Online Training Hyderabad

    ReplyDelete
  18. Thanks for splitting your comprehension with us. It’s really useful to me & I hope it helps the people who in need of this vital information.
    Devops Training in Chennai

    Devops Training Institute in Chennai

    ReplyDelete
  19. Good information posted .Thanks for sharing information.
    Devops

    ReplyDelete
  20. Thanks for sharing valuable information with us, To get Knowledge on Devops Check Here once Devops Online Training

    ReplyDelete
  21. really cool post, highly informative and professionally written and I am glad to be a visitor of this perfect blog, thank you for this rare info!
    devops training in hyderabad

    ReplyDelete
  22. Thanks for posting the useful information to my vision. This is excellent information,.
    interview skills training in hyd

    ReplyDelete
  23. Thnq for sharing your ideas with is. Its very useful for me to develope my knowledge.Nice work keep going DevOps training in chennai

    ReplyDelete
  24. This comment has been removed by the author.

    ReplyDelete
  25. DevOps Certification Training Course will prepare you for a career in DevOps, the fast-growing field that bridges the gap between software developers and operations.

    Thanks for the information. The information you provided is very helpful for DevOps Training learners.

    ReplyDelete
  26. this blog providing good information To learn

    HTML PHP NodeJS Hadoop Training in Tarnaka Hyderabad

    contact: infotechiesguild@gmail.com



    ReplyDelete
  27. Needed to compose you a very little word to thank you yet again regarding the nice suggestions you’ve contributed here.
    java training in bangalore

    ReplyDelete
  28. Excellent content you have shared thanks for sharing valuable information please keep update content on Devops Online Training Hyderabad

    ReplyDelete
  29. Needed to compose you a very little word to thank you yet again regarding the nice suggestions you’ve contributed here.
    Devops Training in Bangalore

    ReplyDelete
  30. I am very thankful to the author to write this fruitful information DevOps Course | DevOps Training Institutes in Bangalore

    ReplyDelete
  31. Ciitnoida provides Core and java training institute in noida. We have a team of experienced Java professionals who help our students learn Java with the help of Live Base Projects. The object-oriented, java training in noida , class-based build of Java has made it one of most popular programming languages and the demand of professionals with certification in Advance Java training is at an all-time high not just in India but foreign countries too.

    By helping our students understand the fundamentals and Advance concepts of Java, we prepare them for a successful programming career. With over 13 years of sound experience, we have successfully trained hundreds of students in Noida and have been able to turn ourselves into an institute for best Java training in Noida.

    java training institute in noida
    java training in noida
    best java training institute in noida
    java coaching in noida
    java institute in noida

    ReplyDelete
  32. This is a much needed information thank you for sharing and it's very helpful to know about this information. Thanks for sharing it Devops Online Training Bangalore

    ReplyDelete
  33. ERP-SAP-SD Training Centre in Noida

    CIIT Noida provides Best SAP Training in Noida based on current industry standards that helps attendees to secure placements in their dream jobs at MNCs. CIIT Provides Best ERP SAP Training in Noida. CIIT is one of the most credible ERP SAP training institutes in Noida offering hands on practical knowledge and full job assistance with basic as well as advanced level ERP SAP training courses. At CIIT ERP SAP training in noida is conducted by subject specialist corporate professionals with 7+ years of experience in managing real-time ERP SAP projects. CIIT implements a blend of aERPemic learning and practical sessions to give the student optimum exposure that aids in the transformation of naïve students into thorough professionals that are easily recruited within the industry.

    At CIIT’s well-equipped ERP SAP training center in Noida aspirants learn the skills for ERP SAP Basis, ERP SAP ABAP, ERP SAP APO, ERP SAP Business Intelligence (BI), ERP SAP FICO, ERP SAP HANA, ERP SAP Production Planning, ERP SAP Supply Chain Management, ERP SAP Supplier Relationship Management, ERP SAP Training on real time projects along with ERP SAP placement training. ERP SAP Training in Noida has been designed as per latest industry trends and keeping in mind the advanced ERP SAP course content and syllabus based on the professional requirement of the student; helping them to get placement in Multinational companies and achieve their career goals.

    ReplyDelete
  34. Pretty article! I found some useful information in your blog
    Devops Training in Hyderabad

    ReplyDelete
  35. I love to read your articles because your writing style is too good, its is very very helpful for all of us and I never get bored while reading your article because, they are becomes a more and more interesting from the starting lines until the end.
    Devops interview Questions

    ReplyDelete
  36. This is an excellent blog thanks for sharing valuable information with us, please check it once at Devops Online Training Bangalore

    ReplyDelete
  37. Awesome article. It is so detailed and well formatted that i enjoyed reading it as well as get some new information too.
    jira software training

    ReplyDelete
  38. BCA Colleges in Noida

    CIIT Noida provides Sofracle Specialized B Tech colleges in Noida based on current industry standards that helps students to secure placements in their dream jobs at MNCs. CIIT provides Best B.Tech Training in Noida. It is one of the most trusted B.Tech course training institutes in Noida offering hands on practical knowledge and complete job assistance with basic as well as advanced B.Tech classes. CIITN is the best B.Tech college in Noida, greater noida, ghaziabad, delhi, gurgaon regoin .

    At CIIT’s well-equipped Sofracle Specialized M Tech colleges in Noida aspirants learn the skills for designing, analysis, manufacturing, research, sales, management, consulting and many more. At CIIT B.Tech student will do practical on real time projects along with the job placement and training. CIIT Sofracle Specialized M.Tech Classes in Noida has been designed as per latest IT industry trends and keeping in mind the advanced B.Tech course content and syllabus based on the professional requirement of the student; helping them to get placement in Multinational companies (MNCs) and achieve their career goals.

    MCA colleges in Noida we have high tech infrastructure and lab facilities and the options of choosing multiple job oriented courses after 12th at Noida Location. CIIT in Noida prepares thousands of engineers at reasonable B.Tech course fees keeping in mind training and B.Tech course duration and subjects requirement of each attendee.

    Engineering College in Noida"

    ReplyDelete
  39. very informative post you have been shared. really nice blog. to know something advance devops automation.

    ReplyDelete
  40. This comment has been removed by the author.

    ReplyDelete
  41. This concept is a good way to enhance the knowledge.thanks for sharing. please keep it up salesforce Online Training Bangalore

    ReplyDelete
  42. Thanks for providing valuable information.

    ReplyDelete
  43. Worthful Hadoop tutorial. Appreciate a lot for taking up the pain to write such a quality content on Hadoop course. Just now I watched this similar Hadoop tutorial and I think this will enhance the knowledge of other visitors for sure. Thanks anyway.https://www.youtube.com/watch?v=cY5AnQMdXhY

    ReplyDelete
  44. If you want to Learn salesforce CRM Course Contact Navya from onlineitguru. onlineitguru Is one of the Leading Training institute to Offer salesforce Online Training Bangalore. For more Details Call@8885448788.

    ReplyDelete
  45. Thanks for sharing this post and nice explanation about Puppet Terminology.
    DevOps Training in Hyderabad

    ReplyDelete
  46. Thanks for sharing the excellent information about Devops to puppet. The blog is very nice, keep your good work.

    DevOps Training in Chennai | DevOps Training Institute in Chennai

    ReplyDelete
  47. Nice Post.Thanks for sharing the information about the DevOps to puppet.keep on sharing like this posts.
    DevOps Training in Hyderabad

    ReplyDelete
  48. very nice post, and thanks for sharing the informations
    iot training in ameerpet!

    ReplyDelete
  49. Good informations It may be Helpfull for me thanks alot for sharing
    Learn Online DevOps Training

    ReplyDelete
  50. I have read your article it's very informatic and beneficial Tibco Certification Training thanks for posting.

    ReplyDelete
  51. Technology is updated day to day
    Thanks for sharing the info, Salesforce is the best platform for all organizations to perform the multiple tasks at a time
    Best Salesforce Training
    Best Salesforce Online Training

    ReplyDelete
  52. Good Information.This article helped for my DevOps Training.Post new articles.
    Thankyou.DevOps Training


    ReplyDelete
  53. Thanks for your article.It is very useful to learn.Update new article.

    ReplyDelete
  54. Nice blog. Explained well. I have suggested to my friends to go through this blog. Very nice explanation after learning. Thank you for sharing this useful information.

    devops training in chennai

    ReplyDelete
  55. Thank you for posting such amazing article.Its easy to understand.I have learned lot of thing from your post.

    aws training in chennai

    selenium training in chennai

    python training in chennai

    ReplyDelete
    Replies
    1. This comment has been removed by the author.

      Delete

  56. Really it was an awesome article… very interesting to read…
    Thanks for sharing.........


    Devops online training in ammerpet

    ReplyDelete
  57. Best article for DevOps.Its easy to learn.please Upload other article.Thankyou
    DevOps Training Institute In Chennai

    ReplyDelete
  58. Thank you for posting this blog.It is really useful to learn about devops
    DevOps Training In Chennai | DevOps Training Institute In Chennai

    ReplyDelete