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

Update cloud-shell-tutorial.md #549

Open
wants to merge 1 commit into
base: docs
Choose a base branch
from

Conversation

FossPrime
Copy link

@FossPrime FossPrime commented Jan 26, 2024

Instructions were outdated.

Token is now default and server.sh no longer exists.

Would be nice to have a way to generate the real link... with token and IP... but I see no way to do that. Maybe pipe it in sed?

outdated instructions
@FossPrime
Copy link
Author

FossPrime commented Jan 27, 2024

Turns out, a firewall rule is not needed if you use ssh port forwarding, which is built into gcloud and works from Cloud Shell

This prints a link with a proxy by Google Cloud Shell:
gcloud compute ssh "openvscode-server" -- -L 127.0.0.1:3000:[::1]:3000 "openvscode-server | sed 's|://localhost:3000|s://3000-$WEB_HOST|'"

The url is stored in the env var WEB_HOST, its port 80 by default but can be turned into 3000 by prepending 3000--

Your session will be terminated every hour unless you interact with the shell
https://cloud.google.com/shell/docs/quotas-limits#non-interactive_usage

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