SlideShare ist ein Scribd-Unternehmen logo
1 von 19
Microservice Bus Tutorial
Huabing Zhao, PTL of MSB Project, ZTE
2
Agenda
MSB Overview
Service Registration
Service Discovery
Example & Demo
Suggested Integration Approach
Future plan
3
MSB Overview-Introduction
Microservices Bus(MSB) provide a reliable, resilient and scalable
communication and governance infrastructure to support Microservice
Architecture including including service registration/discovery, external
API gateway, internal API gateway, client SDK. It's a pluggable
architecture so it can integrate with auth service provider to provide
centralized Authentication & Authorization. MSB also provides a service
portal to manage the REST APIs.
MSB doesn’t depend on a specific environment. It can work in bare metal,
virtual machine or containerized environment.
4
MSB Overview-Functionalities
CircuitBreaker
Transformation
RateLimiting
Flowtagging
Authentication
Service requests statistics and analysis
Pluggable Architecture
OtherPlug-in…
Service Registration
Service Discovery
Service Change
Notification
Service Status Change
Notification
TCP/UDP Forwarding
HTTP/HTTPS Forwarding
WEB Socket Forwarding
Route dynamically update
FTP Forwarding
Service Healthy Check
Service Registration Load Balancing API Gateway
5
MSB Overview-Components
• Registry
Service information storage, MSB uses Consul as the service registry.
• MSB Discovery
Provides REST APIs for service discovery and registration
• API Gateway
Provide service request routing, load balancing and service governance. It can be deployed as
external Gateway or Internal Gateway.
• MSB SDK
Java SDK for point to point communication
MSB
MSB
Discovery
External service Internal service
External Gateway Internal Gateway
Registry
ONAP Microservices
Microservice A
Microservice B
Microservice C
MSB SDK
1 Service discovery
2 Service request
1 Service request
2 Route request to service provider
Desktop External SystemsMobile
External service request
MSB
Discovery
External Gateway Internal Gateway
6
Service Registration-Information Model
Attribute Description
serviceName Service Name
version Service Version
url the actual URL of the service to be registered
protocol supported protocols: 'REST', 'UI', 'HTTP','TCP'
visualRange Visibility of the service.
External(can be accessed by external systems):0
Internal(can only be accessed by ONAP microservices):1
path The customized publish path of this service.
If path parameter is specified when registering the service, the service will
be published to api gateway under this path. Otherwise, the service will
be published to api gateway using a fixed format: api/{serviceName}
/{version}.
The customized publish path should only be used for back-compatible.
lb_policy Load balancing method, Currently two LB methods are supported, round-
robin and ip-hash.
enable_ssl True if the registered service is based on https.
False if the registered service is based on http.
nodes ip: the ip of theservice instance node
port: the port of the service instance node
ttl: time to live, this parameter is reserved for later use
7
Service Registration-RESTFul API
http method: POST
url: http://{msb_ip}:{msb_port}/api/microservices/v1/services
Example:
curl -X POST 
-H "Content-Type: application/json" 
-d '{"serviceName": "test", "version": "v1", "url": "/","protocol": "REST", "lb_policy":"round-robin","nodes": [
{"ip": "127.0.0.1","port": "9090"}]}' 
"http://127.0.0.1:10081/api/microservices/v1/services”
8
Service Registration-MSB SDK
Microservices can use MSB SDK to register themselves to MSB.
MSB
ONAP
Microservice
MSB SDK
REST API
9
Service Registration-Kube2msb Registrator
MSB
MSB
Discovery
External service Internal service
External Gateway Internal Gateway
Registry
ONAP Operations Manager
ONAP
A&AI
Kube2msb registrator
Kube2msb registrator can register service endpoints for the microservices deployed by OOM
• OOM(Kubernetes) deploy/start/stop ONAP components.
• Registrator watches the kubernetes pod event .
• Registrator registers service endpoint info to MSB. It also updates the service info to MSB
when ONAP components are stopped/restarted/scaled by OOM
1 Pod Even (Start, Stop etc.)
Policy
SDC
SO
VF-CVF-C
2 Register Service
Update Service
k8s
deployment
specs
(annotation)
10
Kube2msb Registrator-Service configuration
Use Kubernetes annotations to attach service endpoint metadata to objects.
Service endpoint can be defined at Pod level or Service level
Pod level: leverage the LB capabilities of MSB to distribute requests to multiple pods
Service level: MSB send the request to service(Cluster IP), K8s dispatch the request to the backend Pod
Pod
Pod
Service MSB
Register
Pod
Pod
MSBRegister
Register at service level
Register at pod level
11
Kube2msb Registrator-flow chart
12
Service Discovery-Server Side Discovery
Service
Registry
Micorservice
(Consumer)
Router
Micorservice
Instance A
10.74.215.33:3564
10.74.215.211:1522
10.74.215.8:3281
Invoke
Load balance &
invoke
Query
ONAP
Register
Micorservice
Instance B
Micorservice
Instance C
•Compared to client-side discovery, the client code is simpler since it does not have to deal with discovery. Instead, a client
simply makes a request to the router.
•One more network hop is required than when using client-side discovery
Example: Curl http://msb_ip:msb_port/api/sdc/v1/catalog/resources
13
Service Discovery-Server Side Discovery
14
Service Discovery-Client Side Discovery
Microservices can use MSB SDK to discovery and access other microservices within ONAP.
Service
Registry
Micorservice
(Consumer)
MSB
SDK
Micorservice
Instance A
Micorservice
Instance A
Micorservice
Instance A
10.74.215.33:3564
10.74.215.211:1522
10.74.215.8:3281
Load balance &
invoke
Query
Register
ONAP
15
Service Discovery-Client Side Discovery
16
Example & Demo-Without OOM
 Start MSB services
