Application Delivery and Release Management Honestbee - - PowerPoint PPT Presentation

application delivery and release management
SMART_READER_LITE
LIVE PREVIEW

Application Delivery and Release Management Honestbee - - PowerPoint PPT Presentation

Application Delivery and Release Management Honestbee @vincentdesmet with Containers, Kubernetes and Helm Grocery and Food delivery Honestbee We are Hiring DevOps! Overview Context & overview of Containers (Docker) - Container


slide-1
SLIDE 1

Application Delivery and Release Management with Containers, Kubernetes and Helm

Honestbee

@vincentdesmet

slide-2
SLIDE 2

Grocery and Food delivery

slide-3
SLIDE 3

Honestbee

We are Hiring DevOps!

slide-4
SLIDE 4

Overview

  • Context & overview of Containers (Docker)
  • Container Orchestration (Kubernetes)
  • Managing Releases (Helm)
  • CI/CD ~ Demo (Drone)
slide-5
SLIDE 5

Agile Evolution

Reference: http://docker.com

Loosely Coupled Services Many Small Servers

~2000 Today

Monolithic Big Servers Slow changing Rapidly updated

slide-6
SLIDE 6

Containers / VMs

Infrastructure Container Runtime Interface Bins / Libs Host OS Infrastructure Hypervisor AppA Bins / Libs AppA Guest OS Bins/Libs AppB Guest OS Bins/Libs AppB

slide-7
SLIDE 7

Docker containers

Reference: http://docker.com

  • Packages up software binaries and dependencies
  • Isolates software from each other
  • Container is a standard format
  • Easily portable across environment
  • Allows ecosystem to develop around its standard

Container

slide-8
SLIDE 8

Docker Concepts

Docker Image The basis of a Docker container Docker Container The standard unit in which the application service resides Docker Engine Creates, ships and runs Docker containers deployable on physical or virtual host locally, in a datacenter or cloud service provider Docker Registry On-premises registry for image storing and collaboration

slide-9
SLIDE 9

Docker Tools: BUILD, SHIP, RUN

slide-10
SLIDE 10

Container Orchestration

  • Mesos
  • Kubernetes
  • Docker Swarm
  • ...
slide-11
SLIDE 11

More than just packing and Isolation

  • Scheduling: Where should the containers run?
  • Resource Optimisation: How much resources does each container

really need?

  • Lifecycle and health: Keep containers running despite failures
  • Discovery: How can I connect to the containers?
  • Monitoring: What’s happening with the containers?
  • Auth{n,z}: Control who can do what with the containers?
  • Aggregate: Compose set of containers into jobs
  • Scaling: Handle higher load by adding more instances

Source

slide-12
SLIDE 12

KUBERNETES

"κυβερνήτης" (kubernetes) is Greek for "pilot" or "helmsman of ship"

slide-13
SLIDE 13

WHAT IS KUBERNETES?

  • Container orchestrator
  • Runs and manages containers
  • Supports multiple cloud & bare-metal environments
  • 100% Open Source written in Go
  • Built on decades of experience of running containers at Google
  • First project hosted by CNCF (Accepted on Mar. 11 2016)

Container packaged Dynamically scheduled (Micro) Service oriented

slide-14
SLIDE 14

CONCEPTS: PODS

Container Foo Container Bar Namespaces:

  • Net
  • IPC

volumes

slide-15
SLIDE 15

k8s - High Level View

slide-16
SLIDE 16

k8s - High Level View

slide-17
SLIDE 17

k8s - High Level View

Run X Replicas = 2 Memory = 4Gi CPU = 2.5

slide-18
SLIDE 18

k8s - High Level View

Which node?

slide-19
SLIDE 19

k8s - High Level View

Run X R u n X

slide-20
SLIDE 20

Pull X

k8s - High Level View

slide-21
SLIDE 21

k8s - High Level View

X status X status

slide-22
SLIDE 22

LABELS

app : my-app role : master track: stable app : my-app role : worker track: stable app : my-app role : worker track: canary app : my-app role : master track: canary

slide-23
SLIDE 23

SELECTORS

app : my-app

