This repository was archived by the owner on Sep 12, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 876
This repository was archived by the owner on Sep 12, 2018. It is now read-only.
NG: Configuration #646
Copy link
Copy link
Closed
Labels
Milestone
Description
Let's define the approach by which users will configure the next-gen registry:
First, some use cases:
- I want to run a simple registry in container form with a default storage driver (local filesystem or S3) and want to provide the relevant parameters.
- I want to configure a persistent registry with many fine-tuned parameters.
- I want to manage multiple registries and manage my configurations in one place.
Current solutions:
-
Parameters can be provided via environment variables at runtime. Example shown below:
docker run \ -e SETTINGS_FLAVOR=s3 \ -e AWS_BUCKET=mybucket \ -e STORAGE_PATH=/registry \ -e AWS_KEY=myawskey \ -e AWS_SECRET=myawssecret \ -e SEARCH_BACKEND=sqlalchemy \ -p 5000:5000 \ registry -
Edit the config.yml and provide it to the container with a shared volume
-
Same as 2, but with an NFS volume or a synchronized directory(?)
Proposed solutions:
- Keep the same behavior with environment variables. We may want to do a better job namespacing configuration variables for storage drivers though. For instance, the s3 driver, we provide
AWS_BUCKETandAWS_KEY, but perhaps these should beS3_BUCKETandS3_AWS_KEYorS3_KEY. - We should probably still use a YAML configuration file, although we should be more conscious of versioning, as to avoid requiring a rewrite of configuration files on each version change. The registry could continue to use old configuration file versions up to a point, as long as we're explicit in specifying the configuration version.
- Allow the registry to use a URL to point at a YAML configuration, as hosted on a web server somewhere. This allows us to update the configuration in one place and have the changes propagate to all registries using this configuration endpoint (great for mirroring setups).