SlideShare a Scribd company logo
www.jfrog.comCopyright © 2018 JFrog. All Rights Reserved
Lessons learned and best practices
From shipping rpms to containerized
microservices to run on k8s
Ankush Chadha – Senior Solution Developer
Sept 15th 2018
Copyright @ 2018 JFrog - All rights reserved. @ankushchadha111
Who’s Speaking?
ANKUSH CHADHA
Senior Solution Developer
@ankushchadha111
Copyright @ 2018 JFrog - All rights reserved. @ankushchadha111
From app to k8s
3
app
docker-app:1.0
Manifest
sha256:252564
..
OS: SHA2
Layer n: SHA2
app: SHA2
docker-app:1.0
Manifest
sha256:252564
..
OS: SHA2
Layer n: SHA2
app: SHA2
helper-a:1.0
Manifest
OS
Layer n
helper-b:1.0
Manifest
OS
Layer n
1 2
Copyright @ 2018 JFrog - All rights reserved. @ankushchadha111
From app to k8s
4
app
docker-app:1.0
Manifest
sha256:252564
..
OS: SHA2
Layer n: SHA2
app: SHA2
docker-app:1.0
Manifest
sha256:252564
..
OS: SHA2
Layer n: SHA2
app: SHA2
helper-a:1.0
Manifest
OS
Layer n
helper-b:1.0
Manifest
OS
Layer n
1 2
config compute
Copyright @ 2018 JFrog - All rights reserved. @ankushchadha111
Let’s talk about app: Lessons learned
5
app
docker-app:1.0
Manifest
sha256:252564
..
OS: SHA2
Layer n: SHA2
app: SHA2
config
tools
OS
1
● Can we ship all tools? What about
license?
● What about configurations? Is it fine
tuned for staging?
● What’s the best way to containerize
the app?
● How do we patch security updates?
Copyright @ 2018 JFrog - All rights reserved. @ankushchadha111
Best Practices: Containerize an app
● Build once and promote
6
Copyright @ 2018 JFrog - All rights reserved. @ankushchadha111
Build Once and Promote
Manifest
sha256:252564..
OS: SHA2
Framework: SHA2
L
a
y
e
r
s
T
a
g
s
Application: SHA2:
3
ac-image:1.0-dev ac-image:1.0-qa
ac-image:1.0-
release
Copyright @ 2018 JFrog - All rights reserved. @ankushchadha111
Best Practices: Containerize an app
● Build once and promote
● Double tagging (for traceability)
8
Copyright @ 2018 JFrog - All rights reserved. @ankushchadha111 9
Best Practices: Containerize an app
BUILD SCAN TEST PROMOTE
BUILD SCAN TEST PROMOTE
BUILD SCAN TEST PROMOTE
● 3 different and independent release cycles
base layer  known good version
containerized app
app
Copyright @ 2018 JFrog - All rights reserved. @ankushchadha111
CI/CD
10
1
OS: SHA2
Layer n: SHA2
2
base-image:1.0 ac-app:1.0
Manifest
sha256:252564
Manifest
sha256:462564.
.
app: SHA2: 4
3 4
https://github.com/jfrogtraining/kubernetes_example
Copyright @ 2018 JFrog - All rights reserved. @ankushchadha111
Approaches to build docker image
● Dockerfile approach
● Dockerfile-less approach
● Docker daemon less approach
11
Copyright @ 2018 JFrog - All rights reserved. @ankushchadha111
Dockerfile
Dockerfile should be carefully
constructed
○ Number of layers
○ Size of layers
○ Changes in layers
○ Security
Copyright © 2018 JFrog. All Rights Reserved | www.swampup.jfrog.com
I am a developer, do I need to know docker to test a
containerized app?
Copyright © 2018 JFrog. All Rights Reserved | www.swampup.jfrog.com
Building Docker images without Dockerfile
Copyright @ 2018 JFrog - All rights reserved. @ankushchadha111
s2i – source to image
s2i build https://github.com/$src cpp-conan-builder:0.1 timer-app:0.1
docker run -it timer-app:0.1
source builder image Docker image+ =
Copyright @ 2018 JFrog - All rights reserved. @ankushchadha111
Behind the scenes ….
Copyright @ 2018 JFrog - All rights reserved. @ankushchadha111
Takeaways
● https://github.com/JFrogDev/project-examples/tree/master/openshift-s2i-
examples/cpp-conan
● https://blog.openshift.com/conan-accelerates-your-c-c-applications-in-
openshift/
Copyright © 2018 JFrog. All Rights Reserved | www.swampup.jfrog.com
How can I build docker images in a secure
environment?
Copyright © 2018 JFrog. All Rights Reserved | www.swampup.jfrog.com
Building images in secure environments i.e. without
using Docker Daemon.
Copyright @ 2018 JFrog - All rights reserved. @ankushchadha111
Challenges with existing approach (dind, dood)
● Docker Daemon is monolith
● Interactive access to a
docker daemon required to
build images
● Security Issues – requires
privilege access, root access.
https://robinsystems.com/blog/containers-deep-dive-lxc-vs-docker-comparison/
Copyright @ 2018 JFrog - All rights reserved. @ankushchadha111
Kaniko
https://github.com/GoogleContainerTools/kaniko
Build images without having access to docker daemon
Copyright @ 2018 JFrog - All rights reserved. @ankushchadha111
Is this really a microservice?
22
app
base-image:1.0
Manifest
sha256:252564
..
OS: SHA2
Layer n: SHA2
app: SHA2
config
tools
OS
● What’s the core responsibility of this
microservice?
● What else is this microservice doing
○ Bootstrapping database?
○ Pinging database to make sure that it’s up?
○ Include tools that are not required during runtime
○ Logging to third party services
Copyright @ 2018 JFrog - All rights reserved. @ankushchadha111
How do we start?
23
● Identify common feature-set
● Identify ways to run the main microservice with reduced privileges
● Solution that k8s provides -
○ Init-Containers
○ Sidecar pattern -
https://static.googleusercontent.com/media/research.google.com/en//pubs/archive/45406.pdf
○ Readiness and liveness probes
Copyright @ 2018 JFrog - All rights reserved. @ankushchadha111
This is what it looks like after 1st iteration
24
Copyright @ 2018 JFrog - All rights reserved. @ankushchadha111
Best practices
25
● Resource consumption
● Modularize configuration (dev, staging, prod). Enable staging by default.
● Networking
● Persistence
○ Enabled/disabled
○ Storage Class (dynamic provisioning)
● Chaos Testing is mandatory
○ Scale up / down
○ Move services to another node
Copyright @ 2018 JFrog - All rights reserved. @ankushchadha111
Source to Kubernetes
26
M I C R O S E R V I C E S
Deployment
Statefulsets
Job
DaemonSets
Secrets
Service
A
B
Copyright @ 2018 JFrog - All rights reserved. @ankushchadha111
Challenges without helm
27
● Wrapper script (Context, Application lifecycle management)
● Lack of dependency management
● Lack of conventions (filename, folder name)
● Can’t add logic to templates
Copyright @ 2018 JFrog - All rights reserved. @ankushchadha111
With Helm?
28
● Wrapper script (Application lifecycle management) - helm cli
● Lack of context - Release
● Lack of dependency management – sub charts
● Lack of conventions (filename, foldername) - helm create, starters
● Can’t add logic to templates - Go Templating
Copyright @ 2018 JFrog - All rights reserved. @ankushchadha111
What’s helm?
29
● Easy way to get started on Kubernetes.
● Package manager for Kubernetes
● Application lifecycle management
Copyright @ 2018 JFrog - All rights reserved. @ankushchadha111
Helm Chart Structure
30
Copyright @ 2018 JFrog - All rights reserved. @ankushchadha111
Helm Tips and Tricks
31
● Go Templating ‘{{-’ vs ‘{{‘ or ‘-}}’ vs ‘}}’ or ‘.’
● Storage
○ persistence.enabled
 Dynamic Provisioning
