Upload
vunhu
View
215
Download
0
Embed Size (px)
Citation preview
Introduction to the Oracle Cloud MicroservicesPlatform
open, manageable, polyglot and scalable
On what would be and still can be…
Introduction to the Oracle Cloud Microservices Platform 1
Lucas Jellema, CTO of AMIS
nlOUG TechExperience 2018, Amersfoort, The Netherlands
Lucas Jellema
Architect / Developer
1994 started in IT at Oracle
2002 joined AMIS
Currently CTO & Solution Architect
Introduction to the Oracle Cloud Microservices Platform 2
How do we implement microservices?
• And how we make the containers horizontally scalable
Introduction to the Oracle Cloud Microservices Platform 3
How do we get
from a Monolith
to Microservices?
Why?What?
How?
Introduction to the Oracle Cloud Microservices Platform 4
What is IT all about?
Application
Production Runtime
What is IT all about?
Application
Production Runtime
Platform
Introduction to the Oracle Cloud Microservices Platform 6
Objectives
• Business Agility
• In functionality: quick, cheap, effortless and risk free
• IT Agility
• In non-functionality: scale, resilience, infrastructure & location
• Real working applications with rapid relevant evolution that run reliably
Introduction to the Oracle Cloud Microservices Platform 7
What is IT all about?
Application
Platform
Production Runtime
Operations
Monitoring &
Management
PlatformPlatform
Introduction to the Oracle Cloud Microservices Platform 8
Production Runtime is the Result of Preparation Runtime
Application
Platform
Production Runtime
Operations
Monitoring &
ManagementApplication
Preparation Runtime
Platform
Development
CD
Agile Design,
Build, Test
Introduction to the Oracle Cloud Microservices Platform 9
What?
Introduction to the Oracle Cloud Microservices Platform 10
One team has Agile responsibility through full lifecyle
Application
Platform
Production Runtime
Operations
Monitoring &
ManagementApplication
Preparation Runtime
Platform
Development
CD
Agile Design,
Build, Test
Introduction to the Oracle Cloud Microservices Platform 11
One team has Agile responsibility through full lifecyle
Application
Platform
Production Runtime
Operations
Monitoring &
ManagementApplication
Preparation Runtime
Platform
Development
CD
Agile Design,
Build, Test
Introduction to the Oracle Cloud Microservices Platform 12
One team has Agile responsibility through full lifecyle
Application
Platform
Application
Platform
Introduction to the Oracle Cloud Microservices Platform 13
DevOps team owns and runs one (or more) products
Application
Platform
Generic Infrastructure Platform for running DevOps Products
Floorspace, Power,
Cooling, Storage,
Compute
Monitoring, Management,
Cache, Authentication,
RDBMS, Event HubIntroduction to the Oracle Cloud Microservices Platform 14
Multiple products from multiple teams run on a shared generic infrastructure
Generic Infrastructure Platform for running DevOps Products
Floorspace, Power,
Cooling, Storage,
Compute
Monitoring, Management,
Cache, Authentication,
RDBMS, Event Hub
Application
Platform
Application
Platform
Application
Platform
Application
Platform
Application
Platform
Introduction to the Oracle Cloud Microservices Platform 15
(Application plus platform)under DevOps ==
Generic Infrastructure Platform for running DevOps Products
µ µ µ µ µ
Microservice
Introduction to the Oracle Cloud Microservices Platform 16
What?
• Realistic approach (technology, people, process) => Something that works!
• No dependency on individuals
• Able to scale in rate of change
• Small, well: comprehensible, manageable
• Stand alone /isolated/encapsulated (in terms of change, release/deploy,
scale, location, implementation technology)
• Provide clear and meaningful functionality in a way that it can be consumed
• One microservice does not completely fall over when other microservices
break (or are redeployed)
• Able to scale elastically & horizontally and relocate easily
Introduction to the Oracle Cloud Microservices Platform 17
How?
Introduction to the Oracle Cloud Microservices Platform 18
How microservices
• One team owns the microservice and can do functional and technical
evolution and deployment continuously and independently
• The business ownership is clearly defined
Introduction to the Oracle Cloud Microservices Platform 19
Application
Platform
THE MICROSERVICE
API
HTTP REST/JSON
How microservices: design & implement
• Business & Team ownership of application and associated platform
• Automated CD – including regression test
• Open (standards, protocols) on the outside,
whatever you like inside
• Deployable on enterprise standardized microservices platform
• API & Event
• Standard protocols for interaction
• Horizontally scalable: multiple parallel instances
• Stateless instances – horizontally scalable up & down,
can handle fail over & restart
• Private Bounded (Data) Context
• Including derived data from other domains
Introduction to the Oracle Cloud Microservices Platform 21
Introduction to the Oracle Cloud Microservices Platform 22
Microservices State
Cache
RDBMSDocument
StoreNoSQL
Generic Platform for running microservices
Event Hub
Big Data
Block
Storage
LDAP
Introduction to the Oracle Cloud Microservices Platform 23
Bounded context in microservices
• A micoservice needs to be able to run independently
• It needs to contain & own all data required to run
• It cannot depend on other microservices
API
Customer
APIUI
OrderCustomerModified event
Introduction to the Oracle Cloud Microservices Platform 24
Order Microservice
Demo – Maintaining Derived Data in Bounded Context
Introduction to the Oracle Cloud Microservices Platform 25
Application
Container
Customer Microservice
Customers
Topic
Event Hub
Application
Container
DBaaS
Microservices based Webshop
µ Customers µ Orders µ Products µ Loyalty µ Financeµ Logistics
Web Shop Portalµ
Customersµ Orders µ Products µ Loyalty µ Finance
Introduction to the Oracle Cloud Microservices Platform 26
API Portal
Web Shop Portalµ
Customersµ Orders µ Products µ Loyalty µ Finance
API PlatformBackoffice
UI
Event Hub
Event
Schema
Registry
λ
Introduction to the Oracle Cloud Microservices Platform 27
Event
Monitor
…. Event-(First) Driven
Order
Products
Logistics
Shop
Customers
Loyalty Program Finance
Event Hub
Topic X Topic Y Topic Z Topic Q
• Order Payment
Received
• Customer Frozen• Product Stock
Update
• Shipping News
• Order Create
• Order Cancelled
• Customer Loyalty
Status Change
• Product Update
• Product added
to Shopping Cart
• New Customer
• Customer Profile Changed
• Customer Sign In
Introduction to the Oracle Cloud Microservices Platform 28
How?
Run & Operate
Introduction to the Oracle Cloud Microservices Platform 29
Run & Operate Microservices
• Rapid rollout
• Including scale out & recover
• Non breaking upgrade & rollback
strategies (e.g. canary release)
• Agile infrastructure
• Relocate, independent of
infra specifics
• Health management
• Monitor and safeguard SLA requirements on response time, success
and availability
• Scale elastically
• TCO management
• DevOps: one team creates and runs
Introduction to the Oracle Cloud Microservices Platform 30
Generic Infrastructure Platform for running DevOps Products
µ µ µ µ µ
The elephant in the room…
Introduction to the Oracle Cloud Microservices Platform 31
whale
Containers
• As vehicle for:
• Encapsulate
• Build
• Share & Ship
• Automated Tests
• Deploy
• Run
• Scale
• Relocate
• Standardize
Introduction to the Oracle Cloud Microservices Platform 32
Looking for a runtime platform for
Introduction to the Oracle Cloud Microservices Platform 33
Compute
Node
Looking for a runtime platform for
Introduction to the Oracle Cloud Microservices Platform 34
Compute
NodeCompute Node
Compute
Node
Looking for a runtime platform for
Introduction to the Oracle Cloud Microservices Platform 35
Compute
NodeCompute Node
Compute
Node
Looking for a runtime platform for
Introduction to the Oracle Cloud Microservices Platform 36
Compute
NodeCompute Node
Compute
Node
Looking for a runtime platform for
Introduction to the Oracle Cloud Microservices Platform 37
Compute
NodeCompute Node
Compute
Node
Looking for a runtime platform for
Introduction to the Oracle Cloud Microservices Platform 38
Compute
NodeCompute Node
Compute
Node
Cloud
StorageSAN
Looking for a runtime platform for
Introduction to the Oracle Cloud Microservices Platform 39
Compute
NodeCompute Node
Compute
Node
Cloud
StorageSAN
Configuration
Map
Configuration
Map
Looking for a runtime platform for
Introduction to the Oracle Cloud Microservices Platform 40
Compute
NodeCompute Node
Compute
Node
Compute
Node
Compute
Node
Compute
Node
Compute
Node
Looking for a runtime platform for
Introduction to the Oracle Cloud Microservices Platform 41
Compute Node
Compute
Node
Compute
Node
Looking for a runtime platform for
Introduction to the Oracle Cloud Microservices Platform 42
Compute Node
Compute
Node
Compute
Node
Looking for a runtime platform for
Introduction to the Oracle Cloud Microservices Platform 43
Compute Node
v2
v2
v2
v2
v2
Introduction to the Oracle Cloud Microservices Platform 44
Introducing Kubernetes
• Distributed Container Run Time Management platform
• Based on Google’s Borg system (in use at Google for over a decade)
• Initial announcement: 2014
• Kubernetes v1.0 was released on July 21, 2015
• A Kubernetes cluster typically spans multiple compute nodes
• Either in the cloud, on premises, on a single machine (minikube) or hybrid
• K8S manages Pods in which containers are running
• K8S schedules Pods on one or more nodes
• Docker can be the container runtime; other engines are supported as well,
such as rkt and containerd
• K8S handles network traffic to, between and from Pods
• The kubectl command line interface is used for most management activities
Introduction to the Oracle Cloud Microservices Platform 45
Cloud Native & Vendor Neutral
• Cloud Native Computing Foundation - CNCF
• Oracle is a platinum member since July 2017
• Cloud Native: container packaged, dynamically managed, microservices oriented
• Open technology for running container based workloads in a cross cloud vendor neutral
way
Introduction to the Oracle Cloud Microservices Platform 46
Introduction to the Oracle Cloud Microservices Platform 47
Introduction to the Oracle Cloud Microservices Platform 48
Introduction to the Oracle Cloud Microservices Platform 49
Kubernetes & OKE Demo
Introduction to the Oracle Cloud Microservices Platform 50
Compute Node Compute Node
RequestCounter Microservice – V1
Introduction to the Oracle Cloud Microservices Platform
RequestCounter
http GET
counter
/
/health
/ready
/kill
51
Compute Node Compute Node
RequestCounter Microservice – V1
Introduction to the Oracle Cloud Microservices Platform
RequestCounter
http GET
countercounter
/
/health
/ready
/kill
52
Compute Node Compute Node
RequestCounter Microservice – V1
Introduction to the Oracle Cloud Microservices Platform
RequestCounter
http GET
countercounter
/
/health
/ready
/kill
counter=0
counter
53
Compute Node Compute Node
RequestCounter Microservice – V2
Introduction to the Oracle Cloud Microservices Platform
Cache
RequestCounter v2
http GET
counter
/
/health
/ready
/kill
54
Introduction to the Oracle Cloud Microservices Platform 55
Automated Container [Build | Stock | Deliver] Pipelines
• Oracle Wercker
Introduction to the Oracle Cloud Microservices Platform 56
Wercker: Build, Test, Push and Deploy Pipelines for Containers
Introduction to the Oracle Cloud Microservices Platform 57
µµ
µ
Oracle Container Registry for Your Images
• After build and before run – container images need to be stored
• Secure (because runtime artefacts)
• Accessible (& low latency) to deployment engine and container runtime
• Scalable and Smart (no duplicate images and image layers)
Introduction to the Oracle Cloud Microservices Platform 58
Introduction to the Oracle Cloud Microservices Platform 59
Microservice Runtime Platform - plus
Introduction to the Oracle Cloud Microservices Platform 60
Introduction to the Oracle Cloud Microservices Platform 61
Istio – Service Mesh Operations
• Routing
• Access Control
• Whitelist/Blacklist
• Security
• TLS
• Resilience
• Rate Limiting & Circuit Breaker
• Monitoring
• Trace
• Service Graph
Introduction to the Oracle Cloud Microservices Platform 62
Introduction to the Oracle Cloud Microservices Platform 63
Envoy Sidecar
Introduction to the Oracle Cloud Microservices Platform 64
Pod
Envoy Sidecar
http(s), tcp,gRPC
Metrics, trace, policy checks
Istio Pilot
Istio Mixer
Istio Auth
Istio Demo
Introduction to the Oracle Cloud Microservices Platform 65
Introduction to the Oracle Cloud Microservices Platform 66
Istio – Bookinfo Demo
• 10% weight for routing to Reviews-v2
• Content based routing to Reviews-v3
for special user
• Denier/Blacklist on Details
Introduction to the Oracle Cloud Microservices Platform 67
Introduction to the Oracle Cloud Microservices Platform 68
Introduction to the Oracle Cloud Microservices Platform 69
Zipkin Tracing
Introduction to the Oracle Cloud Microservices Platform 70
Prometheus
Introduction to the Oracle Cloud Microservices Platform 71
Grafana
Introduction to the Oracle Cloud Microservices Platform 72
Fluentd + Elastic Stack
Introduction to the Oracle Cloud Microservices Platform 73
Fluentd + Elastic Stack
Introduction to the Oracle Cloud Microservices Platform 74
Serverless
Introduction to the Oracle Cloud Microservices Platform 76
µ
Open Source ServerlessFunction Platform• Functions can be implemented in any
language
• Java, Go, PHP, JavaScript/Node,
Python, Ruby
• Functions run in their own container
• Functions can be accessed via HTTP calls
• Routing, load balancing, running is
taken care of by Fn Server platform
• Platform runs locally, on prem & in cloud
• Fn Flow orchestrates workflows across
multiple functions
• Workflow described in Java
• Includes business logic (conditional,
parallel execution, exceptions)
Introduction to the Oracle Cloud Microservices Platform 77
µ
Project Fn has announced support for
Introduction to the Oracle Cloud Microservices Platform 78
Managed Serverless Platform on Oracle Public Cloud
Introduction to the Oracle Cloud Microservices Platform 79
µ
Microservices Platform (Kubernetes & Istio) ++
• API Gateway
• Cache
• Event Hub
• Service Broker
• Chaos Monkey & Regression Testing
• Workflow
• Transactions (cross microservice)
• RDBMS, NoSQL, Data Lake(Big Data), Fast Data Ingestion
• Billing
• Notification
Introduction to the Oracle Cloud Microservices Platform 80
Microservices Platform
Storage
Oracle Container Native Microservices Architecture
Managed Kubernetes
Open Service BrokerEvent ManagementAPI Registry
Foo2
IST
IO
Dia
gn
ostics/M
on
ito
rin
g
IST
IO
Developer
Cloud
Prometheus
ISTIO
µ
CacheRDBMS
LDAP/IdM NoSQL
Billing
Engine
Block Storage
Voice
Recognition
Introduction to the Oracle Cloud Microservices Platform 81
Thank you
Dank je wel
• Blog: technology.amis.nl
• Email: [email protected]
• : @lucasjellema
• : lucas-jellema
• : www.amis.nl, [email protected]
Technologies
• Docker containers
• CD Pipelines (Wercker, Developer CS, Jenkins X)
• Kubernetes as deployment platform
• Distributed
• Rolling Upgrades
• Load Balancing & Networking
• Failover
• Elastic scaling
• Helm for predefined rollout
• Istio plus side cars
• Service Mesh
• Routing – policies, authorize, A/B, canary, throttle
• Metrics
• Circuitbreaker
• Prometheus – collect metricsIntroduction to the Oracle Cloud Microservices Platform 83
Technologies (2)
• Grafana – Visualize metrics
• Vizceral – visualize traffic
• Kafka – events
• Elastic – logs??
• Redis – cache??
• API Gateway??
• Camunda/Conductor – workflow
• Fn - Serverless
Introduction to the Oracle Cloud Microservices Platform 84