Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I think by now all sys admins have started to amass a large collection of scripts for kinds of scenarios, user management, server builds, incident mitigation tasks, app deployment.

and like most sys admins I've got these scripts kept in a bunch of version control repositories.

These repositories have started to become unstructured and hard to find content; leading to duplication and other such fun things.

does anyone have an equivalent of: http://stackoverflow.com/questions/16829/structure-of-projects-in-version-control

but for structure administration scripts instead of development projects

share|improve this question
add comment

closed as not constructive by EEAA, Zoredache, Ward, John Gardeniers, Iain Dec 3 '12 at 9:29

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

2 Answers

I use Git. I have a whole bunch of public (mostly) git repositories on my Github account, and I have a "devopstools" repository which mostly just contains submodules to link to the other repositories.
See here: https://github.com/tomoconnor/devopstools

As and when I add new scripts to it, they'll either go into a scripts/ directory in the devopstools repository, or into a separate project if they're big and bulky, and then get submodule'd in.

share|improve this answer
    
I can definitely see submodule usage being a really good way of managing common scripts across different hosts/services. Looking at your devopstool repo you only have 3 submodules you've linked, which is linked by file group (capistrano, puppet, bash scripts), do you have any cases where the capistrano or puppet manifests need to be different for different services? –  Preflightsiren Nov 28 '12 at 4:15
1  
Not really.. I mean.. I'm likely to update the differing scripts inside each repository and then deploy the whole lot, and pick and choose the bits I want.. Alternatively, could branch for different servers/services. –  Tom O'Connor Nov 28 '12 at 10:14
add comment

My tree

REPOROOT - Host - Service - files

(for Host-Service pair I know full path to destination on target. In case of SVN path also stored in custom property)

share|improve this answer
    
Do you have a very static list of hosts? Also how do you handle shared services (eg. Web Server) - without duplicating the Install-WebServer script? –  Preflightsiren Nov 28 '12 at 4:12
    
@Preflightsiren - no, but I can handle any Host-list (static or very dinamic), it's a matter or adding new dir. I don't version install scripts (it's OS game) and don't share configs: one system - one configuration –  Lazy Badger Nov 28 '12 at 4:23
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.