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

Inherit environment variables from the worker #25

Open
naorlivne opened this issue Sep 26, 2017 · 1 comment
Open

Inherit environment variables from the worker #25

naorlivne opened this issue Sep 26, 2017 · 1 comment

Comments

@naorlivne
Copy link
Member

I can see some cases that inheriting envvars from the worker-manager host node will be a good idea, that would allow devices to have some customizability that might be useful for distributed systems yet still managed centrally (same IoT sensor everywhere, but a tag is manually set on each sensor with it's location name, etc...), thinking it could be any combination of the follow:

  • envvar with some sort of prefix (IE NEBULA_)
  • file with a list of the envvars

not sure about how to handle multiple apps each getting different envvars yet, anyone got any ideas in that regards?

@naorlivne
Copy link
Member Author

naorlivne commented Jun 24, 2019

A really simple soultion that was staring me in the face & I somehow missed is to use parse_it and to have it have a dict of all worker inherited key:values in the following format:

{
   "nebula_worker_envvars": {
        "app": {
             "app_1": {key_1":" value_1", .... "key_n":"value_n"},
            ...
            "app_n": {key_1":" value_1", .... "key_n":"value_n"}
             },
         "cron": {
             "cron_1": {key_1":" value_1", .... "key_n":"value_n"},
            ...
            "cron_n": {key_1":" value_1", .... "key_n":"value_n"}
             },
       }
}

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

No branches or pull requests

1 participant