I have a number of docker hosts - for arguments sake lets use 3 as an example. On those 3 hosts I have a total of 10 applications. Each will be standalone, or part of a stack. Most of the applications do hold some persistent data (configuration files and the like).
I have in the past, used a flat svn structure.
- docker-data
- stack1
- app1
- app2
- app3
- stack2
- app4
- app5
- stack3
- app6
- app7
- app8
- app9
- stack1
The whole structure and the config files would be under svn and loaded on all 3 hosts. Having to remember which host had which apps, and make changes and commit as needed.
Where host 1 = stack 1, host 2 = stack2, host3 = stack3 and app8 and 9
As part of rebuilding I was going to look at moving to git and a better structure.
I did see someone suggest the my entire structure go into git as the master
With a branch for each host.
- master
- docker-data
- stack1
- app1
- app2
- app3
- stack2
- app4
- app5
- stack3
- app6
- app7
- app8
- app9
- stack1
- docker-data
- host1
- docker-data
- stack1
- app1
- app2
- app3
- stack1
- docker-data
This seemed quite a good approach. But what struck me is how to set it up initially.
If all my apps are in the master how do I initialise the branch for host one and only pull app1, 2 and 3?
I assume I them do a merge back to master if any of those configurations change.
And finally, I want to move app8 into host1's branch from host 3.
Is this over complicated? and are there any posts, or commands that would help me facilitate this?