Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Hacking build pipelines with Kubernetes and Goo...

Joonathan
November 25, 2017

Hacking build pipelines with Kubernetes and Google Cloud Container Builder

Joonathan

November 25, 2017
Tweet

More Decks by Joonathan

Other Decks in Technology

Transcript

  1. KUBERNETES & GOOGLE CLOUD PLATFORM It’s not scary to get

    started Kubernetes is production ready Not only for “microservices” Grow together from prototype to planet scale Friendly pricing Offers managed Kubernetes
  2. LAUNCHING A KUBERNETES CLUSTER ON GKE Launching a cluster is

    really as easy as this? gcloud container clusters create \ hackjunction-demo-cluster \ --zone europe-west3-a \ --additional-zones=europe-west3-b \ --num-nodes=3 \ --cluster-version=1.8.3-gke.0 \ --machine-type=n1-standard-1 \ --project hackjunction-demo
  3. CONTAINER BUILDER Build in the Cloud Fully managed with 120

    free build minutes per day Supports build triggers to automatically run on code changes Flexible build steps execute commands in Docker containers Easy to integrate with other GCP services It’s fast
  4. TRIGGER BUILDS ON GIT PUSHES Customizable build triggers on source

    code changes Support for Cloud Source Repository, GitHub and Bitbucket CLI and API for submitting build requests
  5. APPLICATIONS IN THE CLOUD Project layout for our Cloud Build

    enabled deployment. . ├── .gitignore ├── .kubernetes │ ├── deployment.yaml │ ├── ingress.yaml │ └── service.yaml ├── Dockerfile ├── LICENSE ├── cloudbuild.yaml └── main.go https://github.com/joonathan/hackathon-demo
  6. APPLICATIONS IN THE CLOUD Build request YAML document defines our

    build steps. steps: - name: 'gcr.io/cloud-builders/go' args: - 'install' - 'hello' env: - 'PROJECT_ROOT=hello' - name: 'gcr.io/cloud-builders/docker' args: - 'build' - '-t' - 'gcr.io/$PROJECT_ID/$REPO_NAME:$COMMIT_SHA-$BUILD_ID' - ‘.' - - snip - - images: [‘gcr.io/$PROJECT_ID/$REPO_NAME']