SlideShare a Scribd company logo
1 of 26
Download to read offline
E
ffi
cient DevOps Tooling


with Java and GraalVM
OOP Fachforen 2021 Digital, February 9th 2021


@LeanderReimer #cloudnativenerd #qaware
Mario-Leander Reimer


Principal Software Architect


@LeanderReimer


#cloudnativenerd #qaware
// OOP 2021 Digital // Efficient DevOps Tooling with Java and GraalVM // @LeanderReimer #cloudnativenerd #qaware #OOPdigital
How do you organise and enable
DevOps teams for


fast
fl
ow and high productivity?
3
// OOP 2021 Digital // Efficient DevOps Tooling with Java and GraalVM // @LeanderReimer #cloudnativenerd #qaware #OOPdigital
Too much cognitive load will become a bottleneck
for fast
fl
ow and high productivity.
• Instrinsic Cognitive Load - relates to fundamental aspects
and knowledge in the problem space (e.g. used languages,
APIs, frameworks)


• Extraneous Cognitive Load - relates to the environment


(e.g. deployment, con
fi
guration, console commands)


• Germane Cognitive Load - relates to speci
fi
c aspects of the
business domain (aka. „value added“ thinking)
4
https://teamtopologies.com
// OOP 2021 Digital // Efficient DevOps Tooling with Java and GraalVM // @LeanderReimer #cloudnativenerd #qaware #OOPdigital
Eliminate


extraneous cognitive load




Minimize


intrinsic cognitive load
5
// OOP 2021 Digital // Efficient DevOps Tooling with Java and GraalVM // @LeanderReimer #cloudnativenerd #qaware #OOPdigital
6
// OOP 2021 Digital // Efficient DevOps Tooling with Java and GraalVM // @LeanderReimer #cloudnativenerd #qaware #OOPdigital
Use the right language for the job!?
7
Getty Images Liliboas
Ansible Shell Scripts
Ruby Python
// OOP 2021 Digital // Efficient DevOps Tooling with Java and GraalVM // @LeanderReimer #cloudnativenerd #qaware #OOPdigital
8
// OOP 2021 Digital // Efficient DevOps Tooling with Java and GraalVM // @LeanderReimer #cloudnativenerd #qaware #OOPdigital
GraalVM to the Rescue!
9
// OOP 2021 Digital // Efficient DevOps Tooling with Java and GraalVM // @LeanderReimer #cloudnativenerd #qaware #OOPdigital
GraalVM in a Nutshell
• Polyglot Runtime: runs all JVM languages, R, JavaScript, NodeJS,
Ruby, Python, C/C++ via LLVM with full interop


• Ahead-of-time (AOT) Compilation: memory management, thread
scheduling via SubstrateVM


• GraalVM as a Platform: embed and extend GraalVM with Tru
ffl
e,
implement your own language and tools
10
// OOP 2021 Digital // Efficient DevOps Tooling with Java and GraalVM // @LeanderReimer #cloudnativenerd #qaware #OOPdigital
Polyglot Mayhem
• The Graal Polyglot API allows you to embed and use different
languages with full bidirectional interop.









• This is not the same as with the Java Scripting API (JSR 223)!
11
private static void helloPython(PolyglotMessage message) {


try (Context context = Context.newBuilder().allowAllAccess(true).build()) {


context.getPolyglotBindings().putMember("message", message);


context.eval("python",


"import polyglotn" +


"message = polyglot.import_value('message')n" +


"message['invocations'] += 1n" +


"print(message['text'])");


}


}
// OOP 2021 Digital // Efficient DevOps Tooling with Java and GraalVM // @LeanderReimer #cloudnativenerd #qaware #OOPdigital
12
Code & Demos
https://github.com/qaware/hands-on-graalvm


https://github.com/qaware/fast-fibonacci
// OOP 2021 Digital // Efficient DevOps Tooling with Java and GraalVM // @LeanderReimer #cloudnativenerd #qaware #OOPdigital
The Swiss Army Knife of Operations.
13
CLIs - The Swiss Army Knife of Operations
// OOP 2021 Digital // Efficient DevOps Tooling with Java and GraalVM // @LeanderReimer #cloudnativenerd #qaware #OOPdigital
The basics of 12-factor CLI apps
• Great help is essential. What version am I on?


