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


mit Java und GraalVM
IT Tage 365, 25.März 2021


@LeanderReimer #cloudnativenerd #qaware
Mario-Leander Reimer


Principal Software Architect


@LeanderReimer


#cloudnativenerd #qaware
// IT Tage 365 // Effizientes DevOps Tooling mit Java und GraalVM // @LeanderReimer #cloudnativenerd #qaware
How do you organise and enable
DevOps teams for


fast
fl
ow and high productivity?
3
// IT Tage 365 // Effizientes DevOps Tooling mit Java und GraalVM // @LeanderReimer #cloudnativenerd #qaware
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
// IT Tage 365 // Effizientes DevOps Tooling mit Java und GraalVM // @LeanderReimer #cloudnativenerd #qaware
Eliminate


extraneous cognitive load




Minimize


intrinsic cognitive load
5
// IT Tage 365 // Effizientes DevOps Tooling mit Java und GraalVM // @LeanderReimer #cloudnativenerd #qaware
6
// IT Tage 365 // Effizientes DevOps Tooling mit Java und GraalVM // @LeanderReimer #cloudnativenerd #qaware
Use the right language for the job!?
7
Getty Images Liliboas
Ansible Shell Scripts
Ruby Python
// IT Tage 365 // Effizientes DevOps Tooling mit Java und GraalVM // @LeanderReimer #cloudnativenerd #qaware
8
// IT Tage 365 // Effizientes DevOps Tooling mit Java und GraalVM // @LeanderReimer #cloudnativenerd #qaware
GraalVM to the Rescue!
9
// IT Tage 365 // Effizientes DevOps Tooling mit Java und GraalVM // @LeanderReimer #cloudnativenerd #qaware
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
// IT Tage 365 // Effizientes DevOps Tooling mit Java und GraalVM // @LeanderReimer #cloudnativenerd #qaware
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'])");


}


}
// IT Tage 365 // Effizientes DevOps Tooling mit Java und GraalVM // @LeanderReimer #cloudnativenerd #qaware
12
Code & Demos
https://github.com/qaware/hands-on-graalvm


https://github.com/qaware/fast-fibonacci
// IT Tage 365 // Effizientes DevOps Tooling mit Java und GraalVM // @LeanderReimer #cloudnativenerd #qaware
The Swiss Army Knife of Operations.
13
CLIs - The Swiss Army Knife of Operations
// IT Tage 365 // Effizientes DevOps Tooling mit Java und GraalVM // @LeanderReimer #cloudnativenerd #qaware
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
// IT Tage 365 // Effizientes DevOps Tooling mit Java und GraalVM // @LeanderReimer #cloudnativenerd #qaware
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
// IT Tage 365 // Effizientes DevOps Tooling mit Java und GraalVM // @LeanderReimer #cloudnativenerd #qaware
16
Code & Demos
https://github.com/lreimer/microj-cli


https://github.com/lreimer/microj-picocli-graalvm
// IT Tage 365 // Effizientes DevOps Tooling mit Java und GraalVM // @LeanderReimer #cloudnativenerd #qaware
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, …)
// IT Tage 365 // Effizientes DevOps Tooling mit Java und GraalVM // @LeanderReimer #cloudnativenerd #qaware
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."]
// IT Tage 365 // Effizientes DevOps Tooling mit Java und GraalVM // @LeanderReimer #cloudnativenerd #qaware
19
Operator.
- Do stuff to my Kubernetes.
// IT Tage 365 // Effizientes DevOps Tooling mit Java und GraalVM // @LeanderReimer #cloudnativenerd #qaware
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
// IT Tage 365 // Effizientes DevOps Tooling mit Java und GraalVM // @LeanderReimer #cloudnativenerd #qaware
Kubernetes Operators in a Nutshell
21
// IT Tage 365 // Effizientes DevOps Tooling mit Java und GraalVM // @LeanderReimer #cloudnativenerd #qaware
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:


...
// IT Tage 365 // Effizientes DevOps Tooling mit Java und GraalVM // @LeanderReimer #cloudnativenerd #qaware
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==
// IT Tage 365 // Effizientes DevOps Tooling mit Java und GraalVM // @LeanderReimer #cloudnativenerd #qaware
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
// IT Tage 365 // Effizientes DevOps Tooling mit Java und GraalVM // @LeanderReimer #cloudnativenerd #qaware
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

毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degreeyuu sss
 
Predicting Salary Using Data Science: A Comprehensive Analysis.pdf
Predicting Salary Using Data Science: A Comprehensive Analysis.pdfPredicting Salary Using Data Science: A Comprehensive Analysis.pdf
Predicting Salary Using Data Science: A Comprehensive Analysis.pdfBoston Institute of Analytics
 
原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档
原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档
原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档208367051
 
RadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdfRadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdfgstagge
 
NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...
NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...
NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...Boston Institute of Analytics
 
RABBIT: A CLI tool for identifying bots based on their GitHub events.
RABBIT: A CLI tool for identifying bots based on their GitHub events.RABBIT: A CLI tool for identifying bots based on their GitHub events.
RABBIT: A CLI tool for identifying bots based on their GitHub events.natarajan8993
 
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...limedy534
 
Biometric Authentication: The Evolution, Applications, Benefits and Challenge...
Biometric Authentication: The Evolution, Applications, Benefits and Challenge...Biometric Authentication: The Evolution, Applications, Benefits and Challenge...
Biometric Authentication: The Evolution, Applications, Benefits and Challenge...GQ Research
 
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样vhwb25kk
 
20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdf20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdfHuman37
 
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改yuu sss
 
Statistics, Data Analysis, and Decision Modeling, 5th edition by James R. Eva...
Statistics, Data Analysis, and Decision Modeling, 5th edition by James R. Eva...Statistics, Data Analysis, and Decision Modeling, 5th edition by James R. Eva...
Statistics, Data Analysis, and Decision Modeling, 5th edition by James R. Eva...ssuserf63bd7
 
Advanced Machine Learning for Business Professionals
Advanced Machine Learning for Business ProfessionalsAdvanced Machine Learning for Business Professionals
Advanced Machine Learning for Business ProfessionalsVICTOR MAESTRE RAMIREZ
 
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...dajasot375
 
How we prevented account sharing with MFA
How we prevented account sharing with MFAHow we prevented account sharing with MFA
How we prevented account sharing with MFAAndrei Kaleshka
 
NO1 Certified Black Magic Specialist Expert Amil baba in Lahore Islamabad Raw...
NO1 Certified Black Magic Specialist Expert Amil baba in Lahore Islamabad Raw...NO1 Certified Black Magic Specialist Expert Amil baba in Lahore Islamabad Raw...
NO1 Certified Black Magic Specialist Expert Amil baba in Lahore Islamabad Raw...Amil Baba Dawood bangali
 
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024thyngster
 
While-For-loop in python used in college
While-For-loop in python used in collegeWhile-For-loop in python used in college
While-For-loop in python used in collegessuser7a7cd61
 
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort servicejennyeacort
 
Call Girls In Dwarka 9654467111 Escorts Service
Call Girls In Dwarka 9654467111 Escorts ServiceCall Girls In Dwarka 9654467111 Escorts Service
Call Girls In Dwarka 9654467111 Escorts ServiceSapana Sha
 

Recently uploaded (20)

毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
 
Predicting Salary Using Data Science: A Comprehensive Analysis.pdf
Predicting Salary Using Data Science: A Comprehensive Analysis.pdfPredicting Salary Using Data Science: A Comprehensive Analysis.pdf
Predicting Salary Using Data Science: A Comprehensive Analysis.pdf
 
原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档
原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档
原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档
 
RadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdfRadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdf
 
NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...
NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...
NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...
 
RABBIT: A CLI tool for identifying bots based on their GitHub events.
RABBIT: A CLI tool for identifying bots based on their GitHub events.RABBIT: A CLI tool for identifying bots based on their GitHub events.
RABBIT: A CLI tool for identifying bots based on their GitHub events.
 
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
 
Biometric Authentication: The Evolution, Applications, Benefits and Challenge...
Biometric Authentication: The Evolution, Applications, Benefits and Challenge...Biometric Authentication: The Evolution, Applications, Benefits and Challenge...
Biometric Authentication: The Evolution, Applications, Benefits and Challenge...
 
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
 
20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdf20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdf
 
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
 
Statistics, Data Analysis, and Decision Modeling, 5th edition by James R. Eva...
Statistics, Data Analysis, and Decision Modeling, 5th edition by James R. Eva...Statistics, Data Analysis, and Decision Modeling, 5th edition by James R. Eva...
Statistics, Data Analysis, and Decision Modeling, 5th edition by James R. Eva...
 
Advanced Machine Learning for Business Professionals
Advanced Machine Learning for Business ProfessionalsAdvanced Machine Learning for Business Professionals
Advanced Machine Learning for Business Professionals
 
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
 
How we prevented account sharing with MFA
How we prevented account sharing with MFAHow we prevented account sharing with MFA
How we prevented account sharing with MFA
 
NO1 Certified Black Magic Specialist Expert Amil baba in Lahore Islamabad Raw...
NO1 Certified Black Magic Specialist Expert Amil baba in Lahore Islamabad Raw...NO1 Certified Black Magic Specialist Expert Amil baba in Lahore Islamabad Raw...
NO1 Certified Black Magic Specialist Expert Amil baba in Lahore Islamabad Raw...
 
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
 
While-For-loop in python used in college
While-For-loop in python used in collegeWhile-For-loop in python used in college
While-For-loop in python used in college
 
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
 
