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

Docker images and environment variables. #4

Open
eloycoto opened this issue Apr 30, 2020 · 2 comments
Open

Docker images and environment variables. #4

eloycoto opened this issue Apr 30, 2020 · 2 comments

Comments

@eloycoto
Copy link

eloycoto commented Apr 30, 2020

Hi,

After a couple of issues, I think that some changes will be good to address some of the common issues that we have in our POC around integration this feature with other projects:

  • Make an official docker image, with tags, so we don't need to use a custom version of netty, etc.. So people can test a single YAML file and no changes between users.
  • Add a LOG_LEVEL env variable, and if it set to debug, add a way to print the request headers, so it'll help us to know if proxy information is correct.
  • Add an HTTPS_CERT and HTTPS_CERT_FILE so if someone needs to use the container can set these variables, and it'll be easier.

Many thanks!

@zregvart
Copy link
Owner

zregvart commented May 4, 2020

  • Make an official docker image, with tags, so we don't need to use a custom version of netty, etc.. So people can test a single YAML file and no changes between users.

Not sure, what do you mean with a "custom version of netty"?

This is an example project, I don't think there's a need for a official releases, should be fairly simple to push this image to a registry such as Quay.io and tag versions there if you need. Other than that, you could use the SHA if you need a deterministic version, i.e.

quay.io/zregvart/camel-netty-proxy@sha256:838cf9f7e08be62eedbbd92e79a5d009f59fffe5d015c5679eb326de38a94bc0

or

zregvart/camel-netty-proxy@sha256:6814f3e93dc3f47a5a9d07083fc63f93561ef77cb570f84618683e25f820fa07
  • Add a LOG_LEVEL env variable, and if it set to debug, add a way to print the request headers, so it'll help us to know if proxy information is correct.

Added in 4ce26b2.

  • Add an HTTPS_CERT and HTTPS_CERT_FILE so if someone needs to use the container can set these variables, and it'll be easier.

The default deployment to OpenShift, triggered via openshift Maven profile (i.e. when run with ./mvnw -Popenshift package), adds a init container using the https://github.com/jimmidyson/pemtokeystore which will convert key and certificate issued by OpenShift CA to a Java keystore. The focus of this example is running this on OpenShift, not sure I want to make it more complex than that.

You can simulate the same by mounting a keystore to /tls/keystore.jks, and generate a Java Keystore file by running a command like:

$ keytool -genkeypair -keystore keystore.jks -dname "CN=hostname" -keypass changeit -storepass changeit -keyalg RSA -ext SAN=dns:hostname
$ docker run -v $(pwd)/keystore.jks:/tls/keystore.jks:Z camel-netty-proxy

@eloycoto
Copy link
Author

Hello!

About this:

  1. If you can add tags, like v1 on the quay containers will be great.
  2. Thanks for the logs, will help a lot.
  3. I'm a bit worried about the installation. This process is awesome if you are a full-time Java developer, but I think that should make it simpler for non-developers, and they are more familiar with Yamls, something like that:

https://github.com/eloycoto/apicast-demo-apps/blob/a2eacf501a4fad268ffadc3e94f1e0ac95c0fe67/camel/camel.yaml#L1-L30

I'll try to do something like the init contianer, is always the path in the /tls/ folder?

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

No branches or pull requests

2 participants