openmicroservices.org icon indicating copy to clipboard operation
openmicroservices.org copied to clipboard

Environment check function

Open stevepeak opened this issue 6 years ago • 2 comments

Proposition to add methods for checking environment variables before deployment.

environment:
  foobar:
    ...
environment_check: ["python", "check_env.py"]

All environment variables are included during the check (because they all may be needed). Return a 0 if the variable(s) are valid. Return a 1+ for failure and write to stderr why.

stevepeak avatar Feb 18 '19 09:02 stevepeak

What's the advantage over (1) checking this on the engine directly for all services or (2) in the program itself?

wilzbach avatar Feb 18 '19 12:02 wilzbach

The idea here is to reduce issues before placing into production. The Platform would be able to run a simple check to see if environment works. e.g., GitHub Apps client/secret pairs actually work and resolve. This can be checked upon updating configuration and periodically as a service health-check.

Both your points above, from my interpretation, occur after deployment and when "real" data is handled.

stevepeak avatar Feb 18 '19 13:02 stevepeak