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

Use environment variables to configure Zeebe #81

Open
kbakk opened this issue Nov 11, 2020 · 4 comments
Open

Use environment variables to configure Zeebe #81

kbakk opened this issue Nov 11, 2020 · 4 comments
Labels
enhancement New feature or request
Projects

Comments

@kbakk
Copy link
Collaborator

kbakk commented Nov 11, 2020

Is your feature request related to a problem? Please describe.
The zeebe-client-node library has a "Zero-Conf constructor" that allows to use environment variables to set up Zeebe.

This project could benefit from taking the same approach.

It already supports specifying hostname:port with ZEEBE_ADDRESS.

Describe the solution you'd like
To quote from zeebe-client-node docs:

With no relevant environment variables set, it will default to localhost on the default port with no TLS.

The following environment variable configurations are possible with the Zero-conf constructor:

Camunda Cloud:

ZEEBE_ADDRESS
ZEEBE_AUTHORIZATION_SERVER_URL
ZEEBE_CLIENT_SECRET
ZEEBE_CLIENT_ID

Self-hosted or local broker (no TLS or OAuth):

ZEEBE_ADDRESS

Self-hosted or local broker with OAuth + TLS:

ZEEBE_CLIENT_ID
ZEEBE_CLIENT_SECRET
ZEEBE_TOKEN_AUDIENCE
ZEEBE_AUTHORIZATION_SERVER_URL
ZEEBE_ADDRESS

Basic Auth:

ZEEBE_BASIC_AUTH_PASSWORD
ZEEBE_BASIC_AUTH_USERNAME

Describe alternatives you've considered

  • Having a function that's responsible for loading config and pass it to ZeebeWorker/ZeebeClient on instantiation.

E.g.

zeebe_client = ZeebeClient(**get_zeebe_config())
# where `get_zeebe_config` would return a dict
# e.g. {"secure_connection": True, "hostname": "localhost", "port": 26500}

If this is a direction we'd like to take, I'd be happy to submit a PR for this.

@JonatanMartens
Copy link
Collaborator

I definitely think this is something that we want in pyzeebe. It would be great if you could submit a PR.

@JonatanMartens JonatanMartens added this to Backlog in pyzeebe via automation Nov 18, 2020
@JonatanMartens JonatanMartens added the enhancement New feature or request label Nov 18, 2020
@kbakk kbakk mentioned this issue Mar 8, 2021
@JonatanMartens
Copy link
Collaborator

Should I add this issue to the Pyzeebe 3.0.0 milestone @kbakk?

@kbakk
Copy link
Collaborator Author

kbakk commented Nov 4, 2021

@JonatanMartens I assume #186 was accidentally closed (because the branch it was made against was deleted)? Should I try to rebase this against master/development?

@JonatanMartens
Copy link
Collaborator

@kbakk, sorry for the late response.

It would be great if you could rebase this agains master :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
pyzeebe
  
Backlog
Development

No branches or pull requests

2 participants