app : my-app role : master track: stable app : my-app role : worker track: stable app : my-app role : worker track: canary app : my-app role : master track: canary

slide-24
SLIDE 24

SELECTORS

app : my-app role : worker

app : my-app role : master track: stable app : my-app role : worker track: stable app : my-app role : worker track: canary app : my-app role : master track: canary

slide-25
SLIDE 25

SELECTORS

app : my-app track: canary

app : my-app role : master track: stable app : my-app role : worker track: stable app : my-app role : worker track: canary app : my-app role : master track: canary

slide-26
SLIDE 26

REPLICA SETS

+

Replica Set:

  • replicas: 1
  • selector:
  • app: my-app
  • version: 1.0
  • Desired State:
  • Pod Specification
  • Replica Count
  • Label Selector
slide-27
SLIDE 27

REPLICA SETS

+

Replica Set:

  • replicas: 2
  • selector:
  • app: my-app
  • version: 1.0
slide-28
SLIDE 28

REPLICA SETS

+

Replica Set:

  • replicas: 4
  • selector:
  • app: my-app
  • version: 1.0
slide-29
SLIDE 29

SERVICES

Service:

  • nodePort: 30128
  • selector:
  • app: my-app
  • version: 1.0
  • de-couple discovery from application
  • Define how to access pods
  • Act as a proxy (Virtual IP - stable for DNS)

Think of:

  • Dynamic Routing Table
slide-30
SLIDE 30

DEPLOYMENTS

Service:

  • nodePort: 30128
  • selector:
  • app: my-app

+

Replica Set:

  • replicas: 2
  • selector:
  • app: my-app
  • version: 1.0

+

  • Manage updates with Deployment resources
slide-31
SLIDE 31

UPDATES

Service:

  • nodePort: 30128
  • selector:
  • app: my-app

+

Replica Set:

  • replicas: 4
  • selector:
  • app: my-app
  • version: 1.0

+

Deployment:

  • strategy:
  • rollingUpdate
slide-32
SLIDE 32

UPDATES

Service:

  • nodePort: 30128
  • selector:
  • app: my-app

+ +

Replica Set:

  • replicas: 1
  • selector:
  • app: my-app
  • version: 2.0

Replica Set:

  • replicas: 4
  • selector:
  • app: my-app
  • version: 1.0

+

Deployment:

  • strategy:
  • rollingUpdate
slide-33
SLIDE 33

UPDATES

Service:

  • nodePort: 30128
  • selector:
  • app: my-app

+ +

Replica Set:

  • replicas: 1
  • selector:
  • app: my-app
  • version: 2.0

Replica Set:

  • replicas: 3
  • selector:
  • app: my-app
  • version: 1.0

+

Deployment:

  • strategy:
  • rollingUpdate
slide-34
SLIDE 34

UPDATES

Service:

  • nodePort: 30128
  • selector:
  • app: my-app

+ +

Replica Set:

  • replicas: 2
  • selector:
  • app: my-app
  • version: 2.0

Replica Set:

  • replicas: 3
  • selector:
  • app: my-app
  • version: 1.0

+

Deployment:

  • strategy:
  • rollingUpdate
slide-35
SLIDE 35

UPDATES

Service:

  • nodePort: 30128
  • selector:
  • app: my-app

+ +

Replica Set:

  • replicas: 2
  • selector:
  • app: my-app
  • version: 2.0

Replica Set:

  • replicas: 2
  • selector:
  • app: my-app
  • version: 1.0

+

Deployment:

  • strategy:
  • rollingUpdate
slide-36
SLIDE 36

UPDATES

Service:

  • nodePort: 30128
  • selector:
  • app: my-app

+ +

Replica Set:

  • replicas: 3
  • selector:
  • app: my-app
  • version: 2.0

Replica Set:

  • replicas: 2
  • selector:
  • app: my-app
  • version: 1.0

+

Deployment:

  • strategy:
  • rollingUpdate
slide-37
SLIDE 37

UPDATES

Service:

  • nodePort: 30128
  • selector:
  • app: my-app

+ +