1. Run the Consul dockers.
sudo docker run -d --net=host --name msb_consul consul:0.9.3
2. Run the MSB dockers.
Login the ONAP docker registry first: docker login -u docker -p docker nexus3.onap.org:10001
sudo docker run -d --net=host --name msb_discovery nexus3.onap.org:10001/onap/msb/msb_discovery
sudo docker run -d --net=host -e "ROUTE_LABELS=visualRange:1" --name msb_internal_apigateway
nexus3.onap.org:10001/onap/msb/msb_apigateway
Explore the MSB portal.
http://127.0.0.1/msb
 Register and test your REST service with MSB via curl
https://wiki.onap.org/display/DW/MSB+Test+Environment+Setup
17
Example & Demo-Within OOM
 Precondition
Have kubernetes cluster, kubectl and helm installed.
Login the ONAP docker registry first: docker login -u docker -p docker nexus3.onap.org:10001
 Download oom from ONAP gerrit
git clone https://gerrit.onap.org/r/oom
 Install MSB and Kube2MSB registrator
cd ~/oom/kubernets/config
./createConfig.sh -n onap
cd ~/oom/kubernetes/oneclick/
../createAll.bash -a msb -n onap
./createAll.bash -a kube2msb -n onap
 Install AAI for testing
./createAll.bash -a aai-n onap
 Open the MSB IAG portal in the browser
You are able to see the registered AAI services at http://${Node_IP}:30080/msb
18
Suggested Integration approach-minimum
impact to existing codes
 Automatically MSB registration by OOM Kube2MSB
Access services via MSB Internal API Gateway
 Follows the standard URI structure
http://[host]:[port]/api/{service name}]/v{version number}/{resource}
https://wiki.onap.org/display/DW/RESTful+API+Design+Specification
19
The way going forward-OMSA
(ONAP Microservice Architecture)
External API Gateway
Service Discovery
Async Message Bus
Kafka
监控采集
GatewayDiscoveryMicroservicesInfrastructure
Registration
ServiceA
ADF JAVA ADF Go ADF
HTTP/JSON
RPC
agent
Governance
Configure
Management
API
Management
Monitoring
Distributed
Tracing
GRPC/protobuf
MetricsActiveMQ
Bare Metal
Python ADF
Registration
Logging
Orchestration
Update/Change
Deployment
Scaling/Healing
Instance 1
agent
Virtual Machine Containers Clouds
sidecar
Policy/Security
sidecar
Instance 2
Instance n
ServiceB
Instance 1
Instance 2
Instance n
OMSA is the vision of ONAP Microservice
Architecture to support carrier-grade
requirements of ONAP microservices,
which includes service
registration/discovery, service
communication, API gateway, service
orchestration, service governance and
service monitoring, etc.
Next step: Investgate Istio service mesh and
integrate Istio into OMSA when it's
production ready.
Note: this diagram is a functional view of OMSA, which is not mapped to specific projects

Weitere ähnliche Inhalte

Was ist angesagt?

20190727 HashiCorp Consul Workshop: 管管你們家 config 啦
20190727 HashiCorp Consul Workshop: 管管你們家 config 啦20190727 HashiCorp Consul Workshop: 管管你們家 config 啦
20190727 HashiCorp Consul Workshop: 管管你們家 config 啦Jiun-Yi Chen
 
Consul: Service Mesh for Microservices
Consul: Service Mesh for MicroservicesConsul: Service Mesh for Microservices
Consul: Service Mesh for MicroservicesArmonDadgar
 
Managing microservices with Istio Service Mesh
Managing microservices with Istio Service MeshManaging microservices with Istio Service Mesh
Managing microservices with Istio Service MeshRafik HARABI
 
Get Your Data Flowing
Get Your Data FlowingGet Your Data Flowing
Get Your Data FlowingSolace
 
Microservices With Istio Service Mesh
Microservices With Istio Service MeshMicroservices With Istio Service Mesh
Microservices With Istio Service MeshNatanael Fonseca
 
Introduction to Consul
Introduction to ConsulIntroduction to Consul
Introduction to ConsulViswanath J
 
Protecting Multi-Interfaced Mobile Web Services using Agreements
Protecting Multi-Interfaced Mobile Web Services using Agreements Protecting Multi-Interfaced Mobile Web Services using Agreements
Protecting Multi-Interfaced Mobile Web Services using Agreements Dr. Fahad Aijaz
 
Service Provider Architectures for Tomorrow by Chow Khay Kid
Service Provider Architectures for Tomorrow by Chow Khay KidService Provider Architectures for Tomorrow by Chow Khay Kid
Service Provider Architectures for Tomorrow by Chow Khay KidMyNOG
 
Layer 7 Observability and Centralized Configuration with Consul Service Mesh
Layer 7 Observability and Centralized Configuration with Consul Service MeshLayer 7 Observability and Centralized Configuration with Consul Service Mesh
Layer 7 Observability and Centralized Configuration with Consul Service MeshMitchell Pronschinske
 
Using Microservices Architecture and Patterns to Address Applications Require...
Using Microservices Architecture and Patterns to Address Applications Require...Using Microservices Architecture and Patterns to Address Applications Require...
Using Microservices Architecture and Patterns to Address Applications Require...Prem Sankar Gopannan
 
Service Mesh 101 - Digging into your service
Service Mesh 101 - Digging into your service Service Mesh 101 - Digging into your service
Service Mesh 101 - Digging into your service Huynh Thai Bao
 
All About Microservices and OpenSource Microservice Frameworks
All About Microservices and OpenSource Microservice FrameworksAll About Microservices and OpenSource Microservice Frameworks
All About Microservices and OpenSource Microservice FrameworksMohammad Asif Siddiqui
 
Building high performance microservices in finance with Apache Thrift
Building high performance microservices in finance with Apache ThriftBuilding high performance microservices in finance with Apache Thrift
Building high performance microservices in finance with Apache ThriftRX-M Enterprises LLC
 
IBM Integration Bus and REST APIs - Sanjay Nagchowdhury
IBM Integration Bus and REST APIs - Sanjay NagchowdhuryIBM Integration Bus and REST APIs - Sanjay Nagchowdhury
IBM Integration Bus and REST APIs - Sanjay NagchowdhuryKaren Broughton-Mabbitt
 
Service mesh on Kubernetes - Istio 101
Service mesh on Kubernetes - Istio 101Service mesh on Kubernetes - Istio 101
Service mesh on Kubernetes - Istio 101Huy Vo
 
Big ip f5 ltm load balancing methods
Big ip f5 ltm load balancing methodsBig ip f5 ltm load balancing methods
Big ip f5 ltm load balancing methodsUtpal Sinha
 
Whats New in IBM Integration Bus Interconnect 2017
Whats New in IBM Integration Bus Interconnect 2017Whats New in IBM Integration Bus Interconnect 2017
Whats New in IBM Integration Bus Interconnect 2017bthomps1979
 
Mule real-world-old
Mule real-world-oldMule real-world-old
Mule real-world-oldF K
 