• Prefer
fl
ags to positional arguments.


• Mind the streams. stdout is for output, stderr is for messaging.


• Handle things going wrong: error code, title, how to
fi
x, URL, …


• Be fancy: use colours, have shell completion.


• Prompt if you can.


• Be speedy. CLIs need to start fast.


• Be clear about subcommands.
14
For complete list and info, read https://medium.com/@jdxcode/12-factor-cli-apps-dd3c227a0e46
// OOP 2021 Digital // Efficient DevOps Tooling with Java and GraalVM // @LeanderReimer #cloudnativenerd #qaware #OOPdigital
Build CLIs with Picocli and GraalVM
• Native DevOps tools, CLIs or sidecar containers can now also be
build using Java! Golang is still cool.


• Picoli is a small framework to easily build JVM command line apps.


• Support for ANSI colors, tab completion, sub commands and other
12-factor CLI app principles


• In-built support for GraalVM AOT compilation to native images via the
ReflectionConfigGenerator utility and annotation processor.
15
// OOP 2021 Digital // Efficient DevOps Tooling with Java and GraalVM // @LeanderReimer #cloudnativenerd #qaware #OOPdigital
16
Code & Demos
https://github.com/lreimer/microj-cli


https://github.com/lreimer/microj-picocli-graalvm
// OOP 2021 Digital // Efficient DevOps Tooling with Java and GraalVM // @LeanderReimer #cloudnativenerd #qaware #OOPdigital
Container Orchestration Patterns
17
Sidecar Container


Extended Container Behaviour


• Log Extraction / Reformatting


(
fl
uentd,
fi
le beat)


• Scheduling (cron, quartz)
Ambassador Container


Proxy Communication


• TLS Tunnel (ghostunnel, Istio)


• Circuit Breaking (linked, Istio)


• Request Monitoring (linked, Istio)
Adapter Container


Standardized Ops Interfaces


• Monitoring (Prometheus)


• Con
fi
guration (Con
fi
gMaps, Secrets, …)
// OOP 2021 Digital // Efficient DevOps Tooling with Java and GraalVM // @LeanderReimer #cloudnativenerd #qaware #OOPdigital
Use a multi-stage Docker
fi
le to build Linux binary
18
FROM ghcr.io/graalvm/graalvm-ce:20.3.0 AS builder


# install native-image utility


RUN gu install native-image && mkdir /hands-on-graalvm


# copy files content and build native application


WORKDIR /hands-on-graalvm


COPY . .


RUN ./gradlew build -x test && ./gradlew graalNativeImage


FROM gcr.io/distroless/cc-debian10:debug


# copy binary and required libraries into runtime image


COPY --from=builder /hands-on-graalvm/build/hands-on-graal /


COPY --from=builder /opt/graalvm-ce-java11-20.3.0/lib/libsunec.so /


COPY --from=debian:10.2 /usr/lib/x86_64-linux-gnu/libz* /usr/lib/x86_64-linux-gnu/


COPY --from=debian:10.2 /lib/x86_64-linux-gnu/libz* /lib/x86_64-linux-gnu/


ENTRYPOINT ["/hands-on-graal"]


CMD ["Hello World from GraalVM native inside Docker."]
// OOP 2021 Digital // Efficient DevOps Tooling with Java and GraalVM // @LeanderReimer #cloudnativenerd #qaware #OOPdigital
19
Operator.
- Do stuff to my Kubernetes.
// OOP 2021 Digital // Efficient DevOps Tooling with Java and GraalVM // @LeanderReimer #cloudnativenerd #qaware #OOPdigital
What are operators?
• Operators are codi
fi
ed Ops procedures!


• Operators are the path towards Zero-Ops. They enable auto-updating,
self-monitoring and self-healing infrastructure and applications.


• The concept was coined in the Kubernetes world. It’s now been
adopted and used widespread in the cloud native world.


