$ datalab create simonlab
Creating the instance simonlab
Created [https://www.googleapis.com/compute/v1/projects/mitac-simonsu-2017/zones/asia-east1-c/instances/simonlab].
Connecting to simonlab.
This will create an SSH tunnel and may prompt you to create an rsa key pair.
Waiting for Datalab to be reachable at http://localhost:8081/
The connection to Datalab is now open and will remain until this command is killed.
You can connect to Datalab at http://localhost:8081/
$ datalab list
NAME ZONE MACHINE_TYPE PREEMPTIBLE INTERNAL_IP EXTERNAL_IP STATUS
simonlab asia-east1-c n1-standard-1 10.140.0.2 123.123.123.123 RUNNING
下面是實際連線上的狀態:
Datalab Tutorials
我們可以透過/datalab/dosc/turtorials來找到許多與GCP Data Source連線的範例,下面是一個BigQuery連線的畫面..
$ datalab connect simonlab
Connecting to simonlab.
This will create an SSH tunnel and may prompt you to create an rsa key pair.
Waiting for Datalab to be reachable at http://localhost:8081/
The connection to Datalab is now open and will remain until this command is killed.
You can connect to Datalab at http://localhost:8081/
連線上後,系統會打開瀏覽器,讓您直接連線使用。
如果最後需要刪除這個資源,可以直接使用delete指令將該資源刪除...
$ datalab delete simonlab
Deleting simonlab
The following instances will be deleted. Attached disks configured to
be auto-deleted will be deleted unless they are attached to any other
instances. Deleting a disk is irreversible and any data on the disk
will be lost.
- [simonlab] in [asia-east1-c]
Do you want to continue (Y/n)? Y
Deleted [https://www.googleapis.com/compute/v1/projects/mitac-simonsu-2017/zones/asia-east1-c/instances/simonlab].