SlideShare une entreprise Scribd logo
1  sur  60
Télécharger pour lire hors ligne
Migrating Hundreds
of Legacy
Applications to
Josef Adersberger, CTO, QAware

@adersberger

}THE GOOD,
THE BAD,
THE UGLY
proud CNCF member
HYPERSCALE
RESILIENT
OPEX SAVINGS
SPEED
CIOLet’s bring 

all our web 

applications

into the cloud!
I’ve already 

canceled our

current data center 

contract.
Chief Architect
Great goal!
But we’ll need 

our time.
Excellent!
You’ve got one year.
CIOMy priorities:
(1) Security level
(2) Time
(3) OpEx savings
(4) Migration costs
8
WE WERE BRAVE
AND WE HAD … IMPEDIMENTS
THE GOOD
11
Visibility
Let’s architect
the cloud!
PACKAGED AND
DISTRIBUTED AS CONTAINERS
BUILD AND COMPOSED
AS MICROSERVICES
DYNAMICALLY
EXECUTED IN THE CLOUD
CLOUD NATIVE APPLICATIONS
3KEYPRINCIPLES
OMG - no greenfield

approach!?
Hundreds of legacy
systems!?
Questionnaire: Typical Questions And Their Motivation
1. Technology stack (e.g. OS, appserver, jvm)
2. Required resources (memory, CPU cores)
3. Writes to storage (local/remote storage,
write mode, data volume)
4. Special requirements (native libs, special
hardware)
5. Inbound and outbound protocols (protocol
stack, TLS, multicast, dynamic ports)
6. Ability to execute (regression/load tests,
business owner, dev knowhow, release cycle,
end of life)
7. Client authentication (e.g. SSO, login,
certificates)
What images to provide?
How many applications will be hard/
inefficient to schedule (>3 GB RAM, > 2
cores)?
What storage solutions to provide?
What applications will be hard to
impossible to be containerized?
Are there any non cloud-friendly
protocols?
How risky is the migration? Is the
migration maybe not needed?
What IAM and security mechanisms have
to be ported to the cloud?
16
QAVALIDATOR
SONARQUBE
EAM TOOL
QUESTIONNNAIRES
JIRA
XLS
STATIC ANALYSIS
IBM MIGRATION TOOL
…
MIGRATION TASKS
BASIC
TOUR-DE-MIGRATION
SYSTEM PROPERTIES
dashboard for information radiator
freestyle analysis with Tableau
MIGRATION DATABASE
CLOUDALYZER
17
Emergent design
of software landscapes
OLD APPLICATIONS (~200) MORE MODERN APPLICATIONS (~200)
ALL WEB APPLICATIONS (~400)
Re-architect to run on k8s on AWS lift & shift VMs to AWS EC2
APPLICATION
HTTPD WEB LAYER
ALMIGHTY LEGACY FRAMEWORK
J2EE 1.4 APPSERVER
JVM 1.6
DB MQ HOST BATCH FS
CLIENTS
TLS 1.0+
mostly non-TLS;

TCP-Binary, WS, REST, C:D, LDAP

Corba, SMTP, FTP, NAS, …
RACF ESB
ONPREM DATA CENTER
ONPREM DATA CENTER
DB MQ HOST BATCH FS RACF ESB
KUBERNETES / OPENSHIFT (CAAS)
DOCKER
JVM 8
ALMIGHTY FRAMEWORK NG
INNER APPLICATIONS
AWS WEB LAYER
AWS
CLIENTS
TLS 1.2
all TLS 1.2
JEE 7 APPSERVER
API GATEWAY
OUTER APPLICATIONS all 2-way
TLS 1.2

& OIDC

identity
token
APPLICATION
HTTPD WEB LAYER
ALMIGHTY LEGACY FRAMEWORK
J2EE 1.4 APPSERVER
JVM 1.6
DB MQ HOST BATCH FS
CLIENTS
TLS 1.0+
mostly non-TLS;

TCP-Binary, WS, REST, C:D, LDAP

Corba, SMTP, FTP, NAS, …
RACF ESB
ONPREM DATA CENTER
ONPREM DATA CENTER
DB MQ HOST BATCH FS RACF ESB
KUBERNETES / OPENSHIFT (CAAS)
DOCKER
JVM 8
ALMIGHTY FRAMEWORK NG
INNER APPLICATIONS
AWS WEB LAYER
AWS
CLIENTS
TLS 1.2
all TLS 1.2
JEE 7 APPSERVER
API GATEWAY
OUTER APPLICATIONS all 2-way
TLS 1.2

& OIDC

