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

Convert OPQ Cloud services to use JSON configuration files #227

Open
philipmjohnson opened this issue Feb 27, 2019 · 0 comments
Open

Convert OPQ Cloud services to use JSON configuration files #227

philipmjohnson opened this issue Feb 27, 2019 · 0 comments

Comments

@philipmjohnson
Copy link
Contributor

philipmjohnson commented Feb 27, 2019

Please do work for this task in a branch called issue-227-<service>, where service is one of 'view', 'mauka', 'makai', etc.

Currently, OPQ View uses a JSON file to specify configuration settings. This is more convenient to manage than environment variables. Let's use that approach consistently for all OPQ Cloud services.

Proposed approach

  1. Create a top-level 'config' directory in your service implementation (i.e. opq/mauka/config, opq/makai/config, etc.)

  2. Inside that directory, create a file called mauka.config.json (or makai.config.json, etc). These hold your "developer" configuration values. You can have one or many config files, whatever makes most sense to you.

  3. Update the service code to obtain all configuration values from this json file, which will generally be made available to the service as the contents of a single env var called <SERVICE>_SETTINGS.

  4. In the openpowerquality/docker repo, create a config/ directory, with subdirectories for each service (view, mauka, makai, health, boxupdater). Put in your config file(s) with "default" settings (which might be empty strings in the case of usernames, hostnames, or passwords).

  5. Update docker-compose scripts and files to provide these config files to services.

  6. Update https://openpowerquality.org/docs/cloud-installation.html#edit-configuration-files with documentation on any required edits to the default config files in order to bring up a new OPQ Cloud instance in a new host.

  7. Edit your developer level documentation (i.e. https://openpowerquality.org/docs/cloud-mauka.html) to provide complete documentation of these configuration variables and their appropriate values.

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