From a cluster to the Cloud

Jean-Frederic Clere
Jean-Frederic ClereSoftware Developer at Red Hat
APACHECON North America Sept. 9-12, 2019
From a cluster to the CloudFrom a cluster to the Cloud
Jean-Frederic Clere
Tomcat
@jfclere
Jean-Frederic Clere
Tomcat
@jfclere
TM
219/09/19
AgendaAgenda
Who I am
A cluster:
Session replication and application.
The cloud:
Looking at the different cloud providers
KUBEPing and DNSPing
Modify the tomcat cluster
Allow a dynamic list of nodes
Only TCP. (8888 port exported via deployment.yml)
Operator and S2I
Demos
What next? Questions / Suggestions
TM
319/09/19
Who am I?Who am I?Who am I?Who am I?
Jean-Frederic Clere
● Red Hat
● Years writing JAVA code and server software
● Tomcat committer since 2001
● Doing OpenSource since 1999
● Cyclist/Runner etc
● Lived 15 years in Spain (Barcelona)
● Now in Neuchâtel (CH)
TM
419/09/19
Session replication in a clusterSession replication in a clusterSession replication in a clusterSession replication in a cluster
HTTP/1.1
No transaction
No persistent connection
Web App:
Using cookies to carry session ID
Store information in the session:
Shopping cart etc.
Multi nodes and dynamic
Route request to right node
Replicate information
TM
519/09/19
A clusterA cluster
! Power
COL 1 2 3 4 5 6 7 8 1 2 3 6 25 50 8012
100
10
Ether 10/100
Load balancer
HTTPD
mod_proxy
Tomcat node Tomcat nodeTomcat node
TM
619/09/19
How to replicate sessionsHow to replicate sessions
In cluster:
<distributable/> in web.xml
<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
Port upd 45564
Ports tcp range 4000:4100
TM
819/09/19
KubernetesKubernetes
Kubernetes is an open-source system for automating
deployment, scaling, and management of containerized
applications. https://kubernetes.io/
TM
919/09/19
Cloud providersCloud providers
Most of the major cloud providers rely on Kubernetes as a
container management solution.
TM
1019/09/19
Cloud providersCloud providers
We worked on adding support for Kubernetes so that our
solution would be available on all of these providers.
TM
1119/09/19
DeploymentDeployment
Build Push Run Expose
Image of tomcat-
in-the-cloud
Docker registry Port 80Docker
container
TM
1219/09/19
AutomationAutomation
Because the deployment can be time consuming and slightly different
for each of the cloud providers (in terms of permission management).
We’re currently working on automating the process preparing an
operator.
AWS:
awscli /IAM console / docker / kops / kubectl
Azure:
azure-cli /Azure console / docker / kubectl
Google:
google-cloud-sdk / google cloud console / docker / kubectl
IBM:
Need to check / kubectl
TM
1319/09/19
OPENSHIFTOPENSHIFT
A Red Hat project / product
See OpenShift
https://www.openshift.com/
Can use AWS (public cloud) or Private on premise.
A layer on top of kubernetes to make developpers life more
easy.
TM
1419/09/19
Tomcat in OpenShift/KubernetesTomcat in OpenShift/Kubernetes
TM
1519/09/19
Developping Tomcat App in OpenShift/KubernetesDevelopping Tomcat App in OpenShift/Kubernetes
RHEL RHEL
When a developer
creates a new
application OpenShift
start a new pod
Web Console
Eclipse IDE
Command Line
Master Node Node Node
RHEL
pod
AWS / CloudForms / OpenStack (IaaS) / RHEV (Virt) / Bare Metal
TM
1619/09/19
Getting startedGetting started
minishift:
Allows a demo on a single box.
Easy to setup
Small demo
Online:
We have prepared wiki to help you to start:
https://github.com/web-servers/tomcat-in-the-cloud/wiki
We have a katacoda tutorial:
https://katacoda.com/jfclere/courses/tomcat-in-the-cloud
Bare metal / VM:
Use ansible to install
2 nodes + master + infra minimal
Tomcat webapp with sessions
Rest Counter demo.
TM
1719/09/19
From a cluster to the CloudFrom a cluster to the Cloud
RHEL RHEL
Broker Node Node Node
RHEL
! Power
COL 1 2 3 4 5 6 7 8 1 2 3 6 25 50 8012
100
10
Ether 10/100
Load balancer Tomcat node Tomcat nodeTomcat node
TM
1819/09/19
Problems for a cluster to cloud...Problems for a cluster to cloud...
Many ways to solve:
Embed tomcat with SpringBoot
Create a docker image
Extend an existing docker image
Fabric8
Tomcat session replication:
No multicast in the cloud.
Need a “ping” to find the other nodes (KubePing/DNSPing)
Need to add “view nodes” permission to the system account of the project.
TM
1919/09/19
Solutions: KUBEPingSolutions: KUBEPing
Tomcat cluster built-in solution
Peer discovery through multicast
heartbeat messages
Does not work in a cloud environment
Session
Data
Session
Data
Session
Data
Session
Data
Session
Data
Session
Data
Multicast
solution
Peer discovery through Kubernetes
Downward API
Works in all kubernetes clouds
Kubernetes API
TM
2019/09/19
Kubernetes APIKubernetes API
Tools for managing a Kubernetes
cluster
Accessible from the pods within the
cluster
GET /api/v1/namespaces/tomcat-in-the-
cloud/pods
➔
Return a JSON representation of all the pods in
the cluster
➔
Requires permissions
TM
2119/09/19
Architecture KUBEPing caseArchitecture KUBEPing case
DynamicMembershipService
RefreshThread
●
Call memberProvider.getMembers()
●
Filter out already known Member
●
Inform listeners of
new/dead members
KubernetesMemberProvider
●
init():
●
Get URL, cert, ... from
environment variables
●
Set startTime
●
getMembers():
●
Call api to get pods
●
Filter active pods
●
Compute aliveTime
MemberProvider
●
init(Properties)
●
getMembers(): List<Member>
TM
2219/09/19
Solutions: DNSPingSolutions: DNSPing
Tomcat cluster built-in solution
Peer discovery through multicast
heartbeat messages
Does not work in a cloud environment
Session
Data
Session
Data
Session
Data
Session
Data
Session
Data
Session
Data
Multicast
solution
Peer discovery through DNS lookup
Works in all kubernetes clouds
InetAddress.getAllByName(namespace)
TM
2319/09/19
DNS lookupDNS lookup
nslookup name-space
Accessible from the pods within
the cluster
InetAddress.getAllByName()
TM
2419/09/19
Demos contents:
We use Katacoda for the demos.
Where is the code:
In Tomcat tomcat-maven for the Docker Image
In github for the S2I (there is PR 188)
In github for the operator
More documentation / tests are welcome
What is doneWhat is done
TM
2519/09/19
Katacoda demo using KUBEPingKatacoda demo using KUBEPing
https://katacoda.com/jfclere/courses/tomcat-in-the-cloud
And the sources:
https://github.com/jfclere/intro-katacoda/tree/master/tomcat-in-t
he-cloud/deploy-titc-using-cli
Requires permission to read pods configuration (use it in private
cloud)
TM
2619/09/19
Katacoda demo using DNSPingKatacoda demo using DNSPing
https://katacoda.com/jfclere/scenarios/dnsping-tomcat
And the sources:
https://github.com/jfclere/intro-katacoda/tree/master/DNSPing-t
omcat
Runs everywhere, but requires a service for DNS discovering.
TM
2719/09/19
OperatorOperator
What is a Kubernetes operator
kubernetes definition
Basically it automates the services, routes and build (S2I) process.
What do we have now
We have one written in GO (prototype)
S2I (source to image) just tooling (PR # 188) vetoed but doesn’t need to be in Tomcat.
TM
2819/09/19
Katacoda demo using operatorKatacoda demo using operator
Operator demo in Katacoda
And the sources:
https://github.com/jfclere/intro-katacoda/tree/master/war-kataco
da
Every thing is created by the operator: pods, services etc.
TM
2919/09/19
Where we areWhere we are
Main sites:
https://github.com/web-servers/tomcat-in-the-cloud
https://github.com/jfclere/tomcatPI
https://docs.openshift.com
https://github.com/apache/tomcat
tomcat : res/tomcat-maven
DNSMembershipProvider / KubernetesMembershipProvider
Tomcat operator and S2I PR#188
TM
19/09/19 30
Questions ?
Suggestions?
THANK YOUTHANK YOU
JEAN-FREDERIC CLERE
@jclere
jfclere@gmail.com
JEAN-FREDERIC CLERE
@jclere
jfclere@gmail.com
1 of 30

Recommended

HTTP/2, HTTP/3 and SSL/TLS State of the Art in Our Servers by
HTTP/2, HTTP/3 and SSL/TLS State of the Art in Our ServersHTTP/2, HTTP/3 and SSL/TLS State of the Art in Our Servers
HTTP/2, HTTP/3 and SSL/TLS State of the Art in Our ServersJean-Frederic Clere
1.7K views31 slides
TomcatCon: from a cluster to the cloud by
TomcatCon: from a cluster to the cloudTomcatCon: from a cluster to the cloud
TomcatCon: from a cluster to the cloudJean-Frederic Clere
2.1K views36 slides
Tomcat from a cluster to the cloud on RP3 by
Tomcat from a cluster to the cloud on RP3Tomcat from a cluster to the cloud on RP3
Tomcat from a cluster to the cloud on RP3Jean-Frederic Clere
588 views22 slides
Apache Httpd and TLS certificates validations by
Apache Httpd and TLS certificates validationsApache Httpd and TLS certificates validations
Apache Httpd and TLS certificates validationsJean-Frederic Clere
240 views29 slides
Anatomy of neutron from the eagle eyes of troubelshoorters by
Anatomy of neutron from the eagle eyes of troubelshoortersAnatomy of neutron from the eagle eyes of troubelshoorters
Anatomy of neutron from the eagle eyes of troubelshoortersSadique Puthen
1.1K views27 slides
How happy they became with H2O/mruby and the future of HTTP by
How happy they became with H2O/mruby and the future of HTTPHow happy they became with H2O/mruby and the future of HTTP
How happy they became with H2O/mruby and the future of HTTPIchito Nagata
26.8K views67 slides

More Related Content

What's hot

IPTABLES Introduction by
IPTABLES IntroductionIPTABLES Introduction
IPTABLES IntroductionHungWei Chiu
668 views46 slides
Web scale infrastructures with kubernetes and flannel by
Web scale infrastructures with kubernetes and flannelWeb scale infrastructures with kubernetes and flannel
Web scale infrastructures with kubernetes and flannelpurpleocean
948 views36 slides
Kubernetes internals (Kubernetes 해부하기) by
Kubernetes internals (Kubernetes 해부하기)Kubernetes internals (Kubernetes 해부하기)
Kubernetes internals (Kubernetes 해부하기)DongHyeon Kim
2.2K views52 slides
6 Million Ways To Log In Docker - NYC Docker Meetup 12/17/2014 by
6 Million Ways To Log In Docker - NYC Docker Meetup 12/17/20146 Million Ways To Log In Docker - NYC Docker Meetup 12/17/2014
6 Million Ways To Log In Docker - NYC Docker Meetup 12/17/2014Christian Beedgen
16.2K views55 slides
Nomad + Flatcar: a harmonious marriage of lightweights by
Nomad + Flatcar: a harmonious marriage of lightweightsNomad + Flatcar: a harmonious marriage of lightweights
Nomad + Flatcar: a harmonious marriage of lightweightsIago López Galeiras
325 views28 slides
Apache httpd reverse proxy and Tomcat by
Apache httpd reverse proxy and TomcatApache httpd reverse proxy and Tomcat
Apache httpd reverse proxy and TomcatJean-Frederic Clere
126.5K views30 slides

What's hot(19)

IPTABLES Introduction by HungWei Chiu
IPTABLES IntroductionIPTABLES Introduction
IPTABLES Introduction
HungWei Chiu668 views
Web scale infrastructures with kubernetes and flannel by purpleocean
Web scale infrastructures with kubernetes and flannelWeb scale infrastructures with kubernetes and flannel
Web scale infrastructures with kubernetes and flannel
purpleocean948 views
Kubernetes internals (Kubernetes 해부하기) by DongHyeon Kim
Kubernetes internals (Kubernetes 해부하기)Kubernetes internals (Kubernetes 해부하기)
Kubernetes internals (Kubernetes 해부하기)
DongHyeon Kim2.2K views
6 Million Ways To Log In Docker - NYC Docker Meetup 12/17/2014 by Christian Beedgen
6 Million Ways To Log In Docker - NYC Docker Meetup 12/17/20146 Million Ways To Log In Docker - NYC Docker Meetup 12/17/2014
6 Million Ways To Log In Docker - NYC Docker Meetup 12/17/2014
Christian Beedgen16.2K views
Nomad + Flatcar: a harmonious marriage of lightweights by Iago López Galeiras
Nomad + Flatcar: a harmonious marriage of lightweightsNomad + Flatcar: a harmonious marriage of lightweights
Nomad + Flatcar: a harmonious marriage of lightweights
How to Troubleshoot OpenStack Without Losing Sleep by Sadique Puthen
How to Troubleshoot OpenStack Without Losing SleepHow to Troubleshoot OpenStack Without Losing Sleep
How to Troubleshoot OpenStack Without Losing Sleep
Sadique Puthen2.5K views
Neutron Network Namespaces and IPtables--A Technical Deep Dive by Mirantis
Neutron Network Namespaces and IPtables--A Technical Deep DiveNeutron Network Namespaces and IPtables--A Technical Deep Dive
Neutron Network Namespaces and IPtables--A Technical Deep Dive
Mirantis39.1K views
青云CoreOS虚拟机部署kubernetes by Zhichao Liang
青云CoreOS虚拟机部署kubernetes 青云CoreOS虚拟机部署kubernetes
青云CoreOS虚拟机部署kubernetes
Zhichao Liang29.6K views
What should be PID 1 in a container ? by Ranjith Rajaram for #rootConf 2017 by Ranjith Rajaram
What should be PID 1 in a container ? by Ranjith Rajaram for #rootConf 2017What should be PID 1 in a container ? by Ranjith Rajaram for #rootConf 2017
What should be PID 1 in a container ? by Ranjith Rajaram for #rootConf 2017
Ranjith Rajaram503 views
iptables 101- bottom-up by HungWei Chiu
iptables 101- bottom-upiptables 101- bottom-up
iptables 101- bottom-up
HungWei Chiu1.4K views
Installation Openstack Swift by ymtech
Installation Openstack SwiftInstallation Openstack Swift
Installation Openstack Swift
ymtech49.8K views
Acus08 Advanced Load Balancing Apache2.2 by Jim Jagielski
Acus08 Advanced Load Balancing Apache2.2Acus08 Advanced Load Balancing Apache2.2
Acus08 Advanced Load Balancing Apache2.2
Jim Jagielski180.7K views
KubeCon EU 2016: Creating an Advanced Load Balancing Solution for Kubernetes ... by KubeAcademy
KubeCon EU 2016: Creating an Advanced Load Balancing Solution for Kubernetes ...KubeCon EU 2016: Creating an Advanced Load Balancing Solution for Kubernetes ...
KubeCon EU 2016: Creating an Advanced Load Balancing Solution for Kubernetes ...
KubeAcademy236K views
Improving the ZFS Userland-Kernel API with Channel Programs - BSDCAN 2017 - M... by Matthew Ahrens
Improving the ZFS Userland-Kernel API with Channel Programs - BSDCAN 2017 - M...Improving the ZFS Userland-Kernel API with Channel Programs - BSDCAN 2017 - M...
Improving the ZFS Userland-Kernel API with Channel Programs - BSDCAN 2017 - M...
Matthew Ahrens306 views

Similar to From a cluster to the Cloud

Juggva cloud by
Juggva cloudJuggva cloud
Juggva cloudJean-Frederic Clere
251 views37 slides
kubernetes for beginners by
kubernetes for beginnerskubernetes for beginners
kubernetes for beginnersDominique Dumont
1.2K views19 slides
Cloud RPI4 tomcat ARM64 by
Cloud RPI4 tomcat ARM64Cloud RPI4 tomcat ARM64
Cloud RPI4 tomcat ARM64Jean-Frederic Clere
161 views26 slides
Scaling docker with kubernetes by
Scaling docker with kubernetesScaling docker with kubernetes
Scaling docker with kubernetesLiran Cohen
2.4K views79 slides
Kubernetes - Sailing a Sea of Containers by
Kubernetes - Sailing a Sea of ContainersKubernetes - Sailing a Sea of Containers
Kubernetes - Sailing a Sea of ContainersKel Cecil
1.4K views40 slides
Kubernetes extensibility by
Kubernetes extensibilityKubernetes extensibility
Kubernetes extensibilityDocker, Inc.
1K views73 slides

Similar to From a cluster to the Cloud(20)

Scaling docker with kubernetes by Liran Cohen
Scaling docker with kubernetesScaling docker with kubernetes
Scaling docker with kubernetes
Liran Cohen2.4K views
Kubernetes - Sailing a Sea of Containers by Kel Cecil
Kubernetes - Sailing a Sea of ContainersKubernetes - Sailing a Sea of Containers
Kubernetes - Sailing a Sea of Containers
Kel Cecil1.4K views
Kubernetes extensibility by Docker, Inc.
Kubernetes extensibilityKubernetes extensibility
Kubernetes extensibility
Docker, Inc.1K views
Effective Building your Platform with Kubernetes == Keep it Simple by Wojciech Barczyński
Effective Building your Platform with Kubernetes == Keep it Simple Effective Building your Platform with Kubernetes == Keep it Simple
Effective Building your Platform with Kubernetes == Keep it Simple
Kubernetes Basis: Pods, Deployments, and Services by Jian-Kai Wang
Kubernetes Basis: Pods, Deployments, and ServicesKubernetes Basis: Pods, Deployments, and Services
Kubernetes Basis: Pods, Deployments, and Services
Jian-Kai Wang194 views
K8s in 3h - Kubernetes Fundamentals Training by Piotr Perzyna
K8s in 3h - Kubernetes Fundamentals TrainingK8s in 3h - Kubernetes Fundamentals Training
K8s in 3h - Kubernetes Fundamentals Training
Piotr Perzyna396 views
Supporting and Using EC2/CIMI on top of Cloud Environments via Deltacloud by Oved Ourfali
Supporting and Using EC2/CIMI on top of Cloud Environments via DeltacloudSupporting and Using EC2/CIMI on top of Cloud Environments via Deltacloud
Supporting and Using EC2/CIMI on top of Cloud Environments via Deltacloud
Oved Ourfali1.7K views
Kubernetes laravel and kubernetes by William Stewart
Kubernetes   laravel and kubernetesKubernetes   laravel and kubernetes
Kubernetes laravel and kubernetes
William Stewart3.4K views
Kubered -Recipes for C2 Operations on Kubernetes by Jeffrey Holden
Kubered -Recipes for C2 Operations on KubernetesKubered -Recipes for C2 Operations on Kubernetes
Kubered -Recipes for C2 Operations on Kubernetes
Jeffrey Holden704 views
Kubernetes Basics for Connections Admins by LetsConnect
Kubernetes Basics for Connections AdminsKubernetes Basics for Connections Admins
Kubernetes Basics for Connections Admins
LetsConnect285 views
Social Connections 14 - Kubernetes Basics for Connections Admins by panagenda
Social Connections 14 - Kubernetes Basics for Connections AdminsSocial Connections 14 - Kubernetes Basics for Connections Admins
Social Connections 14 - Kubernetes Basics for Connections Admins
panagenda2.5K views
Installing Component Pack 6.0.0.6 by LetsConnect
Installing Component Pack 6.0.0.6Installing Component Pack 6.0.0.6
Installing Component Pack 6.0.0.6
LetsConnect2.5K views
15-ways-to-optimize-spring-boot-for-the-cloud by Billy Korando
15-ways-to-optimize-spring-boot-for-the-cloud15-ways-to-optimize-spring-boot-for-the-cloud
15-ways-to-optimize-spring-boot-for-the-cloud
Billy Korando183 views
Learn kubernetes in 90 minutes by Larry Cai
Learn kubernetes in 90 minutesLearn kubernetes in 90 minutes
Learn kubernetes in 90 minutes
Larry Cai5.5K views
15 ways-to-optimize-spring-boot-for-the-cloud by PolyglotMeetups
15 ways-to-optimize-spring-boot-for-the-cloud15 ways-to-optimize-spring-boot-for-the-cloud
15 ways-to-optimize-spring-boot-for-the-cloud
PolyglotMeetups121 views

More from Jean-Frederic Clere

Panama.pdf by
Panama.pdfPanama.pdf
Panama.pdfJean-Frederic Clere
14 views51 slides
03_clere-HTTP2 HTTP3 the State of the Art in Our Servers.pdf by
03_clere-HTTP2 HTTP3 the State of the Art in Our Servers.pdf03_clere-HTTP2 HTTP3 the State of the Art in Our Servers.pdf
03_clere-HTTP2 HTTP3 the State of the Art in Our Servers.pdfJean-Frederic Clere
7 views37 slides
03_clere_Proxing to tomcat with httpd.pdf by
03_clere_Proxing to tomcat with httpd.pdf03_clere_Proxing to tomcat with httpd.pdf
03_clere_Proxing to tomcat with httpd.pdfJean-Frederic Clere
6 views26 slides
01_clere_Having fun with a solar panel, camera and raspberry. How with a few ... by
01_clere_Having fun with a solar panel, camera and raspberry. How with a few ...01_clere_Having fun with a solar panel, camera and raspberry. How with a few ...
01_clere_Having fun with a solar panel, camera and raspberry. How with a few ...Jean-Frederic Clere
8 views23 slides
Apache httpd and TLS/SSL certificates validation by
Apache httpd and TLS/SSL certificates validationApache httpd and TLS/SSL certificates validation
Apache httpd and TLS/SSL certificates validationJean-Frederic Clere
156 views22 slides
Having fun with Raspberry(s) and Apache projects by
Having fun with Raspberry(s) and Apache projectsHaving fun with Raspberry(s) and Apache projects
Having fun with Raspberry(s) and Apache projectsJean-Frederic Clere
445 views18 slides

More from Jean-Frederic Clere(13)

03_clere-HTTP2 HTTP3 the State of the Art in Our Servers.pdf by Jean-Frederic Clere
03_clere-HTTP2 HTTP3 the State of the Art in Our Servers.pdf03_clere-HTTP2 HTTP3 the State of the Art in Our Servers.pdf
03_clere-HTTP2 HTTP3 the State of the Art in Our Servers.pdf
01_clere_Having fun with a solar panel, camera and raspberry. How with a few ... by Jean-Frederic Clere
01_clere_Having fun with a solar panel, camera and raspberry. How with a few ...01_clere_Having fun with a solar panel, camera and raspberry. How with a few ...
01_clere_Having fun with a solar panel, camera and raspberry. How with a few ...
Apache httpd and TLS/SSL certificates validation by Jean-Frederic Clere
Apache httpd and TLS/SSL certificates validationApache httpd and TLS/SSL certificates validation
Apache httpd and TLS/SSL certificates validation
Having fun with Raspberry(s) and Apache projects by Jean-Frederic Clere
Having fun with Raspberry(s) and Apache projectsHaving fun with Raspberry(s) and Apache projects
Having fun with Raspberry(s) and Apache projects

Recently uploaded

DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J... by
DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J...DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J...
DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J...Deltares
9 views24 slides
DSD-INT 2023 Modelling litter in the Yarra and Maribyrnong Rivers (Australia)... by
DSD-INT 2023 Modelling litter in the Yarra and Maribyrnong Rivers (Australia)...DSD-INT 2023 Modelling litter in the Yarra and Maribyrnong Rivers (Australia)...
DSD-INT 2023 Modelling litter in the Yarra and Maribyrnong Rivers (Australia)...Deltares
9 views34 slides
DevsRank by
DevsRankDevsRank
DevsRankdevsrank786
11 views1 slide
Cycleops - Automate deployments on top of bare metal.pptx by
Cycleops - Automate deployments on top of bare metal.pptxCycleops - Automate deployments on top of bare metal.pptx
Cycleops - Automate deployments on top of bare metal.pptxThanassis Parathyras
30 views12 slides
ict act 1.pptx by
ict act 1.pptxict act 1.pptx
ict act 1.pptxsanjaniarun08
13 views17 slides
Unleash The Monkeys by
Unleash The MonkeysUnleash The Monkeys
Unleash The MonkeysJacob Duijzer
7 views28 slides

Recently uploaded(20)

DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J... by Deltares
DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J...DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J...
DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J...
Deltares9 views
DSD-INT 2023 Modelling litter in the Yarra and Maribyrnong Rivers (Australia)... by Deltares
DSD-INT 2023 Modelling litter in the Yarra and Maribyrnong Rivers (Australia)...DSD-INT 2023 Modelling litter in the Yarra and Maribyrnong Rivers (Australia)...
DSD-INT 2023 Modelling litter in the Yarra and Maribyrnong Rivers (Australia)...
Deltares9 views
Cycleops - Automate deployments on top of bare metal.pptx by Thanassis Parathyras
Cycleops - Automate deployments on top of bare metal.pptxCycleops - Automate deployments on top of bare metal.pptx
Cycleops - Automate deployments on top of bare metal.pptx
El Arte de lo Possible by Neo4j
El Arte de lo PossibleEl Arte de lo Possible
El Arte de lo Possible
Neo4j38 views
Tridens DevOps by Tridens
Tridens DevOpsTridens DevOps
Tridens DevOps
Tridens9 views
DSD-INT 2023 - Delft3D User Days - Welcome - Day 3 - Afternoon by Deltares
DSD-INT 2023 - Delft3D User Days - Welcome - Day 3 - AfternoonDSD-INT 2023 - Delft3D User Days - Welcome - Day 3 - Afternoon
DSD-INT 2023 - Delft3D User Days - Welcome - Day 3 - Afternoon
Deltares13 views
Copilot Prompting Toolkit_All Resources.pdf by Riccardo Zamana
Copilot Prompting Toolkit_All Resources.pdfCopilot Prompting Toolkit_All Resources.pdf
Copilot Prompting Toolkit_All Resources.pdf
Riccardo Zamana6 views
SUGCON ANZ Presentation V2.1 Final.pptx by Jack Spektor
SUGCON ANZ Presentation V2.1 Final.pptxSUGCON ANZ Presentation V2.1 Final.pptx
SUGCON ANZ Presentation V2.1 Final.pptx
Jack Spektor22 views
DSD-INT 2023 Wave-Current Interaction at Montrose Tidal Inlet System and Its ... by Deltares
DSD-INT 2023 Wave-Current Interaction at Montrose Tidal Inlet System and Its ...DSD-INT 2023 Wave-Current Interaction at Montrose Tidal Inlet System and Its ...
DSD-INT 2023 Wave-Current Interaction at Montrose Tidal Inlet System and Its ...
Deltares9 views
.NET Developer Conference 2023 - .NET Microservices mit Dapr – zu viel Abstra... by Marc Müller
.NET Developer Conference 2023 - .NET Microservices mit Dapr – zu viel Abstra....NET Developer Conference 2023 - .NET Microservices mit Dapr – zu viel Abstra...
.NET Developer Conference 2023 - .NET Microservices mit Dapr – zu viel Abstra...
Marc Müller38 views
DSD-INT 2023 Baseline studies for Strategic Coastal protection for Long Islan... by Deltares
DSD-INT 2023 Baseline studies for Strategic Coastal protection for Long Islan...DSD-INT 2023 Baseline studies for Strategic Coastal protection for Long Islan...
DSD-INT 2023 Baseline studies for Strategic Coastal protection for Long Islan...
Deltares11 views
Roadmap y Novedades de producto by Neo4j
Roadmap y Novedades de productoRoadmap y Novedades de producto
Roadmap y Novedades de producto
Neo4j50 views
Unmasking the Dark Art of Vectored Exception Handling: Bypassing XDR and EDR ... by Donato Onofri
Unmasking the Dark Art of Vectored Exception Handling: Bypassing XDR and EDR ...Unmasking the Dark Art of Vectored Exception Handling: Bypassing XDR and EDR ...
Unmasking the Dark Art of Vectored Exception Handling: Bypassing XDR and EDR ...
Donato Onofri711 views
Advanced API Mocking Techniques by Dimpy Adhikary
Advanced API Mocking TechniquesAdvanced API Mocking Techniques
Advanced API Mocking Techniques
Dimpy Adhikary19 views
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx by animuscrm
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx
animuscrm13 views

From a cluster to the Cloud

  • 1. APACHECON North America Sept. 9-12, 2019 From a cluster to the CloudFrom a cluster to the Cloud Jean-Frederic Clere Tomcat @jfclere Jean-Frederic Clere Tomcat @jfclere
  • 2. TM 219/09/19 AgendaAgenda Who I am A cluster: Session replication and application. The cloud: Looking at the different cloud providers KUBEPing and DNSPing Modify the tomcat cluster Allow a dynamic list of nodes Only TCP. (8888 port exported via deployment.yml) Operator and S2I Demos What next? Questions / Suggestions
  • 3. TM 319/09/19 Who am I?Who am I?Who am I?Who am I? Jean-Frederic Clere ● Red Hat ● Years writing JAVA code and server software ● Tomcat committer since 2001 ● Doing OpenSource since 1999 ● Cyclist/Runner etc ● Lived 15 years in Spain (Barcelona) ● Now in Neuchâtel (CH)
  • 4. TM 419/09/19 Session replication in a clusterSession replication in a clusterSession replication in a clusterSession replication in a cluster HTTP/1.1 No transaction No persistent connection Web App: Using cookies to carry session ID Store information in the session: Shopping cart etc. Multi nodes and dynamic Route request to right node Replicate information
  • 5. TM 519/09/19 A clusterA cluster ! Power COL 1 2 3 4 5 6 7 8 1 2 3 6 25 50 8012 100 10 Ether 10/100 Load balancer HTTPD mod_proxy Tomcat node Tomcat nodeTomcat node
  • 6. TM 619/09/19 How to replicate sessionsHow to replicate sessions In cluster: <distributable/> in web.xml <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/> Port upd 45564 Ports tcp range 4000:4100
  • 7. TM 819/09/19 KubernetesKubernetes Kubernetes is an open-source system for automating deployment, scaling, and management of containerized applications. https://kubernetes.io/
  • 8. TM 919/09/19 Cloud providersCloud providers Most of the major cloud providers rely on Kubernetes as a container management solution.
  • 9. TM 1019/09/19 Cloud providersCloud providers We worked on adding support for Kubernetes so that our solution would be available on all of these providers.
  • 10. TM 1119/09/19 DeploymentDeployment Build Push Run Expose Image of tomcat- in-the-cloud Docker registry Port 80Docker container
  • 11. TM 1219/09/19 AutomationAutomation Because the deployment can be time consuming and slightly different for each of the cloud providers (in terms of permission management). We’re currently working on automating the process preparing an operator. AWS: awscli /IAM console / docker / kops / kubectl Azure: azure-cli /Azure console / docker / kubectl Google: google-cloud-sdk / google cloud console / docker / kubectl IBM: Need to check / kubectl
  • 12. TM 1319/09/19 OPENSHIFTOPENSHIFT A Red Hat project / product See OpenShift https://www.openshift.com/ Can use AWS (public cloud) or Private on premise. A layer on top of kubernetes to make developpers life more easy.
  • 14. TM 1519/09/19 Developping Tomcat App in OpenShift/KubernetesDevelopping Tomcat App in OpenShift/Kubernetes RHEL RHEL When a developer creates a new application OpenShift start a new pod Web Console Eclipse IDE Command Line Master Node Node Node RHEL pod AWS / CloudForms / OpenStack (IaaS) / RHEV (Virt) / Bare Metal
  • 15. TM 1619/09/19 Getting startedGetting started minishift: Allows a demo on a single box. Easy to setup Small demo Online: We have prepared wiki to help you to start: https://github.com/web-servers/tomcat-in-the-cloud/wiki We have a katacoda tutorial: https://katacoda.com/jfclere/courses/tomcat-in-the-cloud Bare metal / VM: Use ansible to install 2 nodes + master + infra minimal Tomcat webapp with sessions Rest Counter demo.
  • 16. TM 1719/09/19 From a cluster to the CloudFrom a cluster to the Cloud RHEL RHEL Broker Node Node Node RHEL ! Power COL 1 2 3 4 5 6 7 8 1 2 3 6 25 50 8012 100 10 Ether 10/100 Load balancer Tomcat node Tomcat nodeTomcat node
  • 17. TM 1819/09/19 Problems for a cluster to cloud...Problems for a cluster to cloud... Many ways to solve: Embed tomcat with SpringBoot Create a docker image Extend an existing docker image Fabric8 Tomcat session replication: No multicast in the cloud. Need a “ping” to find the other nodes (KubePing/DNSPing) Need to add “view nodes” permission to the system account of the project.
  • 18. TM 1919/09/19 Solutions: KUBEPingSolutions: KUBEPing Tomcat cluster built-in solution Peer discovery through multicast heartbeat messages Does not work in a cloud environment Session Data Session Data Session Data Session Data Session Data Session Data Multicast solution Peer discovery through Kubernetes Downward API Works in all kubernetes clouds Kubernetes API
  • 19. TM 2019/09/19 Kubernetes APIKubernetes API Tools for managing a Kubernetes cluster Accessible from the pods within the cluster GET /api/v1/namespaces/tomcat-in-the- cloud/pods ➔ Return a JSON representation of all the pods in the cluster ➔ Requires permissions
  • 20. TM 2119/09/19 Architecture KUBEPing caseArchitecture KUBEPing case DynamicMembershipService RefreshThread ● Call memberProvider.getMembers() ● Filter out already known Member ● Inform listeners of new/dead members KubernetesMemberProvider ● init(): ● Get URL, cert, ... from environment variables ● Set startTime ● getMembers(): ● Call api to get pods ● Filter active pods ● Compute aliveTime MemberProvider ● init(Properties) ● getMembers(): List<Member>
  • 21. TM 2219/09/19 Solutions: DNSPingSolutions: DNSPing Tomcat cluster built-in solution Peer discovery through multicast heartbeat messages Does not work in a cloud environment Session Data Session Data Session Data Session Data Session Data Session Data Multicast solution Peer discovery through DNS lookup Works in all kubernetes clouds InetAddress.getAllByName(namespace)
  • 22. TM 2319/09/19 DNS lookupDNS lookup nslookup name-space Accessible from the pods within the cluster InetAddress.getAllByName()
  • 23. TM 2419/09/19 Demos contents: We use Katacoda for the demos. Where is the code: In Tomcat tomcat-maven for the Docker Image In github for the S2I (there is PR 188) In github for the operator More documentation / tests are welcome What is doneWhat is done
  • 24. TM 2519/09/19 Katacoda demo using KUBEPingKatacoda demo using KUBEPing https://katacoda.com/jfclere/courses/tomcat-in-the-cloud And the sources: https://github.com/jfclere/intro-katacoda/tree/master/tomcat-in-t he-cloud/deploy-titc-using-cli Requires permission to read pods configuration (use it in private cloud)
  • 25. TM 2619/09/19 Katacoda demo using DNSPingKatacoda demo using DNSPing https://katacoda.com/jfclere/scenarios/dnsping-tomcat And the sources: https://github.com/jfclere/intro-katacoda/tree/master/DNSPing-t omcat Runs everywhere, but requires a service for DNS discovering.
  • 26. TM 2719/09/19 OperatorOperator What is a Kubernetes operator kubernetes definition Basically it automates the services, routes and build (S2I) process. What do we have now We have one written in GO (prototype) S2I (source to image) just tooling (PR # 188) vetoed but doesn’t need to be in Tomcat.
  • 27. TM 2819/09/19 Katacoda demo using operatorKatacoda demo using operator Operator demo in Katacoda And the sources: https://github.com/jfclere/intro-katacoda/tree/master/war-kataco da Every thing is created by the operator: pods, services etc.
  • 28. TM 2919/09/19 Where we areWhere we are Main sites: https://github.com/web-servers/tomcat-in-the-cloud https://github.com/jfclere/tomcatPI https://docs.openshift.com https://github.com/apache/tomcat tomcat : res/tomcat-maven DNSMembershipProvider / KubernetesMembershipProvider Tomcat operator and S2I PR#188
  • 30. THANK YOUTHANK YOU JEAN-FREDERIC CLERE @jclere jfclere@gmail.com JEAN-FREDERIC CLERE @jclere jfclere@gmail.com