Where the Helm are your binaries?

A presentation at Kubernetes and Cloud Native Montréal Q3 Meetup in August 2018 in Montreal, QC, Canada by Baruch Sadogursky

Slide 1

Slide 1

Where the Helm are your binaries?

Slide 2

Slide 2

Join.jfrog.com

Slide 3

Slide 3

About me @ jbaruch

Slide 4

Slide 4

shownotes • www.jfrog.com / shownotes • Slides • Video (tomorrow!) • All the links! • Ratings, comments • Raffle! @jbaruch www.jfrog.com/shownotes

Slide 5

Slide 5

What the helm is helm? Dependency manager for Kubernetes @jbaruch www.jfrog.com/shownotes

Slide 6

Slide 6

How to deploy anything to k8s • Copy YAML • Paste YAML • Fix indents • Repeat @jbaruch www.jfrog.com/shownotes

Slide 7

Slide 7

Kubernetes resource { "kind" : "Deployment" , " apiVersion " : "extensions/v1beta1" , "metadata" : { "name" : "my

release

docker

app

chart" }, "spec" : { "containers" : [ { "name" : " docker

app

chart" , "image" : " docker.artifactory /docker

app:1.0" , @jbaruch www.jfrog.com/shownotes

Slide 8

Slide 8

Let’s build a new one!

docker build – t docker.artifactory /docker

app:1.1 @jbaruch www.jfrog.com/shownotes

Slide 9

Slide 9

One last thing…

sed – i.bak ` s#docker.artifactory /docker

app:1.1#${ imageTag }#` deployment.yaml @jbaruch www.jfrog.com/shownotes

Slide 10

Slide 10

@jbaruch www.jfrog.com/shownotes

Slide 11

Slide 11

Or just use :latest "image" : " docker.artifactory / docker

app:latest " @jbaruch www.jfrog.com/shownotes

Slide 12

Slide 12

Enter helm @jbaruch www.jfrog.com/shownotes

Slide 13

Slide 13

Encapsulated packages of Kubernetes deployments All this… xrayxray

analysis xray

event xray

indexer xray

nfs

server xray

persist Becomes this xray @jbaruch www.jfrog.com/shownotes

Slide 14

Slide 14

Powerful templating for descriptor files { "kind" : "Deployment" , " apiVersion " : "extensions/v1beta1" , "metadata" : { "name" : "{{ template " docker

app.fullname " . }}" }, "spec" : { "containers" : [ { "name" : "{{ template " docker

app.name " . }}" , "image" : "{{ . Values.image.repository }}: {{ . Values.image.tag }}" @jbaruch www.jfrog.com/shownotes

Slide 15

Slide 15

Values:

Default values for

docker

app.

This is a YAML

formatted file.

Declare name/value pairs to be passed into your templates.

image : repository : docker.artifactory / docker

app tag : 1.1 secretName : regsecret pullPolicy : Always @jbaruch www.jfrog.com/shownotes

Slide 16

Slide 16

Simple! • Templates • Values • Metadata @jbaruch www.jfrog.com/shownotes

Slide 17

Slide 17

Chart <

image relationship • Using templates we can reuse charts for multiple image versions • Chart versions != Image versions @jbaruch www.jfrog.com/shownotes

Slide 18

Slide 18

Kubernetes cluster control @jbaruch www.jfrog.com/shownotes

Slide 19

Slide 19

Two parts Helm client • Local chart development • Managing repositories • Interacting with the Tiller server Tiller Server • Listening for incoming requests from the Helm client • Combining a chart and configuration to build a release • Installing charts into Kubernetes, and then tracking the subsequent release • Upgrading and uninstalling charts by interacting with Kubernetes @jbaruch www.jfrog.com/shownotes

Slide 20

Slide 20

Helm commands

helm init

helm search

helm install

helm status

helm repo @jbaruch www.jfrog.com/shownotes

Slide 21

Slide 21

Helm repositories • Official repository

kubeapps.com @jbaruch www.jfrog.com/shownotes

Slide 22

Slide 22

@jbaruch www.jfrog.com/shownotes

Slide 23

Slide 23

Helm repositories • Official repository

kubeapps.com • Get a local one! • Option 1: Create your own: • Run an http server with index.yaml • Run helm repo index to generate one the index • Option 2: Use JFrog Artifactory • Universal Artifact Repository which supports Docker, Helm and everything else @jbaruch www.jfrog.com/shownotes

Slide 24

Slide 24

What Dependency managers and printers have in common? @jbaruch www.jfrog.com/shownotes

Slide 25

Slide 25

@jbaruch www.jfrog.com/shownotes

Slide 26

Slide 26

@jbaruch www.jfrog.com/shownotes

Slide 27

Slide 27

Seven deadly sins of package managers 1. Over

architecture 2. Lack of planning for enterprise scenarios (e.g., no private repositories, won’t scale, etc.) 3. Downloadable index 4. CSDR (cross

site dependency resolution) loopholes 5. Lack of proper package authentication 6. Lack of version management 7. Using the wrong service for the central registry (and hard

coding it) @ jbaruch www.jfrog.com / shownotes

Slide 28

Slide 28

Seven deadly sins of package managers 1. Over

architecture 2. Lack of planning for enterprise scenarios (e.g., no private repositories, won’t scale, etc.) 3. Downloadable index 4. CSDR (cross

site dependency resolution) loopholes 5. Lack of proper package authentication 6. Lack of version management 7. Using the wrong service for the central registry (and hard

coding it ) @ jbaruch www.jfrog.com / shownotes

Slide 29

Slide 29

Tiller is a pain • Back in the days we had a good reason for Tiller • Pre

RBAC days in k8s • Now it is just PITA • Good news: you can use Helm without Tiller today! • Also, Helm 3 is tillerless @jbaruch www.jfrog.com/shownotes

Slide 30

Slide 30

Downloadable index @jbaruch www.jfrog.com/shownotes

Slide 31

Slide 31

How bad can it be? @jbaruch www.jfrog.com/shownotes

Slide 32

Slide 32

Why in the world you need 120k or charts?! @jbaruch www.jfrog.com/shownotes

Slide 33

Slide 33

Use Artifactory: Take your metadata seriously Where the helm is my binary? @jbaruch www.jfrog.com/shownotes

Slide 34

Slide 34

The Age of Binaries IoT Docker Microservices DevOps CD CI Agile 2001 2018

Slide 35

Slide 35

Who cares about those binaries anyway? @jbaruch www.jfrog.com/shownotes

Slide 36

Slide 36

Slide 37

Slide 37

Slide 38

Slide 38

@jbaruch www.jfrog.com/shownotes

Slide 39

Slide 39

@jbaruch www.jfrog.com/shownotes

Slide 40

Slide 40

@jbaruch www.jfrog.com/shownotes

Slide 41

Slide 41

@jbaruch www.jfrog.com/shownotes

Slide 42

Slide 42

@jbaruch www.jfrog.com/shownotes

Slide 43

Slide 43

@jbaruch www.jfrog.com/shownotes

Slide 44

Slide 44

@jbaruch www.jfrog.com/shownotes

Slide 45

Slide 45

@jbaruch www.jfrog.com/shownotes

Slide 46

Slide 46

@jbaruch www.jfrog.com/shownotes

Slide 47

Slide 47

Slide 48

Slide 48

Slide 49

Slide 49

Slide 50

Slide 50

Slide 51

Slide 51

Slide 52

Slide 52

Slide 53

Slide 53

Slide 54

Slide 54

Slide 55

Slide 55

Slide 56

Slide 56

Slide 57

Slide 57

Slide 58

Slide 58

Slide 59

Slide 59

Demo time Talk is cheap, show me the code! @jbaruch www.jfrog.com/shownotes

Slide 60

Slide 60

QA and links • www.jfrog.com / shownotes • Slides • Video (tomorrow!) • All the links! • Ratings, comments • Raffle! @jbaruch www.jfrog.com/shownotes