Skip to content

Simplify launch scripts #119

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

Closed
jdortiz opened this issue Mar 20, 2025 · 1 comment
Closed

Simplify launch scripts #119

jdortiz opened this issue Mar 20, 2025 · 1 comment

Comments

@jdortiz
Copy link
Member

jdortiz commented Mar 20, 2025

At the moment, there are two scripts that launch the server (server.sh) and the user interface (sandbox.sh). Both scripts share a number of environment variables, that the user might have to modify in both places, should any of the configuration parameters change. Also they are the place where some other variables have to be added, like the OPENAI_API_KEY, which should remain secret and never be committed into the repository.
I would suggest to create two other scripts just for setting the environment. The first one could be called shared_conf.sh and would contain all the configuration variables that can be public. The second one could be called secret_conf.sh and contain the environment variables that are to keep private.
Both scrips (server.sh and sandbox.sh) will source shared_conf.sh at the beginning and conditionally source secret_conf.sh if it exists.

[[ -f secret_conf.sh ]] && source secret_conf.sh

Additionally, secret_conf.sh can be included in .gitignore so team members won't commit their secret credentials by accident to the repository.

@gotsysdba
Copy link
Contributor

Thanks @jdortiz; some comments:
Generally, IMO, we should avoid supporting or providing examples of using custom wrappers to bootstrap settings. While using environment vars, and thus including them in a wrapper is provided... it is not the ideal (or documented) way to bootstrap the environment outside of K8s. It would be up to the user to write, protect, and support a wrapper. IMO, the documented feature to export/import settings is the only method that should be supported for custom bootstrapping.

  • Documented examples of starting the AI Explorer using wrapper scripts should be replaced with examples of creating a settings json file for consumption; the only place I know where examples are provided are in the HOL and will be addressed in Move HOL to LL #121

#35 will address the automatic consuption of existing settings to discourage wrapper use.

I'm going to close this and address the points raised in #35 and #121; feel free to re-open if the comments do not satisfy the request. FYI @corradodebari

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants