3 ms·
We have a highly distributed system at our company, with multiple library packages, daemons, django apps, etc., as well as configuration files, and several 'med
by danudey 12y ago
We have a highly distributed system at our company, with multiple library packages, daemons, django apps, etc., as well as configuration files, and several 'media' git repos which are in the 5GB range.
Our solution was to build a simple (well, originally simple) tool to handle cloning out our code. Each of our repos has a .config file in it which defines what it depends on, and we have a simple script which 'installs' packages by git clone and then creates symlinks into the proper places. Because we're not using submodules, we don't have any of the standard submodule issues (e.g. if you do a 'git pull' you have to commit that to the main repository and push or it shows as a change).
The tool also handles scanning through our 'install' directory, determining what packages are installed, doing a 'git pull', post-install/post-update hooks, multi-branch support, show local changes/uncommitted changes, etc.
The other option for you (since our dependency list is fairly flat and uncomplicated, and yours may not be) would be to create a yaml/xml/json file to specify the directory structure and which packages go where, and then have the tool automatically update them appropriately. Alternately, store a .config.yml file in each repo telling what other repos should be cloned where, and let your tool recurse through it.
The nice thing about a tool like that is you can add functionality like e.g. doing a batch-commit (commit all changes in all/specified repositories, with the same commit message, create the same tag name for all of them in all repos, etc), batch-rollback, and so on.
Just a thought.
- ansible 12y agoThe other option for you (since our dependency list is fairly flat and uncomplicated, and yours may not be) would be to create a yaml/xml/json file to specify the directory structure and which packages go where, and then have the tool automatically update them appropriately. Alternately, store a .config.yml file in each repo telling what other repos should be cloned where, and let your tool recurse through it. The nice thing about a tool like that is you can add functionality like e.g. doing a batch-commit (commit all changes in all/specified repositories, with the same commit message, create the same tag name for all of them in all repos, etc), batch-rollback, and so on. I think you've basically re-invented Google's repo application. :-)
- stevekemp 12y agoOr even the "mr" tool which allows you to work with multiple-repositories easily. I have a few locations where I have a config-file listing repositories, their target destinations, and some arbitrary shell commands (read: making symlinks) that I distribute to people. Users just run "mr -c config.cfg checkout" to get all the code in the right place. http://myrepos.branchable.com/ http://myrepos.branchable.com/