• Examples: OKD, Sealed Secrets, Kube Monkey, Weave Flux
20
// OOP 2021 Digital // Efficient DevOps Tooling with Java and GraalVM // @LeanderReimer #cloudnativenerd #qaware #OOPdigital
Kubernetes Operators in a Nutshell
21
// OOP 2021 Digital // Efficient DevOps Tooling with Java and GraalVM // @LeanderReimer #cloudnativenerd #qaware #OOPdigital
The Kill Pod Operator
22
• Super simple Chaos monkey style operator inspired by Kubemonkey


• Regularly kills pods of deployments that are killpod/enabled
apiVersion: apps/v1


kind: Deployment


metadata:


name: nginx-killpod-enabled


labels:


killpod/enabled: "true"


killpod/application: nginx-killpod-enabled


killpod/delay: "30"


killpod/amount: "2"


spec:


...
// OOP 2021 Digital // Efficient DevOps Tooling with Java and GraalVM // @LeanderReimer #cloudnativenerd #qaware #OOPdigital
The Super Secret Operator
23
• Apply asymmetrical encrypted secrets, the operator will decrypt and manage ordinary
K8s secrets under the hood


• Inspired by Sealed Secrets from Bitnami https://github.com/bitnami-labs/sealed-secrets
apiVersion: operators.on.hands/v1alpha1


kind: SuperSecret


metadata:


name: supersecret-test


spec:


secretData:


password: eV7YoQXyZlY+y51RWXEqyu0U44EPEPwEz+fZvGo+7McOTA4wQYCdxXMANtab3aW8


...


ywqpkHYtSLvrPgFnbcuSvD2UzuUNeE2qkh6SAM1z9Lpfwi+IUZjaY34Z+RjEL5OZFPYkQ==
// OOP 2021 Digital // Efficient DevOps Tooling with Java and GraalVM // @LeanderReimer #cloudnativenerd #qaware #OOPdigital
The Microservice Operator
24
apiVersion: operators.on.hands/v1alpha1


kind: Microservice


metadata:


name: microservice-test


labels:


app: nginx


spec:


replicas: 2


image: nginx:1.17.6


ports:


- containerPort: 80


serviceType: LoadBalancer
• Abstracting the usual Deployment, Service and Con
fi
gMap de
fi
nitions
using a simple and uni
fi
ed Microservice CRD
// OOP 2021 Digital // Efficient DevOps Tooling with Java and GraalVM // @LeanderReimer #cloudnativenerd #qaware #OOPdigital
25
Code & Demos
https://github.com/qaware/graal-operators
Mario-Leander Reimer


Principal Software Architect, QAware GmbH


mario-leander.reimer@qaware.de


https://www.qaware.de


https://speakerdeck.com/lreimer/


https://github.com/lreimer/
&

More Related Content

More from QAware GmbH

Cloud Migration mit KI: der Turbo
Cloud Migration mit KI: der Turbo Cloud Migration mit KI: der Turbo
Cloud Migration mit KI: der Turbo QAware GmbH
 
Migration von stark regulierten Anwendungen in die Cloud: Dem Teufel die See...
 Migration von stark regulierten Anwendungen in die Cloud: Dem Teufel die See... Migration von stark regulierten Anwendungen in die Cloud: Dem Teufel die See...
Migration von stark regulierten Anwendungen in die Cloud: Dem Teufel die See...QAware GmbH
 
Aus blau wird grün! Ansätze und Technologien für nachhaltige Kubernetes-Cluster
Aus blau wird grün! Ansätze und Technologien für nachhaltige Kubernetes-Cluster Aus blau wird grün! Ansätze und Technologien für nachhaltige Kubernetes-Cluster
Aus blau wird grün! Ansätze und Technologien für nachhaltige Kubernetes-Cluster QAware GmbH
 
Endlich gute API Tests. Boldly Testing APIs Where No One Has Tested Before.
Endlich gute API Tests. Boldly Testing APIs Where No One Has Tested Before.Endlich gute API Tests. Boldly Testing APIs Where No One Has Tested Before.
Endlich gute API Tests. Boldly Testing APIs Where No One Has Tested Before.QAware GmbH
 
