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

Environment variable to configure node port(s) #53

Open
TimothyLoyer opened this issue Sep 26, 2023 · 0 comments
Open

Environment variable to configure node port(s) #53

TimothyLoyer opened this issue Sep 26, 2023 · 0 comments

Comments

@TimothyLoyer
Copy link

Is your feature request related to a problem? Please describe.
I need to run singlestoredb-dev-image in a Kubernetes Pod alongside other infrastructure (including MySQL) to run tests. I am attempting to upgrade from my customized CIAB image, in which I had overridden the startup script so that PORT could be set in the environment. This would cause the master node to use the specified port, and the leaf node to use PORT + 1.

I attempted a similar customization for the singlestoredb-dev-image. However, it appears that due to the execution of init.sh within the original image, I am unable to simply modify the file within my image to alter the ports.

Here is the script I use to populate the port argument in sdb-admin create-node and sdb-admin add-leaf:

MASTER_PORT="${PORT:-3306}"
LEAF_PORT="$((MASTER_PORT + 1))"

Describe the solution you'd like
Add an environment variable to allow node port(s) to be customized and resolve port conflicts.

Describe alternatives you've considered
Writing my own Dockerfile, or figuring out an additional script to run to update the configurations or recreate the nodes (this is pretty unfavorable).

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

1 participant