INTEGRATING DEVELOPER AND OPERATOR EXPERIENCE IN K8S BRENDAN BURNS - - PowerPoint PPT Presentation

integrating developer and operator experience in k8s
SMART_READER_LITE
LIVE PREVIEW

INTEGRATING DEVELOPER AND OPERATOR EXPERIENCE IN K8S BRENDAN BURNS - - PowerPoint PPT Presentation

INTEGRATING DEVELOPER AND OPERATOR EXPERIENCE IN K8S BRENDAN BURNS VELOCITY NYC - 2018 FIRST A QUESTION? Do you love your development environment? FIRST A QUESTION? (OR TWO) Do you love your development environment? Does your


slide-1
SLIDE 1

INTEGRATING DEVELOPER AND OPERATOR EXPERIENCE IN K8S

BRENDAN BURNS VELOCITY – NYC - 2018

slide-2
SLIDE 2

FIRST A QUESTION?

  • Do you love your development environment?
slide-3
SLIDE 3

FIRST A QUESTION? (OR TWO)

  • Do you love your development environment?
  • Does your development environment love you?
slide-4
SLIDE 4

WHAT DO I MEAN?

  • We're editing code in the cloud
  • We're building code in the cloud
  • We're deploying code in the cloud
  • We're debugging code in the cloud
slide-5
SLIDE 5

WHAT DO I MEAN?

  • But our tools are tied to a single machine
  • And often our tools are confined to a single persona
slide-6
SLIDE 6

GOALS AND NON-GOALS

Goals:

  • Make developing, testing, deploying and debugging seamless
  • Build modular, composable tooling experiences

Non-goals:

  • Develop an all-encompassing "railed" experience
  • Assuming that everyone will use these tools (all or some)
slide-7
SLIDE 7

A QUICK WORD FROM OUR SPONSORS...

  • J/K
slide-8
SLIDE 8

THE 'I' IN 'IDE' IS FOR INTEGRATION

  • Code doesn't run in a vacuum
  • Most of the things our code 'integrates' with don't live on our machine
  • Some of this we're somewhat good at:
  • Git
  • Most of it, we're pretty bad at:
  • Services, Replication, Logs, ….
  • And even the things that are on the machine often aren't great...
slide-9
SLIDE 9

Binary

GETTING STARTED (WITH K8S)

Code Dockerfile Kubernetes YAML Image Service Compiler Docker kubectl

slide-10
SLIDE 10

GETTING STARTED (WITH K8S)

But tools can help!

Binary Code Dockerfile Kubernetes YAML Image Service Compiler Docker kubectl

slide-11
SLIDE 11

FIRST THINGS FIRST, A PLACE TO DEPLOY...

  • The deployment environment for code used to be implicit.
  • Not anymore.
  • But tools can help with that too...
slide-12
SLIDE 12

AND THEN THERE'S THAT WHOLE DOCKERFILE AND YAML THING...

  • Three files
  • Three tools
  • Three syntaxes
  • Just to deploy one app!
slide-13
SLIDE 13

DRAFT DEMO

  • https://draft.sh
slide-14
SLIDE 14

BUILDING MODERN TOOLS

slide-15
SLIDE 15

BUILDING MODERN TOOLS

slide-16
SLIDE 16

BUILDING MODERN TOOLS

slide-17
SLIDE 17

BUILDING AND DEPLOYING IMAGES

Binary Code Dockerfile Kubernetes YAML Image Service Compiler Docker kubectl

slide-18
SLIDE 18

BUILDING AND DEPLOYING WITH DRAFT

slide-19
SLIDE 19

VISIBILITY (OR THE LACK THERE-OF)

slide-20
SLIDE 20

EXPLORING YOUR CLUSTER

  • Connect the development and deployment environment together
  • Browse your cluster
  • Visualize service health
  • Don't learn 'awk' (yet)
slide-21
SLIDE 21

CONNECTING TO YOUR APPLICATION

  • My code's in the cloud... Now what?
slide-22
SLIDE 22

EXPLORING YOUR PODS (AND CONTAINERS)

  • Integrating Pod logs
  • Integrating Pod terminal
  • apiVersion: v1

kind: Pod metadata: name: foo … Hello world! Request handled …

logs pods/foo

slide-23
SLIDE 23

DEBUGGING YOUR CODE

  • Bringing your services to a local proxy
slide-24
SLIDE 24

DEBUGGING YOUR CODE

  • Synchronizing external state to your local repository
  • func main() {

http.ListenAndServe(:80) }

git checkout <hash>

slide-25
SLIDE 25

UPGRADING YOUR JOBS

  • Edit and visual diff.
slide-26
SLIDE 26

UPGRADING YOUR JOBS

  • Making the changes in a principled way
slide-27
SLIDE 27

LOOKING FORWARD

  • Cloud state and cloud experiences.
slide-28
SLIDE 28

LOOKING FORWARD

  • Merging logs from many different sources...
  • apiVersion

kind: Pod metadata: name: foo … Hello world! Request handled …

{ app: frontend, stage: production }

slide-29
SLIDE 29

LOOKING FORWARD

Cloud-idiomatic code

slide-30
SLIDE 30

LOOKING FORWARD

const server = http.createServer((request, response) => { console.log(request.url); response.end(`Hello World: hostname: ${os.hostname()}\n`); }); mp.containerize( { repository: 'docker.io/docker-user-goes-here', }, () => { server.listen(port, (err) => { if (err) { return console.log('server startup error: ', err); } console.log(`server up on ${port}`); }); } );

https://metaparticle.io

slide-31
SLIDE 31

LOOKING FORWARD

from metaparticle import containerize class MyHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): … @containerize( 'docker.io/your-docker-user-goes-here', options={'name': 'my-image', 'publish': True}) def main(): Handler = MyHandler httpd = socketserver.TCPServer(("", port), Handler) httpd.serve_forever() if __name__ == '__main__’: main()

https://metaparticle.io

slide-32
SLIDE 32

CONTRIBUTIONS NEEDED

  • What about monitoring?
  • What about collaboration?
  • Configuration languages?
  • https://github.com/Azure/vscode-kubernetes-tools
  • https://github.com/helm/helm