Skip to content

Deploy on Google Cloud Platform

Anders Larsson edited this page Sep 12, 2017 · 31 revisions

Please follow this guide for the General prerequisites for a deployment on a private of public cloud provider.

Google cloud specific prerequisites

  • You have enabled the Google Compute Engine API: API Manager > Library > Compute Engine API > Enable

  • You have created and downloaded a service account file for your GCE project: Api manager > Credentials > Create credentials > Service account key

  • You installed python package apache-libcloud and jmespath (e.g. sudo pip install apache-libcloud jmespath)

Configuration

All of the commands in this documentation are meant to be run in the cloud-deploy-kubenow directory.

Start by creating your configuration file: config.gcp.sh There is a template that you can use for your convenience:

mv config.gcp.sh-template config.gcp.sh

In this configuration file you will need to set:

Cluster

  • TF_VAR_cluster_prefix: every resource in your tenancy will be named with this prefix

  • TF_VAR_gce_credentials_file: path to your service account file

  • TF_VAR_gce_region: the zone for your project (e.g. europe-west1-b)

  • TF_VAR_gce_project: your project id

Master configuration

  • TF_VAR_master_flavor: an instance flavor for the master
  • TF_VAR_master_as_edge: master is acting as gateway for accessing services

Node configuration

  • TF_VAR_node_count: number of Kubernetes nodes to be created (no floating IP is needed for these nodes)
  • TF_VAR_node_flavor: an instance flavor name for the Kubernetes nodes

Gluster configuration

  • TF_VAR_glusternode_count: number of egde nodes to be created (1 - 3 depending on preferred replication factor)
  • TF_VAR_glusternode_flavor: an instance flavor for the glusternodes
  • TF_VAR_glusternode_extra_disk_size: disk size of the fileserver size in GB

Edge configuration (optional)

  • TF_VAR_edge_count: number of egde nodes to be created
  • TF_VAR_edge_iflavor: an instance flavor for the edge nodes

Cloudflare (optional) - See: KubeNow Cloudflare documentation.

  • TF_VAR_use_cloudflare: wether you want to use cloudflare as dns provider
  • TF_VAR_cloudflare_email: the mail that you used to register your Cloudflare account
  • TF_VAR_cloudflare_token: an authentication token that you can generate from the Cloudflare web interface
  • TF_VAR_cloudflare_domain: a zone that you created in your Cloudflare account. This typically matches your domain name (e.g. somedomain.com)

Galaxy

  • TF_VAR_galaxy_admin_email: the local galaxy admin (you?)
  • TF_VAR_galaxy_admin_password: min 6 characters admin password

Jupyter

  • TF_VAR_jupyter_password: password for your notebook

Kubernetes dashboard

  • TF_VAR_dashboard_username: username to access your kubernetes dashboard
  • TF_VAR_dashboard_password: password for your kubernetes dashboard

Once you are done with your settings you are ready to deploy the cluster:

./phenomenal.sh deploy gcp

when deployment is finished then you should be able to reach the services at:

Galaxy         = http://galaxy.<your-prefix>.<yourdomain>
Jupyter        = http://notebook.<your-prefix>.<yourdomain>
Luigi          = http://luigi.<your-prefix>.<yourdomain>
Kube-dashboard = http://dashboard.<your-prefix>.<yourdomain>

and if you want to ssh into the master node:

# first add your private key to your ssh-agent:
ssh-add deployments/id-phnmnl-config.gcp/vre.key
# then
ssh ubuntu@master.<yourdomain>

and to destroy use:

./phenomenal.sh destroy gcp
Clone this wiki locally