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

[cli] Resolve ENV placeholders in secrets.yaml with a bash-like syntax #380

Merged
merged 10 commits into from
Sep 8, 2023

Conversation

eolivelli
Copy link
Member

@eolivelli eolivelli commented Sep 8, 2023

Summary:

  • now in your secrets.yaml file you can use the bash syntax for ENV variables ${VARIABLE:-defaultValue}
  • reworked the sample secrets.yaml file and instances/astra.yaml to use ENV variables
  • reworked all the sample applications to instruct the user to export ENV variables with the API keys, tokens, database names...
  • reworked some cases in which we used "is null" vs "is empty", now with the default secrets many variables are defined but empty, especially the Astra secureBundle, database, token, username, password...
  • removed some useless example applications

This patch contains unrelated changes to:

  • debug statements (less verbosity)
  • classpath of the Cassandra Drivers (the WebCrawler application crashed due to a problem on the class path)

README.md Outdated
1. Export two environment variables containing the OpenAI URL and access key:
```
export OPEN_AI_URL=xx
export OPEN_AI_ACCESS_KEY=xx
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

space

Export some ENV variables in order to configure access to the database:

```
export ASTRA_TOKEN=...
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
export ASTRA_TOKEN=...
export ASTRA_TOKEN=AstraCS:xxxx

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it is worth, the user has to copy/paste from the Astra UI, and we are now using the same terms: token, secret, clientId. Previously we called them username/password with a custom mapping to clientId and secret

```
export OPENAI_ACCESS_KEY=...
export OPENAI_URL=...
export OPENAI_PROVIDER=azure
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shall we default to openai here instead of azure ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, I have updated it

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actully I have removed the whole application, we already have other applications, like the WebCrawler, that do the same things.

It is confusing to have too many examples that perform almost that same things

Export some ENV variables in order to configure access to the database:

```
export ASTRA_TOKEN=...
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
export ASTRA_TOKEN=...
export ASTRA_TOKEN=AstraCS:xxx

@eolivelli eolivelli merged commit e8ed1c4 into main Sep 8, 2023
8 checks passed
@eolivelli eolivelli deleted the impl/secrets-from-env branch September 8, 2023 12:07
benfrank241 pushed a commit to vectorize-io/langstream that referenced this pull request May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants