Ask Your Question
3

What are some methods for managing environments?

asked 2013-04-17 14:46:33 -0600

Ancillas gravatar image

Right now, I have an environment for every application cluster that I have deployed. The reason for this is that application updates often introduce config changes that are not backwards compatible, and some application clusters are intended to be on the latest version, while others must remain on the current stable version.

I've been improving my Puppet code base and now have all of my logic broken out into proper modules that can be controlled via parameters or hiera. This provides a great deal of flexibility, and is fantastic - everyone should do it.

Now, I'm trying to improve ... (more)

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
3

answered 2013-05-10 12:52:54 -0600

Ancillas gravatar image

After much digging, the best solution that I've found is r10k over on GitHub.

You can read more about the thought process behind r10k on Adrien's blog.

In a nutshell, you create a Git repo (or multiple git repos), and each branch is its own puppet environment. e.g. if you had dev, tst, and prd branches, then you would get three environment directories: dev, tst, and prd.

The contents of each branch is pretty straight forward, and follows the librarian-puppet model, which amounts to a site.pp file, and a Puppetfile which defines which module versions should ... (more)

edit flag offensive delete link more
0

answered 2013-04-20 07:54:23 -0600

deric gravatar image

what about using hiera for this:

  ---
  :hierarchy:
      - %{cluster}/common
      - %{cluster}/%{operatingsystem}
      - %{operatingsystem}
      - common
  :backends:
      - yaml
  :yaml:
      :datadir: /etc/puppet/hieradata/%{::environment}

You can separate configuration for each cluster, or you might have a folder for each cluster: :datadir: /etc/puppet/hieradata/%{cluster}/%{::environment} but in this case you can't share common settings for all servers.

edit flag offensive delete link more

Comments

I've got the configuration piece figured out. It's the deployment of the environment code from git, and the organization of the environment code in git which is problematic.

Ancillas gravatar imageAncillas ( 2013-04-20 17:27:31 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2013-04-17 14:46:33 -0600

Seen: 439 times

Last updated: May 10 '13