Fork me on GitHub

You are here

What's needed for a practical Puppet class?

 I'm a happy user of Puppet and love sharing my knowledge with other people.  Although I'm not that active online, I've done quiet some work in getting Puppet known and used in environments that aren't that easily addressable.  More specifically, IT departments at several universities in Cuba and Ethiopia.  This as part of several IT for development  programmes.  If you want to learn more about that work, read the paper I published about it.  I also started the Puppet User Group in Ethiopia.

Last December I was in Cuba to follow up on my projects.  When I was at the Universidad de Oriente in Santiago De Cuba I spent some time with the university staff working with Puppet.  The adoption is still very young and they are still in the 'learning and testing' phase.
During our hands on sessions it became clear to me that there is need for specific instructors material that teaches the use of Puppet by using already available modules.
I've seen many 'introduction to Puppet' presentations and created several myself.  But to be honest I never really saw any presentation that showed the audience to start from scratch and build up your infrastructure by using already available modules.
Why is that necessary?  Because I've seen so many newbies getting lost in setting up Puppet and then loosing way to much time with reinventing the wheel.  New users to Puppet, and very specifically users who don't have access to peers that are already using Puppet, have a hard time deciding what to do first.  And many of them start out like so many people started with Puppet 8 years ago: some small classes and no modules.  But unfortunately they get stuck there and don't move on.
In the same category of missing information is how to set up an easy and usable work flow.  For people who are new to Puppet (and maybe even Git too!) setting up dynamic environments is too difficult.  There are just too many ways to do it.  I think it's important to have this in place.  Similarly getting a good syntax checking and puppet lint tests
in place right from the beginning is key in writing good Puppet code.
It's not that there is no good documentation or tutorials.  Puppetlabs provides a "learning VM". But the learning VM is more for individual learning.  Recently I found Example42 Puppet Tutorial.  I find the example42 Puppet Tutorial very good.  And best of all, the tutorial is Free Software too.  I've already decided to start using this tutorial if I need to teach Puppet in the future.  They also provide some example architectures.  But I'm missing the approach I was discussing. 
So what should be in the approach I'm looking for?
For example I think the new users (let's call them students) should be shown how to build a small infrastructure with existing modules. Installing modules to manage some key components in your infrastructure:
  • motd updating (not important but good first exercise)
  • repository management
  • DNS configuration in resolve.conf
  • user management
  • ssh configuration
  • firewall rules
  • setting up an apache web server
  • setting up a MySQL server
Only after completing these steps students should move on to learn the  specific Puppet DSL and write their own modules.
While students are setting up their core infrastructure they should be able to do this by using a local VM where they are running 'puppet apply' to test the changes they making.  A vagrant VM is well suitedf or this.
Next to the above I think it would be good to have some CI infrastructure set up and ready to use.  The CI should check and deploy code committed to a VCS repo.  Getting students already acquainted with this way of working should ease adoption.  Emphasis should be given to using the workflow.  Documentation should be provided on how to set it up, but  shouldn't be the first thing the students needs to do.  They just need to be able to use it in the first case.
It would be nice to know what the Puppet community thinks of this. Of course there could be a guide or tutorial that partly handles this. If so, please point me to it.  So some questions for the community:
  • Which basic infrastructure components are missing?
  • Is there already some tutorial/presentation that handles my points?
You can tweet or send me your feedback to me through the contacts page.