● Default Storage Class
● Custom Storage Class (persistence.storageClass)
 Static Provisioning
● persistence.existingClaim
Copyright @ 2018 JFrog - All rights reserved. @ankushchadha111
Helm Tips and Tricks
32
● How to avoid maintaining a third-party templates/chart?
#helm-users
Copyright @ 2018 JFrog - All rights reserved. @ankushchadha111
Takeaways
33
● Chaos Testing, configuration & resource consumption
● Helm Tips and Tricks
○ Go Templating
○ Hooks
○ Storage
○ Network
● helm lint
● helm install --dry-run --debug
Copyright © 2018 JFrog. All Rights Reserved | www.swampup.jfrog.com
Q/A?

More Related Content

PDF
Containers and Kubernetes without limits
Antje Barth
 
PDF
What's new in Gerrit Code Review v3.1 and beyond
Luca Milanesio
 
PPTX
Jenkins plugin for Gerrit Code Review pipelines
Luca Milanesio
 
PDF
Gitops: the kubernetes way
sparkfabrik
 
PDF
Hands-on lab: Open Cloud Day México
Software Guru
 
PDF
GitOps: Git come unica fonte di verità per applicazioni e infrastruttura
sparkfabrik
 
PDF
GitOps with Gitkube
Tirumarai Selvan
 
