Skip to content
This repository has been archived by the owner on Dec 10, 2018. It is now read-only.

Reduce configuration to one (or max two) short properties #5

Closed
codefromthecrypt opened this issue Feb 9, 2017 · 5 comments
Closed
Assignees

Comments

@codefromthecrypt
Copy link

Right now, there's a long description of creating a properties file which includes all but one property. Each of these are in long form, like zipkin.collector.eventhub.connection-string. To get a similar experience with other services, we'd ideally have one or two required properties in short form (like EVENTHUB_CONNECTION_STRING, taking anything we can from host installed defaults (if exist)

The following are good examples of where a short env variable is available, which allows people to literally hand type a commandline in as needed!

@aliostad
Copy link
Collaborator

aliostad commented Feb 9, 2017

Currently only 2 conf params are mandatory (rest are supplied for overwriting defaults):

  • EVENTHUB_CONNECTION_STRING
  • Azure Storage Connection String

The first one being passed using the property launcher which leaves only the second one - I have not tried but I guess we can pass system variables via command line.

I will check.

UPDATE

Yes it does. It worked as system properties so it is mainly question of shortening it. I will do that - expect a PR soon.

codefromthecrypt pushed a commit that referenced this issue Feb 10, 2017
This uses a spring profile to make configuration like other Zipkin
components. This doesn't prevent property file configuration, rather
suggests the same style here as we do elsewhere.

This also cleans up tests and simplifies the startup instructions.

Ex.
``` bash
cd /tmp
EVENTHUB_CONNECTION_STRING=foo
EVENTHUB_STORAGE_CONNECTION_STRING=bar
java -Dloader.path=eventhub -Dspring.profiles.active=eventhub -cp zipkin.jar org.springframework.boot.loader.PropertiesLauncher
```

You'll notice the convention of using the same directory of loader path
as the server profile. This is intentional as I think it will make
docker or other server setup easier. For example, the java command can
be templated.

Fixes #5
See #7
@codefromthecrypt
Copy link
Author

here's an implementation along with some fixes and other suggestions #9

@codefromthecrypt
Copy link
Author

actually, it doesn't completely solve this because I still don't have good docs or instructions to derive the mandatory properties.. @aliostad maybe you can help with that after the fact?

@aliostad
Copy link
Collaborator

Is it not better to read environment variables in the auto configuration so not having to rely on the YAML file? e.g. System.getenv("EVENTHUB_CONNECTION_STRING"), etc

@codefromthecrypt
Copy link
Author

codefromthecrypt commented Feb 10, 2017 via email

SergeyKanzhelev pushed a commit to SergeyKanzhelev/zipkin-azure that referenced this issue Jun 29, 2017
…model

data model changes to add name, id and dependency for sr annotaiton
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants