Reputation: 91
Because the way we use GCP, it's not possible for me to create a datalab-network in my setup. So when I create a Datalab instances though "datalab create", I get an error (ERROR: ...Required 'compute.networks.create' permission for 'projects/xxxx').
Is it possible to setup datalab and use my own network? I have tried to set it up like suggested here (http://e-lin.github.io/wiki/jekyll/update/2016/12/13/Running-Google-Cloud-Datalab.html) but I am not sure this is officially supported. When I open my browser at localhost:8081 I get a ERR_CONNECTION_RESET, and when I log onto the Compute Engine VM I don't see anything listening to port 8080 (docker ps does not show anything running). Do we need to start docker explicitly in such a case?
Thanks.
Upvotes: 0
Views: 735
Reputation: 1066
It is possible to run Datalab on a different network, but it is not supported.
The recommended solution to your problem is to ask a project owner to create the network for you. Specifically, they would run two commands:
gcloud compute networks create \
--description 'Network for Datalab instances' \
datalab-network
gcloud compute firewall-rules create \
--allow 'tcp:22' \
--network datalab-network \
--description 'Allow SSH access to Datalab instances' \
datalab-network-allow-ssh
... and then you will be able to run datalab create ...
If that is not tenable, then you can clone the Datalab source repository here, change the name of the network here, comment out the line of code here, and then run tools/cli/datalab.py create ...
.
Note, however, that approach is neither recommended nor supported.
Upvotes: 1