Kubernetes with Cilium in AWS - Experience Report!
Kubernetes with Cilium in AWS - Experience Report!Kubernetes with Cilium in AWS - Experience Report!
Kubernetes with Cilium in AWS - Experience Report!QAware GmbH
 
50 Shades of K8s Autoscaling
50 Shades of K8s Autoscaling50 Shades of K8s Autoscaling
50 Shades of K8s AutoscalingQAware GmbH
 
Kontinuierliche Sicherheitstests für APIs mit Testkube und OWASP ZAP
Kontinuierliche Sicherheitstests für APIs mit Testkube und OWASP ZAPKontinuierliche Sicherheitstests für APIs mit Testkube und OWASP ZAP
Kontinuierliche Sicherheitstests für APIs mit Testkube und OWASP ZAPQAware GmbH
 
Service Mesh Pain & Gain. Experiences from a client project.
Service Mesh Pain & Gain. Experiences from a client project.Service Mesh Pain & Gain. Experiences from a client project.
Service Mesh Pain & Gain. Experiences from a client project.QAware GmbH
 
50 Shades of K8s Autoscaling
50 Shades of K8s Autoscaling50 Shades of K8s Autoscaling
50 Shades of K8s AutoscalingQAware GmbH
 
Blue turns green! Approaches and technologies for sustainable K8s clusters.
Blue turns green! Approaches and technologies for sustainable K8s clusters.Blue turns green! Approaches and technologies for sustainable K8s clusters.
Blue turns green! Approaches and technologies for sustainable K8s clusters.QAware GmbH
 
Per Anhalter zu Cloud Nativen API Gateways
Per Anhalter zu Cloud Nativen API GatewaysPer Anhalter zu Cloud Nativen API Gateways
Per Anhalter zu Cloud Nativen API GatewaysQAware GmbH
 
Aus blau wird grün! Ansätze und Technologien für nachhaltige Kubernetes-Cluster
Aus blau wird grün! Ansätze und Technologien für nachhaltige Kubernetes-Cluster Aus blau wird grün! Ansätze und Technologien für nachhaltige Kubernetes-Cluster
Aus blau wird grün! Ansätze und Technologien für nachhaltige Kubernetes-Cluster QAware GmbH
 
How to speed up Spring Integration Tests
How to speed up Spring Integration TestsHow to speed up Spring Integration Tests
How to speed up Spring Integration TestsQAware GmbH
 
Aus blau wird grün! Ansätze und Technologien für nachhaltige Kubernetes-Cluster
Aus blau wird grün! Ansätze und Technologien für nachhaltige Kubernetes-ClusterAus blau wird grün! Ansätze und Technologien für nachhaltige Kubernetes-Cluster
Aus blau wird grün! Ansätze und Technologien für nachhaltige Kubernetes-ClusterQAware GmbH
 
Cloud Migration – Eine Strategie die funktioniert
Cloud Migration – Eine Strategie die funktioniertCloud Migration – Eine Strategie die funktioniert
Cloud Migration – Eine Strategie die funktioniertQAware GmbH
 
Policy Driven Microservices mit Open Policy Agent
Policy Driven Microservices mit Open Policy AgentPolicy Driven Microservices mit Open Policy Agent
Policy Driven Microservices mit Open Policy AgentQAware GmbH
 
Make Developers Fly: Principles for Platform Engineering
Make Developers Fly: Principles for Platform EngineeringMake Developers Fly: Principles for Platform Engineering
Make Developers Fly: Principles for Platform EngineeringQAware GmbH
 
Security Lab: OIDC in der Praxis
Security Lab: OIDC in der PraxisSecurity Lab: OIDC in der Praxis
Security Lab: OIDC in der PraxisQAware GmbH
 
Die nächsten 100 Microservices
Die nächsten 100 MicroservicesDie nächsten 100 Microservices
Die nächsten 100 MicroservicesQAware GmbH
 
Enterprise-level Kubernetes Security mit Open Source Tools - geht das?
Enterprise-level Kubernetes Security mit Open Source Tools - geht das?Enterprise-level Kubernetes Security mit Open Source Tools - geht das?
Enterprise-level Kubernetes Security mit Open Source Tools - geht das?QAware GmbH
 