Was ist angesagt? (20)

Javantura v6 - Istio Service Mesh - The magic between your microservices - Ma...
Javantura v6 - Istio Service Mesh - The magic between your microservices - Ma...Javantura v6 - Istio Service Mesh - The magic between your microservices - Ma...
Javantura v6 - Istio Service Mesh - The magic between your microservices - Ma...
 
20190727 HashiCorp Consul Workshop: 管管你們家 config 啦
20190727 HashiCorp Consul Workshop: 管管你們家 config 啦20190727 HashiCorp Consul Workshop: 管管你們家 config 啦
20190727 HashiCorp Consul Workshop: 管管你們家 config 啦
 
Consul: Service Mesh for Microservices
Consul: Service Mesh for MicroservicesConsul: Service Mesh for Microservices
Consul: Service Mesh for Microservices
 
Managing microservices with Istio Service Mesh
Managing microservices with Istio Service MeshManaging microservices with Istio Service Mesh
Managing microservices with Istio Service Mesh
 
Get Your Data Flowing
Get Your Data FlowingGet Your Data Flowing
Get Your Data Flowing
 
Microservices With Istio Service Mesh
Microservices With Istio Service MeshMicroservices With Istio Service Mesh
Microservices With Istio Service Mesh
 
Introduction to Consul
Introduction to ConsulIntroduction to Consul
Introduction to Consul
 
Protecting Multi-Interfaced Mobile Web Services using Agreements
Protecting Multi-Interfaced Mobile Web Services using Agreements Protecting Multi-Interfaced Mobile Web Services using Agreements
Protecting Multi-Interfaced Mobile Web Services using Agreements
 
Enterprise service bus part 1
Enterprise service bus part 1Enterprise service bus part 1
Enterprise service bus part 1
 
Service Provider Architectures for Tomorrow by Chow Khay Kid
Service Provider Architectures for Tomorrow by Chow Khay KidService Provider Architectures for Tomorrow by Chow Khay Kid
Service Provider Architectures for Tomorrow by Chow Khay Kid
 
Layer 7 Observability and Centralized Configuration with Consul Service Mesh
Layer 7 Observability and Centralized Configuration with Consul Service MeshLayer 7 Observability and Centralized Configuration with Consul Service Mesh
Layer 7 Observability and Centralized Configuration with Consul Service Mesh
 
Using Microservices Architecture and Patterns to Address Applications Require...
Using Microservices Architecture and Patterns to Address Applications Require...Using Microservices Architecture and Patterns to Address Applications Require...
Using Microservices Architecture and Patterns to Address Applications Require...
 
Service Mesh 101 - Digging into your service
Service Mesh 101 - Digging into your service Service Mesh 101 - Digging into your service
Service Mesh 101 - Digging into your service
 
All About Microservices and OpenSource Microservice Frameworks
All About Microservices and OpenSource Microservice FrameworksAll About Microservices and OpenSource Microservice Frameworks
All About Microservices and OpenSource Microservice Frameworks
 
Building high performance microservices in finance with Apache Thrift
Building high performance microservices in finance with Apache ThriftBuilding high performance microservices in finance with Apache Thrift
Building high performance microservices in finance with Apache Thrift
 
IBM Integration Bus and REST APIs - Sanjay Nagchowdhury
IBM Integration Bus and REST APIs - Sanjay NagchowdhuryIBM Integration Bus and REST APIs - Sanjay Nagchowdhury
IBM Integration Bus and REST APIs - Sanjay Nagchowdhury
 
Service mesh on Kubernetes - Istio 101
Service mesh on Kubernetes - Istio 101Service mesh on Kubernetes - Istio 101
Service mesh on Kubernetes - Istio 101
 
Big ip f5 ltm load balancing methods
Big ip f5 ltm load balancing methodsBig ip f5 ltm load balancing methods
Big ip f5 ltm load balancing methods
 
Whats New in IBM Integration Bus Interconnect 2017
Whats New in IBM Integration Bus Interconnect 2017Whats New in IBM Integration Bus Interconnect 2017
Whats New in IBM Integration Bus Interconnect 2017
 
Mule real-world-old
Mule real-world-oldMule real-world-old
Mule real-world-old
 

Ähnlich wie Microservice bus tutorial

