pythonindia / magudi

Salt stack based config for Python India servers
https://in.pycon.org
5 stars 9 forks source link

Add options to deploy specific apps using provision #36

Open ananyo2012 opened 4 years ago

ananyo2012 commented 4 years ago

Running provision deploys all the applications managed by magudi. We need options to deploy specific applications.

palnabarun commented 4 years ago

I think the whole point of a declarative configuration is to declare a state which you want your resources to be in. so, when you need to change one application, just change the configuration for that and ask your tooling to apply that. It would ensure the target state is equal to your desired state.

Right now, if you change only a subset of the salt formulas, only the changes would get applied and rest would be ensured that they maintain their state. In that essence, salt is already designed to do that.

Do you still think this is relevant then?

PS: Nearly all configuration management software work along the same lines. :)

ananyo2012 commented 4 years ago

So my suggestion is to not change magudi but the provision script somehow to deploy one application. Like if we want to deploy only current inpycon website then we don't need to resync junction or other year websites. We still may want to abstract the inside details for running multiple commands and use just one command to deloy. Just sync the specific app and deploy. Is that possible using passing option to salt command ?

palnabarun commented 4 years ago

If you don't change any configuration for resources other than what you are trying to change, those reources are untouched. That's what I am trying to convey. That's the whole paradigm of declarative state management.

ananyo2012 commented 4 years ago

What about changes to the app or something like cert update. We use magudi for these things as well. When I am updating 2020 website or doing a cert update I don't want to run changes on other resources. I want it to be selective. Doing it manually like syncing the code or running certbot manually is a option but that also requires some steps and adequate knowledge of the tool. The purpose of magudi is to abstract all these steps and make it seamless.