identity
token
2
Can we evolve existing enterprise applications into the
cloud with reasonable effort?
Containerization
12-Factor App Principles
Microservices
Cloud-native Apps
Monolithic Deployment
Traditional Infrastructure
CLOUD FRIENDLY CLOUD NATIVECLOUD ALIEN
2
Can we evolve existing enterprise applications into the
cloud with reasonable effort?
Containerization
12-Factor App Principles
Microservices
Cloud-native Apps
Monolithic Deployment
Traditional Infrastructure
Sweetspot

time and value (security, opex)
Put the monolith
into a container
… and enhance the

application according
the 12 factors
CLOUD FRIENDLY
Edge Service to the Rescue
MONOLITH
MONOLITH
EDGE SERVICE
BACKEND
CLIENTS
API GATEWAY
BACKEND
CLIENTS
BEFORE AFTER
MONOLITH
EDGE SERVICE
CLIENTS
TOKEN PROVIDER
TLS 1.2 + diverse user contexts (SAML,
Cookie, Header, Certificate, User/Pwd, …)
Change user context to
OIDC identity token
IAM SYSTEMS
API GATEWAY
TLS 1.2 + identity token
TLS 1.2 + identity token
Redirect to (S)SO if user context
not set / valid but required
user context
> 10
Edge Service <<pod>>
Edge Service <<container>>
Edge Service Chassis <<spring boot app>>
Spring Framework
Spring Boot
Netflix Zuul / Spring Cloud Zuul
Edge Service Filters
Redis
Edge Library
Token Service
Token Cache
SPI
Token
SPIToken
APIToken Handling Filter <<pre>>
Static Content Filter <<routing>>
Security Filter <<pre>>
Auth Plugins
Token
Provider
Web Layer
API Gateway
Sidecars to the Rescue
Container Patterns Applied
• Log extraction / re-formatting (fluentd)
• Scheduling (Quartz)
Sidecar: Enhance container behaviour
Ambassador: Proxy communication
Adapter: Provide standardized interface
• Configuration (ConfigMaps & Secrets to files)
• TLS tunnel (Stunnel, ghosttunnel)
• Circuit Breaking (linkerd)
• Request monitoring (linkerd)
Pod
Application Container
Pattern Container
Other Container
“Design patterns for container-based distributed systems”. Brendan Burns, David Oppenheimer. 2016
Kubernets 

Constraints
Initially we thought we’ll
run into k8s restrictions on
our infrastructure like:
‣ No support for multicast
‣ No RWX PVC available
We did. But cutting these

application requirements
lead to a better
architecture in each
and every case.
THE BAD
STATE
Databases
ONPREM DATA CENTER
AWS
DATABASES
MONOLITH
Databases stay in onprem data center
• Advantages:
• onprem/cloud version of the application can run in parallel
• privacy
• Disadvantages:
• latency (no real problem)
Activate TLS for all database connections

(low effort on application-side but separate project on the
database side)
Files
File persistence is very restricted to keep persistent state completely out of
AWS (privacy).
‣ No file writes allowed into container
‣ No RWX PVC available
‣ Files with application data written to PVC must be deleted after 15mins
‣ No NAS mounts from onprem data centers into containers allowed
Migration tasks for affected applications
‣ Store files as BLOB in database or use FTPS
Session State
90% OF THE APPLICATIONS HAVE SESSION STATE
100% OF THE APPLICATIONS HAVE MORE THAN 1 INSTANCE
Session Stickyness: not within the cloud!
Session Persistence:
‣ Within existing application database: performance impact too high for most
‣ Redis: no transport encryption out-of-the-box and separate infrastructure required
Session Synchronization:
‣ Application server: nope, no dynamic peer lookup within k8s
‣ In-memory data grid: Hazelcast. Nope. $$$ for TLS.
‣ In-memory data grid: Apache Ignite. Done.
‣ Embedded within application or standalone in a separate container.
‣ Little bit cumbersome but working k8s peer lookup
‣ Runs into JIT bug on IBM JVM (some methods have to be excluded from JIT)
DIAGNOS-

ABILITY
need a DevOps?
Metrics
Events / LogsTraces
Diagnosability
Metrics
Events / LogsTraces
Diagnosability
Metrics
Events / LogsTraces
• High effort to instrument for
valuable insights
•Scalability unclear for hundreds of
applications
•Applications have no time to run
their own Prometheus instance
•Scalability unclear for hundreds of
applications (Jaeger & ZipKin)
•Applications have no time to run
their own instance
•Scalability unclear (a lot of events lost)
•Applications have no time to run their
own EFK instance
•Non-standardized log format requires
custom log rewrite adapter but no
fluentd DaemonSet
Diagnosability
Metrics
Events / LogsTraces
SECURITY
need a SecDevOps?
We Came Far
BACKEND
MONOLITH
EDGE SERVICE
TLS 1.2 + user context
API GATEWAY
Two-way TLS 1.2 +
identity token
Two-way TLS 1.2 +
identity token
TOKEN CHECK
TLS 1.2 + user context
secrets injected at
container startup
security filters included
CLIENTS
CLIENTCERT ACL
EGRESS RULES
The Bad: Certificate Management
VAR 1: CLOUD NATIVE STYLE CERTIFICATE MANAGEMENT 

(SPIFFE-BASED, AT SERVICE MESH OR APPLICATION LEVEL)
VAR 2: REPLACE BY POLICIES (AT NETWORKING LEVEL)
e.g. e.g.
SPIRE
THE UGLY
String hostRequest = new HostRequest().hostusPokus(message);
44
CLOUD ENABLING 

CLOUD ALIENS
TOXIC

TECH
The Almighty Legacy Framework
• “worry-free package framework” from the early 2000s with about
500kLOC and 0% test coverage
• Migration tasks
• from J2EE 1.4 to JEE 7 and Java 6 to 8
• add identity token check and token relay
• modify session handling (synchronization)
• modify logging (to STDOUT)
• modify configuration (overwrite from ConfigMap)
• enforce TLS 1.2
• place circuit breakers
• predefined liveness and readiness probes
• Strategies:
• the hard way: migrate manually and increase coverage
• decorate with ambassadors, sidekicks and adapters
• do not migrate parts and replace that API within the applications
APPLICATION
ALMIGHTY LEGACY FRAMEWORK
J2EE 1.4 APPSERVER
JVM 1.6
47
~ 100 systems live on target
by end of this year (after 8mo)
~ 200 systems live on target
by end of first quarter 2018
other ~200 systems migrated
by end of first quarter 2018 via
virtual lift & shift. They will be
migrated onto Kubernetes
afterwards
That’s what we’ve learned
from migrating hundreds

of J2EE legacy apps

onto Kubernetes?

No stupid
“as-is into 

containers”
approach!
Getting as close as 

possible to cloud friendly 

application principles.
Increasing the security 

level by an order of 

magnitude!
Q -> A
proud member of the CNCF
TWITTER.COM/QAWARE - SLIDESHARE.NET/QAWARE
Thank you!
josef.adersberger@qaware.de
@adersberger
BONUS SLIDES
54
Industrialization
ARCHITECTURE TEAM (~2 FTE)
SUPPORT TEAM (~10 FTE)
DOZENS OF MIGRATION PROJECTS RUNNING IN PARALLEL (UP TO ~80)
‣ Training sessions
‣ Support sessions
‣ Guidance (cookbook, sample application)
‣ Development environment (SEU-as-Code)
‣ Standard images
‣ Automated Refactorings (RefactoBot)
‣ Pre-migrated frameworks
‣ Solutions: Edge service, ambassadors
INDUSTRIALIZATION TEAM (~6 FTE)
‣ Application blueprint (target architecture, migration rules)
‣ Migration database
NO SPEAK 

CLOUD
DMS System
APPLICATION
DMS
Proprietary (binary)

TCP-level on fixed ports

Non-encrypted

Multiple target servers
DMS ADAPTER
Hard-coded DNS
names as reference
to other servers in
response
APPLICATION
DMS ADAPTER
STUNNEL
STUNNEL
DMS
ONPREM
KUBERNETES ON AWS
POD
STUNNEL STUNNEL
PODS
SVC.HOST1 SVC.HOST2 SVC.HOST3
lbl:host1 lbl:host2 lbl:host3
ONPREM
dnshostname1.com.myapp.svc.cluster.local
dnshostname1.com
8
PLAN
BUILD
RUN
GRASP
Continuous

Delivery
Continuous

Feedback
IDE (ECLIPSE, INTELLIJ)
ARTIFACTORY
Kubernetes Cluster
RUNNING TESTED APPLICATIONS
INFORMATION RADIATOR
GITHUB ENTERPRISE
ACCOUNTABILITY PLUGIN
JENKINS
JARs

Docker image
Docker image
deploy
Trigger

Code
Code
Status
 The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications to Kubernetes

Contenu connexe

Tendances

Tendances (20)

Securing and Automating Kubernetes with Kyverno
Securing and Automating Kubernetes with KyvernoSecuring and Automating Kubernetes with Kyverno
Securing and Automating Kubernetes with Kyverno
 
Cloud-native Application Lifecycle Management
Cloud-native Application Lifecycle ManagementCloud-native Application Lifecycle Management
Cloud-native Application Lifecycle Management
 
Evolve or Fall Behind: Driving Transformation with Containers - Sai Vennam - ...
Evolve or Fall Behind: Driving Transformation with Containers - Sai Vennam - ...Evolve or Fall Behind: Driving Transformation with Containers - Sai Vennam - ...
Evolve or Fall Behind: Driving Transformation with Containers - Sai Vennam - ...
 