PDF
Secure GitOps pipelines for Kubernetes with Snyk & Weaveworks
Weaveworks
 
Containers and Kubernetes without limits
Antje Barth
 
What's new in Gerrit Code Review v3.1 and beyond
Luca Milanesio
 
Jenkins plugin for Gerrit Code Review pipelines
Luca Milanesio
 
Gitops: the kubernetes way
sparkfabrik
 
Hands-on lab: Open Cloud Day México
Software Guru
 
GitOps: Git come unica fonte di verità per applicazioni e infrastruttura
sparkfabrik
 
GitOps with Gitkube
Tirumarai Selvan
 
Secure GitOps pipelines for Kubernetes with Snyk & Weaveworks
Weaveworks
 

What's hot (20)

PDF
What's New for GitLab CI/CD February 2020
Noa Harel
 
PDF
Contributing to Automotive Grade Linux (AGL) and GENIVI Development Platform ...
Leon Anavi
 
PDF
Gerrit Code Review v3.2 and v3.3
Luca Milanesio
 
PDF
Introducing GitLab (September 2018)
Noa Harel
 
PDF
Continuous Security for GitOps
Weaveworks
 
PDF
WKP Team Workspaces Webinar
Weaveworks
 
PDF
Code Review with Git and Gerrit - Devoxx 2011 - Tools in Action - 2011-11-14
msohn
 
PDF
CI:CD in Lightspeed with kubernetes and argo cd
Billy Yuen
 
PDF
WKP 2.4 Delivers GitOps Anywhere
Weaveworks
 
PDF
Diagnose Your Microservices
Marcus Hirt
 
PPTX
Git & GitLab
Gaurav Wable
 
PDF
What's New in GitLab and Software Development Trends
Noa Harel
 
PDF
DCVCS using GIT
Pravat Sutar
 
PDF
Introducing GitLab (September 2018)
Noa Harel
 
PDF
gopaddle-meetup
Sujai Sivasamy
 
PDF
Developing automotive Linux
Alison Chaiken
 
PDF
GitOps with ArgoCD
CloudOps2005
 
PPTX
Egit democamp-karlsruhe-2011-11-29
Stefan Lay
 
PDF
So I Downloaded Qt, Now What?
Janel Heilbrunn
 
PPT
Advanced topics in Agile: Implementing Scrum in a project-based company
Ethan Ram
 
What's New for GitLab CI/CD February 2020
Noa Harel
 
Contributing to Automotive Grade Linux (AGL) and GENIVI Development Platform ...
Leon Anavi
 
Gerrit Code Review v3.2 and v3.3
Luca Milanesio
 
Introducing GitLab (September 2018)
Noa Harel
 
Continuous Security for GitOps
Weaveworks
 
WKP Team Workspaces Webinar
Weaveworks
 
Code Review with Git and Gerrit - Devoxx 2011 - Tools in Action - 2011-11-14
msohn
 
CI:CD in Lightspeed with kubernetes and argo cd
Billy Yuen
 
WKP 2.4 Delivers GitOps Anywhere
Weaveworks
 
Diagnose Your Microservices
Marcus Hirt
 
Git & GitLab
Gaurav Wable
 
What's New in GitLab and Software Development Trends
Noa Harel
 
DCVCS using GIT
Pravat Sutar
 
Introducing GitLab (September 2018)
Noa Harel
 
gopaddle-meetup
Sujai Sivasamy
 
Developing automotive Linux
Alison Chaiken
 
GitOps with ArgoCD
CloudOps2005
 
Egit democamp-karlsruhe-2011-11-29
Stefan Lay
 
So I Downloaded Qt, Now What?
Janel Heilbrunn
 
Advanced topics in Agile: Implementing Scrum in a project-based company
Ethan Ram
 
Ad

Similar to From shipping rpms to helm charts - Lessons learned and best practices (20)

PPTX
Kubernetes is hard! Lessons learned taking our apps to Kubernetes - Eldad Ass...
Cloud Native Day Tel Aviv
 
PDF
Rejekts 24 EU No GitOps Pain, No Platform Gain
Łukasz Piątkowski
 
