SlideShare a Scribd company logo
1 of 37
Download to read offline
Nicola Ferraro - Voxxed Days Ticino 2017
Cloud Native Applications on Kubernetes:
a DevOps Approach
Nicola Ferraro
@ni_ferraro
Nicola Ferraro - Voxxed Days Ticino 2017
About Me
Nicola Ferraro
Software Engineer at Red Hat
Working on Apache Camel,
Fabric8.io, JBoss Fuse, Fuse
Integration Services for Openshift,
Syndesis.io
Follow me on twitter:
@ni_ferraro
Nicola Ferraro - Voxxed Days Ticino 2017
Agenda
● Technological Overview
○ Docker
○ Kubernetes
○ Development Tools
● Demo: deploying a microservice
● Buzzwords Explained
○ Cloud Native
○ Microservices
○ DevOps
○ IaC, CI & CD
● Demo: IaC, CI & CD
Nicola Ferraro - Voxxed Days Ticino 2017
Containers
Docker is revolutionizing the way
we build software today.
● Lightweight virtualization
○ Ever tried to run docker
containers on a RaspberryPI?
● Full runtime isolation
○ Using linux namespaces
● Language-independent packaging
and distribution
○ The new JAR? The new EAR?
● Run 10x more apps in a single
host than with VMs
● Composability ...
$ docker run -d myuser/myapp
Nicola Ferraro - Voxxed Days Ticino 2017
Containers: how to build them
There are multiple ways of building
containers:
● Dockerfile (classic)
● Rockerfile
○ Supports e.g. templating
● Ansible
● Docker-Maven-Plugin (for Java
apps, from fabric8)
● See ro14nd talk for 10+ ways:
https://github.com/ro14nd-talks/docker-conta
iner-loading/blob/master/docker-container-lo
ading.pdf
FROM ubuntu:16.04
…
RUN apt-get update && apt-get
install -y mongodb-org
RUN mkdir -p /data/db
EXPOSE 27017
…
ENTRYPOINT ["/usr/bin/mongod"]
… a Dockerfile
Nicola Ferraro - Voxxed Days Ticino 2017
Containers: distribution
● Build locally
● Push to a registry
● Run public and private
images
Nicola Ferraro - Voxxed Days Ticino 2017
Java EAR vs. Docker Image
Java EAR:
● Complete runnable description
of a Java EE application
● To be deployed on a Java EE
application server providing:
○ Availability
○ Scalability
○ Fault tolerance
○ Load balancing
○ Rolling upgrades
○ Monitoring
○ Logging
○ …
Docker Image:
● Complete runnable description
of a generic application
● To be run with “docker run” ???
There should be something else!
Nicola Ferraro - Voxxed Days Ticino 2017
Introducing Kubernetes
Cloud platform (also for private cloud), to
Orchestrate (Docker) containers:
● Born at Google
● Production ready
● Provides:
○ Availability
○ Scalability (auto and manual)
○ Fault tolerance
○ Load balancing
○ Deployment (canary, blue-green, …)
○ Monitoring
○ Logging
○ …
○ Service discovery
Kubernetes
Openshift Origin
(Kubernetes on steroids)
Open source
(like anything else in Red Hat)
Nicola Ferraro - Voxxed Days Ticino 2017
Kubernetes: Architecture
● kubectl / oc: client tools
● Master:
○ There can be multiple ones!
○ Rest API Server, Scheduler,
Controller Manager
○ Configuration in etcd v3
● Nodes:
○ Workers: run containers
○ Kubelet, Proxy
Can scale up to 4000 nodes!
And you can create smaller
federated clusters (v 1.6)
Master
kubectl / oc / ...
Node
Node
Node
Node
Nicola Ferraro - Voxxed Days Ticino 2017
Kubernetes Concepts: Namespace
The same physical cluster can host multiple virtual
environments called namespaces (or projects in Openshift).
Node Node
Private networks
Master
N1 N2
kubectl / oc / ...
RBAC
● Openshift Origin
● New in Kubernetes (beta v. 1.6+)
Nicola Ferraro - Voxxed Days Ticino 2017
Kubernetes Concepts: POD
The deployment unit in Kubernetes is not the container, but
the pod (group of related containers).
Containers inside pods are automatically restarted in case
of failure (configurable policy), but they don’t survive
node crash.
Node
Pod Pod
Pod
Pods:
● Are groups of related containers
● Share (virtual) network interfaces
● Usually 1 pod contains 1 container
● Are treated as a single unit by
Kubernetes (in replication controllers,
services, etc.)
Nicola Ferraro - Voxxed Days Ticino 2017
Kubernetes Concepts: Deployment
Allows to specify the target condition of our application:
e.g. 3 replicas of a given pod.
Node Node Node Node
replicas = 3
Master
Ctrl Manager
Node choice:
● Affinity
● Anti-affinity
● ...
(using labels)
Kubernetes 1.6+
Openshift
Just change the
number of replicas to
scale up/down! Scheduler
Deployment
Nicola Ferraro - Voxxed Days Ticino 2017
Kubernetes Concepts: Deployment
Allows software upgrades.
Two modes:
● Rolling update: e.g. for microservices
○ Gradual process
○ Configurable: max surge, max unav. (25%)
● Recreate: e.g. for databases
● Canary or Blue-green:
○ Not oob
○ Can be done using
Multiple deployments
Node
v1 v2
Node
v1 v2
Node
v1 v2
Deployment
Nicola Ferraro - Voxxed Days Ticino 2017
Kubernetes Concepts: Service
Services provide named (dns) access to pod’s network
endpoints (level 4).
Kubernetes Namespace
Service
Load balancing
Route /
Ingress
myservice
http://myservice/api
http://myservice-ns.mycluster.io
L7
Nicola Ferraro - Voxxed Days Ticino 2017
Kubernetes Concepts: Other “Objects”
● Volume, VolumeClaim: to attach storage to containers
● ConfigMap: key value map to inject configuration
● Secret: like a config map, with more access restrictions
● CronJob, StatefulSet, DaemonSet: other “deployment” options
Openshift:
● BuildConfig, Build: build automatically containers from source
and deploy (or run custom Jenkins pipelines).
Free!
Nicola Ferraro - Voxxed Days Ticino 2017
Kubernetes: running it locally
Minikube
https://github.com/kuberne
tes/minikube
(VM based)
Minishift
https://github.com/minishi
ft/minishift
(VM based)
“oc cluster up”
https://github.com/openshi
ft/origin
(docker container based)
Nicola Ferraro - Voxxed Days Ticino 2017
Demo
Deploying a microservice
(in Openshift)
Nicola Ferraro - Voxxed Days Ticino 2017
Demo: Deploying a microservice
A demo showing how to create a spring-boot microservice
using the fabric8-maven-plugin.
Features of Kubernetes/Openshift are shown:
● Scaling
● Load Balancing
● Rolling Deployment
https://github.com/nicolaferraro/voxxed-ticino-demo
Nicola Ferraro - Voxxed Days Ticino 2017
Agenda
● Technological Overview
○ Docker
○ Kubernetes
○ Development Tools
● Demo: deploying a microservice
● Buzzwords Explained
○ Cloud Native
○ Microservices
○ DevOps
○ IaC, CI & CD
● Demo: IaC, CI & CD
Nicola Ferraro - Voxxed Days Ticino 2017
Cloud Native
It just means.. applications built for the cloud!
● Developed for a cloud platform (e.g. Kubernetes)
● Not bound to physical servers, networks, storage …
● Packaged and ready to run (e.g. Docker container)
● Supporting load balancing, auto-scaling, relocation …
● Communicating (directly or indirectly) with the platform:
○ Health checks
○ Configuration (e.g. with configmaps)
○ Service discovery
○ Logging
○ Tracing, circuit breaking (especially for microservices)
https://www.cncf.io/projects/
Nicola Ferraro - Voxxed Days Ticino 2017
Microservices
Design applications as a set of independently
deployable services.
The Java EE
Monolith
Microservices !
i.e. “why are you
using Struts v 1
in 2017 ?”
NodeJS on
MongoDB
Vert.x with
PostgreSQL
Spring-Boot with
PostgreSQL
Nicola Ferraro - Voxxed Days Ticino 2017
Microservices: How and why?
How:
● Develop a service around a “bounded context”
● Make a team responsible for the service
● Define a strict API to communicate with other services
Why:
● Optimize the service for speed (e.g. scaling)
● Evolve the service periodically
○ Even change technology!
● Release early and often:
○ To fix bugs
○ To patch security vulnerabilities
○ To meet business requirements
○ … there is more to say here …
Free!
Nicola Ferraro - Voxxed Days Ticino 2017
DevOps: the first way
Why should we release earlier?
● DevOps = Dev + Ops = Make everyone work together towards the same goal:
deliver value to the end user.
Manufacturing Software
Not so easy …
Automation is
just the first
way!
Dev OpsBusiness User
QA
And do not pass problems
downstream (fail fast) !
→ Increase the capacity of this flow →
Nicola Ferraro - Voxxed Days Ticino 2017
DevOps: the second way
Why should we release often?
● To create short feedback loops between business people, developers,
operation guys, quality assessment people and the end user.
● Feedback loops are the receipt for optimizing and correcting work
continuously towards the same goal.
● Short agile iterations are the key for continuous improvement.
● Automation is fundamental for the second way.
Business Dev QA Ops User
Learning paths
Nicola Ferraro - Voxxed Days Ticino 2017
DevOps: the third way
Experimenting and learning from failures is the way to improve!
● Cultural change:
○ Do not fear the change
○ Taking risks should be the norm
● Mastery (experience) makes sure that risks are controlled
● Change the process to improve it continuously.
Business Dev QA Ops User
Nicola Ferraro - Voxxed Days Ticino 2017
DevOps practices
Technically, the fundamental DevOps practices are:
● Infrastructure as Code
○ Write your entire system into “source code” (including configuration)
○ Your system must be “runnable”
● Continuous Integration (CI)
○ Continuously test if your modules (or “services”) can work together
● Continuous Delivery (CD)
○ Deliver software to users quickly with (very) limited intervention
○ Deliver software into “mirrors” of the production environment
Nicola Ferraro - Voxxed Days Ticino 2017
Infrastructure as Code
The main enabler for DevOps:
● Code everything that constitute you application:
○ The application itself
○ Network configuration
○ Operating systems (and JVM)
○ Physical (or better virtual) Machines
○ Configuration (application settings, certificates, endpoints, …)
● Your whole infrastructure becomes “runnable”
Tools used for automation: Ansible, Chef, Puppet.
Nicola Ferraro - Voxxed Days Ticino 2017
“Cloud Native” Infrastructure as Code
What’s the “infrastructure” for a cloud-native application?
In Kubernetes it’s more or less:
● a Deployment: containers (OS, JVM), health checks, pods,
replicas, network endpoints, load balancers, upgrade
process, placement strategy
● ConfigMap and Secrets: define the application
configuration
Ok, I put everything in my SCM. Now what?
Nicola Ferraro - Voxxed Days Ticino 2017
CI-CD
Microservices are independently deployable…
Build
Deploy
to dev
Deploy
to stg
Deploy
to prod
Build
Deploy
to dev
Deploy
to stg
Deploy
to prod
Microservice 1
Microservice 2
conditional
conditional
Test
Test
The same software deployed here!!!
Nicola Ferraro - Voxxed Days Ticino 2017
CI-CD: Testing
Testing is a crucial aspect of DevOps:
● Unit tests (in isolation)
● End-to-end functional tests
○ E.g. inject a Selenium pod
● Load tests
○ E.g. inject a (highly replicated!)
JMeter pod
● System tests
○ E.g. inject a chaos monkey
Testing pod (optional)
Production-like
environment
Create virtual
environments on the fly,
for testing!
You can run tests as part of the delivery
pipeline, in a production-like environment!
Nicola Ferraro - Voxxed Days Ticino 2017
CI-CD: How
Openshift
Jenkins pipelines integrated into
the platform.
Kubernetes
Fabric8 (https://fabric8.io/)
Integrated development platform for
Kubernetes. Includes:
● Jenkins
● Gogs
● Nexus
● Hubot (chat ops)
● Quickstarts
● Maven Plugin
● …
Nicola Ferraro - Voxxed Days Ticino 2017
Demo
IaC, CI & CD
(in Openshift)
Nicola Ferraro - Voxxed Days Ticino 2017
Demo: IaC, CI & CD
Deploy a set of applications on Openshift and configure CI-CD.
Spring-Boot microservice, communicating with an Apache Spark recommender
system using a Kafka broker.
Source code:
● https://github.com/nicolaferraro/voxxed-bigdata-kafka
● https://github.com/nicolaferraro/voxxed-bigdata-web
● https://github.com/nicolaferraro/voxxed-bigdata-spark
● https://github.com/nicolaferraro/voxxed-bigdata-pipeline
Nicola Ferraro - Voxxed Days Ticino 2017
Spark on Kubernetes: Oshinko
Oshinko is a project for running Apache Spark cloud native
applications on Openshift.
Spark Driver Cluster
Manager
Spark Workers
http://radanalytics.io
User “main”
code
Oshinko
“magic”
Nicola Ferraro - Voxxed Days Ticino 2017
Future from Red Hat: Openshift.io
Preview announced few days ago. Cloud development platform
from the experience of Fabric8.
● SCM
● CI-CD
● Artifact Repository
● Planning
● Collaboration
● IDE (Eclipse Che)
Everything on the cloud! No need to install anything, just open a browser!
Nicola Ferraro - Voxxed Days Ticino 2017
Future from Red Hat: syndesis.io
A new community for devs and non-devs for cloud integration.
● Deploy integration services on Openshift
● No need to write code!
● Connectors based on Apache Camel
Follow us on twitter!
@syndesisio
Nicola Ferraro - Voxxed Days Ticino 2017
@ni_ferraro
That’s all folks!

More Related Content

What's hot

Netflix Container Scheduling and Execution - QCon New York 2016
Netflix Container Scheduling and Execution - QCon New York 2016Netflix Container Scheduling and Execution - QCon New York 2016
Netflix Container Scheduling and Execution - QCon New York 2016aspyker
 
Intro to the CNCF Research User Group
Intro to the CNCF Research User GroupIntro to the CNCF Research User Group
Intro to the CNCF Research User GroupBob Killen
 
Kubernetes on the Edge / 在邊緣的K8S
Kubernetes on the Edge / 在邊緣的K8SKubernetes on the Edge / 在邊緣的K8S
Kubernetes on the Edge / 在邊緣的K8SYi-Fu Ciou
 
The Truth Behind Serverless
The Truth Behind ServerlessThe Truth Behind Serverless
The Truth Behind ServerlessDocker, Inc.
 
Building Clustered Applications with Kubernetes and Docker
Building Clustered Applications with Kubernetes and DockerBuilding Clustered Applications with Kubernetes and Docker
Building Clustered Applications with Kubernetes and DockerSteve Watt
 
K8s storage-glusterfs-20180210
K8s storage-glusterfs-20180210K8s storage-glusterfs-20180210
K8s storage-glusterfs-20180210Che-Chia Chang
 
Container World 2017!
Container World 2017!Container World 2017!
Container World 2017!kgraham32
 
Building stateful applications on Kubernetes with Rook
Building stateful applications on Kubernetes with RookBuilding stateful applications on Kubernetes with Rook
Building stateful applications on Kubernetes with RookRoberto Hashioka
 
Running and Managing Kubernetes on OpenStack
Running and Managing Kubernetes on OpenStackRunning and Managing Kubernetes on OpenStack
Running and Managing Kubernetes on OpenStackVictor Palma
 
Cloud Computing Fundamental
Cloud Computing FundamentalCloud Computing Fundamental
Cloud Computing FundamentalDony Riyanto
 
Brief Introduction To Kubernetes
Brief Introduction To KubernetesBrief Introduction To Kubernetes
Brief Introduction To KubernetesAvinash Ketkar
 
Are you ready to be edgy? Bringing applications to the edge of the network
Are you ready to be edgy? Bringing applications to the edge of the networkAre you ready to be edgy? Bringing applications to the edge of the network
Are you ready to be edgy? Bringing applications to the edge of the networkMegan O'Keefe
 
KubeCon US 2021 - Recap - DCMeetup
KubeCon US 2021 - Recap - DCMeetupKubeCon US 2021 - Recap - DCMeetup
KubeCon US 2021 - Recap - DCMeetupFaheem Memon
 
DockerDay2015: Getting started with Google Container Engine
DockerDay2015: Getting started with Google Container EngineDockerDay2015: Getting started with Google Container Engine
DockerDay2015: Getting started with Google Container EngineDocker-Hanoi
 
A Peek Behind the Curtain: Managing the Kubernetes Contributor Community
A Peek Behind the Curtain: Managing the Kubernetes Contributor CommunityA Peek Behind the Curtain: Managing the Kubernetes Contributor Community
A Peek Behind the Curtain: Managing the Kubernetes Contributor CommunityBob Killen
 
HPC in a Box - Docker Workshop at ISC 2015
HPC in a Box - Docker Workshop at ISC 2015HPC in a Box - Docker Workshop at ISC 2015
HPC in a Box - Docker Workshop at ISC 2015inside-BigData.com
 
WSO2Con US 2015 Kubernetes: a platform for automating deployment, scaling, an...
WSO2Con US 2015 Kubernetes: a platform for automating deployment, scaling, an...WSO2Con US 2015 Kubernetes: a platform for automating deployment, scaling, an...
WSO2Con US 2015 Kubernetes: a platform for automating deployment, scaling, an...Brian Grant
 
A Primer on Kubernetes and Google Container Engine
A Primer on Kubernetes and Google Container EngineA Primer on Kubernetes and Google Container Engine
A Primer on Kubernetes and Google Container EngineRightScale
 

What's hot (20)

Netflix Container Scheduling and Execution - QCon New York 2016
Netflix Container Scheduling and Execution - QCon New York 2016Netflix Container Scheduling and Execution - QCon New York 2016
Netflix Container Scheduling and Execution - QCon New York 2016
 
Intro to the CNCF Research User Group
Intro to the CNCF Research User GroupIntro to the CNCF Research User Group
Intro to the CNCF Research User Group
 
Kubernetes on the Edge / 在邊緣的K8S
Kubernetes on the Edge / 在邊緣的K8SKubernetes on the Edge / 在邊緣的K8S
Kubernetes on the Edge / 在邊緣的K8S
 
From Code to Kubernetes
From Code to KubernetesFrom Code to Kubernetes
From Code to Kubernetes
 
The Truth Behind Serverless
The Truth Behind ServerlessThe Truth Behind Serverless
The Truth Behind Serverless
 
Building Clustered Applications with Kubernetes and Docker
Building Clustered Applications with Kubernetes and DockerBuilding Clustered Applications with Kubernetes and Docker
Building Clustered Applications with Kubernetes and Docker
 
K8s storage-glusterfs-20180210
K8s storage-glusterfs-20180210K8s storage-glusterfs-20180210
K8s storage-glusterfs-20180210
 
Container World 2017!
Container World 2017!Container World 2017!
Container World 2017!
 
Building stateful applications on Kubernetes with Rook
Building stateful applications on Kubernetes with RookBuilding stateful applications on Kubernetes with Rook
Building stateful applications on Kubernetes with Rook
 
Running and Managing Kubernetes on OpenStack
Running and Managing Kubernetes on OpenStackRunning and Managing Kubernetes on OpenStack
Running and Managing Kubernetes on OpenStack
 
Cloud Computing Fundamental
Cloud Computing FundamentalCloud Computing Fundamental
Cloud Computing Fundamental
 
Brief Introduction To Kubernetes
Brief Introduction To KubernetesBrief Introduction To Kubernetes
Brief Introduction To Kubernetes
 
Are you ready to be edgy? Bringing applications to the edge of the network
Are you ready to be edgy? Bringing applications to the edge of the networkAre you ready to be edgy? Bringing applications to the edge of the network
Are you ready to be edgy? Bringing applications to the edge of the network
 
KubeCon US 2021 - Recap - DCMeetup
KubeCon US 2021 - Recap - DCMeetupKubeCon US 2021 - Recap - DCMeetup
KubeCon US 2021 - Recap - DCMeetup
 
DockerDay2015: Getting started with Google Container Engine
DockerDay2015: Getting started with Google Container EngineDockerDay2015: Getting started with Google Container Engine
DockerDay2015: Getting started with Google Container Engine
 
How Kubernetes make OpenStack & Ceph better
How Kubernetes make OpenStack & Ceph betterHow Kubernetes make OpenStack & Ceph better
How Kubernetes make OpenStack & Ceph better
 
A Peek Behind the Curtain: Managing the Kubernetes Contributor Community
A Peek Behind the Curtain: Managing the Kubernetes Contributor CommunityA Peek Behind the Curtain: Managing the Kubernetes Contributor Community
A Peek Behind the Curtain: Managing the Kubernetes Contributor Community
 
HPC in a Box - Docker Workshop at ISC 2015
HPC in a Box - Docker Workshop at ISC 2015HPC in a Box - Docker Workshop at ISC 2015
HPC in a Box - Docker Workshop at ISC 2015
 
WSO2Con US 2015 Kubernetes: a platform for automating deployment, scaling, an...
WSO2Con US 2015 Kubernetes: a platform for automating deployment, scaling, an...WSO2Con US 2015 Kubernetes: a platform for automating deployment, scaling, an...
WSO2Con US 2015 Kubernetes: a platform for automating deployment, scaling, an...
 
A Primer on Kubernetes and Google Container Engine
A Primer on Kubernetes and Google Container EngineA Primer on Kubernetes and Google Container Engine
A Primer on Kubernetes and Google Container Engine
 

Similar to Cloud Native Applications on Kubernetes: a DevOps Approach

OpenNebulaConf2019 - Welcome and Project Update - Ignacio M. Llorente, Rubén ...
OpenNebulaConf2019 - Welcome and Project Update - Ignacio M. Llorente, Rubén ...OpenNebulaConf2019 - Welcome and Project Update - Ignacio M. Llorente, Rubén ...
OpenNebulaConf2019 - Welcome and Project Update - Ignacio M. Llorente, Rubén ...OpenNebula Project
 
Montreal Kubernetes Meetup: Developer-first workflows (for microservices) on ...
Montreal Kubernetes Meetup: Developer-first workflows (for microservices) on ...Montreal Kubernetes Meetup: Developer-first workflows (for microservices) on ...
Montreal Kubernetes Meetup: Developer-first workflows (for microservices) on ...Ambassador Labs
 
Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...
Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...
Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...Ambassador Labs
 
Kubernetes - how to orchestrate containers
Kubernetes - how to orchestrate containersKubernetes - how to orchestrate containers
Kubernetes - how to orchestrate containersinovex GmbH
 
OpenNebulaConf2018 - Welcome and Project Update - Ignacio M. Llorente, Rubén ...
OpenNebulaConf2018 - Welcome and Project Update - Ignacio M. Llorente, Rubén ...OpenNebulaConf2018 - Welcome and Project Update - Ignacio M. Llorente, Rubén ...
OpenNebulaConf2018 - Welcome and Project Update - Ignacio M. Llorente, Rubén ...OpenNebula Project
 
Triangle Devops Meetup 10/2015
Triangle Devops Meetup 10/2015Triangle Devops Meetup 10/2015
Triangle Devops Meetup 10/2015aspyker
 
Netflix Architecture and Open Source
Netflix Architecture and Open SourceNetflix Architecture and Open Source
Netflix Architecture and Open SourceAll Things Open
 
DevOps Days Boston 2017: Real-world Kubernetes for DevOps
DevOps Days Boston 2017: Real-world Kubernetes for DevOpsDevOps Days Boston 2017: Real-world Kubernetes for DevOps
DevOps Days Boston 2017: Real-world Kubernetes for DevOpsAmbassador Labs
 
The path to a serverless-native era with Kubernetes
The path to a serverless-native era with KubernetesThe path to a serverless-native era with Kubernetes
The path to a serverless-native era with Kubernetessparkfabrik
 
CNCF Introduction - Feb 2018
CNCF Introduction - Feb 2018CNCF Introduction - Feb 2018
CNCF Introduction - Feb 2018Krishna-Kumar
 
Data Science in Production: Technologies That Drive Adoption of Data Science ...
Data Science in Production: Technologies That Drive Adoption of Data Science ...Data Science in Production: Technologies That Drive Adoption of Data Science ...
Data Science in Production: Technologies That Drive Adoption of Data Science ...Nir Yungster
 
Free GitOps Workshop
Free GitOps WorkshopFree GitOps Workshop
Free GitOps WorkshopWeaveworks
 
Azure ai on premises with docker
Azure ai on premises with  dockerAzure ai on premises with  docker
Azure ai on premises with dockerVishwas N
 
The world of Docker and Kubernetes
The world of Docker and Kubernetes The world of Docker and Kubernetes
The world of Docker and Kubernetes vty
 
Making Service Deployments to AWS a breeze with Nova
Making Service Deployments to AWS a breeze with NovaMaking Service Deployments to AWS a breeze with Nova
Making Service Deployments to AWS a breeze with NovaGregor Heine
 
Developer workflow with docker
Developer workflow with dockerDeveloper workflow with docker
Developer workflow with dockerLalatendu Mohanty
 
[Global logic] container runtimes and kubernetes
[Global logic] container runtimes and kubernetes[Global logic] container runtimes and kubernetes
[Global logic] container runtimes and kubernetesGlobalLogic Ukraine
 
InteropNY/CloudConnect 2014 - Quick Crash Course in Open Source Cloud Computing
InteropNY/CloudConnect 2014 - Quick Crash Course in Open Source Cloud ComputingInteropNY/CloudConnect 2014 - Quick Crash Course in Open Source Cloud Computing
InteropNY/CloudConnect 2014 - Quick Crash Course in Open Source Cloud ComputingMark Hinkle
 
CS80A Foothill College Open Source Talk
CS80A Foothill College Open Source TalkCS80A Foothill College Open Source Talk
CS80A Foothill College Open Source Talkaspyker
 

Similar to Cloud Native Applications on Kubernetes: a DevOps Approach (20)

OpenNebulaConf2019 - Welcome and Project Update - Ignacio M. Llorente, Rubén ...
OpenNebulaConf2019 - Welcome and Project Update - Ignacio M. Llorente, Rubén ...OpenNebulaConf2019 - Welcome and Project Update - Ignacio M. Llorente, Rubén ...
OpenNebulaConf2019 - Welcome and Project Update - Ignacio M. Llorente, Rubén ...
 
Montreal Kubernetes Meetup: Developer-first workflows (for microservices) on ...
Montreal Kubernetes Meetup: Developer-first workflows (for microservices) on ...Montreal Kubernetes Meetup: Developer-first workflows (for microservices) on ...
Montreal Kubernetes Meetup: Developer-first workflows (for microservices) on ...
 
Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...
Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...
Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...
 
Kubernetes - how to orchestrate containers
Kubernetes - how to orchestrate containersKubernetes - how to orchestrate containers
Kubernetes - how to orchestrate containers
 
OpenNebulaConf2018 - Welcome and Project Update - Ignacio M. Llorente, Rubén ...
OpenNebulaConf2018 - Welcome and Project Update - Ignacio M. Llorente, Rubén ...OpenNebulaConf2018 - Welcome and Project Update - Ignacio M. Llorente, Rubén ...
OpenNebulaConf2018 - Welcome and Project Update - Ignacio M. Llorente, Rubén ...
 
Triangle Devops Meetup 10/2015
Triangle Devops Meetup 10/2015Triangle Devops Meetup 10/2015
Triangle Devops Meetup 10/2015
 
Netflix Architecture and Open Source
Netflix Architecture and Open SourceNetflix Architecture and Open Source
Netflix Architecture and Open Source
 
DevOps Days Boston 2017: Real-world Kubernetes for DevOps
DevOps Days Boston 2017: Real-world Kubernetes for DevOpsDevOps Days Boston 2017: Real-world Kubernetes for DevOps
DevOps Days Boston 2017: Real-world Kubernetes for DevOps
 
The path to a serverless-native era with Kubernetes
The path to a serverless-native era with KubernetesThe path to a serverless-native era with Kubernetes
The path to a serverless-native era with Kubernetes
 
CNCF Introduction - Feb 2018
CNCF Introduction - Feb 2018CNCF Introduction - Feb 2018
CNCF Introduction - Feb 2018
 
Data Science in Production: Technologies That Drive Adoption of Data Science ...
Data Science in Production: Technologies That Drive Adoption of Data Science ...Data Science in Production: Technologies That Drive Adoption of Data Science ...
Data Science in Production: Technologies That Drive Adoption of Data Science ...
 
Free GitOps Workshop
Free GitOps WorkshopFree GitOps Workshop
Free GitOps Workshop
 
Docker for dev
Docker for devDocker for dev
Docker for dev
 
Azure ai on premises with docker
Azure ai on premises with  dockerAzure ai on premises with  docker
Azure ai on premises with docker
 
The world of Docker and Kubernetes
The world of Docker and Kubernetes The world of Docker and Kubernetes
The world of Docker and Kubernetes
 
Making Service Deployments to AWS a breeze with Nova
Making Service Deployments to AWS a breeze with NovaMaking Service Deployments to AWS a breeze with Nova
Making Service Deployments to AWS a breeze with Nova
 
Developer workflow with docker
Developer workflow with dockerDeveloper workflow with docker
Developer workflow with docker
 
[Global logic] container runtimes and kubernetes
[Global logic] container runtimes and kubernetes[Global logic] container runtimes and kubernetes
[Global logic] container runtimes and kubernetes
 
InteropNY/CloudConnect 2014 - Quick Crash Course in Open Source Cloud Computing
InteropNY/CloudConnect 2014 - Quick Crash Course in Open Source Cloud ComputingInteropNY/CloudConnect 2014 - Quick Crash Course in Open Source Cloud Computing
InteropNY/CloudConnect 2014 - Quick Crash Course in Open Source Cloud Computing
 
CS80A Foothill College Open Source Talk
CS80A Foothill College Open Source TalkCS80A Foothill College Open Source Talk
CS80A Foothill College Open Source Talk
 

More from Nicola Ferraro

Camel Day Italia 2021 - Camel K
Camel Day Italia 2021 - Camel KCamel Day Italia 2021 - Camel K
Camel Day Italia 2021 - Camel KNicola Ferraro
 
ApacheCon NA - Apache Camel K: connect your Knative serverless applications w...
ApacheCon NA - Apache Camel K: connect your Knative serverless applications w...ApacheCon NA - Apache Camel K: connect your Knative serverless applications w...
ApacheCon NA - Apache Camel K: connect your Knative serverless applications w...Nicola Ferraro
 
ApacheCon NA - Apache Camel K: a cloud-native integration platform
ApacheCon NA - Apache Camel K: a cloud-native integration platformApacheCon NA - Apache Camel K: a cloud-native integration platform
ApacheCon NA - Apache Camel K: a cloud-native integration platformNicola Ferraro
 
Analyzing Data at Scale with Apache Spark
Analyzing Data at Scale with Apache SparkAnalyzing Data at Scale with Apache Spark
Analyzing Data at Scale with Apache SparkNicola Ferraro
 
Extending DevOps to Big Data Applications with Kubernetes
Extending DevOps to Big Data Applications with KubernetesExtending DevOps to Big Data Applications with Kubernetes
Extending DevOps to Big Data Applications with KubernetesNicola Ferraro
 
A brief history of "big data"
A brief history of "big data"A brief history of "big data"
A brief history of "big data"Nicola Ferraro
 

More from Nicola Ferraro (6)

Camel Day Italia 2021 - Camel K
Camel Day Italia 2021 - Camel KCamel Day Italia 2021 - Camel K
Camel Day Italia 2021 - Camel K
 
ApacheCon NA - Apache Camel K: connect your Knative serverless applications w...
ApacheCon NA - Apache Camel K: connect your Knative serverless applications w...ApacheCon NA - Apache Camel K: connect your Knative serverless applications w...
ApacheCon NA - Apache Camel K: connect your Knative serverless applications w...
 
ApacheCon NA - Apache Camel K: a cloud-native integration platform
ApacheCon NA - Apache Camel K: a cloud-native integration platformApacheCon NA - Apache Camel K: a cloud-native integration platform
ApacheCon NA - Apache Camel K: a cloud-native integration platform
 
Analyzing Data at Scale with Apache Spark
Analyzing Data at Scale with Apache SparkAnalyzing Data at Scale with Apache Spark
Analyzing Data at Scale with Apache Spark
 
Extending DevOps to Big Data Applications with Kubernetes
Extending DevOps to Big Data Applications with KubernetesExtending DevOps to Big Data Applications with Kubernetes
Extending DevOps to Big Data Applications with Kubernetes
 
A brief history of "big data"
A brief history of "big data"A brief history of "big data"
A brief history of "big data"
 

Recently uploaded

The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is insideshinachiaurasa2
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...Nitya salvi
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesVictorSzoltysek
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456KiaraTiradoMicha
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfkalichargn70th171
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrandmasabamasaba
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...kalichargn70th171
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfproinshot.com
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionOnePlan Solutions
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfryanfarris8
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
Pharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodologyPharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodologyAnusha Are
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 

Recently uploaded (20)

The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Pharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodologyPharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodology
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 

Cloud Native Applications on Kubernetes: a DevOps Approach

  • 1. Nicola Ferraro - Voxxed Days Ticino 2017 Cloud Native Applications on Kubernetes: a DevOps Approach Nicola Ferraro @ni_ferraro
  • 2. Nicola Ferraro - Voxxed Days Ticino 2017 About Me Nicola Ferraro Software Engineer at Red Hat Working on Apache Camel, Fabric8.io, JBoss Fuse, Fuse Integration Services for Openshift, Syndesis.io Follow me on twitter: @ni_ferraro
  • 3. Nicola Ferraro - Voxxed Days Ticino 2017 Agenda ● Technological Overview ○ Docker ○ Kubernetes ○ Development Tools ● Demo: deploying a microservice ● Buzzwords Explained ○ Cloud Native ○ Microservices ○ DevOps ○ IaC, CI & CD ● Demo: IaC, CI & CD
  • 4. Nicola Ferraro - Voxxed Days Ticino 2017 Containers Docker is revolutionizing the way we build software today. ● Lightweight virtualization ○ Ever tried to run docker containers on a RaspberryPI? ● Full runtime isolation ○ Using linux namespaces ● Language-independent packaging and distribution ○ The new JAR? The new EAR? ● Run 10x more apps in a single host than with VMs ● Composability ... $ docker run -d myuser/myapp
  • 5. Nicola Ferraro - Voxxed Days Ticino 2017 Containers: how to build them There are multiple ways of building containers: ● Dockerfile (classic) ● Rockerfile ○ Supports e.g. templating ● Ansible ● Docker-Maven-Plugin (for Java apps, from fabric8) ● See ro14nd talk for 10+ ways: https://github.com/ro14nd-talks/docker-conta iner-loading/blob/master/docker-container-lo ading.pdf FROM ubuntu:16.04 … RUN apt-get update && apt-get install -y mongodb-org RUN mkdir -p /data/db EXPOSE 27017 … ENTRYPOINT ["/usr/bin/mongod"] … a Dockerfile
  • 6. Nicola Ferraro - Voxxed Days Ticino 2017 Containers: distribution ● Build locally ● Push to a registry ● Run public and private images
  • 7. Nicola Ferraro - Voxxed Days Ticino 2017 Java EAR vs. Docker Image Java EAR: ● Complete runnable description of a Java EE application ● To be deployed on a Java EE application server providing: ○ Availability ○ Scalability ○ Fault tolerance ○ Load balancing ○ Rolling upgrades ○ Monitoring ○ Logging ○ … Docker Image: ● Complete runnable description of a generic application ● To be run with “docker run” ??? There should be something else!
  • 8. Nicola Ferraro - Voxxed Days Ticino 2017 Introducing Kubernetes Cloud platform (also for private cloud), to Orchestrate (Docker) containers: ● Born at Google ● Production ready ● Provides: ○ Availability ○ Scalability (auto and manual) ○ Fault tolerance ○ Load balancing ○ Deployment (canary, blue-green, …) ○ Monitoring ○ Logging ○ … ○ Service discovery Kubernetes Openshift Origin (Kubernetes on steroids) Open source (like anything else in Red Hat)
  • 9. Nicola Ferraro - Voxxed Days Ticino 2017 Kubernetes: Architecture ● kubectl / oc: client tools ● Master: ○ There can be multiple ones! ○ Rest API Server, Scheduler, Controller Manager ○ Configuration in etcd v3 ● Nodes: ○ Workers: run containers ○ Kubelet, Proxy Can scale up to 4000 nodes! And you can create smaller federated clusters (v 1.6) Master kubectl / oc / ... Node Node Node Node
  • 10. Nicola Ferraro - Voxxed Days Ticino 2017 Kubernetes Concepts: Namespace The same physical cluster can host multiple virtual environments called namespaces (or projects in Openshift). Node Node Private networks Master N1 N2 kubectl / oc / ... RBAC ● Openshift Origin ● New in Kubernetes (beta v. 1.6+)
  • 11. Nicola Ferraro - Voxxed Days Ticino 2017 Kubernetes Concepts: POD The deployment unit in Kubernetes is not the container, but the pod (group of related containers). Containers inside pods are automatically restarted in case of failure (configurable policy), but they don’t survive node crash. Node Pod Pod Pod Pods: ● Are groups of related containers ● Share (virtual) network interfaces ● Usually 1 pod contains 1 container ● Are treated as a single unit by Kubernetes (in replication controllers, services, etc.)
  • 12. Nicola Ferraro - Voxxed Days Ticino 2017 Kubernetes Concepts: Deployment Allows to specify the target condition of our application: e.g. 3 replicas of a given pod. Node Node Node Node replicas = 3 Master Ctrl Manager Node choice: ● Affinity ● Anti-affinity ● ... (using labels) Kubernetes 1.6+ Openshift Just change the number of replicas to scale up/down! Scheduler Deployment
  • 13. Nicola Ferraro - Voxxed Days Ticino 2017 Kubernetes Concepts: Deployment Allows software upgrades. Two modes: ● Rolling update: e.g. for microservices ○ Gradual process ○ Configurable: max surge, max unav. (25%) ● Recreate: e.g. for databases ● Canary or Blue-green: ○ Not oob ○ Can be done using Multiple deployments Node v1 v2 Node v1 v2 Node v1 v2 Deployment
  • 14. Nicola Ferraro - Voxxed Days Ticino 2017 Kubernetes Concepts: Service Services provide named (dns) access to pod’s network endpoints (level 4). Kubernetes Namespace Service Load balancing Route / Ingress myservice http://myservice/api http://myservice-ns.mycluster.io L7
  • 15. Nicola Ferraro - Voxxed Days Ticino 2017 Kubernetes Concepts: Other “Objects” ● Volume, VolumeClaim: to attach storage to containers ● ConfigMap: key value map to inject configuration ● Secret: like a config map, with more access restrictions ● CronJob, StatefulSet, DaemonSet: other “deployment” options Openshift: ● BuildConfig, Build: build automatically containers from source and deploy (or run custom Jenkins pipelines). Free!
  • 16. Nicola Ferraro - Voxxed Days Ticino 2017 Kubernetes: running it locally Minikube https://github.com/kuberne tes/minikube (VM based) Minishift https://github.com/minishi ft/minishift (VM based) “oc cluster up” https://github.com/openshi ft/origin (docker container based)
  • 17. Nicola Ferraro - Voxxed Days Ticino 2017 Demo Deploying a microservice (in Openshift)
  • 18. Nicola Ferraro - Voxxed Days Ticino 2017 Demo: Deploying a microservice A demo showing how to create a spring-boot microservice using the fabric8-maven-plugin. Features of Kubernetes/Openshift are shown: ● Scaling ● Load Balancing ● Rolling Deployment https://github.com/nicolaferraro/voxxed-ticino-demo
  • 19. Nicola Ferraro - Voxxed Days Ticino 2017 Agenda ● Technological Overview ○ Docker ○ Kubernetes ○ Development Tools ● Demo: deploying a microservice ● Buzzwords Explained ○ Cloud Native ○ Microservices ○ DevOps ○ IaC, CI & CD ● Demo: IaC, CI & CD
  • 20. Nicola Ferraro - Voxxed Days Ticino 2017 Cloud Native It just means.. applications built for the cloud! ● Developed for a cloud platform (e.g. Kubernetes) ● Not bound to physical servers, networks, storage … ● Packaged and ready to run (e.g. Docker container) ● Supporting load balancing, auto-scaling, relocation … ● Communicating (directly or indirectly) with the platform: ○ Health checks ○ Configuration (e.g. with configmaps) ○ Service discovery ○ Logging ○ Tracing, circuit breaking (especially for microservices) https://www.cncf.io/projects/
  • 21. Nicola Ferraro - Voxxed Days Ticino 2017 Microservices Design applications as a set of independently deployable services. The Java EE Monolith Microservices ! i.e. “why are you using Struts v 1 in 2017 ?” NodeJS on MongoDB Vert.x with PostgreSQL Spring-Boot with PostgreSQL
  • 22. Nicola Ferraro - Voxxed Days Ticino 2017 Microservices: How and why? How: ● Develop a service around a “bounded context” ● Make a team responsible for the service ● Define a strict API to communicate with other services Why: ● Optimize the service for speed (e.g. scaling) ● Evolve the service periodically ○ Even change technology! ● Release early and often: ○ To fix bugs ○ To patch security vulnerabilities ○ To meet business requirements ○ … there is more to say here … Free!
  • 23. Nicola Ferraro - Voxxed Days Ticino 2017 DevOps: the first way Why should we release earlier? ● DevOps = Dev + Ops = Make everyone work together towards the same goal: deliver value to the end user. Manufacturing Software Not so easy … Automation is just the first way! Dev OpsBusiness User QA And do not pass problems downstream (fail fast) ! → Increase the capacity of this flow →
  • 24. Nicola Ferraro - Voxxed Days Ticino 2017 DevOps: the second way Why should we release often? ● To create short feedback loops between business people, developers, operation guys, quality assessment people and the end user. ● Feedback loops are the receipt for optimizing and correcting work continuously towards the same goal. ● Short agile iterations are the key for continuous improvement. ● Automation is fundamental for the second way. Business Dev QA Ops User Learning paths
  • 25. Nicola Ferraro - Voxxed Days Ticino 2017 DevOps: the third way Experimenting and learning from failures is the way to improve! ● Cultural change: ○ Do not fear the change ○ Taking risks should be the norm ● Mastery (experience) makes sure that risks are controlled ● Change the process to improve it continuously. Business Dev QA Ops User
  • 26. Nicola Ferraro - Voxxed Days Ticino 2017 DevOps practices Technically, the fundamental DevOps practices are: ● Infrastructure as Code ○ Write your entire system into “source code” (including configuration) ○ Your system must be “runnable” ● Continuous Integration (CI) ○ Continuously test if your modules (or “services”) can work together ● Continuous Delivery (CD) ○ Deliver software to users quickly with (very) limited intervention ○ Deliver software into “mirrors” of the production environment
  • 27. Nicola Ferraro - Voxxed Days Ticino 2017 Infrastructure as Code The main enabler for DevOps: ● Code everything that constitute you application: ○ The application itself ○ Network configuration ○ Operating systems (and JVM) ○ Physical (or better virtual) Machines ○ Configuration (application settings, certificates, endpoints, …) ● Your whole infrastructure becomes “runnable” Tools used for automation: Ansible, Chef, Puppet.
  • 28. Nicola Ferraro - Voxxed Days Ticino 2017 “Cloud Native” Infrastructure as Code What’s the “infrastructure” for a cloud-native application? In Kubernetes it’s more or less: ● a Deployment: containers (OS, JVM), health checks, pods, replicas, network endpoints, load balancers, upgrade process, placement strategy ● ConfigMap and Secrets: define the application configuration Ok, I put everything in my SCM. Now what?
  • 29. Nicola Ferraro - Voxxed Days Ticino 2017 CI-CD Microservices are independently deployable… Build Deploy to dev Deploy to stg Deploy to prod Build Deploy to dev Deploy to stg Deploy to prod Microservice 1 Microservice 2 conditional conditional Test Test The same software deployed here!!!
  • 30. Nicola Ferraro - Voxxed Days Ticino 2017 CI-CD: Testing Testing is a crucial aspect of DevOps: ● Unit tests (in isolation) ● End-to-end functional tests ○ E.g. inject a Selenium pod ● Load tests ○ E.g. inject a (highly replicated!) JMeter pod ● System tests ○ E.g. inject a chaos monkey Testing pod (optional) Production-like environment Create virtual environments on the fly, for testing! You can run tests as part of the delivery pipeline, in a production-like environment!
  • 31. Nicola Ferraro - Voxxed Days Ticino 2017 CI-CD: How Openshift Jenkins pipelines integrated into the platform. Kubernetes Fabric8 (https://fabric8.io/) Integrated development platform for Kubernetes. Includes: ● Jenkins ● Gogs ● Nexus ● Hubot (chat ops) ● Quickstarts ● Maven Plugin ● …
  • 32. Nicola Ferraro - Voxxed Days Ticino 2017 Demo IaC, CI & CD (in Openshift)
  • 33. Nicola Ferraro - Voxxed Days Ticino 2017 Demo: IaC, CI & CD Deploy a set of applications on Openshift and configure CI-CD. Spring-Boot microservice, communicating with an Apache Spark recommender system using a Kafka broker. Source code: ● https://github.com/nicolaferraro/voxxed-bigdata-kafka ● https://github.com/nicolaferraro/voxxed-bigdata-web ● https://github.com/nicolaferraro/voxxed-bigdata-spark ● https://github.com/nicolaferraro/voxxed-bigdata-pipeline
  • 34. Nicola Ferraro - Voxxed Days Ticino 2017 Spark on Kubernetes: Oshinko Oshinko is a project for running Apache Spark cloud native applications on Openshift. Spark Driver Cluster Manager Spark Workers http://radanalytics.io User “main” code Oshinko “magic”
  • 35. Nicola Ferraro - Voxxed Days Ticino 2017 Future from Red Hat: Openshift.io Preview announced few days ago. Cloud development platform from the experience of Fabric8. ● SCM ● CI-CD ● Artifact Repository ● Planning ● Collaboration ● IDE (Eclipse Che) Everything on the cloud! No need to install anything, just open a browser!
  • 36. Nicola Ferraro - Voxxed Days Ticino 2017 Future from Red Hat: syndesis.io A new community for devs and non-devs for cloud integration. ● Deploy integration services on Openshift ● No need to write code! ● Connectors based on Apache Camel Follow us on twitter! @syndesisio
  • 37. Nicola Ferraro - Voxxed Days Ticino 2017 @ni_ferraro That’s all folks!