This post is about configuring SALT Stacks subversion backend. Salt itself provides some information on its website, but its not obvious how it works in detail. I'm running my salt-master on an Ubuntu 12.0.4 LTS version, the salt-master (at time of writing in version 2014.1.0-1precise1) package has been downloaded from Launchpad PPA.
In order to use subversion (or other version control backends), it is necessary to edit the salt masters configuration file - in /etc/salt/master. There are already some commented sections for gitfs_remotes, but none for mercurial or subversion. However, the principle behind the configuration/backends is the same. In the following we assume that our salt configuration space is hosted under http://svn.example.com/sourcecode/salt/. Below that directory we have a typical subversion project structure - that means trunk, branches, tags. Salt assumes that the base environment is below trunk, all other environments are derived from the subdirectories in branches and tags.
svnfs_remotes: - https://svn.example.com/sourcecode/salt
svnfs_trunk:
- trunk: trunk
svnfs_branches:
- branches: branches
svnfs_tags:
- tags: tags
After adding this to your salt masters configuration andy after restarting the daemon, you will most likely find the following error message in your salt error log file (/var/log/salt/master.log).
2014-04-01 12:56:39,007 [salt.loaded.int.fileserver.svnfs][ERROR ] subversion fileserver backend is enabled in configuration but could not be loaded, is pysvn installed?
This can be solved by adding python-svn package (apt-get install python-svn).
That's it, the configuration space is now visible to your salt-minions.
Keine Kommentare:
Kommentar veröffentlichen