Service Discovery in MicroServices
Service Discovery in MicroServicesService Discovery in MicroServices
Service Discovery in MicroServicesSRINIVAS KOLAPARTHI
 
Evolution of kube-proxy (Brussels, Fosdem 2020)
Evolution of kube-proxy (Brussels, Fosdem 2020)Evolution of kube-proxy (Brussels, Fosdem 2020)
Evolution of kube-proxy (Brussels, Fosdem 2020)Laurent Bernaille
 
Ipso smart object seminar
Ipso smart object seminarIpso smart object seminar
Ipso smart object seminarMichael Koster
 
HHM-3481: IBM MQ for z/OS: Enhancing Application and Messaging Connectivity ...
 HHM-3481: IBM MQ for z/OS: Enhancing Application and Messaging Connectivity ... HHM-3481: IBM MQ for z/OS: Enhancing Application and Messaging Connectivity ...
HHM-3481: IBM MQ for z/OS: Enhancing Application and Messaging Connectivity ...Matt Leming
 
Hia 1691-using iib-to_support_api_economy
Hia 1691-using iib-to_support_api_economyHia 1691-using iib-to_support_api_economy
Hia 1691-using iib-to_support_api_economyAndrew Coleman
 
Introducing envoy-based service mesh at Booking.com
Introducing envoy-based service mesh at Booking.comIntroducing envoy-based service mesh at Booking.com
Introducing envoy-based service mesh at Booking.comIvan Kruglov
 
AWS CloudFormation Automation, TrafficScript, and Serverless architecture wit...
AWS CloudFormation Automation, TrafficScript, and Serverless architecture wit...AWS CloudFormation Automation, TrafficScript, and Serverless architecture wit...
AWS CloudFormation Automation, TrafficScript, and Serverless architecture wit...PolarSeven Pty Ltd
 
Working with PowerVC via its REST APIs
Working with PowerVC via its REST APIsWorking with PowerVC via its REST APIs
Working with PowerVC via its REST APIsJoe Cropper
 
F5 BigIP LTM Initial, Build, Install and Licensing.
F5 BigIP LTM Initial, Build, Install and Licensing.F5 BigIP LTM Initial, Build, Install and Licensing.
F5 BigIP LTM Initial, Build, Install and Licensing.Kapil Sabharwal
 
Consul 1.6: Layer 7 Traffic Management and Mesh Gateways
Consul 1.6: Layer 7 Traffic Management and Mesh GatewaysConsul 1.6: Layer 7 Traffic Management and Mesh Gateways
Consul 1.6: Layer 7 Traffic Management and Mesh GatewaysMitchell Pronschinske
 
Consull7 webinar hasicorp
Consull7 webinar hasicorpConsull7 webinar hasicorp
Consull7 webinar hasicorpHien Nguyen Van
 
F5 Meetup presentation automation 2017
F5 Meetup presentation automation 2017F5 Meetup presentation automation 2017
F5 Meetup presentation automation 2017Guy Brown
 
ОЛЕКСАНДР ЛИПКО «Graceful Shutdown Node.js + k8s» Online WDDay 2021
ОЛЕКСАНДР ЛИПКО «Graceful Shutdown Node.js + k8s» Online WDDay 2021ОЛЕКСАНДР ЛИПКО «Graceful Shutdown Node.js + k8s» Online WDDay 2021
ОЛЕКСАНДР ЛИПКО «Graceful Shutdown Node.js + k8s» Online WDDay 2021WDDay
 
Migrate a on-prem platform to the public cloud with Java - SpringBoot and PCF
Migrate a on-prem platform to the public cloud with Java - SpringBoot and PCFMigrate a on-prem platform to the public cloud with Java - SpringBoot and PCF
Migrate a on-prem platform to the public cloud with Java - SpringBoot and PCFRoy Braam
 
Open Source Networking Days- Service Mesh
Open Source Networking Days- Service MeshOpen Source Networking Days- Service Mesh
Open Source Networking Days- Service MeshCloudOps2005
 
PLNOG15: The Power of the Open Standards SDN API’s - Mikael Holmberg
PLNOG15: The Power of the Open Standards SDN API’s - Mikael Holmberg PLNOG15: The Power of the Open Standards SDN API’s - Mikael Holmberg
PLNOG15: The Power of the Open Standards SDN API’s - Mikael Holmberg PROIDEA
 
