Skip to content

Commit 72e8128

Browse files
authored
docs: Add additional explanation on jumpbox and port fowarding setup with minor fix. (#52)
Co-authored-by: Robert Xiong <>
1 parent c686ab4 commit 72e8128

1 file changed

Lines changed: 16 additions & 3 deletions

File tree

samples/langchain_quick_start.ipynb

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,21 @@
9191
"source": [
9292
"Memorystore for Redis uses private, internal IP addresses for security. To access your Redis instance from the public internet, you'll need to set up a jump box and SSH into it from your Colab with port forwarding. Using a local Colab runtime makes this process easier.\n",
9393
"\n",
94-
"Download and run the latest Colab runtime docker image on your local machine: `docker run --network=host us-docker.pkg.dev/colab-images/public/runtime`"
94+
"The flow of a connection to Redis instance in this colab example would be:\n",
95+
"\n",
96+
"```\n",
97+
"Colab browser -> Colab runtime on local machine -> GCE VM(jump box) -> Redis instance\n",
98+
"```"
9599
]
96100
},
97101
{
98102
"attachments": {},
99103
"cell_type": "markdown",
100104
"metadata": {},
101105
"source": [
102-
"Connect Colab to the local Colab runtime. Please refer to the [instructions](https://research.google.com/colaboratory/local-runtimes.html)."
106+
"1. Download and run the latest Colab runtime docker image on your local machine: `docker run --network=host us-docker.pkg.dev/colab-images/public/runtime`\n",
107+
"\n",
108+
"1. Connect Colab to the local Colab runtime. Please refer to the [instructions](https://research.google.com/colaboratory/local-runtimes.html)."
103109
]
104110
},
105111
{
@@ -350,7 +356,14 @@
350356
"outputs": [],
351357
"source": [
352358
"redis_ip = !gcloud beta redis instances describe {instance_name} --region {region} --format=\"value(host)\"\n",
353-
"!gcloud compute ssh --project={project_id} --zone={zone} {vm_name} -- -NL 6379:{redis_ip}:6379"
359+
"!gcloud compute ssh --project={project_id} --zone={zone} {vm_name} -- -NL 6379:{redis_ip[0]}:6379\""
360+
]
361+
},
362+
{
363+
"cell_type": "markdown",
364+
"metadata": {},
365+
"source": [
366+
"Please run the above command printed in the output of above step in your local machine to establishing traffic forwarding. Note that the above command is a processed as a blocking command, hence it has to be executed outside Colab and you will need run it on your local machine terminal."
354367
]
355368
},
356369
{

0 commit comments

Comments
 (0)