Save 37% off PRO during our Black Friday Sale! »

Cloud-native Go dev-environment: a year later - Christian Weichel - TypeFox

6e3ea86995d93d35c0fadf2694bca773?s=47 GoDays
January 23, 2020

Cloud-native Go dev-environment: a year later - Christian Weichel - TypeFox

Go powers the cloud. Yet, most Go code is still written offline. With the advent of a new generation of Cloud IDEs, such as Eclipse Theia, this is changing.

In this talk I will show how we integrated Kubernetes, Telepresence, Jenkins, Athens and Gitpod into the cloud-native Go dev environment we've been using in production for about a year now.
This talk is very much a real-world experience report from a core developer working in the trenches of a cloud native SaaS product, obviously including live demos. Our dev setup
- centers around a VS-code like online (read, in-the-browser) IDE with Docker-backed terminals,
- integrates a Git-ops approach with pre-built workspaces (`go get/vet/build` running before you open your IDE),
- Athens as Go module proxy making our builds fast,
- in-cluster debugging using Telepresence,
- and a ready-to-go `kubectl` setup for each member of the team.

As a boon, workspaces are isolated and thus no longer mess up our local setups or interfere with each other.

We aim to show how modern, cloud-native dev environments can immensely benefit us as Go developers.
Packed with real-world examples this talk will leave the audience with loads of new ideas of how they can improve their own dev environment.

6e3ea86995d93d35c0fadf2694bca773?s=128

GoDays

January 23, 2020
Tweet

Transcript

  1. Christian Weichel, PhD @csweichel 1 Cloud-Native Go
 Dev-Environment A year

    later
  2. Christian Weichel @csweichel TypeFox

  3. Christian Weichel @csweichel TypeFox

  4. Christian Weichel @csweichel Gitpod built on a diverse stack

  5. Christian Weichel @csweichel Local Dev-Environment is hot stuff

  6. Christian Weichel @csweichel Automated Preview Environments don’t run locally git

    push
  7. Christian Weichel @csweichel Debugging using telepresence somewhat run locally preview


    environment ws-manager
  8. Christian Weichel @csweichel Automated Preview Environments don’t run locally git

    push CI start 4 min build > 20 min
  9. Christian Weichel @csweichel Automated Preview Environments can take long to

    set up CI start 4 min build > 20 min
  10. Christian Weichel @csweichel Automated Preview Environments can be quick to

    set up CI start 4 min build ~ 2 min
  11. Christian Weichel @csweichel Automated Preview Environments can be quick to

    set up CI start 4 min build ~ 2 min
  12. Christian Weichel @csweichel GitOps Dev-Installation can be quick to set

    up git push CI start 5 sec build ~ 2 min
  13. Christian Weichel @csweichel Local Dev-Environment is a workout node
 tsc


    yarn
 go
 docker
 kubectl
 gcloud
 python
 helm
 protoc
 mysql
 minikube
 dnsmasq
 VirtualBox
 telepresence node
 tsc
 dnsmasq
 VirtualBox
 telepresence >= $NODE_VER
 >= $TSC_VERSION
 >= $YARN_VERSION
 == 1.12
 == 18.06
 >= $KUBE_VERSION
 
 >= 3.x
 >= 2.x
 
 
 >= v0.28.2
 
 >= 5.2.16

  14. Christian Weichel @csweichel Local Dev-Environment is expensive to set up,

    maintain, live with
  15. Christian Weichel @csweichel Local Dev-Environment can be containerised ### cloud_sql_proxy

    ### ARG CLOUD_SQL_PROXY=/usr/local/bin/cloud_sql_proxy RUN curl -fsSL https://dl.google.com/cloudsql/cloud_sql_proxy.linux.amd64 > $CLOUD_SQL_PROXY \ && chmod +x $CLOUD_SQL_PROXY ### Docker client ### RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - \ # 'cosmic' not supported && add-apt-repository -yu "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable" \ && apt-get install -yq docker-ce-cli=5:18.09.0~3-0~ubuntu-bionic \ && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* ### Helm2 ### RUN curl -fsSL https://storage.googleapis.com/kubernetes-helm/helm-v2.11.0-linux-amd64.tar.gz \ | tar -xzvC /usr/local/bin --strip-components=1 \ && helm completion bash > /usr/share/bash-completion/completions/helm ### Helm3 ### RUN mkdir -p /tmp/helm/ \ && curl -fsSL https://get.helm.sh/helm-v3.0.0-linux-amd64.tar.gz | tar -xzvC /tmp/helm/ --strip-components=1 \ && cp /tmp/helm/helm /usr/local/bin/helm3 \ && rm -rf /tmp/helm/ ### kubectl ### RUN curl -fsSL https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - \
  16. Christian Weichel @csweichel Local Dev-Environment provides ample coffee breaks 15

    minutes wasted
 for each checkout
 issue
 feature
 quick fix
 branch
  17. Christian Weichel @csweichel Local Dev-Environment is expensive 10 developers
 x

    1h per day 
 = 50h per week
  18. Christian Weichel @csweichel Cloud-Native Dev-Environment can be prebuilt git push

  19. Christian Weichel @csweichel Cloud-Native Go Dev-Environment in a nutshell Kubernetes

    Cluster https://gitpod.io
 https://theia-ide.org https://telepresence.io
 https://werft.dev
 https://helm.sh preview
 environment
  20. Christian Weichel, PhD @csweichel 20 Thanks
 for your attention

  21. Christian Weichel @csweichel Cloud-Native Go Dev-Environment in a nutshell Kubernetes

    Cluster https://gitpod.io
 https://theia-ide.org https://telepresence.io
 https://werft.dev
 https://helm.sh preview
 environment