NYTimes/drone-gke

Name: drone-gke

Owner: The New York Times

Description: Drone plugin to deploy containers to Google Container Engine

Created: 2016-08-23 23:17:17.0

Updated: 2018-05-22 13:46:10.0

Pushed: 2018-05-01 17:15:17.0

Homepage: https://open.blogs.nytimes.com/2017/01/12/continuous-deployment-to-google-cloud-platform-with-drone/

Size: 388

Language: Go

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

drone-gke

Drone plugin to deploy container images to Kubernetes on Google Container Engine. For the usage information and a listing of the available options please take a look at the docs.

This is a little simpler than deploying straight to Kubernetes, because the API endpoints and credentials can be derived using the Google credentials. In addition, this opens the yaml file to templatization and customization with each Drone build.

Drone Compatibility

For usage in Drone 0.5 and newer, please use a release greater than 0.7.

For usage in Drone 0.4, please use the nytimes/drone-gke:0.4 tag.

Releases

Users should use the x.X releases for stable use cases (eg 0.8).

Breaking changes may occur between x.X releases (eg 0.7 and 0.8), and will be documented in the changelog.

Development

The git workflow follows git-flow. New features should be based on the master branch.

glide is used to manage vendor dependencies.

uild
Testing

This could use your contribution! Help us create a runnable test suite.

Docker

Build the Docker image with the following commands:

R=your-docker-hub-user ./bin/dist
Usage

Executing locally from the working directory:

ploy the manifest templates in example/
 example/

t to the path of your GCP service account JSON file
port GOOGLE_APPLICATION_CREDENTIALS=xxx

t to your cluster
port CLUSTER=yyy

t to your cluster's zone
port ZONE=zzz

e variables required for the templates in JSON format
t vars.json

app": "echo",
env": "dev",
image": "gcr.io/google_containers/echoserver:1.4"


ecute the plugin
cker run --rm \
 PLUGIN_CLUSTER="$CLUSTER" \
 PLUGIN_ZONE="$ZONE" \
 PLUGIN_NAMESPACE=drone-gke \
 PLUGIN_VARS="$(cat vars.json)" \
 TOKEN="$(cat $GOOGLE_APPLICATION_CREDENTIALS)" \
 SECRET_API_TOKEN=123 \
 SECRET_BASE64_P12_CERT="cDEyCg==" \
 $(pwd):$(pwd) \
 $(pwd) \
times/drone-gke --dry-run --verbose

move --dry-run to deploy

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.