caktus / margarita

A collection of delicious Salt states for Django project deployments.
BSD 3-Clause "New" or "Revised" License
34 stars 8 forks source link

Break apart "repo" pillar into "branch" and "repo" #127

Closed ghost closed 8 years ago

ghost commented 8 years ago

There's a nifty command line trick for salt to pass in pillar data. If we break apart this pillar then we can easily override the branch in the deploy Fabric command.

See also: https://github.com/caktus/django-project-template/pull/251 https://github.com/caktus/developer-documentation/pull/44

mlavin commented 8 years ago

This is going to be a bit painful to update but definitely for the best. @vkurup @dpoirier do you have any strong objection? This would enable us to get back to easy branch deployments as @rebecca-caktus has already proven on Hosted Tracpro.

dpoirier commented 8 years ago

Maybe mention this in the developer docs, with a link to https://docs.saltstack.com/en/latest/topics/tutorials/pillar.html#setting-pillar-data-on-the-command-line and an example of using it to override the branch name on the fab command line?

dpoirier commented 8 years ago

I made a couple of comments but like the idea overall.

ghost commented 8 years ago

Interesting note: an alternative to this change would be to change the pillar merging strategy: https://docs.saltstack.com/en/latest/ref/configuration/master.html#pillar-source-merging-strategy

ghost commented 8 years ago

See changes here: https://github.com/caktus/django-project-template/pull/251

ghost commented 8 years ago

@dpoirier This is ready for re-review.

dpoirier commented 8 years ago

Let's update http://caktus.github.io/developer-documentation/margarita/states.html#project-repo along with this.

ghost commented 8 years ago

@dpoirier Updated.

Related pulls: https://github.com/caktus/developer-documentation/pull/44 https://github.com/caktus/django-project-template/pull/251

dpoirier commented 8 years ago

:+1: