#gitops (2020-03)
Discuss continuous delivery of infrastructure
Archive: https://archive.sweetops.com/gitops/
2020-03-10
![Thomas Burton avatar](https://secure.gravatar.com/avatar/236535b0126e26ecc257a579bf0db819.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0013-72.png)
Hello all
Have a scenario I’d love some input with. We run around 18 microservices, a mixture of frontends and backends. As with many companies we have ended up with the monolithic microservice architecture and thus we often need to release things at the same time to prevent downtime on production. We have now successfully implemented FluxCD on our staging namespace. We have two more namespaces/environments, sandbox and production. We have not yet implemented flux in these namespaces. The issue we have to now is how best to implement flux and promote services from stage>sandbox>prod. It has been suggested we could use develop
and master
branches. If anyone could expand on that or add anything I’d be super grateful. Hope you all have a great day
![joshmyers avatar](https://avatars.slack-edge.com/2018-11-20/483958217281_8117d6f6c62807ce9912_72.jpg)
Sounds like gitflow https://datasift.github.io/gitflow/IntroducingGitFlow.html
![joshmyers avatar](https://avatars.slack-edge.com/2018-11-20/483958217281_8117d6f6c62807ce9912_72.jpg)
and gitflow is probably a thing you don’t want/need
![Thomas Burton avatar](https://secure.gravatar.com/avatar/236535b0126e26ecc257a579bf0db819.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0013-72.png)
In what sense?
![Erik Osterman (Cloud Posse) avatar](https://secure.gravatar.com/avatar/88c480d4f73b813904e00a5695a454cb.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0023-72.png)
Git Flow has fallen out of favor for simpler strategies. There was recently a HN post on this: https://georgestocker.com/2020/03/04/please-stop-recommending-git-flow/
![joshmyers avatar](https://avatars.slack-edge.com/2018-11-20/483958217281_8117d6f6c62807ce9912_72.jpg)
Thats the one
![joshmyers avatar](https://avatars.slack-edge.com/2018-11-20/483958217281_8117d6f6c62807ce9912_72.jpg)
Thx @Erik Osterman (Cloud Posse)
![Zachary Loeber avatar](https://avatars.slack-edge.com/2020-05-13/1115475485942_e68ae4d6556df390de70_72.jpg)
Question is do you do actual environment promotion or do you simply deploy at whim to any number of environments?
![Zachary Loeber avatar](https://avatars.slack-edge.com/2020-05-13/1115475485942_e68ae4d6556df390de70_72.jpg)
If you are actually promoting then having a single release git repo with various branches aligned with each step in the promotion process makes sense as you can easily automate PRs and such.
![Zachary Loeber avatar](https://avatars.slack-edge.com/2020-05-13/1115475485942_e68ae4d6556df390de70_72.jpg)
Otherwise I suspect it would be just as easy to simply have one deployment repo per environment and PR approve your release versions in the manifests therein.
![Zachary Loeber avatar](https://avatars.slack-edge.com/2020-05-13/1115475485942_e68ae4d6556df390de70_72.jpg)
that way your repo is more like a docker-compose file with multiple microservices comprising the whole of an environment
![Thomas Burton avatar](https://secure.gravatar.com/avatar/236535b0126e26ecc257a579bf0db819.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0013-72.png)
All super helpful information. Appreciate it greatly!
![Thomas Burton avatar](https://secure.gravatar.com/avatar/236535b0126e26ecc257a579bf0db819.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0013-72.png)
We would probably stick to a single repo because we kustomize
to manage the templating
![Thomas Burton avatar](https://secure.gravatar.com/avatar/236535b0126e26ecc257a579bf0db819.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0013-72.png)
My issue originally is that we tag the images differently between stage (commit #) and sandbox/prod (v*). My thoughts now are
- One branch per environment (stage, sandbox, prod)
- One flux patch for staging on automated releases
- One flux patch for sandbox and prod with automated releases for sandbox deployments and not for prod.
- Sandbox always stays up to date with latest semantic tag and updates the flux-patch file.
- On merge to from sandbox branch to prod branch prod applies ALL infra changes and ALL application updates at the same time from the flux patch file
2020-03-11
2020-03-27
![Erik Osterman (Cloud Posse) avatar](https://secure.gravatar.com/avatar/88c480d4f73b813904e00a5695a454cb.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0023-72.png)
Adding @discourse_forum bot
![discourse_forum avatar](https://avatars.slack-edge.com/2020-03-26/1029663249525_451a74d3463357c40dbf_72.png)
@discourse_forum has joined the channel
2020-03-30
![sheldonh avatar](https://secure.gravatar.com/avatar/b909e5a82474e9853ff6a6c6111cf0cf.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0020-72.png)
Trying to find docs on this….
if I want to apply actions, templates, settings or anything across all my org in github, isn’t there a .github
special repository you can create and all the child repositories inherit this, for instance with CODE_OWNERS for example? I thought there was a special repo for github that allowed this, like the .github
name or something (not the folder in each github, I’m aware of that one)
![Erik Osterman (Cloud Posse) avatar](https://secure.gravatar.com/avatar/88c480d4f73b813904e00a5695a454cb.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0023-72.png)
Ya, no way to do that across repositoryies
![Erik Osterman (Cloud Posse) avatar](https://secure.gravatar.com/avatar/88c480d4f73b813904e00a5695a454cb.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0023-72.png)
the .github
directory is just a place to store github-specific configurations inside of a single repository
![sheldonh avatar](https://secure.gravatar.com/avatar/b909e5a82474e9853ff6a6c6111cf0cf.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0020-72.png)
Thanks for confirming. Therefore codeowner would be done on all repos not one central. Makes sense in the git world for sure
![sheldonh avatar](https://secure.gravatar.com/avatar/b909e5a82474e9853ff6a6c6111cf0cf.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0020-72.png)
I just found more documentation supporting a central .github repo for an org… Look at this section