Call Girls In Dwarka 9654467111 Escorts Service
Call Girls In Dwarka 9654467111 Escorts ServiceCall Girls In Dwarka 9654467111 Escorts Service
Call Girls In Dwarka 9654467111 Escorts Service
 

Effizientes DevOps Tooling mit Java und GraalVM

  • 1. E ffi zientes DevOps Tooling mit Java und GraalVM IT Tage 365, 25.März 2021 @LeanderReimer #cloudnativenerd #qaware
  • 2. Mario-Leander Reimer Principal Software Architect @LeanderReimer #cloudnativenerd #qaware
  • 3. // IT Tage 365 // Effizientes DevOps Tooling mit Java und GraalVM // @LeanderReimer #cloudnativenerd #qaware How do you organise and enable DevOps teams for fast fl ow and high productivity? 3
  • 4. // IT Tage 365 // Effizientes DevOps Tooling mit Java und GraalVM // @LeanderReimer #cloudnativenerd #qaware 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. // IT Tage 365 // Effizientes DevOps Tooling mit Java und GraalVM // @LeanderReimer #cloudnativenerd #qaware Eliminate extraneous cognitive load 
 Minimize intrinsic cognitive load 5
  • 6. // IT Tage 365 // Effizientes DevOps Tooling mit Java und GraalVM // @LeanderReimer #cloudnativenerd #qaware 6
  • 7. // IT Tage 365 // Effizientes DevOps Tooling mit Java und GraalVM // @LeanderReimer #cloudnativenerd #qaware Use the right language for the job!? 7 Getty Images Liliboas Ansible Shell Scripts Ruby Python
  • 8. // IT Tage 365 // Effizientes DevOps Tooling mit Java und GraalVM // @LeanderReimer #cloudnativenerd #qaware 8
  • 9. // IT Tage 365 // Effizientes DevOps Tooling mit Java und GraalVM // @LeanderReimer #cloudnativenerd #qaware GraalVM to the Rescue! 9
  • 10. // IT Tage 365 // Effizientes DevOps Tooling mit Java und GraalVM // @LeanderReimer #cloudnativenerd #qaware 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. // IT Tage 365 // Effizientes DevOps Tooling mit Java und GraalVM // @LeanderReimer #cloudnativenerd #qaware 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. // IT Tage 365 // Effizientes DevOps Tooling mit Java und GraalVM // @LeanderReimer #cloudnativenerd #qaware 12 Code & Demos https://github.com/qaware/hands-on-graalvm 
 https://github.com/qaware/fast-fibonacci
  • 13. // IT Tage 365 // Effizientes DevOps Tooling mit Java und GraalVM // @LeanderReimer #cloudnativenerd #qaware The Swiss Army Knife of Operations. 13 CLIs - The Swiss Army Knife of Operations
  • 14. // IT Tage 365 // Effizientes DevOps Tooling mit Java und GraalVM // @LeanderReimer #cloudnativenerd #qaware 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. // IT Tage 365 // Effizientes DevOps Tooling mit Java und GraalVM // @LeanderReimer #cloudnativenerd #qaware 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. // IT Tage 365 // Effizientes DevOps Tooling mit Java und GraalVM // @LeanderReimer #cloudnativenerd #qaware 16 Code & Demos https://github.com/lreimer/microj-cli https://github.com/lreimer/microj-picocli-graalvm
  • 17. // IT Tage 365 // Effizientes DevOps Tooling mit Java und GraalVM // @LeanderReimer #cloudnativenerd #qaware 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. // IT Tage 365 // Effizientes DevOps Tooling mit Java und GraalVM // @LeanderReimer #cloudnativenerd #qaware 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. // IT Tage 365 // Effizientes DevOps Tooling mit Java und GraalVM // @LeanderReimer #cloudnativenerd #qaware 19 Operator. - Do stuff to my Kubernetes.
  • 20. // IT Tage 365 // Effizientes DevOps Tooling mit Java und GraalVM // @LeanderReimer #cloudnativenerd #qaware 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. // IT Tage 365 // Effizientes DevOps Tooling mit Java und GraalVM // @LeanderReimer #cloudnativenerd #qaware Kubernetes Operators in a Nutshell 21
  • 22. // IT Tage 365 // Effizientes DevOps Tooling mit Java und GraalVM // @LeanderReimer #cloudnativenerd #qaware 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. // IT Tage 365 // Effizientes DevOps Tooling mit Java und GraalVM // @LeanderReimer #cloudnativenerd #qaware 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. // IT Tage 365 // Effizientes DevOps Tooling mit Java und GraalVM // @LeanderReimer #cloudnativenerd #qaware 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. // IT Tage 365 // Effizientes DevOps Tooling mit Java und GraalVM // @LeanderReimer #cloudnativenerd #qaware 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/ &