SE-Couch Meetup, Februar 2020, München: Vortrag von Mario-Leander Reimer (@LeanderReimer, Technischer Geschäftsbereichsleiter bei QAware)
== Dokument bitte herunterladen, falls unscharf! Please download slides if blurred! ==
Abstract: Leander erklärt, was hinter dem Begriff Cloud Native wirklich steckt und wie man es verwenden kann, um Software(-Architekturen) für die (Elastic) Cloud zu bauen. Er kennt die aktuellen Trends und Neuerungen im Cloud-native Universum und berichtet darüber, wie er diese in das eigene Unternehmen und seine Projekte trägt.
10. | 4. Münchner SE-Couch Meetup | Enterprise Cloud Native ist das neue Normal | @LeanderReimer #cloudnativenerd #qaware
2020
10
11. | 4. Münchner SE-Couch Meetup | Enterprise Cloud Native ist das neue Normal | @LeanderReimer #cloudnativenerd #qaware11
By Simon Wardley #EEA @swardly https://twitter.com/swardley/status/1143463178396979200?s=03
12. | 4. Münchner SE-Couch Meetup | Enterprise Cloud Native ist das neue Normal | @LeanderReimer #cloudnativenerd #qaware12
https://www.loodse.com/blog/why-you-should-go-cloud-native-in-2020
13. | 4. Münchner SE-Couch Meetup | Enterprise Cloud Native ist das neue Normal | @LeanderReimer #cloudnativenerd #qaware13
Enterprise Cloud Native
ANTIFRAGILITYHYPERSCALE
TRAFFIC, DATA, FEATURES
RECRUITING
SPEED
DEVOPS &
CONTINUOUS DELIVERY
OPEX SAVINGS
(automation & utilization)
14. NOPE, IT'S ALL BAD.
SO THIS IS
CLOUD NATIVE?
YOU KNOW WHAT?
IT'S NOT HALF BAD.
16. | 4. Münchner SE-Couch Meetup | Enterprise Cloud Native ist das neue Normal | @LeanderReimer #cloudnativenerd #qaware
Nicht schön. Hat aber funktioniert.
16
Ein Monolith
Komponente
A
Komponente
T
Komponente
?
17. | 4. Münchner SE-Couch Meetup | Enterprise Cloud Native ist das neue Normal | @LeanderReimer #cloudnativenerd #qaware
Definitiv keine gute Idee!
17
Microservice
A
Microservice
T
Microservice
?
18. | 4. Münchner SE-Couch Meetup | Enterprise Cloud Native ist das neue Normal | @LeanderReimer #cloudnativenerd #qaware
Fachlichkeit
an erster Stelle
18
19. | 4. Münchner SE-Couch Meetup | Enterprise Cloud Native ist das neue Normal | @LeanderReimer #cloudnativenerd #qaware
Hands-on Event Storming.
Event storming is a workshop-based interactive method
for rapidly identifying the key concepts and boundaries
in a business domain and aligning a variety of stake-
holders in the best way to slice potential solutions. The
basic idea is to bring together software developers and
domain experts and learn from each other. The business
process is "stormed out" as a series of domain events
which are denoted as sticky notes on a wide wall. It was
invented by Alberto Brandolini in the context of domain-
driven design (DDD).
19
https://www.thoughtworks.com/radar/techniques/event-storming
20. | 4. Münchner SE-Couch Meetup | Enterprise Cloud Native ist das neue Normal | @LeanderReimer #cloudnativenerd #qaware20
Domain Event
An event that occurs in the business process. Written in past tense.
Issue
An issue or question that needs to be clarified and resolved.
Business Process
Processes commands according to business rules. Creates 1..* domain events.
Aggregate
Cluster of domain objects that can be treated as a single unit.
Command
A command executed on an aggregate that results in the creation of a domain event.
External System
A third-party service provider such as a payment gateway or shipping company.
View
A view that users interacts with to carry out a task in the system.
1.Domain Event Storming
Domain Events in Vergangenheitsform auf Post-Its
schreiben. Chronologisch anordnen.
2.Story Telling
Moderiert durch den Prozess führen. Post-Its neu
anordnen, Duplikate entfernen.
3.Functional Refinement
Suchen und finden von fachlichen Kontexten und
Sollbruchstellen in den Prozessen
4.Technical Refinement
Weitere Unterteilung. Mögliche Indikatoren: Size,
Isolation, Speed, Redundanz
21. picture alliance / United Archive
8 Fallacies of Distributed Systems
1. The network is reliable
2. Latency is zero
3. Bandwidth is infinite
4. The network is secure
5. Topology doesn’t change
6. There is one administrator
7. Transport cost is zero
8. The networks is homogeneous
22. | 4. Münchner SE-Couch Meetup | Enterprise Cloud Native ist das neue Normal | @LeanderReimer #cloudnativenerd #qaware
1. The network is reliable
Problem: Netzwerk-Aufrufe werden fehlschlagen.
• Circuit Breaker und Retries sind eine Lösung, aber oft ein Pflaster.
• Service Meshes können helfen, bringen aber zusätzliche Komplexität und
Overhead. Istio, Linkerd, et.al. -> Service Mesh Interface (SMI)
• Nutze Event-driven Architecture (EDA) für lose gekoppelte Systeme. Neue
Herausforderungen: Protokolle, Delivery Garantien, Message-Codierung
• Zahlreiche spannende CNCF Projekte z.B. CloudEvents, OpenMessaging
22
https://landscape.cncf.io/category=streaming-messaging&format=card-mode&license=open-source
23. | 4. Münchner SE-Couch Meetup | Enterprise Cloud Native ist das neue Normal | @LeanderReimer #cloudnativenerd #qaware
2. Latency is zero
Problem: Netzwerk-Aufrufe haben eine Verzögerung. Das n+1 Problem.
• Schicke alle benötigten Daten mit möglichst wenigen (1) Requests.
• Es gibt Alternativen zu REST: GraphQL, effiziente Binärprotokolle, gRPC.
• Umsetzung von B4F und API-Gateway Patterns zur Server-side Daten-Aggregation.
• Inversion of Control: Nutzung von Pub/Sub Mechanismen, Server-sent Events, Web
Sockets, Local Storage
• Die Daten müssen näher zum Client. Nutzung von Availability Zones, Content Delivery
Networks und intelligentes Caching.
23
https://landscape.cncf.io/category=remote-procedure-call&format=card-mode&license=open-source
24. | 4. Münchner SE-Couch Meetup | Enterprise Cloud Native ist das neue Normal | @LeanderReimer #cloudnativenerd #qaware
3. Bandwidth is infinite
Problem: Natürlich ist die Bandbreite limitiert.
• Große und komplexe Objekt-Graphen sollten vermieden werden.
• Übertrage nur die Daten die wirklich benötigt werden. Das steht im
Konflikt mit Latency is zero.
• Domain Driven Design hilft bei der Partitionierung der Domäne und der
Daten-Modelle in Bounded Contexts.
• CQRS ermöglicht optimierte Datenmodelle für Schreibende und
Lesende Use Cases.
24
25. | 4. Münchner SE-Couch Meetup | Enterprise Cloud Native ist das neue Normal | @LeanderReimer #cloudnativenerd #qaware
4. The network is secure
Problem: Das Netzwerk ist unsicher.
„Running workloads in the cloud is easy - doing it securely and in a compliant way is hard.“
• Security by Design -> Continuous Security -> Continuous Compliance.
• Layered-Security Ansatz: Absicherung auf Netzwerk, Infrastruktur, Plattform und
Anwendungsebene. Free eBook.
• 4C’s of Cloud Native Security: Cloud, Cluster, Container, Code.
https://kubernetes.io/docs/concepts/security/overview/
• Nutzung von Distroless Images. https://github.com/GoogleContainerTools/distroless
• Zero Trust per Default: mTLS zwischen Services per Service Mesh und SPIFFE.
• Compliance per GitSec und Phylake -> Open Policy Agent (OPA), Kubernetes, Istio, Falco
25
https://landscape.cncf.io/category=security-compliance&format=card-mode&license=open-source
26. | 4. Münchner SE-Couch Meetup | Enterprise Cloud Native ist das neue Normal | @LeanderReimer #cloudnativenerd #qaware
5. Topology doesn’t change
Problem: Netzwerk Topologien ändern sich ständig.
• Abstraktion der physischen Netzwerk-Struktur. Nutzung von DNS oder
Discovery Services.
• Cloud-native API Gateways sorgen für zusätzliche Location Transparency.
• Cattle, not pets. Treat Clusters Like Cattle. Immutable Infrastructure.
• Regelmäßige Chaos-Tests zur Überprüfung der Robustheit: Netflix Chaos
Monkey, kube-monkey, Chaos Toolkit, Gremlin, …
26
https://landscape.cncf.io/category=chaos-engineering&format=card-mode&license=open-source
27. | 4. Münchner SE-Couch Meetup | Enterprise Cloud Native ist das neue Normal | @LeanderReimer #cloudnativenerd #qaware
6. There is one administrator
Problem: Diese 1 Person die alles weiß gibt es nicht.
• Jeder im Team ist für den Release Prozess verantwortlich. Frühzeitiges involvieren aller
beteiligten Stakeholder. DevOps.
• Klare Definition der DevOps-Topologie, Rollen, Verantwortlichkeiten, SLOs und SLAs.
• Manuelle Änderungen an der Infrastruktur sind tabu! GitOps heißt das Stichwort!
• Weave Flux: https://github.com/weaveworks/flux
• Automatisierte CI/CD Pipeline: Knative Build, Spinnaker, Drone, GitLab, JenkinsX, …
• Seales Secrets: https://github.com/bitnami-labs/sealed-secrets
27
https://landscape.cncf.io/category=continuous-integration-delivery&format=card-mode&license=open-source
28. | 4. Münchner SE-Couch Meetup | Enterprise Cloud Native ist das neue Normal | @LeanderReimer #cloudnativenerd #qaware
7. Transport cost is zero
Problem: Transport cost is not zero.
• Zwei Seiten der Medaille:
• Kosten für Netzwerk-Infrastruktur. Egal ob On-Premise oder Cloud.
• Kosten (CPU Zeit) für Serialisierung und Deserialisierung.
• Möglichst Effiziente Nutzung der Infrastruktur.
• XML ist teurer als JSON. JSON ist teurer als Binärprotokolle.
28
29. | 4. Münchner SE-Couch Meetup | Enterprise Cloud Native ist das neue Normal | @LeanderReimer #cloudnativenerd #qaware
8. The networks is homogeneous
Problem: The network is not homogeneous.
• Nutzung von Standard-Formaten um Vendor Lockin zu vermeiden.
• XML, JSON, Protocol Buffers.
29
30. | 4. Münchner SE-Couch Meetup | Enterprise Cloud Native ist das neue Normal | @LeanderReimer #cloudnativenerd #qaware30
DevOps Anti-Type, e.g. DevOps Team Topologies, e.g.
https://web.devopstopologies.com
DevOps Team Silo
Dev Don’t Need Ops
Rebranded SysAdmin
Dev and Ops Collaboration Fully Shared Ops Responsibilities
SRE Team (Google Model) DevOps Advocacy Team
Ops as Infrastructure-as-a-Service DevOps as External Service
31. | 4. Münchner SE-Couch Meetup | Enterprise Cloud Native ist das neue Normal | @LeanderReimer #cloudnativenerd #qaware31
Improve your
inner development loop and the
Cloud Native DevEx
of your teams!
32. | 4. Münchner SE-Couch Meetup | Enterprise Cloud Native ist das neue Normal | @LeanderReimer #cloudnativenerd #qaware
Optimiert die Cloud Native DevEx
32
vs.
https://www.datawire.io/guide/development/development-environments-microservices/
33. | 4. Münchner SE-Couch Meetup | Enterprise Cloud Native ist das neue Normal | @LeanderReimer #cloudnativenerd #qaware
Optimiert die Cloud Native DevEx
33
vs.
https://www.datawire.io/guide/development/development-environments-microservices/
34. | 4. Münchner SE-Couch Meetup | Enterprise Cloud Native ist das neue Normal | @LeanderReimer #cloudnativenerd #qaware
Optimiert die Cloud Native DevEx
34
vs.
https://www.datawire.io/guide/development/development-environments-microservices/
35. | 4. Münchner SE-Couch Meetup | Enterprise Cloud Native ist das neue Normal | @LeanderReimer #cloudnativenerd #qaware
Optimiert die Cloud Native DevEx
35
vs.
https://www.datawire.io/guide/development/development-environments-microservices/
36. | 4. Münchner SE-Couch Meetup | Enterprise Cloud Native ist das neue Normal | @LeanderReimer #cloudnativenerd #qaware
Zahlreiche Tools helfen dabei den Inner Development
Loop einfacher und effizienter zu machen.
• The Rise of the IDE: Plugins, Plugins, Plugins. Beispiele: Cloud Code,
OpenShift Extension
• Squash enables easy remote debugging of running microservices in
Kubernetes und OpenShift from within your IDE.
• Kustomize, Draft, Skaffold, oder Tilt für Continuous Development.
Die verschiedenen Entwicklungs-Phase werden zusammenfasst in
einem CLI Command. Der Entwickler Workflow wird vereinfacht.
36
https://tilt.devhttps://draft.sh https://skaffold.dev
37. | 4. Münchner SE-Couch Meetup | Enterprise Cloud Native ist das neue Normal | @LeanderReimer #cloudnativenerd #qaware
Skaffold Workflow and Architecture
37
$ skaffold init
$ skaffold dev
Demo repository https://github.com/lreimer/jakartaee8-java11
38. | 4. Münchner SE-Couch Meetup | Enterprise Cloud Native ist das neue Normal | @LeanderReimer #cloudnativenerd #qaware
Telepresence verspricht schnelle lokale Entwicklung
für Kubernetes und Openshift Microservices.
38
Laptop
Source Code
Lokaler
Service
TelepresenceClient
IDE
Remote Kubernetes Cluster
TelepresenceProxy
Service A
Service B
Database
Queue
https://www.telepresence.io
2-way
Network
Proxy
39. | 4. Münchner SE-Couch Meetup | Enterprise Cloud Native ist das neue Normal | @LeanderReimer #cloudnativenerd #qaware
Serverless
ist die nächste logische Evolution im
Cloud Native Software Engineering.
39
40. Kein Server ist einfacher zu verwalten, als kein Server!
Werner Vogels, CTO, Amazon
41. | 4. Münchner SE-Couch Meetup | Enterprise Cloud Native ist das neue Normal | @LeanderReimer #cloudnativenerd #qaware
–https://landscape.cncf.io/
„Serverless computing refers to a new model of
cloud native computing, enabled by architectures
that do not require server management to build and
run applications. It leverages a finer-grained
deployment model where applications, bundled as
one or more functions, are uploaded to a platform
and then executed, scaled, and billed in response to
the exact demand needed at the moment.“
41
42. | 4. Münchner SE-Couch Meetup | Enterprise Cloud Native ist das neue Normal | @LeanderReimer #cloudnativenerd #qaware42
Funktionen
sind das bevorzugte
aber nicht das einzige
Programmiermodell
von Serverless Apps.
43. | 4. Münchner SE-Couch Meetup | Enterprise Cloud Native ist das neue Normal | @LeanderReimer #cloudnativenerd #qaware
Hybrid Architecture Use Cases
• Kombination von Microservice
Architektur mit EDA
• Nutzung von Function Services für
Event-getriebene Use Cases
• Reduzierter Ressourcen-Verbrauch
per Scale-to-Zero
• Integration in bestehende
Enterprise PaaS Umgebung
43
Shared Enterprise PaaS
Microservices
Function Services FaaS Platform
X Y ZF1 F2 Fn
DevOps
S1 S2 Sn L M T
44. | 4. Münchner SE-Couch Meetup | Enterprise Cloud Native ist das neue Normal | @LeanderReimer #cloudnativenerd #qaware44
45. • Fission ist eine schnelle und komplette Platform
mit Unterstützung für viele Sprachen.
• Knative ist eine K8s-basierte Plattform um
Serverless Workloads zu bauen und zu betreiben.
• Kubeless ist einfach und leichtgewichtig.
• Nuclio ist super schnell, mit kleinem Footprint
und vielen Triggern.
• OpenFaaS ist sehr populär mit einer aktiven und
guten Community. Schnell. ARM Support.
• Kyma positioniert sich als komplette Enterprise
Serverless Platform mit vielen Features.
• https://github.com/lreimer/the-big-faas-lebowski