StrongLoop Overview
StrongLoop OverviewStrongLoop Overview
StrongLoop OverviewShubhra Kar
 

Ähnlich wie Microservice bus tutorial (20)

Service Discovery in MicroServices
Service Discovery in MicroServicesService Discovery in MicroServices
Service Discovery in MicroServices
 
Microservice Powered Orchestration
Microservice Powered OrchestrationMicroservice Powered Orchestration
Microservice Powered Orchestration
 
Evolution of kube-proxy (Brussels, Fosdem 2020)
Evolution of kube-proxy (Brussels, Fosdem 2020)Evolution of kube-proxy (Brussels, Fosdem 2020)
Evolution of kube-proxy (Brussels, Fosdem 2020)
 
Ipso smart object seminar
Ipso smart object seminarIpso smart object seminar
Ipso smart object seminar
 
HHM-3481: IBM MQ for z/OS: Enhancing Application and Messaging Connectivity ...
 HHM-3481: IBM MQ for z/OS: Enhancing Application and Messaging Connectivity ... HHM-3481: IBM MQ for z/OS: Enhancing Application and Messaging Connectivity ...
HHM-3481: IBM MQ for z/OS: Enhancing Application and Messaging Connectivity ...
 
Hia 1691-using iib-to_support_api_economy
Hia 1691-using iib-to_support_api_economyHia 1691-using iib-to_support_api_economy
Hia 1691-using iib-to_support_api_economy
 
Introducing envoy-based service mesh at Booking.com
Introducing envoy-based service mesh at Booking.comIntroducing envoy-based service mesh at Booking.com
Introducing envoy-based service mesh at Booking.com
 
AWS CloudFormation Automation, TrafficScript, and Serverless architecture wit...
AWS CloudFormation Automation, TrafficScript, and Serverless architecture wit...AWS CloudFormation Automation, TrafficScript, and Serverless architecture wit...
AWS CloudFormation Automation, TrafficScript, and Serverless architecture wit...
 
Working with PowerVC via its REST APIs
Working with PowerVC via its REST APIsWorking with PowerVC via its REST APIs
Working with PowerVC via its REST APIs
 
F5 BigIP LTM Initial, Build, Install and Licensing.
F5 BigIP LTM Initial, Build, Install and Licensing.F5 BigIP LTM Initial, Build, Install and Licensing.
F5 BigIP LTM Initial, Build, Install and Licensing.
 
Microservices with Spring
Microservices with SpringMicroservices with Spring
Microservices with Spring
 
Consul 1.6: Layer 7 Traffic Management and Mesh Gateways
Consul 1.6: Layer 7 Traffic Management and Mesh GatewaysConsul 1.6: Layer 7 Traffic Management and Mesh Gateways
Consul 1.6: Layer 7 Traffic Management and Mesh Gateways
 
Consull7 webinar hasicorp
Consull7 webinar hasicorpConsull7 webinar hasicorp
Consull7 webinar hasicorp
 
Microservices
MicroservicesMicroservices
Microservices
 
F5 Meetup presentation automation 2017
F5 Meetup presentation automation 2017F5 Meetup presentation automation 2017
F5 Meetup presentation automation 2017
 
ОЛЕКСАНДР ЛИПКО «Graceful Shutdown Node.js + k8s» Online WDDay 2021
ОЛЕКСАНДР ЛИПКО «Graceful Shutdown Node.js + k8s» Online WDDay 2021ОЛЕКСАНДР ЛИПКО «Graceful Shutdown Node.js + k8s» Online WDDay 2021
ОЛЕКСАНДР ЛИПКО «Graceful Shutdown Node.js + k8s» Online WDDay 2021
 
Migrate a on-prem platform to the public cloud with Java - SpringBoot and PCF
Migrate a on-prem platform to the public cloud with Java - SpringBoot and PCFMigrate a on-prem platform to the public cloud with Java - SpringBoot and PCF
Migrate a on-prem platform to the public cloud with Java - SpringBoot and PCF
 
Open Source Networking Days- Service Mesh
Open Source Networking Days- Service MeshOpen Source Networking Days- Service Mesh
Open Source Networking Days- Service Mesh
 
