Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Practical advice on using branches vs paths and source_root #99

Open
stevenscg opened this issue Sep 30, 2016 · 1 comment
Open

Practical advice on using branches vs paths and source_root #99

stevenscg opened this issue Sep 30, 2016 · 1 comment

Comments

@stevenscg
Copy link
Contributor

The gitter room has been pretty quiet, so I will ask this here.

Does anybody have advice on using branches for different environments (or datacenters) vs constructing the repo with paths for each environments (or datacenters) and configuring source_root??

I started building out a "configuration" repo using branches for "dev", "test", etc, and a top level path for each datacenter ("us", "eu", etc). I haven't spent much time with that arrangement yet, but it seems like it might be a pain to do diffs or pull requests across branches and even to keep changes that should be in sync across environments and/or datacenters.

We already use a "git flow" like workflow with our apps and Ansible projects with feature branches built from a mainline branch, reviewed, and accepted via PR.

I am currently experimenting with using a branch for each stage of the workflow ("dev", "master"), namespacing the data in the repo with "{datacenter}/{environment}", and using the same "{datacenter}/{environment}" as my source_root value.

This is more familiar, but it does mean that I have to pick which environments should track the "dev" branch and which should track the "master" branch.

@breser
Copy link
Owner

breser commented Oct 29, 2016

We're just using one repo for all our environments. We don't currently have differences in the configurations in git2consul between the datacenters. We just use source_root to split which configurations go to which environment and run a copy of git2consul for each environment/datacenter combination.

However, at current due to bugs in source_root I wouldn't recommend this setup. I've submitted a pull request that will fix the problems though:
#110

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants