How to best manage the puppet manifests with versioning?

Hi,

After many years of installing and configuring servers and VM's by hand
using the cli or bash scripting we are now in the process of
implementing a foreman environment to manage everything.

I have read up about puppet and have written my first manifests but now
I'm facing the problem of how to manage all this?

In foreman there is no way to edit the classes and have versioning on
them so my idea is now to hook it up to a git repo.

But before I spend my time on this, I would like to know how other
foreman users handle this? Are there any best practices on how to setup
your git for puppet?

As a sysadmin I normally don't use the tools developers use so it's a
bit of a learning curve :wink:

Kind regards,

Jorick Astrego
Netbulae

Hi,

> In foreman there is no way to edit the classes and have versioning on
them so my idea is now to hook it up to a git repo.

we are working on that, check https://github.com/marianitadn/foregit. When
we will have our first release you can give us some feedback, if you want
to. :slight_smile: It's coming soon.

Maria

··· On 5 June 2014 16:17, Jorick Astrego wrote:

Hi,

After many years of installing and configuring servers and VM’s by hand
using the cli or bash scripting we are now in the process of implementing a
foreman environment to manage everything.

I have read up about puppet and have written my first manifests but now
I’m facing the problem of how to manage all this?

In foreman there is no way to edit the classes and have versioning on them
so my idea is now to hook it up to a git repo.

But before I spend my time on this, I would like to know how other foreman
users handle this? Are there any best practices on how to setup your git
for puppet?

As a sysadmin I normally don’t use the tools developers use so it’s a bit
of a learning curve :wink:

Kind regards,

Jorick Astrego
Netbulae


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

Howdy,

Another option is to use Fortello (Foreman + Katello) to manage puppet
modules. Katello adds the ability to create managed repositories of puppet
modules that you have either uploaded, sync'd from a puppet repository or
imported via git. This means you can have multiple authors and version of a
module. Further, you can pick and choose which modules you want and combine
them into what we call a Content View. This "view" of your puppet modules
will generate versioned puppet environments that a host or hostgroup can be
linked to.

Please let me know if you'd like more information on any of this.

Eric

··· On Thu, Jun 5, 2014 at 9:21 AM, Maria Dana Niţă wrote:

Hi,

In foreman there is no way to edit the classes and have versioning on
them so my idea is now to hook it up to a git repo.

we are working on that, check https://github.com/marianitadn/foregit.
When we will have our first release you can give us some feedback, if you
want to. :slight_smile: It’s coming soon.

Maria

On 5 June 2014 16:17, Jorick Astrego j.astrego@netbulae.eu wrote:

Hi,

After many years of installing and configuring servers and VM’s by hand
using the cli or bash scripting we are now in the process of implementing a
foreman environment to manage everything.

I have read up about puppet and have written my first manifests but now
I’m facing the problem of how to manage all this?

In foreman there is no way to edit the classes and have versioning on
them so my idea is now to hook it up to a git repo.

But before I spend my time on this, I would like to know how other
foreman users handle this? Are there any best practices on how to setup
your git for puppet?

As a sysadmin I normally don’t use the tools developers use so it’s a bit
of a learning curve :wink:

Kind regards,

Jorick Astrego
Netbulae


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

In addition to the above answers, it's worth knowing that there is git
support already present in the foreman installer.

When creating your foreman/puppetmaster host, simply add

–puppet-server-git-repo true

to the installer commandline. This will initialize a git repo at
/var/lib/puppet/puppet.git. You can then clone this to your
workstation with:

git clone root@server:/var/lib/puppet/puppet.git puppet

Add some modules (specifically, create a modules dir and put them in
there), and then push to the production branch (important, do not use
master) using:

git push origin HEAD:production

Looking in /etc/puppet/environments/production/ on the server , you
will see a clone of your repo, ready to import into the Foreman UI and
assign to your hosts. It's also possible to trigger this import on any
git push, if you desire.

Any branch (except master, which puppet dislikes) which is pushed in
this way will become a valid puppet environment, making testing in
feature branches easy.

Other people also use r10k or puppet-librarian to manage the content
on their puppetmasters - ultimately, Foreman doesn't care how the
modules get there, so whatever workflow works for you will be fine.