Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
73 lines (63 sloc) 2.33 KB
#
# ElastiCluster Example: R Studio on Google Cloud
#
# This example shows how to set up a single-node R Studio Server:
# ElastiCluster will provision a virtual machine, install R Studio
# Server (Open-Source Edition) and configure it to listen on the
# default port 8787.
#
# This is a complete and self-contained example that should get you
# started with running R Studio servers on Google Cloud Engine.
# You can replace the `[cloud/*]` and `[login/*]` sections
# to get a JupyterHub server running on any other cloud.
#
# In order to use the R Studio server:
#
# 1. Note down the IP address of the server VM created by ElastiCluster
# 2. In your browser, open https://server.ip:8787/
# 3. Log in using username and password
#
# Note that you must edit the default security group to allow
# connections to port 8787!
#
# R Studio Server software to be configured by Ansible
#
# (There is nothing Google-specific in the "setup" section; in fact, it can be
# re-used verbatim with *any* cloud provider or base image)
#
[setup/rstudio]
provider=ansible
server_groups=rstudio
# Create a cloud provider (call it "google-cloud")
#
# See http://googlegenomics.readthedocs.io/en/latest/use_cases/setup_gridengine_cluster_on_compute_engine/index.html
# if you're unsure how to fill the values below.
#
[cloud/google-cloud]
provider=google
gce_project_id=****REPLACE WITH YOUR PROJECT ID****
gce_client_id=****REPLACE WITH YOUR CLIENT ID****
gce_client_secret=****REPLACE WITH YOUR SECRET KEY****
# Create a login (call it "google-login")
#
# In contrast to other cloud providers, GCE creates a personal account on each
# VM so you effectively re-use the same `[login/google]` section across
# different VM images.
[login/google-login]
image_user=****REPLACE WITH YOUR GOOGLE USERID (just the userid, not email)****
image_user_sudo=root
image_sudo=True
user_key_name=elasticluster
# You can generate the keypair with the command: `gcloud compute config-ssh`
user_key_private=~/.ssh/google_compute_engine
user_key_public=~/.ssh/google_compute_engine.pub
# Bring all of the elements together to define a cluster called "rstudio"
[cluster/rstudio]
cloud=google-cloud
login=google-login
security_group=tcp_port_8787
image_id=****REPLACE WITH OUTPUT FROM: gcloud compute images list | grep debian | cut -f 1 -d " "****
flavor=n1-standard-1
setup=rstudio
server_nodes=1
ssh_to=server