Using etcd to control Django settings

Say I have a Django application and I unloaded the environment variable store on etcd. When I deploy a new server, the application can read from etcd, write vars to a (for example) Python file, which can be conditionally loaded when the application loads. It is acceptable.

However, when changing the configuration, I do not know. Afaik etc. Do not broadcast changes. Do I need to configure a daemon that polls and then restarts my application when the values โ€‹โ€‹change? Should I request etcd when I need to use one of these options? How do people deal with this?

+5
source share
1 answer

I did not use CoreOS or Docker, but I read a lot and I think that this is very sexy stuff. I think the decision depends on how you configured the application. If you have the same touch-reload support that you see in many appservers (uWSGI f.ex.), you can set key_file in /etc/etcd/etcd.conf and have your application server watch this . It seems harder than it should be. I am quite sure that someone with experience with the platform can come up with something much better.

0
source

Source: https://habr.com/ru/post/1200682/


All Articles