PLNOG15: The Power of the Open Standards SDN API’s - Mikael Holmberg
PLNOG15: The Power of the Open Standards SDN API’s - Mikael Holmberg PLNOG15: The Power of the Open Standards SDN API’s - Mikael Holmberg
PLNOG15: The Power of the Open Standards SDN API’s - Mikael Holmberg
 
StrongLoop Overview
StrongLoop OverviewStrongLoop Overview
StrongLoop Overview
 

Kürzlich hochgeladen

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 

Kürzlich hochgeladen (20)

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 

Microservice bus tutorial

  • 1. Microservice Bus Tutorial Huabing Zhao, PTL of MSB Project, ZTE
  • 2. 2 Agenda MSB Overview Service Registration Service Discovery Example & Demo Suggested Integration Approach Future plan
  • 3. 3 MSB Overview-Introduction Microservices Bus(MSB) provide a reliable, resilient and scalable communication and governance infrastructure to support Microservice Architecture including including service registration/discovery, external API gateway, internal API gateway, client SDK. It's a pluggable architecture so it can integrate with auth service provider to provide centralized Authentication & Authorization. MSB also provides a service portal to manage the REST APIs. MSB doesn’t depend on a specific environment. It can work in bare metal, virtual machine or containerized environment.
  • 4. 4 MSB Overview-Functionalities CircuitBreaker Transformation RateLimiting Flowtagging Authentication Service requests statistics and analysis Pluggable Architecture OtherPlug-in… Service Registration Service Discovery Service Change Notification Service Status Change Notification TCP/UDP Forwarding HTTP/HTTPS Forwarding WEB Socket Forwarding Route dynamically update FTP Forwarding Service Healthy Check Service Registration Load Balancing API Gateway
  • 5. 5 MSB Overview-Components • Registry Service information storage, MSB uses Consul as the service registry. • MSB Discovery Provides REST APIs for service discovery and registration • API Gateway Provide service request routing, load balancing and service governance. It can be deployed as external Gateway or Internal Gateway. • MSB SDK Java SDK for point to point communication MSB MSB Discovery External service Internal service External Gateway Internal Gateway Registry ONAP Microservices Microservice A Microservice B Microservice C MSB SDK 1 Service discovery 2 Service request 1 Service request 2 Route request to service provider Desktop External SystemsMobile External service request MSB Discovery External Gateway Internal Gateway
  • 6. 6 Service Registration-Information Model Attribute Description serviceName Service Name version Service Version url the actual URL of the service to be registered protocol supported protocols: 'REST', 'UI', 'HTTP','TCP' visualRange Visibility of the service. External(can be accessed by external systems):0 Internal(can only be accessed by ONAP microservices):1 path The customized publish path of this service. If path parameter is specified when registering the service, the service will be published to api gateway under this path. Otherwise, the service will be published to api gateway using a fixed format: api/{serviceName} /{version}. The customized publish path should only be used for back-compatible. lb_policy Load balancing method, Currently two LB methods are supported, round- robin and ip-hash. enable_ssl True if the registered service is based on https. False if the registered service is based on http. nodes ip: the ip of theservice instance node port: the port of the service instance node ttl: time to live, this parameter is reserved for later use
  • 7. 7 Service Registration-RESTFul API http method: POST url: http://{msb_ip}:{msb_port}/api/microservices/v1/services Example: curl -X POST -H "Content-Type: application/json" -d '{"serviceName": "test", "version": "v1", "url": "/","protocol": "REST", "lb_policy":"round-robin","nodes": [ {"ip": "127.0.0.1","port": "9090"}]}' "http://127.0.0.1:10081/api/microservices/v1/services”
  • 8. 8 Service Registration-MSB SDK Microservices can use MSB SDK to register themselves to MSB. MSB ONAP Microservice MSB SDK REST API
  • 9. 9 Service Registration-Kube2msb Registrator MSB MSB Discovery External service Internal service External Gateway Internal Gateway Registry ONAP Operations Manager ONAP A&AI Kube2msb registrator Kube2msb registrator can register service endpoints for the microservices deployed by OOM • OOM(Kubernetes) deploy/start/stop ONAP components. • Registrator watches the kubernetes pod event . • Registrator registers service endpoint info to MSB. It also updates the service info to MSB when ONAP components are stopped/restarted/scaled by OOM 1 Pod Even (Start, Stop etc.) Policy SDC SO VF-CVF-C 2 Register Service Update Service k8s deployment specs (annotation)
  • 10. 10 Kube2msb Registrator-Service configuration Use Kubernetes annotations to attach service endpoint metadata to objects. Service endpoint can be defined at Pod level or Service level Pod level: leverage the LB capabilities of MSB to distribute requests to multiple pods Service level: MSB send the request to service(Cluster IP), K8s dispatch the request to the backend Pod Pod Pod Service MSB Register Pod Pod MSBRegister Register at service level Register at pod level
  • 12. 12 Service Discovery-Server Side Discovery Service Registry Micorservice (Consumer) Router Micorservice Instance A 10.74.215.33:3564 10.74.215.211:1522 10.74.215.8:3281 Invoke Load balance & invoke Query ONAP Register Micorservice Instance B Micorservice Instance C •Compared to client-side discovery, the client code is simpler since it does not have to deal with discovery. Instead, a client simply makes a request to the router. •One more network hop is required than when using client-side discovery Example: Curl http://msb_ip:msb_port/api/sdc/v1/catalog/resources
  • 14. 14 Service Discovery-Client Side Discovery Microservices can use MSB SDK to discovery and access other microservices within ONAP. Service Registry Micorservice (Consumer) MSB SDK Micorservice Instance A Micorservice Instance A Micorservice Instance A 10.74.215.33:3564 10.74.215.211:1522 10.74.215.8:3281 Load balance & invoke Query Register ONAP
  • 16. 16 Example & Demo-Without OOM  Start MSB services 1. Run the Consul dockers. sudo docker run -d --net=host --name msb_consul consul:0.9.3 2. Run the MSB dockers. Login the ONAP docker registry first: docker login -u docker -p docker nexus3.onap.org:10001 sudo docker run -d --net=host --name msb_discovery nexus3.onap.org:10001/onap/msb/msb_discovery sudo docker run -d --net=host -e "ROUTE_LABELS=visualRange:1" --name msb_internal_apigateway nexus3.onap.org:10001/onap/msb/msb_apigateway Explore the MSB portal. http://127.0.0.1/msb  Register and test your REST service with MSB via curl https://wiki.onap.org/display/DW/MSB+Test+Environment+Setup
  • 17. 17 Example & Demo-Within OOM  Precondition Have kubernetes cluster, kubectl and helm installed. Login the ONAP docker registry first: docker login -u docker -p docker nexus3.onap.org:10001  Download oom from ONAP gerrit git clone https://gerrit.onap.org/r/oom  Install MSB and Kube2MSB registrator cd ~/oom/kubernets/config ./createConfig.sh -n onap cd ~/oom/kubernetes/oneclick/ ../createAll.bash -a msb -n onap ./createAll.bash -a kube2msb -n onap  Install AAI for testing ./createAll.bash -a aai-n onap  Open the MSB IAG portal in the browser You are able to see the registered AAI services at http://${Node_IP}:30080/msb
  • 18. 18 Suggested Integration approach-minimum impact to existing codes  Automatically MSB registration by OOM Kube2MSB Access services via MSB Internal API Gateway  Follows the standard URI structure http://[host]:[port]/api/{service name}]/v{version number}/{resource} https://wiki.onap.org/display/DW/RESTful+API+Design+Specification
  • 19. 19 The way going forward-OMSA (ONAP Microservice Architecture) External API Gateway Service Discovery Async Message Bus Kafka 监控采集 GatewayDiscoveryMicroservicesInfrastructure Registration ServiceA ADF JAVA ADF Go ADF HTTP/JSON RPC agent Governance Configure Management API Management Monitoring Distributed Tracing GRPC/protobuf MetricsActiveMQ Bare Metal Python ADF Registration Logging Orchestration Update/Change Deployment Scaling/Healing Instance 1 agent Virtual Machine Containers Clouds sidecar Policy/Security sidecar Instance 2 Instance n ServiceB Instance 1 Instance 2 Instance n OMSA is the vision of ONAP Microservice Architecture to support carrier-grade requirements of ONAP microservices, which includes service registration/discovery, service communication, API gateway, service orchestration, service governance and service monitoring, etc. Next step: Investgate Istio service mesh and integrate Istio into OMSA when it's production ready. Note: this diagram is a functional view of OMSA, which is not mapped to specific projects