Make Java Microservices Resilient with Istio - Mangesh - IBM - CC18
Make Java Microservices Resilient with Istio - Mangesh - IBM - CC18Make Java Microservices Resilient with Istio - Mangesh - IBM - CC18
Make Java Microservices Resilient with Istio - Mangesh - IBM - CC18
 
Istio By Example (extended version)
Istio By Example (extended version)Istio By Example (extended version)
Istio By Example (extended version)
 
AWS Summit Singapore 2019 | Autoscaling Your Kubernetes Workloads
AWS Summit Singapore 2019 | Autoscaling Your Kubernetes WorkloadsAWS Summit Singapore 2019 | Autoscaling Your Kubernetes Workloads
AWS Summit Singapore 2019 | Autoscaling Your Kubernetes Workloads
 
Introduction and Overview of OpenStack for IaaS
Introduction and Overview of OpenStack for IaaSIntroduction and Overview of OpenStack for IaaS
Introduction and Overview of OpenStack for IaaS
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
 
Openstack days sv building highly available services using kubernetes (preso)
Openstack days sv   building highly available services using kubernetes (preso)Openstack days sv   building highly available services using kubernetes (preso)
Openstack days sv building highly available services using kubernetes (preso)
 
Azure dev ops_demo
Azure dev ops_demoAzure dev ops_demo
Azure dev ops_demo
 
Helm - Package Manager for Kubernetes
Helm - Package Manager for KubernetesHelm - Package Manager for Kubernetes
Helm - Package Manager for Kubernetes
 
How to build an event-driven, polyglot serverless microservices framework on ...
How to build an event-driven, polyglot serverless microservices framework on ...How to build an event-driven, polyglot serverless microservices framework on ...
How to build an event-driven, polyglot serverless microservices framework on ...
 
Simple tweaks to get the most out of your JVM
Simple tweaks to get the most out of your JVMSimple tweaks to get the most out of your JVM
Simple tweaks to get the most out of your JVM
 
Building Cloud Native Applications Using Spring Boot and Spring Cloud
Building Cloud Native Applications Using Spring Boot and Spring CloudBuilding Cloud Native Applications Using Spring Boot and Spring Cloud
Building Cloud Native Applications Using Spring Boot and Spring Cloud
 
Application Modernization with PKS / Kubernetes
Application Modernization with PKS / KubernetesApplication Modernization with PKS / Kubernetes
Application Modernization with PKS / Kubernetes
 
DCEU 18: Docker Enterprise Platform and Architecture
DCEU 18: Docker Enterprise Platform and ArchitectureDCEU 18: Docker Enterprise Platform and Architecture
DCEU 18: Docker Enterprise Platform and Architecture
 
DCEU 18: From Monolith to Microservices
DCEU 18: From Monolith to MicroservicesDCEU 18: From Monolith to Microservices
DCEU 18: From Monolith to Microservices
 
Kubecon US 2019: Kubernetes Multitenancy WG Deep Dive
Kubecon US 2019: Kubernetes Multitenancy WG Deep DiveKubecon US 2019: Kubernetes Multitenancy WG Deep Dive
Kubecon US 2019: Kubernetes Multitenancy WG Deep Dive
 
Stateless and Stateful Services in Kubernetes - Mohit Saxena - Citrix - CC18
Stateless and Stateful Services in Kubernetes - Mohit Saxena - Citrix - CC18Stateless and Stateful Services in Kubernetes - Mohit Saxena - Citrix - CC18
Stateless and Stateful Services in Kubernetes - Mohit Saxena - Citrix - CC18
 
Autoscaling in Kubernetes
Autoscaling in KubernetesAutoscaling in Kubernetes
Autoscaling in Kubernetes
 

Similaire à The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications to Kubernetes

Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
QAware GmbH
 

Similaire à The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications to Kubernetes (20)

Patterns and Pains of Migrating Legacy Applications to Kubernetes
Patterns and Pains of Migrating Legacy Applications to KubernetesPatterns and Pains of Migrating Legacy Applications to Kubernetes
Patterns and Pains of Migrating Legacy Applications to Kubernetes
 
Patterns and Pains of Migrating Legacy Applications to Kubernetes
Patterns and Pains of Migrating Legacy Applications to KubernetesPatterns and Pains of Migrating Legacy Applications to Kubernetes
Patterns and Pains of Migrating Legacy Applications to Kubernetes
 
56k.cloud training
56k.cloud training56k.cloud training
56k.cloud training
 
Application portability with kubernetes
Application portability with kubernetesApplication portability with kubernetes
Application portability with kubernetes
 
Meetup callback
Meetup callbackMeetup callback
Meetup callback
 
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
 
Twelve Factor App
Twelve Factor AppTwelve Factor App
Twelve Factor App
 
Containerized Hadoop beyond Kubernetes
Containerized Hadoop beyond KubernetesContainerized Hadoop beyond Kubernetes
Containerized Hadoop beyond Kubernetes
 
Latest (storage IO) patterns for cloud-native applications
Latest (storage IO) patterns for cloud-native applications Latest (storage IO) patterns for cloud-native applications
Latest (storage IO) patterns for cloud-native applications
 
HTTP/2 Comes to Java: Servlet 4.0 and what it means for the Java/Jakarta EE e...
HTTP/2 Comes to Java: Servlet 4.0 and what it means for the Java/Jakarta EE e...HTTP/2 Comes to Java: Servlet 4.0 and what it means for the Java/Jakarta EE e...
HTTP/2 Comes to Java: Servlet 4.0 and what it means for the Java/Jakarta EE e...
 
Amazon EKS 그리고 Service Mesh (김세호 솔루션즈 아키텍트, AWS) :: Gaming on AWS 2018
Amazon EKS 그리고 Service Mesh (김세호 솔루션즈 아키텍트, AWS) :: Gaming on AWS 2018Amazon EKS 그리고 Service Mesh (김세호 솔루션즈 아키텍트, AWS) :: Gaming on AWS 2018
Amazon EKS 그리고 Service Mesh (김세호 솔루션즈 아키텍트, AWS) :: Gaming on AWS 2018
 
[Capitole du Libre] #serverless -  mettez-le en oeuvre dans votre entreprise...
[Capitole du Libre] #serverless -  mettez-le en oeuvre dans votre entreprise...[Capitole du Libre] #serverless -  mettez-le en oeuvre dans votre entreprise...
[Capitole du Libre] #serverless -  mettez-le en oeuvre dans votre entreprise...
 
Leapfrog into Serverless - a Deloitte-Amtrak Case Study | Serverless Confere...
Leapfrog into Serverless - a Deloitte-Amtrak Case Study | Serverless Confere...Leapfrog into Serverless - a Deloitte-Amtrak Case Study | Serverless Confere...
Leapfrog into Serverless - a Deloitte-Amtrak Case Study | Serverless Confere...
 
IBM Think Session 8598 Domino and JavaScript Development MasterClass
IBM Think Session 8598 Domino and JavaScript Development MasterClassIBM Think Session 8598 Domino and JavaScript Development MasterClass
IBM Think Session 8598 Domino and JavaScript Development MasterClass
 
Mini-Track: Lessons from Public Cloud
Mini-Track: Lessons from Public CloudMini-Track: Lessons from Public Cloud
Mini-Track: Lessons from Public Cloud
 
SpringOne Tour: An Introduction to Azure Spring Apps Enterprise
SpringOne Tour: An Introduction to Azure Spring Apps EnterpriseSpringOne Tour: An Introduction to Azure Spring Apps Enterprise
SpringOne Tour: An Introduction to Azure Spring Apps Enterprise
 
Breaking the Monolith Road to Containers
Breaking the Monolith Road to ContainersBreaking the Monolith Road to Containers
Breaking the Monolith Road to Containers
 
Application Portability with Kubernetes (k8)
Application Portability with Kubernetes (k8)Application Portability with Kubernetes (k8)
Application Portability with Kubernetes (k8)
 
(ARC309) Getting to Microservices: Cloud Architecture Patterns
(ARC309) Getting to Microservices: Cloud Architecture Patterns(ARC309) Getting to Microservices: Cloud Architecture Patterns
(ARC309) Getting to Microservices: Cloud Architecture Patterns
 
stackconf 2020 | Replace your Docker based Containers with Cri-o Kata Contain...
stackconf 2020 | Replace your Docker based Containers with Cri-o Kata Contain...stackconf 2020 | Replace your Docker based Containers with Cri-o Kata Contain...
stackconf 2020 | Replace your Docker based Containers with Cri-o Kata Contain...
 

Plus de Josef Adersberger

Plus de Josef Adersberger (13)

Into the cloud, you better fly by sight
Into the cloud, you better fly by sightInto the cloud, you better fly by sight
Into the cloud, you better fly by sight
 
Serverless containers … with source-to-image
Serverless containers  … with source-to-imageServerless containers  … with source-to-image
Serverless containers … with source-to-image
 
The need for speed – transforming insurance into a cloud-native industry
The need for speed – transforming insurance into a cloud-native industryThe need for speed – transforming insurance into a cloud-native industry
The need for speed – transforming insurance into a cloud-native industry
 
