Pietro Abate: managing puppet manifest with gitolite
Managing the puppet manifest using a vcs is a best practice and there is a lot of material on the web. The easier way to do it, is to use git directly in the directory /etc/puppet and use a simple synchronization strategy with an external repo, either to publish your work, or simply to keep a backup somewhere.
Things are a bit more complicated when you would like to co-administer the machine with multiple people. Setting up user accounts, permission and everything can be a pain in the neck. Moreover working from your desktop is always more comfortable then logging in as root on a remote system and make changes there ...
The solution I've chosen to make my life a bit easier is to use gitolite, that is a simple git gateway that works using ssh public keys for authentication and does not require the creating of local users on the server machine. Gitolite is available in debian and installing it is super easy :
This will create the admin and testing repo in /var/lib/gitolite/repositories and setup few other things. At this point you are ready to test you gitolite installation by cloning the admin repo :
Gitolite is engineered to use only the gitolite use to manage all your repositories. To add more repositories and users you should have a look at the documentation and then editing the file conf/gitolite.conf to add your new puppet repository.
At this point, you can go two ways. If you use git to manage your puppet directory, you can just make a copy of it somewhere and then add gitolite as a remote
If you didn't use git before, you can just copy the manifest in your new git repository, make a first commit and push it on the server.
Every authorized users can now use git to clone your puppet repository, hack, commit, push ...
One last step is to add a small post-receive hook on the server to synchronize your gitolite repository with the puppet directory in
This script presuppose that your git repo in /etc/puppet has the gitolite repo as origin ... Then I added a simple hook in the gitolite git repo that calls this script using sudo :
And since you are at it you should also add a pre-commit hook to check the manifest syntax. This will save you a lot of useless commits.
If you use a more complicated puppet setup using environments (I'm not there yet, and I don't think my setup will evolve in that direction in the near future), you can use puppet-sync that seems a neat script to do the job.
For the moment this setup works pretty well. I'm tempted to explore mcollective to trigger puppet runs on my nodes, but I'm there yet...
apt-get install gitolite .
If you use puppet already you might be tempted to use puppet to manage your gitolite installation. This is all good, but I don't advice you to use modules like this one http://forge.puppetlabs.com/gwmngilfen/gitolite/1.0.0 as it's going to install gitolite from source and on debian it's not necessary ... For my purposes, I didn't find necessary to manage gitolite with puppet as all the default config options where good enough for me.
Once your debian package is installed, in order to initialize your repo, you just need to pass to gitolite the admin public key, that is your .ssh/id_rsa.pub key and then run this command:
sudo -H -u gitolite gl-setup /tmp/youruser.pub
git clone gitolite@example.org:gitolite-admin.git
git remote add origin gitolite@example.org:puppet.git
git push origin master
git clone gitolite@example.org:puppet
/etc : This will sync your main puppet directory and trigger changes on the nodes for the next puppetd run. First I created a small shell script in /usr/local/bin/puppet-post-receive-hook.sh :
#!/bin/bash
umask 0022
cd /etc/puppet
git pull -q origin master
umask 0022
cd /etc/puppet
git pull -q origin master
sudo /usr/local/bin/puppet-post-receive-hook.sh
OpenSSH 6.0p1 was
It has been a long time since I announced a version of
Each instance (virtual machine) started from the same image is configured
identically. The same account and the same procedure will be used to
connect to it. If the machine image is public and if the instance is open
to the Internet, which is common when using commercial providers such as
Fedora 17 will be shipping next week. It's got a bunch of
Crazy title, I know.
Over the past $WHILE, I ve found myself checking for the same things. Some of these are fit for inclusion into lintian it s self others, not so much.
Here s a rundown on what my lintian wrapper (tragically also called lintian and just higher up on my $PATH. I know it s a hack.)
Since I only use lintian on .changes files - it pre-processes for some information that is stuffed in the changes.
The first step is to get all the bugs that the package closes. It then takes these bugs, and queries the BTS to see what package they re filed against. If the bug is filed against a different bug then the package s source, it ll emit a warning. It has a greylist for stuff like WNPP . This will fail if something s filed against it s binary package rather then it s source :)
Next, the wrapper will get other info from the changes. It checks if the suite is in the blacklist ( UNRELEASED , and testing , (stable for me as well, since I don t usually deal with SRUs often)).
It ll also check for the changed-by and maintainer, ensuring they re the same. This will fail for co-maint d packages.
If you ve not guessed by now, this system relies on false-positives :)
Nextly, if there are .debs in the Files, it ll go through and check the control of each. It ll print out a stanza with the short-description inside a template, to see if the description works .
After that, it ll attempt to make HTTP requests to the Homepage (and eventually URLs in the description and VCS-Browse)
If the package has python in the source name anywhere, or in any of it s binary packages, it ll trigger
As you can see, it s very (very) verbose, but i d rather cross stuff off a checklist then worry about something being off.
Anyway, it s a work in progress. Not even a serious one, at that. It s a bunch of hacks put together, so I can t really endorse anyone else using this stuff. If you feel crazy enough to do so, all the tools are found on my
I'm doing a Kickstarter! The plan is to take 