More from QAware GmbH (20)

Cloud Migration mit KI: der Turbo
Cloud Migration mit KI: der Turbo Cloud Migration mit KI: der Turbo
Cloud Migration mit KI: der Turbo
 
Migration von stark regulierten Anwendungen in die Cloud: Dem Teufel die See...
 Migration von stark regulierten Anwendungen in die Cloud: Dem Teufel die See... Migration von stark regulierten Anwendungen in die Cloud: Dem Teufel die See...
Migration von stark regulierten Anwendungen in die Cloud: Dem Teufel die See...
 
Aus blau wird grün! Ansätze und Technologien für nachhaltige Kubernetes-Cluster
Aus blau wird grün! Ansätze und Technologien für nachhaltige Kubernetes-Cluster Aus blau wird grün! Ansätze und Technologien für nachhaltige Kubernetes-Cluster
Aus blau wird grün! Ansätze und Technologien für nachhaltige Kubernetes-Cluster
 
Endlich gute API Tests. Boldly Testing APIs Where No One Has Tested Before.
Endlich gute API Tests. Boldly Testing APIs Where No One Has Tested Before.Endlich gute API Tests. Boldly Testing APIs Where No One Has Tested Before.
Endlich gute API Tests. Boldly Testing APIs Where No One Has Tested Before.
 
Kubernetes with Cilium in AWS - Experience Report!
Kubernetes with Cilium in AWS - Experience Report!Kubernetes with Cilium in AWS - Experience Report!
Kubernetes with Cilium in AWS - Experience Report!
 
50 Shades of K8s Autoscaling
50 Shades of K8s Autoscaling50 Shades of K8s Autoscaling
50 Shades of K8s Autoscaling
 
Kontinuierliche Sicherheitstests für APIs mit Testkube und OWASP ZAP
Kontinuierliche Sicherheitstests für APIs mit Testkube und OWASP ZAPKontinuierliche Sicherheitstests für APIs mit Testkube und OWASP ZAP
Kontinuierliche Sicherheitstests für APIs mit Testkube und OWASP ZAP
 
Service Mesh Pain & Gain. Experiences from a client project.
Service Mesh Pain & Gain. Experiences from a client project.Service Mesh Pain & Gain. Experiences from a client project.
Service Mesh Pain & Gain. Experiences from a client project.
 
50 Shades of K8s Autoscaling
50 Shades of K8s Autoscaling50 Shades of K8s Autoscaling
50 Shades of K8s Autoscaling
 
Blue turns green! Approaches and technologies for sustainable K8s clusters.
Blue turns green! Approaches and technologies for sustainable K8s clusters.Blue turns green! Approaches and technologies for sustainable K8s clusters.
Blue turns green! Approaches and technologies for sustainable K8s clusters.
 
Per Anhalter zu Cloud Nativen API Gateways
Per Anhalter zu Cloud Nativen API GatewaysPer Anhalter zu Cloud Nativen API Gateways
Per Anhalter zu Cloud Nativen API Gateways
 
Aus blau wird grün! Ansätze und Technologien für nachhaltige Kubernetes-Cluster
Aus blau wird grün! Ansätze und Technologien für nachhaltige Kubernetes-Cluster Aus blau wird grün! Ansätze und Technologien für nachhaltige Kubernetes-Cluster
Aus blau wird grün! Ansätze und Technologien für nachhaltige Kubernetes-Cluster
 
How to speed up Spring Integration Tests
How to speed up Spring Integration TestsHow to speed up Spring Integration Tests
How to speed up Spring Integration Tests
 
Aus blau wird grün! Ansätze und Technologien für nachhaltige Kubernetes-Cluster
Aus blau wird grün! Ansätze und Technologien für nachhaltige Kubernetes-ClusterAus blau wird grün! Ansätze und Technologien für nachhaltige Kubernetes-Cluster
Aus blau wird grün! Ansätze und Technologien für nachhaltige Kubernetes-Cluster
 
