Last active
December 31, 2015 15:32
-
-
Save thekensta/dc18513099a3d9f1c0e3 to your computer and use it in GitHub Desktop.
Simple Google DataProc IPython Example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://stackoverflow.com/questions/33112020/how-do-i-install-jupyter-ipython-on-dataproc | |
PROJECT_ID=<project_id> | |
CLUSTER_NAME=<cluster_name> | |
# This should be ipython.sh | |
# https://github.com/GoogleCloudPlatform/dataproc-initialization-actions/blob/master/ipython-notebook/ipython.sh | |
INIT_GCS_SCRIPT=<init_gcs_script> | |
CHROME="/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome" | |
gcloud beta dataproc clusters create $CLUSTER_NAME --zone europe-west1-b \ | |
--master-machine-type n1-standard-2 --master-boot-disk-size 50 --num-workers 2 \ | |
--worker-machine-type n1-standard-2 --worker-boot-disk-size 50 \ | |
--image-version 0.2 --project $PROJECT_ID \ | |
--initialization-actions <init_gcs_script> | |
gcloud compute ssh --zone=europe-west1-b --ssh-flag="-D 1080" --ssh-flag="-N" \ | |
--ssh-flag="-n" $CLUSTER_NAME"-m" | |
$CHROME --proxy-server="socks5://localhost:1080" \ | |
--host-resolver-rules="MAP * 0.0.0.0 , EXCLUDE localhost" \ | |
--user-data-dir=/tmp/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment