Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to correctly stop Google Cloud Datalab

Playing with data is a joy in Junyper/Datalab, but I do not want it to become costly.

Google recommends:

"You can minimize compute charges by stopping/restarting Cloud Datalab instances."

However, if I stop the AppEngine instance or the Compute Engine VM instance, they simply restart ...

So how to correctly stop/pause Google Cloud Datalab, so that I'm only charged for my use, not for the idle time? Is there some kind of trigger that restarts the instances?

like image 746
Karel Van Roey Avatar asked Mar 04 '16 16:03

Karel Van Roey


People also ask

How do I stop Google Cloud Virtual machine?

To stop a VM, use the Google Cloud console, the gcloud CLI, or the Compute Engine API. In the Google Cloud console, go to the VM instances page. Select one or more VMs that you want to stop. Click Stop.

How do you stop cloud shells from running?

Cloud Shell can be disabled for G Suite and Cloud Identity managed user accounts. This can be done by going to the Google Admin console and then navigating to Apps > Additional Google services > Google Cloud Platform > Cloud Shell Settings and disabling "Cloud Shell Access Settings".

How do you stop a project in GCP?

Go to the API Console. Open the console left side menu and select IAM & Admin, then select Settings. Find the name or project ID of the project you want to shut down, then click SHUT DOWN. A confirmation screen describing what will happen appears.

What is datalab in GCP?

Use Cloud Datalab to easily explore, visualize, analyze, and transform data using familiar languages, such as Python and SQL, interactively. Pre-installed Jupyter introductory, sample, and tutorial notebooks, show you how to: Access, analyze, monitor, and visualize data.


1 Answers

Here's what I'm doing. I like keeping everything in the cloud; but, I want to resume work with minimal fuss and cost.

Save Data/Source and Delete Datalab

1. Commit changes to Your Cloud Git Repository. As long as the source changes are committed, they'll pop backup when you re-create google cloud. Keep your data in buckets gs://... or BigQuery. Commit all changed Notebooks.

Your Cloud Git Repository

2. Delete the datalab module.

https://console.cloud.google.com/projectselector/appengine/versions?moduleId=datalab enter image description here

Resuming Your Work:

When you're ready to resume your work, goto launch cloud datalab sign-in, and deploy. It will take 6 or 7 minutes. Once it's deployed, up, and running, you can go directly to your tree and resume your work. You're probably talking 10 minutes tops.

like image 86
Mike Chirico Avatar answered Nov 15 '22 12:11

Mike Chirico