PDF
Artifactory Essentials Workshop on August 27, 2020 by JFrog
Cloud Study Network
 
PDF
Using Docker For Development
Laura Frank Tacho
 
PDF
GitOps for Helm Users by Scott Rigby
Weaveworks
 
PPTX
Kubernetes is Hard! Lessons Learned Taking Our Apps to Kubernetes by Eldad Assis
AgileSparks
 
PDF
Airframe: Lightweight Building Blocks for Scala - Scale By The Bay 2018
Taro L. Saito
 
PDF
GitOps (& Flux) for Helm Users with Scott Rigby
Weaveworks
 
PDF
Shrinking the container_zurich_july_2018
Ewan Slater
 
PDF
RHEL8-BETA-RHUG.pdf
Harsh Shah
 
PDF
[scala.by] Launching new application fast
Denis Karpenko
 
PDF
ATT&CKING Containers in The Cloud
MITRE ATT&CK
 
PDF
Unblocking The Main Thread Solving ANRs and Frozen Frames
Sinan KOZAK
 
PDF
GitOps Core Concepts & Ways of Structuring Your Repos
Weaveworks
 
PDF
Custom Script Execution Environment on TD Workflow @ TD Tech Talk 2018-10-17
Muga Nishizawa
 
PDF
API Management for GraphQL
WSO2
 
PDF
OSDC 2019 | Introducing Kudo – Kubernetes Operators the easy way by Matt Jarvis
NETWAYS
 
PDF
Rhel8 Beta - Halifax RHUG
Nicole Maselli
 
PDF
“Quantum” Performance Effects: beyond the Core
C4Media
 
PPTX
Functions and DevOps
Shaun Smith
 
Kubernetes is hard! Lessons learned taking our apps to Kubernetes - Eldad Ass...
Cloud Native Day Tel Aviv
 
Rejekts 24 EU No GitOps Pain, No Platform Gain
Łukasz Piątkowski
 
Artifactory Essentials Workshop on August 27, 2020 by JFrog
Cloud Study Network
 
Using Docker For Development
Laura Frank Tacho
 
GitOps for Helm Users by Scott Rigby
Weaveworks
 
Kubernetes is Hard! Lessons Learned Taking Our Apps to Kubernetes by Eldad Assis
AgileSparks
 
Airframe: Lightweight Building Blocks for Scala - Scale By The Bay 2018
Taro L. Saito
 
GitOps (& Flux) for Helm Users with Scott Rigby
Weaveworks
 
Shrinking the container_zurich_july_2018
Ewan Slater
 
RHEL8-BETA-RHUG.pdf
Harsh Shah
 
[scala.by] Launching new application fast
Denis Karpenko
 
ATT&CKING Containers in The Cloud
MITRE ATT&CK
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Sinan KOZAK
 
GitOps Core Concepts & Ways of Structuring Your Repos
Weaveworks
 
Custom Script Execution Environment on TD Workflow @ TD Tech Talk 2018-10-17
Muga Nishizawa
 
API Management for GraphQL
WSO2
 
OSDC 2019 | Introducing Kudo – Kubernetes Operators the easy way by Matt Jarvis
NETWAYS
 
Rhel8 Beta - Halifax RHUG
Nicole Maselli
 
“Quantum” Performance Effects: beyond the Core
C4Media
 
Functions and DevOps
Shaun Smith
 
Ad

Recently uploaded (20)

PDF
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
PDF
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
PPTX
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 
PPTX
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
PDF
AI-Cloud-Business-Management-Platforms-The-Key-to-Efficiency-Growth.pdf
Artjoker Software Development Company
 
PPTX
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
PPTX
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
PDF
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
PDF
Get More from Fiori Automation - What’s New, What Works, and What’s Next.pdf
Precisely
 
PDF
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
PDF
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
PPTX
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
PDF
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 
PPTX
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
PDF
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
PDF
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
PDF
Software Development Methodologies in 2025
KodekX
 
PDF
GDG Cloud Munich - Intro - Luiz Carneiro - #BuildWithAI - July - Abdel.pdf
Luiz Carneiro
 
PPTX
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
PDF
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
AI-Cloud-Business-Management-Platforms-The-Key-to-Efficiency-Growth.pdf
Artjoker Software Development Company
 
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
Get More from Fiori Automation - What’s New, What Works, and What’s Next.pdf
Precisely
 
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
Software Development Methodologies in 2025
KodekX
 
GDG Cloud Munich - Intro - Luiz Carneiro - #BuildWithAI - July - Abdel.pdf
Luiz Carneiro
 
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 

From shipping rpms to helm charts - Lessons learned and best practices

  • 1. www.jfrog.comCopyright © 2018 JFrog. All Rights Reserved Lessons learned and best practices From shipping rpms to containerized microservices to run on k8s Ankush Chadha – Senior Solution Developer Sept 15th 2018
  • 2. Copyright @ 2018 JFrog - All rights reserved. @ankushchadha111 Who’s Speaking? ANKUSH CHADHA Senior Solution Developer @ankushchadha111
  • 3. Copyright @ 2018 JFrog - All rights reserved. @ankushchadha111 From app to k8s 3 app docker-app:1.0 Manifest sha256:252564 .. OS: SHA2 Layer n: SHA2 app: SHA2 docker-app:1.0 Manifest sha256:252564 .. OS: SHA2 Layer n: SHA2 app: SHA2 helper-a:1.0 Manifest OS Layer n helper-b:1.0 Manifest OS Layer n 1 2
  • 4. Copyright @ 2018 JFrog - All rights reserved. @ankushchadha111 From app to k8s 4 app docker-app:1.0 Manifest sha256:252564 .. OS: SHA2 Layer n: SHA2 app: SHA2 docker-app:1.0 Manifest sha256:252564 .. OS: SHA2 Layer n: SHA2 app: SHA2 helper-a:1.0 Manifest OS Layer n helper-b:1.0 Manifest OS Layer n 1 2 config compute
  • 5. Copyright @ 2018 JFrog - All rights reserved. @ankushchadha111 Let’s talk about app: Lessons learned 5 app docker-app:1.0 Manifest sha256:252564 .. OS: SHA2 Layer n: SHA2 app: SHA2 config tools OS 1 ● Can we ship all tools? What about license? ● What about configurations? Is it fine tuned for staging? ● What’s the best way to containerize the app? ● How do we patch security updates?
  • 6. Copyright @ 2018 JFrog - All rights reserved. @ankushchadha111 Best Practices: Containerize an app ● Build once and promote 6
  • 7. Copyright @ 2018 JFrog - All rights reserved. @ankushchadha111 Build Once and Promote Manifest sha256:252564.. OS: SHA2 Framework: SHA2 L a y e r s T a g s Application: SHA2: 3 ac-image:1.0-dev ac-image:1.0-qa ac-image:1.0- release
  • 8. Copyright @ 2018 JFrog - All rights reserved. @ankushchadha111 Best Practices: Containerize an app ● Build once and promote ● Double tagging (for traceability) 8
  • 9. Copyright @ 2018 JFrog - All rights reserved. @ankushchadha111 9 Best Practices: Containerize an app BUILD SCAN TEST PROMOTE BUILD SCAN TEST PROMOTE BUILD SCAN TEST PROMOTE ● 3 different and independent release cycles base layer  known good version containerized app app
  • 10. Copyright @ 2018 JFrog - All rights reserved. @ankushchadha111 CI/CD 10 1 OS: SHA2 Layer n: SHA2 2 base-image:1.0 ac-app:1.0 Manifest sha256:252564 Manifest sha256:462564. . app: SHA2: 4 3 4 https://github.com/jfrogtraining/kubernetes_example
  • 11. Copyright @ 2018 JFrog - All rights reserved. @ankushchadha111 Approaches to build docker image ● Dockerfile approach ● Dockerfile-less approach ● Docker daemon less approach 11
  • 12. Copyright @ 2018 JFrog - All rights reserved. @ankushchadha111 Dockerfile Dockerfile should be carefully constructed ○ Number of layers ○ Size of layers ○ Changes in layers ○ Security
  • 13. Copyright © 2018 JFrog. All Rights Reserved | www.swampup.jfrog.com I am a developer, do I need to know docker to test a containerized app?
  • 14. Copyright © 2018 JFrog. All Rights Reserved | www.swampup.jfrog.com Building Docker images without Dockerfile
  • 15. Copyright @ 2018 JFrog - All rights reserved. @ankushchadha111 s2i – source to image s2i build https://github.com/$src cpp-conan-builder:0.1 timer-app:0.1 docker run -it timer-app:0.1 source builder image Docker image+ =
  • 16. Copyright @ 2018 JFrog - All rights reserved. @ankushchadha111 Behind the scenes ….
  • 17. Copyright @ 2018 JFrog - All rights reserved. @ankushchadha111 Takeaways ● https://github.com/JFrogDev/project-examples/tree/master/openshift-s2i- examples/cpp-conan ● https://blog.openshift.com/conan-accelerates-your-c-c-applications-in- openshift/
  • 18. Copyright © 2018 JFrog. All Rights Reserved | www.swampup.jfrog.com How can I build docker images in a secure environment?
  • 19. Copyright © 2018 JFrog. All Rights Reserved | www.swampup.jfrog.com Building images in secure environments i.e. without using Docker Daemon.
  • 20. Copyright @ 2018 JFrog - All rights reserved. @ankushchadha111 Challenges with existing approach (dind, dood) ● Docker Daemon is monolith ● Interactive access to a docker daemon required to build images ● Security Issues – requires privilege access, root access. https://robinsystems.com/blog/containers-deep-dive-lxc-vs-docker-comparison/
  • 21. Copyright @ 2018 JFrog - All rights reserved. @ankushchadha111 Kaniko https://github.com/GoogleContainerTools/kaniko Build images without having access to docker daemon
  • 22. Copyright @ 2018 JFrog - All rights reserved. @ankushchadha111 Is this really a microservice? 22 app base-image:1.0 Manifest sha256:252564 .. OS: SHA2 Layer n: SHA2 app: SHA2 config tools OS ● What’s the core responsibility of this microservice? ● What else is this microservice doing ○ Bootstrapping database? ○ Pinging database to make sure that it’s up? ○ Include tools that are not required during runtime ○ Logging to third party services
  • 23. Copyright @ 2018 JFrog - All rights reserved. @ankushchadha111 How do we start? 23 ● Identify common feature-set ● Identify ways to run the main microservice with reduced privileges ● Solution that k8s provides - ○ Init-Containers ○ Sidecar pattern - https://static.googleusercontent.com/media/research.google.com/en//pubs/archive/45406.pdf ○ Readiness and liveness probes
  • 24. Copyright @ 2018 JFrog - All rights reserved. @ankushchadha111 This is what it looks like after 1st iteration 24
  • 25. Copyright @ 2018 JFrog - All rights reserved. @ankushchadha111 Best practices 25 ● Resource consumption ● Modularize configuration (dev, staging, prod). Enable staging by default. ● Networking ● Persistence ○ Enabled/disabled ○ Storage Class (dynamic provisioning) ● Chaos Testing is mandatory ○ Scale up / down ○ Move services to another node
  • 26. Copyright @ 2018 JFrog - All rights reserved. @ankushchadha111 Source to Kubernetes 26 M I C R O S E R V I C E S Deployment Statefulsets Job DaemonSets Secrets Service A B
  • 27. Copyright @ 2018 JFrog - All rights reserved. @ankushchadha111 Challenges without helm 27 ● Wrapper script (Context, Application lifecycle management) ● Lack of dependency management ● Lack of conventions (filename, folder name) ● Can’t add logic to templates
  • 28. Copyright @ 2018 JFrog - All rights reserved. @ankushchadha111 With Helm? 28 ● Wrapper script (Application lifecycle management) - helm cli ● Lack of context - Release ● Lack of dependency management – sub charts ● Lack of conventions (filename, foldername) - helm create, starters ● Can’t add logic to templates - Go Templating
  • 29. Copyright @ 2018 JFrog - All rights reserved. @ankushchadha111 What’s helm? 29 ● Easy way to get started on Kubernetes. ● Package manager for Kubernetes ● Application lifecycle management
  • 30. Copyright @ 2018 JFrog - All rights reserved. @ankushchadha111 Helm Chart Structure 30
  • 31. Copyright @ 2018 JFrog - All rights reserved. @ankushchadha111 Helm Tips and Tricks 31 ● Go Templating ‘{{-’ vs ‘{{‘ or ‘-}}’ vs ‘}}’ or ‘.’ ● Storage ○ persistence.enabled  Dynamic Provisioning ● Default Storage Class ● Custom Storage Class (persistence.storageClass)  Static Provisioning ● persistence.existingClaim
  • 32. Copyright @ 2018 JFrog - All rights reserved. @ankushchadha111 Helm Tips and Tricks 32 ● How to avoid maintaining a third-party templates/chart? #helm-users
  • 33. Copyright @ 2018 JFrog - All rights reserved. @ankushchadha111 Takeaways 33 ● Chaos Testing, configuration & resource consumption ● Helm Tips and Tricks ○ Go Templating ○ Hooks ○ Storage ○ Network ● helm lint ● helm install --dry-run --debug
  • 34. Copyright © 2018 JFrog. All Rights Reserved | www.swampup.jfrog.com Q/A?