Replica Set:

  • replicas: 3
  • selector:
  • app: my-app
  • version: 2.0

Replica Set:

  • replicas: 1
  • selector:
  • app: my-app
  • version: 1.0

+

Deployment:

  • strategy:
  • rollingUpdate
slide-38
SLIDE 38

UPDATES

Service:

  • nodePort: 30128
  • selector:
  • app: my-app

+

Replica Set:

  • replicas: 4
  • selector:
  • app: my-app
  • version: 2.0

Replica Set:

  • replicas: 1
  • selector:
  • app: my-app
  • version: 1.0

+ +

Deployment:

  • strategy:
  • rollingUpdate
slide-39
SLIDE 39

UPDATES

Service:

  • nodePort: 30128
  • selector:
  • app: my-app

+

Replica Set:

  • replicas: 4
  • selector:
  • app: my-app
  • Version: 2.0

Replica Set:

  • replicas: 0
  • selector:
  • app: my-app
  • version: 1.0

+ +

Deployment:

  • strategy:
  • rollingUpdate
slide-40
SLIDE 40

UPDATES

Service:

  • nodePort: 30128
  • selector:
  • app: my-app

+

Replica Set:

  • replicas: 4
  • selector:
  • app: my-app
  • Version: 2.0

+

Deployment:

  • strategy:
  • rollingUpdate
slide-41
SLIDE 41

CONFIGMAPS

Service:

  • nodePort: 30128
  • selector:
  • app: my-app

+ +

Deployment:

  • strategy:
  • rollingUpdate

ConfigMap:

  • sample.yaml: |

env: production cache: true max_threads: 8

slide-42
SLIDE 42

SECRETS

Service:

  • nodePort: 30128
  • selector:
  • app: my-app

+ +

Deployment:

  • strategy:
  • rollingUpdate

Secret:

  • sample.yaml: |

key: *** db_user: *** db_pw: ***

slide-43
SLIDE 43

Kubernetes Deployments

  • Multiple resource types
  • ConfigMaps
  • Secrets
  • Services
  • Based on serializable Manifests

Managing these bundles is a challenge in the long run, can be improved

slide-44
SLIDE 44

Challenges

1.

Collaboration

a. Sharing Manifest files, trust? b. Iterating c. Best Practices

2.

Managing Releases

a. Define package b. Tweaking ~ Multiple copies & variations c. Migrating

slide-45
SLIDE 45

Helm: Package Manager

  • Collaboration with Google, Bitnami, Deis and others
  • Deis/Helm -> Kubernetes/Helm
  • Architecture:
  • Client: Helm
  • Server: Tiller
slide-46
SLIDE 46

Helm core values

  • Aim for the Apt/Yum/Homebrew User Experience
  • Ensure collaboration
  • Reproducible releases
  • Shareable Packages
slide-47
SLIDE 47

Kubeapps.com

slide-48
SLIDE 48

Chart, Repositories, Releases

  • Chart: “Package”, “Bundle”
  • Repository: Package Repository
  • Release: Installed Chart (same chart can be installed multiple times)
slide-49
SLIDE 49

Basic Architecture

Client - Server

slide-50
SLIDE 50

Review using helm

  • Install charts (creates a release)
  • helm install
  • List releases
  • helm ls
  • Upgrade release
  • helm upgrade
  • View release history
  • helm history
  • Bootstrap charts
  • helm create
slide-51
SLIDE 51

Integration with CI/CD

slide-52
SLIDE 52

More features

  • Upgrade Releases
  • helm upgrade <release>
  • Search Charts
  • helm search
  • KubeApps.com (Monocular - https://github.com/helm/monocular)
  • Manage Chart dependencies
  • requirements.yaml
  • helm dep up
  • Helm Plugins
  • Keybase: helm keybase sign/verify
  • GitHub: helm github push
slide-53
SLIDE 53

Mean time to Dopamine Experience

  • RoR promise:

Write a Blog in 15 minutes

slide-54
SLIDE 54

Draft

  • Accelerate time from app source code to Kubernetes deployment
slide-55
SLIDE 55

More Info

https://youtu.be/QNx9-UjTVXA