Cloud Migration – Eine Strategie die funktioniert
Cloud Migration – Eine Strategie die funktioniertCloud Migration – Eine Strategie die funktioniert
Cloud Migration – Eine Strategie die funktioniert
 
Policy Driven Microservices mit Open Policy Agent
Policy Driven Microservices mit Open Policy AgentPolicy Driven Microservices mit Open Policy Agent
Policy Driven Microservices mit Open Policy Agent
 
Make Developers Fly: Principles for Platform Engineering
Make Developers Fly: Principles for Platform EngineeringMake Developers Fly: Principles for Platform Engineering
Make Developers Fly: Principles for Platform Engineering
 
Security Lab: OIDC in der Praxis
Security Lab: OIDC in der PraxisSecurity Lab: OIDC in der Praxis
Security Lab: OIDC in der Praxis
 
Die nächsten 100 Microservices
Die nächsten 100 MicroservicesDie nächsten 100 Microservices
Die nächsten 100 Microservices
 
Enterprise-level Kubernetes Security mit Open Source Tools - geht das?
Enterprise-level Kubernetes Security mit Open Source Tools - geht das?Enterprise-level Kubernetes Security mit Open Source Tools - geht das?
Enterprise-level Kubernetes Security mit Open Source Tools - geht das?
 

Recently uploaded

+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
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
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
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceanilsa9823
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
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
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
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
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 

Recently uploaded (20)

+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...
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
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
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
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
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
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
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 