The good, the bad, and the ugly of migrating hundreds of legacy applications ...
The good, the bad, and the ugly of migrating hundreds of legacy applications ...The good, the bad, and the ugly of migrating hundreds of legacy applications ...
The good, the bad, and the ugly of migrating hundreds of legacy applications ...
 
Docker und Kubernetes Patterns & Anti-Patterns
Docker und Kubernetes Patterns & Anti-PatternsDocker und Kubernetes Patterns & Anti-Patterns
Docker und Kubernetes Patterns & Anti-Patterns
 
Dataservices - Processing Big Data The Microservice Way
Dataservices - Processing Big Data The Microservice WayDataservices - Processing Big Data The Microservice Way
Dataservices - Processing Big Data The Microservice Way
 
Cloud Native und Java EE: Freund oder Feind?
Cloud Native und Java EE: Freund oder Feind?Cloud Native und Java EE: Freund oder Feind?
Cloud Native und Java EE: Freund oder Feind?
 
Time Series Processing with Solr and Spark
Time Series Processing with Solr and SparkTime Series Processing with Solr and Spark
Time Series Processing with Solr and Spark
 
JEE on DC/OS
JEE on DC/OSJEE on DC/OS
JEE on DC/OS
 
Time Series Processing with Apache Spark
Time Series Processing with Apache SparkTime Series Processing with Apache Spark
Time Series Processing with Apache Spark
 
Big Data Landscape 2016
Big Data Landscape 2016Big Data Landscape 2016
Big Data Landscape 2016
 
Clickstream Analysis with Spark
Clickstream Analysis with Spark Clickstream Analysis with Spark
Clickstream Analysis with Spark
 
Software-Sanierung: Wie man kranke Systeme wieder gesund macht.
Software-Sanierung: Wie man kranke Systeme wieder gesund macht.Software-Sanierung: Wie man kranke Systeme wieder gesund macht.
Software-Sanierung: Wie man kranke Systeme wieder gesund macht.
 

Dernier

Dernier (20)

Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 

