Coder Social home page Coder Social logo

Comments (5)

keith-turner avatar keith-turner commented on June 3, 2024

Would this be acceptable?

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?

from accumulo-proxy.

volmasoft avatar volmasoft commented on June 3, 2024

I think there's two ways 1 that goes towards Accumulo's approach, 1 that goes towards Nifi's approach.

1. accumulo-docker approach

Take the variables straight off the command line e.g.:

ACCUMULO_CL_OPTS="-o instance.name=uno -o instance.zookeepers=my.host.com:2181"
docker run accumulo-proxy:latest  ${ACCUMULO_CL_OPTS}

2. Hybrid approach

Provide a single environment variable e.g. similar to how accumulo-docker sets ACCUMULO_CL_OPTS

ACCUMULO_CL_OPTS="-o instance.name=uno -o instance.zookeepers=my.host.com:2181"
docker run -e EXTRA_PROPS=${ACCUMULO_CL_OPTS} accumulo-proxy:latest 

Then inside our code we grab the PROPS environment variable and override any that are specified in proxy.properties.

3. NiFi's approach

Provide individual environments variables for each property e.g. like NiFi does here: https://hub.docker.com/r/apache/nifi/
So something like

docker run -e INSTANCE_NAME="uno" -e INSTANCE_ZOOKEEPERS="my.host.com:2181"  accumulo-proxy:latest

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.

from accumulo-proxy.

keith-turner avatar keith-turner commented on June 3, 2024

Personally I find the NiFi approach to be a cleaner approach

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 AP_INSTANCE_NAME? Code in accumulo-docker could look for all env vars with the prefix AP_.

from accumulo-proxy.

volmasoft avatar volmasoft commented on June 3, 2024

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:

  1. Happy with accumulo-proxy being inconsistent with accumulo-docker
  2. We at happy to update accumulo-docker to follow the same pattern

Any views on who we should dial into that sort of conversation to gain consensus?
Looking at the accumulo-docker repo the two main commiters are @mikewalch and @karthick-rn

from accumulo-proxy.

keith-turner avatar keith-turner commented on June 3, 2024

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.

from accumulo-proxy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.