Efficient DevOps Tooling with Java and GraalVM

  • 1. E ffi cient DevOps Tooling 
 with Java and GraalVM OOP Fachforen 2021 Digital, February 9th 2021 @LeanderReimer #cloudnativenerd #qaware
  • 2. Mario-Leander Reimer Principal Software Architect @LeanderReimer #cloudnativenerd #qaware
  • 3. // OOP 2021 Digital // Efficient DevOps Tooling with Java and GraalVM // @LeanderReimer #cloudnativenerd #qaware #OOPdigital How do you organise and enable DevOps teams for fast fl ow and high productivity? 3
  • 4. // OOP 2021 Digital // Efficient DevOps Tooling with Java and GraalVM // @LeanderReimer #cloudnativenerd #qaware #OOPdigital Too much cognitive load will become a bottleneck for fast fl ow and high productivity. • Instrinsic Cognitive Load - relates to fundamental aspects and knowledge in the problem space (e.g. used languages, APIs, frameworks) • Extraneous Cognitive Load - relates to the environment 
 (e.g. deployment, con fi guration, console commands) • Germane Cognitive Load - relates to speci fi c aspects of the business domain (aka. „value added“ thinking) 4 https://teamtopologies.com
  • 5. // OOP 2021 Digital // Efficient DevOps Tooling with Java and GraalVM // @LeanderReimer #cloudnativenerd #qaware #OOPdigital Eliminate extraneous cognitive load 
 Minimize intrinsic cognitive load 5
  • 6. // OOP 2021 Digital // Efficient DevOps Tooling with Java and GraalVM // @LeanderReimer #cloudnativenerd #qaware #OOPdigital 6
  • 7. // OOP 2021 Digital // Efficient DevOps Tooling with Java and GraalVM // @LeanderReimer #cloudnativenerd #qaware #OOPdigital Use the right language for the job!? 7 Getty Images Liliboas Ansible Shell Scripts Ruby Python
  • 8. // OOP 2021 Digital // Efficient DevOps Tooling with Java and GraalVM // @LeanderReimer #cloudnativenerd #qaware #OOPdigital 8
  • 9. // OOP 2021 Digital // Efficient DevOps Tooling with Java and GraalVM // @LeanderReimer #cloudnativenerd #qaware #OOPdigital GraalVM to the Rescue! 9
  • 10. // OOP 2021 Digital // Efficient DevOps Tooling with Java and GraalVM // @LeanderReimer #cloudnativenerd #qaware #OOPdigital GraalVM in a Nutshell • Polyglot Runtime: runs all JVM languages, R, JavaScript, NodeJS, Ruby, Python, C/C++ via LLVM with full interop • Ahead-of-time (AOT) Compilation: memory management, thread scheduling via SubstrateVM • GraalVM as a Platform: embed and extend GraalVM with Tru ffl e, implement your own language and tools 10
  • 11. // OOP 2021 Digital // Efficient DevOps Tooling with Java and GraalVM // @LeanderReimer #cloudnativenerd #qaware #OOPdigital Polyglot Mayhem • The Graal Polyglot API allows you to embed and use different languages with full bidirectional interop. 
 





 • This is not the same as with the Java Scripting API (JSR 223)! 11 private static void helloPython(PolyglotMessage message) { try (Context context = Context.newBuilder().allowAllAccess(true).build()) { context.getPolyglotBindings().putMember("message", message); context.eval("python", "import polyglotn" + "message = polyglot.import_value('message')n" + "message['invocations'] += 1n" + "print(message['text'])"); } }
  • 12. // OOP 2021 Digital // Efficient DevOps Tooling with Java and GraalVM // @LeanderReimer #cloudnativenerd #qaware #OOPdigital 12 Code & Demos https://github.com/qaware/hands-on-graalvm 
 https://github.com/qaware/fast-fibonacci
  • 13. // OOP 2021 Digital // Efficient DevOps Tooling with Java and GraalVM // @LeanderReimer #cloudnativenerd #qaware #OOPdigital The Swiss Army Knife of Operations. 13 CLIs - The Swiss Army Knife of Operations
  • 14. // OOP 2021 Digital // Efficient DevOps Tooling with Java and GraalVM // @LeanderReimer #cloudnativenerd #qaware #OOPdigital The basics of 12-factor CLI apps • Great help is essential. What version am I on? • Prefer fl ags to positional arguments. • Mind the streams. stdout is for output, stderr is for messaging. • Handle things going wrong: error code, title, how to fi x, URL, … • Be fancy: use colours, have shell completion. • Prompt if you can. • Be speedy. CLIs need to start fast. • Be clear about subcommands. 14 For complete list and info, read https://medium.com/@jdxcode/12-factor-cli-apps-dd3c227a0e46
  • 15. // OOP 2021 Digital // Efficient DevOps Tooling with Java and GraalVM // @LeanderReimer #cloudnativenerd #qaware #OOPdigital Build CLIs with Picocli and GraalVM • Native DevOps tools, CLIs or sidecar containers can now also be build using Java! Golang is still cool. • Picoli is a small framework to easily build JVM command line apps. • Support for ANSI colors, tab completion, sub commands and other 12-factor CLI app principles • In-built support for GraalVM AOT compilation to native images via the ReflectionConfigGenerator utility and annotation processor. 15
  • 16. // OOP 2021 Digital // Efficient DevOps Tooling with Java and GraalVM // @LeanderReimer #cloudnativenerd #qaware #OOPdigital 16 Code & Demos https://github.com/lreimer/microj-cli https://github.com/lreimer/microj-picocli-graalvm
  • 17. // OOP 2021 Digital // Efficient DevOps Tooling with Java and GraalVM // @LeanderReimer #cloudnativenerd #qaware #OOPdigital Container Orchestration Patterns 17 Sidecar Container 
 Extended Container Behaviour • Log Extraction / Reformatting 
 ( fl uentd, fi le beat) • Scheduling (cron, quartz) Ambassador Container 
 Proxy Communication • TLS Tunnel (ghostunnel, Istio) • Circuit Breaking (linked, Istio) • Request Monitoring (linked, Istio) Adapter Container 
 Standardized Ops Interfaces • Monitoring (Prometheus) • Con fi guration (Con fi gMaps, Secrets, …)
  • 18. // OOP 2021 Digital // Efficient DevOps Tooling with Java and GraalVM // @LeanderReimer #cloudnativenerd #qaware #OOPdigital Use a multi-stage Docker fi le to build Linux binary 18 FROM ghcr.io/graalvm/graalvm-ce:20.3.0 AS builder # install native-image utility RUN gu install native-image && mkdir /hands-on-graalvm # copy files content and build native application WORKDIR /hands-on-graalvm COPY . . RUN ./gradlew build -x test && ./gradlew graalNativeImage FROM gcr.io/distroless/cc-debian10:debug # copy binary and required libraries into runtime image COPY --from=builder /hands-on-graalvm/build/hands-on-graal / COPY --from=builder /opt/graalvm-ce-java11-20.3.0/lib/libsunec.so / COPY --from=debian:10.2 /usr/lib/x86_64-linux-gnu/libz* /usr/lib/x86_64-linux-gnu/ COPY --from=debian:10.2 /lib/x86_64-linux-gnu/libz* /lib/x86_64-linux-gnu/ ENTRYPOINT ["/hands-on-graal"] CMD ["Hello World from GraalVM native inside Docker."]
  • 19. // OOP 2021 Digital // Efficient DevOps Tooling with Java and GraalVM // @LeanderReimer #cloudnativenerd #qaware #OOPdigital 19 Operator. - Do stuff to my Kubernetes.
  • 20. // OOP 2021 Digital // Efficient DevOps Tooling with Java and GraalVM // @LeanderReimer #cloudnativenerd #qaware #OOPdigital What are operators? • Operators are codi fi ed Ops procedures! • Operators are the path towards Zero-Ops. They enable auto-updating, self-monitoring and self-healing infrastructure and applications. • The concept was coined in the Kubernetes world. It’s now been adopted and used widespread in the cloud native world. • Examples: OKD, Sealed Secrets, Kube Monkey, Weave Flux 20
  • 21. // OOP 2021 Digital // Efficient DevOps Tooling with Java and GraalVM // @LeanderReimer #cloudnativenerd #qaware #OOPdigital Kubernetes Operators in a Nutshell 21
  • 22. // OOP 2021 Digital // Efficient DevOps Tooling with Java and GraalVM // @LeanderReimer #cloudnativenerd #qaware #OOPdigital The Kill Pod Operator 22 • Super simple Chaos monkey style operator inspired by Kubemonkey • Regularly kills pods of deployments that are killpod/enabled apiVersion: apps/v1 kind: Deployment metadata: name: nginx-killpod-enabled labels: killpod/enabled: "true" killpod/application: nginx-killpod-enabled killpod/delay: "30" killpod/amount: "2" spec: ...
  • 23. // OOP 2021 Digital // Efficient DevOps Tooling with Java and GraalVM // @LeanderReimer #cloudnativenerd #qaware #OOPdigital The Super Secret Operator 23 • Apply asymmetrical encrypted secrets, the operator will decrypt and manage ordinary K8s secrets under the hood • Inspired by Sealed Secrets from Bitnami https://github.com/bitnami-labs/sealed-secrets apiVersion: operators.on.hands/v1alpha1 kind: SuperSecret metadata: name: supersecret-test spec: secretData: password: eV7YoQXyZlY+y51RWXEqyu0U44EPEPwEz+fZvGo+7McOTA4wQYCdxXMANtab3aW8 
 ... ywqpkHYtSLvrPgFnbcuSvD2UzuUNeE2qkh6SAM1z9Lpfwi+IUZjaY34Z+RjEL5OZFPYkQ==
  • 24. // OOP 2021 Digital // Efficient DevOps Tooling with Java and GraalVM // @LeanderReimer #cloudnativenerd #qaware #OOPdigital The Microservice Operator 24 apiVersion: operators.on.hands/v1alpha1 kind: Microservice metadata: name: microservice-test labels: app: nginx spec: replicas: 2 image: nginx:1.17.6 ports: - containerPort: 80 serviceType: LoadBalancer • Abstracting the usual Deployment, Service and Con fi gMap de fi nitions using a simple and uni fi ed Microservice CRD
  • 25. // OOP 2021 Digital // Efficient DevOps Tooling with Java and GraalVM // @LeanderReimer #cloudnativenerd #qaware #OOPdigital 25 Code & Demos https://github.com/qaware/graal-operators
  • 26. Mario-Leander Reimer Principal Software Architect, QAware GmbH mario-leander.reimer@qaware.de https://www.qaware.de https://speakerdeck.com/lreimer/ https://github.com/lreimer/ &