The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications to Kubernetes

  • 1. Migrating Hundreds of Legacy Applications to Josef Adersberger, CTO, QAware
 @adersberger
 }THE GOOD, THE BAD, THE UGLY proud CNCF member
  • 3. CIOLet’s bring 
 all our web 
 applications
 into the cloud! I’ve already 
 canceled our
 current data center 
 contract.
  • 4. Chief Architect Great goal! But we’ll need 
 our time.
  • 6. CIOMy priorities: (1) Security level (2) Time (3) OpEx savings (4) Migration costs
  • 7.
  • 9. AND WE HAD … IMPEDIMENTS
  • 13. PACKAGED AND DISTRIBUTED AS CONTAINERS BUILD AND COMPOSED AS MICROSERVICES DYNAMICALLY EXECUTED IN THE CLOUD CLOUD NATIVE APPLICATIONS 3KEYPRINCIPLES
  • 14. OMG - no greenfield
 approach!? Hundreds of legacy systems!?
  • 15. Questionnaire: Typical Questions And Their Motivation 1. Technology stack (e.g. OS, appserver, jvm) 2. Required resources (memory, CPU cores) 3. Writes to storage (local/remote storage, write mode, data volume) 4. Special requirements (native libs, special hardware) 5. Inbound and outbound protocols (protocol stack, TLS, multicast, dynamic ports) 6. Ability to execute (regression/load tests, business owner, dev knowhow, release cycle, end of life) 7. Client authentication (e.g. SSO, login, certificates) What images to provide? How many applications will be hard/ inefficient to schedule (>3 GB RAM, > 2 cores)? What storage solutions to provide? What applications will be hard to impossible to be containerized? Are there any non cloud-friendly protocols? How risky is the migration? Is the migration maybe not needed? What IAM and security mechanisms have to be ported to the cloud?
  • 16. 16 QAVALIDATOR SONARQUBE EAM TOOL QUESTIONNNAIRES JIRA XLS STATIC ANALYSIS IBM MIGRATION TOOL … MIGRATION TASKS BASIC TOUR-DE-MIGRATION SYSTEM PROPERTIES dashboard for information radiator freestyle analysis with Tableau MIGRATION DATABASE CLOUDALYZER
  • 18. OLD APPLICATIONS (~200) MORE MODERN APPLICATIONS (~200) ALL WEB APPLICATIONS (~400) Re-architect to run on k8s on AWS lift & shift VMs to AWS EC2
  • 19. APPLICATION HTTPD WEB LAYER ALMIGHTY LEGACY FRAMEWORK J2EE 1.4 APPSERVER JVM 1.6 DB MQ HOST BATCH FS CLIENTS TLS 1.0+ mostly non-TLS;
 TCP-Binary, WS, REST, C:D, LDAP
 Corba, SMTP, FTP, NAS, … RACF ESB ONPREM DATA CENTER ONPREM DATA CENTER DB MQ HOST BATCH FS RACF ESB KUBERNETES / OPENSHIFT (CAAS) DOCKER JVM 8 ALMIGHTY FRAMEWORK NG INNER APPLICATIONS AWS WEB LAYER AWS CLIENTS TLS 1.2 all TLS 1.2 JEE 7 APPSERVER API GATEWAY OUTER APPLICATIONS all 2-way TLS 1.2
 & OIDC
 identity token
  • 20. APPLICATION HTTPD WEB LAYER ALMIGHTY LEGACY FRAMEWORK J2EE 1.4 APPSERVER JVM 1.6 DB MQ HOST BATCH FS CLIENTS TLS 1.0+ mostly non-TLS;
 TCP-Binary, WS, REST, C:D, LDAP
 Corba, SMTP, FTP, NAS, … RACF ESB ONPREM DATA CENTER ONPREM DATA CENTER DB MQ HOST BATCH FS RACF ESB KUBERNETES / OPENSHIFT (CAAS) DOCKER JVM 8 ALMIGHTY FRAMEWORK NG INNER APPLICATIONS AWS WEB LAYER AWS CLIENTS TLS 1.2 all TLS 1.2 JEE 7 APPSERVER API GATEWAY OUTER APPLICATIONS all 2-way TLS 1.2
 & OIDC
 identity token
  • 21. 2 Can we evolve existing enterprise applications into the cloud with reasonable effort? Containerization 12-Factor App Principles Microservices Cloud-native Apps Monolithic Deployment Traditional Infrastructure CLOUD FRIENDLY CLOUD NATIVECLOUD ALIEN
  • 22. 2 Can we evolve existing enterprise applications into the cloud with reasonable effort? Containerization 12-Factor App Principles Microservices Cloud-native Apps Monolithic Deployment Traditional Infrastructure Sweetspot
 time and value (security, opex) Put the monolith into a container … and enhance the
 application according the 12 factors CLOUD FRIENDLY
  • 23. Edge Service to the Rescue
  • 25. MONOLITH EDGE SERVICE CLIENTS TOKEN PROVIDER TLS 1.2 + diverse user contexts (SAML, Cookie, Header, Certificate, User/Pwd, …) Change user context to OIDC identity token IAM SYSTEMS API GATEWAY TLS 1.2 + identity token TLS 1.2 + identity token Redirect to (S)SO if user context not set / valid but required user context > 10
  • 26. Edge Service <<pod>> Edge Service <<container>> Edge Service Chassis <<spring boot app>> Spring Framework Spring Boot Netflix Zuul / Spring Cloud Zuul Edge Service Filters Redis Edge Library Token Service Token Cache SPI Token SPIToken APIToken Handling Filter <<pre>> Static Content Filter <<routing>> Security Filter <<pre>> Auth Plugins Token Provider Web Layer API Gateway
  • 27. Sidecars to the Rescue
  • 28. Container Patterns Applied • Log extraction / re-formatting (fluentd) • Scheduling (Quartz) Sidecar: Enhance container behaviour Ambassador: Proxy communication Adapter: Provide standardized interface • Configuration (ConfigMaps & Secrets to files) • TLS tunnel (Stunnel, ghosttunnel) • Circuit Breaking (linkerd) • Request monitoring (linkerd) Pod Application Container Pattern Container Other Container “Design patterns for container-based distributed systems”. Brendan Burns, David Oppenheimer. 2016
  • 29. Kubernets 
 Constraints Initially we thought we’ll run into k8s restrictions on our infrastructure like: ‣ No support for multicast ‣ No RWX PVC available We did. But cutting these
 application requirements lead to a better architecture in each and every case.
  • 31. STATE
  • 32. Databases ONPREM DATA CENTER AWS DATABASES MONOLITH Databases stay in onprem data center • Advantages: • onprem/cloud version of the application can run in parallel • privacy • Disadvantages: • latency (no real problem) Activate TLS for all database connections
 (low effort on application-side but separate project on the database side)
  • 33. Files File persistence is very restricted to keep persistent state completely out of AWS (privacy). ‣ No file writes allowed into container ‣ No RWX PVC available ‣ Files with application data written to PVC must be deleted after 15mins ‣ No NAS mounts from onprem data centers into containers allowed Migration tasks for affected applications ‣ Store files as BLOB in database or use FTPS
  • 34. Session State 90% OF THE APPLICATIONS HAVE SESSION STATE 100% OF THE APPLICATIONS HAVE MORE THAN 1 INSTANCE Session Stickyness: not within the cloud! Session Persistence: ‣ Within existing application database: performance impact too high for most ‣ Redis: no transport encryption out-of-the-box and separate infrastructure required Session Synchronization: ‣ Application server: nope, no dynamic peer lookup within k8s ‣ In-memory data grid: Hazelcast. Nope. $$$ for TLS. ‣ In-memory data grid: Apache Ignite. Done. ‣ Embedded within application or standalone in a separate container. ‣ Little bit cumbersome but working k8s peer lookup ‣ Runs into JIT bug on IBM JVM (some methods have to be excluded from JIT)
  • 38. Metrics Events / LogsTraces • High effort to instrument for valuable insights •Scalability unclear for hundreds of applications •Applications have no time to run their own Prometheus instance •Scalability unclear for hundreds of applications (Jaeger & ZipKin) •Applications have no time to run their own instance •Scalability unclear (a lot of events lost) •Applications have no time to run their own EFK instance •Non-standardized log format requires custom log rewrite adapter but no fluentd DaemonSet Diagnosability
  • 41. We Came Far BACKEND MONOLITH EDGE SERVICE TLS 1.2 + user context API GATEWAY Two-way TLS 1.2 + identity token Two-way TLS 1.2 + identity token TOKEN CHECK TLS 1.2 + user context secrets injected at container startup security filters included CLIENTS CLIENTCERT ACL EGRESS RULES
  • 42. The Bad: Certificate Management VAR 1: CLOUD NATIVE STYLE CERTIFICATE MANAGEMENT 
 (SPIFFE-BASED, AT SERVICE MESH OR APPLICATION LEVEL) VAR 2: REPLACE BY POLICIES (AT NETWORKING LEVEL) e.g. e.g. SPIRE
  • 43. THE UGLY String hostRequest = new HostRequest().hostusPokus(message);
  • 46. The Almighty Legacy Framework • “worry-free package framework” from the early 2000s with about 500kLOC and 0% test coverage • Migration tasks • from J2EE 1.4 to JEE 7 and Java 6 to 8 • add identity token check and token relay • modify session handling (synchronization) • modify logging (to STDOUT) • modify configuration (overwrite from ConfigMap) • enforce TLS 1.2 • place circuit breakers • predefined liveness and readiness probes • Strategies: • the hard way: migrate manually and increase coverage • decorate with ambassadors, sidekicks and adapters • do not migrate parts and replace that API within the applications APPLICATION ALMIGHTY LEGACY FRAMEWORK J2EE 1.4 APPSERVER JVM 1.6
  • 47. 47 ~ 100 systems live on target by end of this year (after 8mo) ~ 200 systems live on target by end of first quarter 2018 other ~200 systems migrated by end of first quarter 2018 via virtual lift & shift. They will be migrated onto Kubernetes afterwards
  • 48. That’s what we’ve learned from migrating hundreds
 of J2EE legacy apps
 onto Kubernetes?

  • 49. No stupid “as-is into 
 containers” approach!
  • 50. Getting as close as 
 possible to cloud friendly 
 application principles. Increasing the security 
 level by an order of 
 magnitude!
  • 51. Q -> A proud member of the CNCF
  • 52. TWITTER.COM/QAWARE - SLIDESHARE.NET/QAWARE Thank you! josef.adersberger@qaware.de @adersberger
  • 55. ARCHITECTURE TEAM (~2 FTE) SUPPORT TEAM (~10 FTE) DOZENS OF MIGRATION PROJECTS RUNNING IN PARALLEL (UP TO ~80) ‣ Training sessions ‣ Support sessions ‣ Guidance (cookbook, sample application) ‣ Development environment (SEU-as-Code) ‣ Standard images ‣ Automated Refactorings (RefactoBot) ‣ Pre-migrated frameworks ‣ Solutions: Edge service, ambassadors INDUSTRIALIZATION TEAM (~6 FTE) ‣ Application blueprint (target architecture, migration rules) ‣ Migration database
  • 57. DMS System APPLICATION DMS Proprietary (binary)
 TCP-level on fixed ports
 Non-encrypted
 Multiple target servers DMS ADAPTER Hard-coded DNS names as reference to other servers in response APPLICATION DMS ADAPTER STUNNEL STUNNEL DMS ONPREM KUBERNETES ON AWS POD STUNNEL STUNNEL PODS SVC.HOST1 SVC.HOST2 SVC.HOST3 lbl:host1 lbl:host2 lbl:host3 ONPREM dnshostname1.com.myapp.svc.cluster.local dnshostname1.com
  • 59. IDE (ECLIPSE, INTELLIJ) ARTIFACTORY Kubernetes Cluster RUNNING TESTED APPLICATIONS INFORMATION RADIATOR GITHUB ENTERPRISE ACCOUNTABILITY PLUGIN JENKINS JARs
 Docker image Docker image deploy Trigger
 Code Code Status