What I think that is needed for a practical Puppet class

73 views
Skip to first unread message

Rudy Gevaert

unread,
Jan 1, 2016, 5:36:45 PM1/1/16
to Puppet Users
Hi,

This is just report of something I just wrote on my blog (http://blog.webworm.org/content/whats-needed-practical-puppet-class) .  Feel free to comment here or through (@rgevaert) twitter or email.

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?

Martin Alfke

unread,
Jan 2, 2016, 6:13:50 AM1/2/16
to puppet...@googlegroups.com
Hi Rudy,

Great idea and work!
I really appreciate supporting less advanced countries.
Maybe you want to also look at our new Puppet documentation/slide/example project: http://www.example42.com/guide/

I encourage people to start using self developed modules (but with a prefix for the module name to not block them from moving to available modules).
This will allow them to understand Puppet code constructs and they should switch to existing modules when they have a decent understanding of Puppet.

Best,
Martin
> --
> 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...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/0e6891c5-caac-471d-b3ae-98991eb1ff35%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Felix Frank

unread,
Feb 7, 2016, 10:14:52 AM2/7/16
to puppet...@googlegroups.com
Hi,

seconded, and I'll go a step further and claim that "(Forge) Modules
First Puppet" might actually be a feasible angle for newcomers who don't
have a programming nor strong operations background to speak of.

Do let me know if you hit any snags along the road. Happy to help, if it
weren't for all the things on the plate already.

Also please do keep us posted with your developments in that direction.

Cheers,
Felix

Jakov Sosic

unread,
Feb 8, 2016, 7:16:06 AM2/8/16
to puppet...@googlegroups.com
On 01/01/2016 11:36 PM, Rudy Gevaert wrote:

> * 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

I think this pretty much covers it up. Stick to the basics.

Only think I would add besides repositories and DNS is NTP as a basic
system setup.


Kudos!

Alex Harvey

unread,
Feb 9, 2016, 8:24:54 PM2/9/16
to Puppet Users
That's fantastic work you are doing there.

I also agree with your approach to teaching.  Traditionally new Puppet users have been trained with a view to writing their own modules, only to find out at the end that the real work is in building infrastructure out of Forge modules.  As you say, this made sense about 8 years ago, in the days when the Forge either didn't exist, or was too immature to support most user's needs.  Today, new Puppet users need to be taught to resist the urge to write their own modules.  To do so well requires fairly advanced skills in programming, and it's rarely necessary.

In my approach the most important concepts to impart to the new users are:
  • How to install Puppet and set up the infrastructure
  • How to set up your first control repo, Hiera data, and how to structure Roles and Profiles
  • Git basics
  • the CI infrastructure like Jenkins, Travis CI etc
  • Librarian-puppet and R10K
  • basic rspec-puppet & Vagrant/Beaker
I spend some time on the basics of the language, but I regard writing your own Puppet modules as the advanced work that comes later.

Best regards,
Alex
Reply all
Reply to author
Forward
0 new messages