Skip to content

Add a utility to create a SSH tunnel for the database#1237

Open
arteymix wants to merge 1 commit into
developmentfrom
feature-ssh-tunnel-for-dev
Open

Add a utility to create a SSH tunnel for the database#1237
arteymix wants to merge 1 commit into
developmentfrom
feature-ssh-tunnel-for-dev

Conversation

@arteymix

@arteymix arteymix commented Sep 29, 2024

Copy link
Copy Markdown
Collaborator

This simplifies working remotely against the production/test database by establishing a tunnel automatically within Gemma.

This is only available when the 'dev' profile is active.

This is only available when the 'dev' profile is active.
@arteymix

arteymix commented Mar 1, 2025

Copy link
Copy Markdown
Collaborator Author

We need to add a thread that consumes the subprocess output and prints it to the logs. Other than that, I think it looks good.

@arteymix arteymix added this to the 1.32.0 milestone Mar 1, 2025
@arteymix arteymix self-assigned this Mar 1, 2025
@arteymix

Copy link
Copy Markdown
Collaborator Author

@oganm what do you think of this?

@arteymix arteymix removed this from the 1.32.0 milestone Apr 28, 2025
public void start() {
Assert.isTrue( host != null && localPort > 0 && remoteHost != null && remotePort > 0 );
try {
String[] args = new String[] { "ssh", "-L", localPort + ":" + remoteHost + ":" + remotePort, host };

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Add the -N option so that no shell is opened.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

We also need a log file for the stdout/stderr. We can take inspiration from the internal static asset server.

@arteymix arteymix removed their assignment Feb 16, 2026
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

Successfully merging this pull request may close these issues.

1 participant