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

Building Instruqt, a gamified learning platform...

Sponsored · Ship Features Fearlessly Turn features on and off without deploys. Used by thousands of Ruby developers. →

Building Instruqt, a gamified learning platform for IT

Bas is one of the founders of Instruqt, a startup building a hands-on learning platform for DevOps tooling and Cloud technology. With Instruqt, every participants gets his own personal infrastructure, that is being created in seconds. Bas will talk about how they leveraged Terraform, Kubernetes and Google Cloud to create a scalable and cost-effective learning platform. He will discuss the choices they've made, the problems they encountered and the lessons learned.

Avatar for Bas Tichelaar

Bas Tichelaar

March 15, 2018

Other Decks in Technology

Transcript

  1. Bas Tichelaar Start new things Writing code Entrepreneur I love

    skiing! DevOps (Google) cloud (pre-)sales Xebia Instruqt Inspire Challenge Connector Consultant Co-founder Startups Automation Solving problems Marketing Drumming
  2. Technologies we use. Golang React Terraform Google Cloud Functions Bash

    Docker Firebase Google Cloud Container Builder Google Datastore Google Storage Kubernetes Google Kubernetes Engine Google Container Registry Google PubSub Redux
  3. Technologies we use. Golang React Terraform Google Cloud Functions Bash

    Docker Firebase Google Cloud Container Builder Google Datastore Google Storage Google Kubernetes Engine Google Kubernetes Engine Google Container Registry Google PubSub Redux
  4. What is being created by the platform? Kubernetes namespace Shell

    pod SSH service Gotty service SSH keys Alpine container
  5. User namespace Exposed via ingress & proxy Proxy JWT token

    validation Gotty service play.instruqt.com Firebase
  6. Benefits of using GKE Automatic scaling Automatic upgrades Separate node-pools

    Natively supported by Terraform Fast release cycle Integration with GCP IAM Google created Kubernetes Google Cloud networking
  7. Our build pipeline Track directory • config.yml • track.yml •

    challenges Instruqt Trackbuilder Google Cloud Storage bucket Google Cloud Container Builder POST instruqt track build upload trigger Google Container Registry Image
  8. Automated deployment Google Container Registry Image Google Cloud PubSub Google

    Cloud Container Builder Google Cloud Function Generate Kubernetes YAML file Kubernetes New container Old container POST
  9. Benefits of using a pipeline like this No central buildserver

    No more Jenkins (jay!) Deployment across projects Integration with GCP IAM No external services required, all Google Cloud Functions are small and simple Automatic build logs
  10. PubSub cannot be used cross project. Use a cloud function

    that publishes the messages across projects. PubSub Cloud Function Cloud Function PubSub Project 1 Project 2
  11. Track container Google Cloud Storage bucket Terraform: create user infrastructure

    config.yaml Terraform template (Golang template) Rendered template terraform apply Infrastructure Terraform state
  12. Benefits of using Terraform Immutable infrastructure Support for all our

    resources Integration with Google IAM Declarative Golang template + Terraform = powerful! Stored state of infrastructure Agentless (API + SSH) Dry-run: terraform plan
  13. GKE auto upgrades are great. But make sure your critical

    services have at least 3 replicas running :)
  14. Some tools have a looong startup time, but we need

    it to start instantly. Our solution: VM pooling,
  15. VM pool VM pooling Kubernetes VM Kubernetes VM Kubernetes VM

    Label: available=true Kubernetes VM Label: available=false A new VM is being created by terraform terraform apply
  16. Our mission is to make learning IT more hands-on and

    fun. You can help us by creating tracks yourself!
  17. Thank you. Go to play.instruqt.com to create an account! Bas

    Tichelaar [email protected] @bastichelaar linkedin.com/in/bastichelaar