-
Notifications
You must be signed in to change notification settings - Fork 127
EPR: enable proxy mode #957
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
Conversation
🌐 Coverage report
|
| COPY profiles/${PROFILE}/stack/package-registry.config.yml /package-registry/config.yml | ||
| COPY stack/development/ /packages/development | ||
|
|
||
| ENTRYPOINT ["./package-registry", "--feature-proxy-mode", "--log-level", "debug"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of the features of package-registry have been configured in the docker-compose.yml using environment variables. What about moving settings related to logging to docker-compose file and keep the entrypoint as:
ENTRYPOINT ["./package-registry", "--feature-proxy-mode"]
Since proxy mode is going to be the default behaviour of the package-registry, it would make sense to keep it in the Dockerfile.
And then, moving the log-level parameter to the docker-compose (EPR_LOG_LEVEL?). In the docker-compose-stack.yaml should be something like:
environment:
- "EPR_LOG_LEVEL=debug"
- "EPR_ADDRESS=0.0.0.0:8080"
- "EPR_METRICS_ADDRESS=0.0.0.0:9000"
- "EPR_TLS_KEY=/etc/ssl/package-registry/key.pem"
- "EPR_TLS_CERT=/etc/ssl/package-registry/cert.pem"
I think if the parameter is set in the command line has preference over the environment variables. Moving the log level as environment variable could be changed by developers in the docker-compose without re-building the image.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call, fixed!
| COPY profiles/${PROFILE}/stack/package-registry.config.yml /package-registry/config.yml | ||
| COPY stack/development/ /packages/development | ||
|
|
||
| ENTRYPOINT ["./package-registry", "--feature-proxy-mode", "--log-level", "debug"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one dash ?
| ENTRYPOINT ["./package-registry", "--feature-proxy-mode", "--log-level", "debug"] | |
| ENTRYPOINT ["./package-registry", "-feature-proxy-mode", "-log-level", "debug"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
|
/test |
1 similar comment
|
/test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
| COPY profiles/${PROFILE}/stack/package-registry.config.yml /package-registry/config.yml | ||
| COPY stack/development/ /packages/development | ||
|
|
||
| ENTRYPOINT ["./package-registry", "-feature-proxy-mode"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be also possible to use environment variables to configure this: EPR_FEATURE_PROXY_MODE=true. This may be better than setting the entrypoint, as we are already using environment variables to disable validation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
| - /packages/development | ||
| - /packages/production | ||
| - /packages/staging | ||
| - /packages/snapshot |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥 🔥 🔥
| // PackageRegistryBaseImage is the base Docker image of the Elastic Package Registry. | ||
| const PackageRegistryBaseImage = "docker.elastic.co/package-registry/distribution:snapshot" | ||
| // commit SHA of enabled proxy mode (technical preview feature) | ||
| const PackageRegistryBaseImage = "docker.elastic.co/package-registry/package-registry:14455fcb7e415d6b4aed48e00d2289718f056162" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want to wait to have a released version with this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, as I'm afraid that we may need to add more fixes, and going with the standard release will slow it down. I will replace it with a proper release after some time.
Issue: elastic/package-registry#770
This PR enables the proxy mode feature in the elastic-package stack.