Tag-Archive for » subversion «

Wednesday, September 08th, 2010 | Author:

eth0 Most people that work with puppet use a VCS : subversion, git, CVS, mercurial… Pick yours. My company uses subversion and each cmmit to the repository needs to be pulled by the master. Since I have two masters, I also want them to be synchronized. Once again it’s mcollective that comes to the rescue. I wrote a very simple agent (a 5 minutes work, to be improved) that can update a specified path. Grab it here. Once it is deployed you can use a post commit hook that calls it.

Example of mine :

#!/usr/local/bin/ruby
 
require 'mcollective'
include MCollective::RPC
 
mc = rpcclient("svnagent")
mc.progress = false
mc.class_filter "puppet::master"
mc.update(:path => "/etc/puppet")

The agent will only be called on machines being puppet masters by using the class filter.

Category: Code, Puppet, SysAdmin  | Tags: , ,  | 2 Comments
Wednesday, April 15th, 2009 | Author:

apple-wireless J’ai adopté il y a quelques temps gedit comme éditeur graphique de tous les jours (et vim en ssh). je l’aime bien parce qu’il est simple, se lance rapidement, n’est pas bloated de fonctionnalités et il est extensible… On a le choix entre les plugins, ou les “commandes externes”. Voici un petit tips pour commiter vos changements dans un dépot subversion depuis gedit par une simple pression sur un raccourci clavier.

#!/bin/sh
#
# Simple script to commit from gedit
# Call it from external tools
# Nicolas Szalay
#
 
comment=$(zenity --entry)
svn commit -m "$comment"

Le prompt zenity vous demandera d’entrer votre message de commit et roulaize !

Category: Code, Tech  | Tags: , , , ,  | 3 Comments