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

Cloud-native Go dev-environment: a year later -...

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.

GoDays

January 23, 2020
Tweet

More Decks by GoDays

Other Decks in Technology

Transcript

  1. 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

  2. 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 - \
  3. Christian Weichel @csweichel Local Dev-Environment provides ample coffee breaks 15

    minutes wasted
 for each checkout
 issue
 feature
 quick fix
 branch
  4. 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
  5. 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