We're a 2 man team using puppet/Hiera to manage 20 servers. Up until now we have not used any VCS whilst developing the manifests.
I've configured a remote Git repo on the puppetmaster and pushed our manifests and module folders to the master branch (used for development) and pushed an identical production branch. The remote repo has a post-release hook which configures a new environment based on the branch name (or updates if exists) and the puppetmaster has dynamic environments configured to enable this to work. This configuration is discussed in detail on the puppet blog.
Our workflow is for each of us to develop on our local master branch and when we are ready to test, we commit, then push, and the post-release hook updates the development environment. We can then test (we don't feel that we need a separate staging environment) the changes on test clients by using puppetd --test --environment development
. If everything works as expected then either of us can merge the development branch into production and push which again updates the production environment.
Questions
- Is this an optimal workflow for using Git and Puppet?
- How do we actually test the development environment. We have spare servers which we can use but do we configure them with the same hostnames as the production servers specified in the node declarations? If we do this then some node specific data from Hiera such as IP addresses will be wrong. Or do we test on the production servers with the --environment development switch and use --noop?
Any advice would be greatly appreciated.