-
Notifications
You must be signed in to change notification settings - Fork 21
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
Provide overrides for proxy.properties in Docker deployments #21
Comments
How were you thinking of passing options via env vars? Seems like this could be done in multiple ways, I am curious what you are envisioning. Would it be possible to provide a few example commands that show what you are thinking? |
I think there's two ways 1 that goes towards Accumulo's approach, 1 that goes towards Nifi's approach. 1. accumulo-docker approachTake the variables straight off the command line e.g.:
2. Hybrid approachProvide a single environment variable e.g. similar to how accumulo-docker sets ACCUMULO_CL_OPTS
Then inside our code we grab the PROPS environment variable and override any that are specified in proxy.properties. 3. NiFi's approachProvide individual environments variables for each property e.g. like NiFi does here: https://hub.docker.com/r/apache/nifi/
We would have to decide an approach to load these properties either in proxy-env or in the Java code. Personally I find the NiFi approach to be a cleaner approach especially if we look towards providing anything like a docker-compose or Kubernetes example configurations in the future. Whichever approach we take we should be consistent so I think we'd have to dive into accumulo-docker and update it if we take a different approach, perhaps before we release the first container image on dockerhub. |
For that approach, it would be nice do it in such a way that code does not have to be written in accumulo-docker for each property. What do you think about having a common env var name prefix with that approach? Like |
That's an interesting idea, to be fair I hadn't thought that far ahead yet but I like it 👍 I'm inclined not to implement this unless we're either:
Any views on who we should dial into that sort of conversation to gain consensus? |
Personally, I would like to see accumulo-docker and accumulo-proxy be consistent w.r.t. passing properties. As far as which should go first with something new, I am not quite sure. |
@keith-turner and I briefly touched upon allowing
proxy.properties
to be overidden for a Docker instantiation of accumulo-proxy in this pull request: #20Currently in accumulo-docker you can override properties by the following:
This is documented in the docs here: https://github.com/apache/accumulo-docker
For standard docker approaches I would say this is a simplistic mechanism that works really cleanly however if you start to look at things like docker-compose or kubernetes I would say it would be advantageous to avoid overriding the CMD or ENTRYPOINT flags where possible.
An alternative method would be to provide these as environment variables, therefore you could also use the Kubernetes secret APIs to handle things such as passwords and either map them to a file or environment variable for use within the application.
Would this be acceptable? If so I'm also happy to look at providing the same change to accumulo-docker to retain consistency?
The text was updated successfully, but these errors were encountered: