Azure Spring Cloud -- Workshop
June 17, 2020
Agenda
Time Topic Lead
09:30 Welcome, intro and setup Adib and Asir
09:45 Primer – Strigo.io
Activate Azure Passes
Daniel Wolf
Nate Ceres
10:00 Cloud native microservices – Java and Spring Cloud Adib
10:30 Azure Spring Cloud – intro Asir
10:45 Hands-on Azure Spring Cloud – 1 Yev + Coaches
11:45 Case Study – Customer 1, Q and A Asir
12:00 Lunch Break --
01:00 Hands-on Azure Spring Cloud – 2 Yev + Coaches
02:00 Case Study – Customer 2, Q and A Asir
02:15 Demos – Azure Spring Cloud
Troubleshooting
Rapidly dev and deploy
Manage secrets
Asir
Yev
Manfred
03:00 Recap, product roadmap, how to get help
Workshop evaluation
Adib and Asir
03:15 Q and A, Hands-on Azure Spring Cloud - 3 Coaches
04:30 Thank you and close Adib and Asir
Host
Coaches
Primer – Strigo.io
Activate Azure Pass
Azure Spring Cloud -- Workshop
June 17, 2020
Create a
Microsoft
Azure Pass
Subscription
2 steps:
• Redeem your Azure Pass Promo Code
• Activate your subscription
• START HERE: microsoftazurepass.com
• Detailed instructions:
microsoftazurepass.com/Home/HowTo
Step 1 –
Redeem a
Microsoft
Azure Pass
Promo Code
Step 1 –
Redeem a
Microsoft
Azure Pass
Promo Code
Step 2 –
Activate Your
Subscription
Step 2 –
Activate Your
Subscription
Azure Spring Cloud -- Workshop
June 17, 2020
Cloud Native Microservices –
Java and Spring Cloud
Asir Selvasingh – Principal PM Architect, Microsoft
Adib Saikali – Principal Platform Architect, VMware
Session learning objectives
References
What is microservices architecture?
suite of small services its
own process lightweight
independently deployable
different
programming languages different data storage
technologies
Microservice Catalyst
quickly penetrate the market
 Not interested
agility and speed scale
Microservices popularized by
 Frameworks
 Platform
 Cloud providers
 Portability across platforms
Representative companies using Java microservices
Microservices are analogous to honeycomb
aligning
start small different materials
Repetitive
independent integrated
grows organically
solid abstracted
reconstruct
Monolith & N-Tier TO Microservice
architecture transformation
Microservice principles (1 of 2)
•
Microservice principles – 12 factor app (2 of 2)
•
•
•
•
•
•
•
•
•
•
•
•
Why use Spring
What is Spring Cloud?
Why Spring Cloud?
•
•
•
•
•
Spring Cloud components
Spring Cloud Config Server
Cannot embed config inside apps
Spring Cloud Service Registry
No more code or URL dependencies
Spring Cloud LoadBalancer
(client-side)
• Moves beyond a single hard-coded
server URL to a load-balanced
solution
• Provides client-side load balancing in
calls to another microservice
• Distributed systems demand an
advanced set of routing and load
balancing behaviors for microservice
to microservice communications
One microservice wants to call another
microservice, looks up the service registry,
returns all the instances of the calling
microservice, caller service headache for which
instance it calls
Spring Cloud Gateway
Cannot duplicate or scatter cross cutting measures across microservices – securing,
routing, rate limiting, caching, monitoring, hiding services, etc.
Spring Cloud Gateway
Example - Spring Cloud Gateway and LoadBalancer
combined
• Two instances of callme-service
• Single instance of caller-service, which uses Spring
Cloud Balancer to find the list of available instances of
callme-service
• callme-service ports are generated dynamically
• Spring Cloud Gateway is hiding the complexity of our
system from external client. It is open on 8080 and is
forwarding requests to the downstream based on
request context path.
Spring Cloud Circuit Breaker and Resilience4J
Failure is inevitable, but end users need not
know
Example – Spring Cloud Circuit Breaker and Resilience4j
@Bean
public Customizer<ReactiveResilience4JCircuitBreakerFactory> defaultCustomizer() {
return factory -> factory.configureDefault(id -> new Resilience4JConfigBuilder(id)
.circuitBreakerConfig(CircuitBreakerConfig.custom()
.slidingWindowSize(5)
.permittedNumberOfCallsInHalfOpenState(5)
.failureRateThreshold(50.0F)
.waitDurationInOpenState(Duration.ofMillis(30))
.build())
.timeLimiterConfig(TimeLimiterConfig.custom().timeoutDuration(Duration.ofMillis(200)).build()).build());
}
• slidingWindowSize is equal to 5
• If 3 timeouts during last 5 calls, circuit is switched to
OPEN state
• waitDurationInOpenState is set to 30 milliseconds
• after 30 milliseconds the circuit is switched to
HALF_OPEN state
• permittedNumberOfCallsInHalfOpenState is set to 5
• In this five attempts we get <= 2 timeouts, circuit is
switched to CLOSE state
Spring Cloud Sleuth and Zipkin – Distributed Tracing
Debugging distributed apps can be complex and take long time
• Spring Cloud Sleuth can instrument apps in a
predictable and repeatable way
• Zipkin can zero in on latency problems
• Together, they trace requests through microservices
• Adds trace and span ids to logs
• appname: name of the app that logged the span
• traceId: ID assigned to a single request, job, or action
• spanId: ID of a specific operation that took place
• exportable: should the log be exported to Zipkin?
Capstone (1 of 3) - Spring Cloud components
Capstone (2 of 3) – Spring Cloud Components
Spring
Cloud Apps
Spring Cloud
Components
Spring Cloud
Components
Cloud
Services
App
Consumers
Breaker
dashboard
Service
registry
Distributed
tracing
Config
dashboard
IoT
Mobile
Browser
API
Gateway
Microservices
Microservices
Microservices
Message brokers
Databases
Build distributed systems by -
• Versioning, distributing, and
refreshing configuration via
config server and management
bus
• Dynamically discovering
remote dependencies
• Decentralizing load balancing
decisions
• Preventing cascading failures
through circuit breakers and
bulkheads
• Integrating on the behalf of
specific clients via gateway
• Instrumenting apps for
distributed tracing
Capstone (3 of 3) – Migrate Monolith to Microservices - M3
Decompose monolithic applications using three principles
Denise Yu
https://aka.ms/monoliths-to-microservices
Spring Microservices – Azure Hosting Options
Azure Spring Cloud Tanzu Application Service AKS VMs
Session takeaways
Learning Objective – be able to Takeaways
Explain microservices Covered what and why for Monolith &
N-tier to Microservice architecture
transformation
Dive deeper and go hands-on with
Spring Cloud
Covered base Spring Cloud
components that are backbone for
microservices
Session resources 1 – Spring Cloud
Spring Cloud Config Server
Spring Cloud Service Registry
Spring Cloud Gateway
Spring Cloud Load Balancer
Spring Cloud Circuit Breaker
Spring Cloud Sleuth and Zipkin
Session resources 2 - References
Session resources 3 – Azure Spring Cloud
https://docs.microsoft.com/en-us/azure/spring-cloud/
https://github.com/microsoft/azure-spring-cloud-training
https://github.com/Azure-Samples/azure-spring-cloud
Q&A
Azure Spring Cloud -- Workshop
June 17, 2020
Azure Spring Cloud
Asir Selvasingh – Principal PM Architect,
Microsoft
Adib Saikali – Principal Platform Architect,
VMware
Industry Trends
• Cloud Native
Usage of Cloud Native grew > 200% since Dec 2017
CNCF Survey Aug 2018
Frequent and Flexible deployments
Spring Boot has become the most popular Java web framework, adding
14% since last year.
https://www.jetbrains.com/lp/devecosystem-2019/java/
56%Spring Boot has the largest
share of Java among application
development frameworks
Spring
Nov 2018 Nov 2019
52.5 Million+ Spring Boot
downloads per month
95 Million+ Spring Boot
downloads per month
Why Spring and Spring Cloud Apps
“The Spring and Spring/Boot frameworks
(57%) dominate today when it comes to
building microservices ” – Jakarta EE
Developer Survey
The world’s
leading
brands run
on Azure
App Configuration
Event Hubs
Service Bus
Storage
Redis
Functions
Spring on Azure cloud.spring.io/spring-cloud-azure/
SQL Database
MySQL
PostgreSQL
Maria DB
Cosmos DB
• SQL
• MongoDB
• Cassandra
• Gremlin
SQL Database
PostgreSQL
Active Directory (AAD)
AAD B2C
Microsoft 365
Microsoft Account
Spring Cloud Spring Data Spring Security
R2DBC Spring Cache
Redis Cache
Storage
Spring Messaging
Spring Resource
Service Bus
Micrometer
Monitor (includes
Log Analytics)
Spring Boot
Build anything
Spring Cloud
Coordinate anything
designed to get you
up and running as
quickly as possible,
with minimal upfront
configuration of
Spring
provides a set of
tools that makes
communication
between
microservices
easier
Spring-based Microservices
Spring-based Microservices
Spring
Cloud Apps
Spring Cloud
Components
Spring Cloud
Components
Cloud
Services
App
Consumers
Breaker
dashboard
Service
registry
Distributed
tracing
Config
dashboard
IoT
Mobile
Browser
API
Gateway
Microservices
Microservices
Microservices
Message brokers
Databases
Common Impediments
High effort required to
manage cloud infrastructure
for Spring boot applications
Application lifecycle is
difficult to manage
Painful to troubleshoot
application issues
Spring
Cloud Apps
Spring Cloud
Components
Spring Cloud
Components
Cloud
Services
App
Consumers
Breaker
dashboard
Service
registry
Distributed
tracing
Config
dashboard
IoT
Mobile
Browser
API
Gateway
Microservices
Microservices
Microservices
Message brokers
Databases
Azure Spring
Cloud
Azure Spring Cloud
More choices and full integration into Azure’s ecosystem and services
Fully managed
infrastructure
Built-in app
lifecycle
management
Ease of
monitoring
Enterprise ready
A fully managed service for Spring Boot microservices
Azure Spring Cloud
Jointly developed,
operated, and supported
Managed service
Zero code changes
Out-of-the-box
monitoring and tracing
Simplify your cloud development for Spring applications
Responsibilities
DIY with Spring
Boot
Azure Spring
Cloud Service
Application
iteration,
debugging
CI/CD
Build and
manage Clusters
Host Spring
Cloud
Middleware
Monitoring and
logging
Scaling
Patching
Support
Customer VMware Microsoft
Azure Database
for MySQL
Azure Cosmos DB
Azure Cache
for Redis
User Git Repository
Azure Spring Cloud
agents
Azure Spring Cloud
VMware Tanzu
Build Service
Azure Kubernetes Service
Service
Binding
Config
Source
Service RuntimeUser Environment
App 1 App 2 App N Config Server Service Registry Lifecycle Mgmt.
Log Stream Data Encryption
App Resiliency
Azure DevOps
CI/CD
GitHub
Jenkins
Custom Domain Self-Diagnostics
Metrics Tracing Managed IdentitiesLogs Service Principals
Azure Monitor Azure Active Directory
Simplify your cloud development for Spring applications
Responsibilities
DIY with Spring
Boot
Azure Spring
Cloud Service
Application
iteration,
debugging
CI/CD
Build and
manage Clusters
Host Spring
Cloud
Middleware
Monitoring and
logging
Scaling
Patching
Support
Customer VMware Microsoft
Azure Database
for MySQL
Azure Cosmos DB
Azure Cache
for Redis
User Git Repository
Azure Spring Cloud
agents
Azure Spring Cloud
VMware Tanzu
Build Service
Azure Kubernetes Service
Service
Binding
Config
Source
Service RuntimeUser Environment
App 1 App 2 App N Config Server Service Registry Lifecycle Mgmt.
Log Stream Data Encryption
App Resiliency
Azure DevOps
CI/CD
GitHub
Jenkins
Custom Domain Self-Diagnostics
Metrics Tracing Managed IdentitiesLogs Service Principals
Azure Monitor Azure Active Directory
Built-in Application Lifecycle Management
Simple app lifecycle
management
Easily deploy source code
or build artifacts
Automatically wire your
app with Spring Cloud
components
Integrated CI/CD pipeline
for deployment
Demo in Slides – Azure Spring Cloud
Demo
Deploy Spring Cloud app
to Azure without worrying
about:
Infrastructure and scaling
Spring Cloud middleware –
config, registry, tracing and
gateway, or
Monitoring
Deploy and Visualize
Setup Diagnostics
Troubleshoot
Troubleshoot
Which app
instance is
misbehaving |
slow?
Which App Instance is misbehaving | slow?
Monitor
Performance
Monitor Performance
Monitor
Failures
Side by side: Azure Spring Cloud & Tanzu Application
Service
Azure Spring Cloud Tanzu Application Service
Managed vs Customized service Fully managed and built into
Azure. No ops team required.
Highly customized, yet
customer-managed solution
(runs in customer Azure
subscription)
Azure-integration vs Multi-cloud
portability
First-party service with deep
Azure integrations to native
services. Spring apps are always
portable.
Multi-cloud solution, with Azure
integrations through service
brokers
Languages supported Highly optimized for Spring/Java
(.NET-core support soon)
Optimized for Spring/Java, .NET
Core & .NET Framework on
Windows, Python, Ruby, PHP
and others
Relationship between VMware
& Microsoft
Jointly engineered, operated
and supported
Built by VMware with Microsoft
collaboration on Azure
integrations
General Availability GA - this summer. Enterprise
customers building solutions
now
Has been in market since 2013.
Dozens on F500 customers on
Azure
©Microsoft Corporation
Azure
Working in the Lab
Use Git Bash for all command line snippets
Use SHIFT + INSERT to paste into Git Bash
(or right-click)
Use browser inside the lab VM
Do all work inside the Lab directory
Azure Spring Cloud -- Workshop
June 17, 2020
Troubleshooting Spring
Cloud Microservices
Asir Selvasingh – Principal PM Architect,
Microsoft
Adib Saikali – Principal Platform Architect,
VMware
Troubleshooting
• Debug locally
• Get log stream
• Query logs and metrics in Log Analytics, ELK or Splunk
• Including logs and metrics from database, cache, messaging, directory, etc.
• Spring Boot Admin Server
• Spring Boot Actuators
• Self diagnostics in Azure Portal
• Use Application Insights
• Use New Relic or Dynatrace or App Dynamics
Demo – Troubleshooting Spring Cloud Microservices
Demo
Deploy Spring Cloud app
to Azure without worrying
about:
Infrastructure and scaling
Spring Cloud middleware –
config, registry, tracing and
gateway, or
Monitoring
Deploy and Visualize
Troubleshoot
Setup Diagnostics
Troubleshoot
Self-diagnostics in Azure Portal
Which app
instance is
misbehaving |
slow?
Which App Instance is misbehaving | slow?
Monitor
Performance
Monitor Performance
Monitor
Failures
End-to-end
Tracing
Application Insights
Spring Boot
Admin Server
Spring Boot
Admin Server
Spring Boot
Admin Server
Managed Identities for Azure Resources
• Gives your Azure resource an identity on Azure Active Directory
• A system managed identity will help you as follows:
• Eliminate the need for credentials in your code.
• Rotate credentials automatically.
• Reduce your involvement in managing identities to a minimum.
• A user assigned identity
• Can be reused
• Must be managed by you
Azure role-based access control (RBAC)
• What can I do with Azure RBAC? Some examples
• Allow one user to manage virtual machines
• Allow a DBA group to manage the Azure SQL databases
• Allow an application to access resources in a resource group
• Security principal
• User
• Group
• Service Principal
• Managed Identity
• Roles
Azure Key Vault
• What does Azure Key Vault deliver?
• Secrets management
• Key Management
• Certificate Management
• Store secrets backed by Hardware Security Modules
• Demo uses
• Spring Boot Key Vault starter
• Uses system assigned Managed Identity for application
• Uses Access policies on Key Vault to allow application access
• Uses Azure Key Vault to get application configuration (using secrets)
Azure Spring Cloud -- Workshop
June 17, 2020
Azure Spring Cloud
Asir Selvasingh – Principal PM Architect,
Microsoft
Adib Saikali – Principal Platform Architect,
VMware
Azure Spring Cloud – Recap & How to Get Help
Azure Spring Cloud - Benefits
Easily monitor
your apps
Built-in application
lifecycle management
Simplify infrastructure
management
Easily identify performance
bottlenecks
Spring Cloud componentsRun your Spring Boot apps
Gain insight into app dependencies
using Azure Monitor
Deploy source code or build artifactsScalable global infrastructure
Aggregate metrics
Automatically wire your app with
Spring Cloud infrastructure
Reduce downtime and deployment
risk
Spring Azure
App Configuration
Event Hubs
Service Bus
Storage
Redis
Functions
cloud.spring.io/spring-cloud-azure/
SQL Database
MySQL
PostgreSQL
Maria DB
Cosmos DB
• SQL
• MongoDB
• Cassandra
• Gremlin
SQL Database
PostgreSQL
Active Directory (AAD)
AAD B2C
Microsoft 365
Microsoft Account
Spring Cloud Spring Data Spring Security
R2DBC Spring Cache
Redis Cache
Storage
Spring Messaging
Spring Resource
Service Bus
Micrometer
Monitor (includes
Log Analytics)
Need Microsoft Help to Build or Migrate Your Java
Apps to Azure Spring Cloud? (1 of 2)
We can
a) Guide your design and plan – thru architecture design session /
workshop
b) Help build representative proof of concepts or pilot
• By customer and engineers in Java on Azure team
Nominate yourself …
Need Microsoft Help to Build or Migrate Your Java Apps to
Azure Spring Cloud? (2 of 2)
http://aka.ms/pilot-my-spring-cloud-apps
Build innovative
customer-centric
products
• Adopt modern product mindset
for Dev Teams and LOB leaders
• Master agile and lean
methodologies
• Kickstart a new software
development culture
• Drive alignment between IT and
LOB teams
Accelerated
application migration
to ASC
• Realize the ROI benefits of
replatforming
• Establish the patterns for
moving future workloads to
Azure Spring Cloud”
• Build the competency and skill
of development teams
Spring education &
enablement
• Accelerate transition to Cloud
Native Devs and Architects
• Document and refine the SDLC for
Cloud Native Apps
• Reduce software deployment
costs and increase dev
productivity
Azure Spring Cloud Accelerator Services
Start with a
PAL Program for Spring App
Modernization
Start with a
VMware Pivotal Labs Engagement
Start with a
Spring Application Transformation
Engagement
Azure Spring Cloud – Roadmap ( Calendar Year)
Q3 2019 Q4 2019 Q1 2020 Q2 2020 Q3 2020 Future
June
Limited Private Preview
• Application lifecycle
mgmt
• Config server
• Eureka
• Manual scaling
Summer 2020
GA
• 99.9 SLA
• Available in more
regions
• Azure Virtual Network
(VNET)
• Auto Scaling in/out
• Interactive self-
diagnostics(v2)
• Auto patching
platform and app
runtime
• Resource
management with
Terraform
• Data encryption with
system assigned and
your own key
• Azure policy for
security
• Audit security related
privilege actions
• Service Tag
November
Standard Tier Public
Preview
• Full billing
• Customer support
October
Private Preview public
announcement
• New Config server
capabilities
• Azure monitor
• Diagnostics
• Distributed tracing
• Build service
• Blue green
deployment
• Service binding
• SSL
• UX revamp
• Documentation
• Deployment w/ Maven
Jan
• Log streaming
• Alerts based on
metrics
• CI/CD (GitHub Actions,
Azure DevOps,
Jenkins) guidance
Candidates
• Available in more
regions
• Steeltoe support in
service runtime
• Certificate based
connection with Data
services
• Non transient
outgoing public IPs
• Data plane
authentication with
AAD
• Support Micrometer /
Resilience4J
• Trace external
dependencies in
Application Map
• Performance related
improvements
…
West Europe
East US
Southeast Asia
West US 2
Australia East, UK South
North Europe, South Central US
East US2, Central US
West Europe
East US
Southeast Asia
West US 2
West Europe
East US
May
• Custom domain
• Managed Identities
• Interactive self-
diagnostics(v1)
• IntelliJ plugin
Get started with Spring on Azure
Try Azure Spring Cloud
https://azure.microsoft.com/services/spring-cloud/
https://docs.microsoft.com/en-us/azure/spring-cloud/
Sign up for the Pilot program to get help specialized assistance for architecture
design sessions and building proof of concepts
http://aka.ms/pilot-my-spring-cloud-apps
Learn Azure Spring Cloud with this self-paced workshop
https://docs.microsoft.com/en-us/learn/modules/azure-spring-cloud-workshop/
Deploy an existing app to Azure Spring Cloud
https://github.com/Azure-Samples/spring-petclinic-microservices
https://github.com/azure-samples/azure-spring-cloud
Use Azure Spring starters to interact with Azure services
https://docs.microsoft.com/en-us/azure/developer/java/spring-framework/
Azure Spring Cloud -- Workshop
June 17, 2020
Your feedback is
important
https://aka.ms/eval-spring-cloud-workshop

Azure Spring Cloud Workshop - June 17, 2020

  • 1.
    Azure Spring Cloud-- Workshop June 17, 2020
  • 2.
    Agenda Time Topic Lead 09:30Welcome, intro and setup Adib and Asir 09:45 Primer – Strigo.io Activate Azure Passes Daniel Wolf Nate Ceres 10:00 Cloud native microservices – Java and Spring Cloud Adib 10:30 Azure Spring Cloud – intro Asir 10:45 Hands-on Azure Spring Cloud – 1 Yev + Coaches 11:45 Case Study – Customer 1, Q and A Asir 12:00 Lunch Break -- 01:00 Hands-on Azure Spring Cloud – 2 Yev + Coaches 02:00 Case Study – Customer 2, Q and A Asir 02:15 Demos – Azure Spring Cloud Troubleshooting Rapidly dev and deploy Manage secrets Asir Yev Manfred 03:00 Recap, product roadmap, how to get help Workshop evaluation Adib and Asir 03:15 Q and A, Hands-on Azure Spring Cloud - 3 Coaches 04:30 Thank you and close Adib and Asir
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
    Azure Spring Cloud-- Workshop June 17, 2020
  • 8.
    Create a Microsoft Azure Pass Subscription 2steps: • Redeem your Azure Pass Promo Code • Activate your subscription • START HERE: microsoftazurepass.com • Detailed instructions: microsoftazurepass.com/Home/HowTo
  • 9.
    Step 1 – Redeema Microsoft Azure Pass Promo Code
  • 10.
    Step 1 – Redeema Microsoft Azure Pass Promo Code
  • 11.
    Step 2 – ActivateYour Subscription
  • 12.
    Step 2 – ActivateYour Subscription
  • 13.
    Azure Spring Cloud-- Workshop June 17, 2020
  • 14.
    Cloud Native Microservices– Java and Spring Cloud Asir Selvasingh – Principal PM Architect, Microsoft Adib Saikali – Principal Platform Architect, VMware
  • 15.
  • 17.
  • 18.
    What is microservicesarchitecture? suite of small services its own process lightweight independently deployable different programming languages different data storage technologies
  • 19.
    Microservice Catalyst quickly penetratethe market  Not interested agility and speed scale
  • 20.
    Microservices popularized by Frameworks  Platform  Cloud providers  Portability across platforms
  • 21.
  • 22.
    Microservices are analogousto honeycomb aligning start small different materials Repetitive independent integrated grows organically solid abstracted reconstruct
  • 23.
    Monolith & N-TierTO Microservice architecture transformation
  • 24.
  • 25.
    Microservice principles –12 factor app (2 of 2) • • • • • • • • • • • •
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
    Spring Cloud ConfigServer Cannot embed config inside apps
  • 31.
    Spring Cloud ServiceRegistry No more code or URL dependencies
  • 32.
    Spring Cloud LoadBalancer (client-side) •Moves beyond a single hard-coded server URL to a load-balanced solution • Provides client-side load balancing in calls to another microservice • Distributed systems demand an advanced set of routing and load balancing behaviors for microservice to microservice communications One microservice wants to call another microservice, looks up the service registry, returns all the instances of the calling microservice, caller service headache for which instance it calls
  • 33.
    Spring Cloud Gateway Cannotduplicate or scatter cross cutting measures across microservices – securing, routing, rate limiting, caching, monitoring, hiding services, etc.
  • 34.
  • 35.
    Example - SpringCloud Gateway and LoadBalancer combined • Two instances of callme-service • Single instance of caller-service, which uses Spring Cloud Balancer to find the list of available instances of callme-service • callme-service ports are generated dynamically • Spring Cloud Gateway is hiding the complexity of our system from external client. It is open on 8080 and is forwarding requests to the downstream based on request context path.
  • 36.
    Spring Cloud CircuitBreaker and Resilience4J Failure is inevitable, but end users need not know
  • 37.
    Example – SpringCloud Circuit Breaker and Resilience4j @Bean public Customizer<ReactiveResilience4JCircuitBreakerFactory> defaultCustomizer() { return factory -> factory.configureDefault(id -> new Resilience4JConfigBuilder(id) .circuitBreakerConfig(CircuitBreakerConfig.custom() .slidingWindowSize(5) .permittedNumberOfCallsInHalfOpenState(5) .failureRateThreshold(50.0F) .waitDurationInOpenState(Duration.ofMillis(30)) .build()) .timeLimiterConfig(TimeLimiterConfig.custom().timeoutDuration(Duration.ofMillis(200)).build()).build()); } • slidingWindowSize is equal to 5 • If 3 timeouts during last 5 calls, circuit is switched to OPEN state • waitDurationInOpenState is set to 30 milliseconds • after 30 milliseconds the circuit is switched to HALF_OPEN state • permittedNumberOfCallsInHalfOpenState is set to 5 • In this five attempts we get <= 2 timeouts, circuit is switched to CLOSE state
  • 38.
    Spring Cloud Sleuthand Zipkin – Distributed Tracing Debugging distributed apps can be complex and take long time • Spring Cloud Sleuth can instrument apps in a predictable and repeatable way • Zipkin can zero in on latency problems • Together, they trace requests through microservices • Adds trace and span ids to logs • appname: name of the app that logged the span • traceId: ID assigned to a single request, job, or action • spanId: ID of a specific operation that took place • exportable: should the log be exported to Zipkin?
  • 39.
    Capstone (1 of3) - Spring Cloud components
  • 40.
    Capstone (2 of3) – Spring Cloud Components Spring Cloud Apps Spring Cloud Components Spring Cloud Components Cloud Services App Consumers Breaker dashboard Service registry Distributed tracing Config dashboard IoT Mobile Browser API Gateway Microservices Microservices Microservices Message brokers Databases Build distributed systems by - • Versioning, distributing, and refreshing configuration via config server and management bus • Dynamically discovering remote dependencies • Decentralizing load balancing decisions • Preventing cascading failures through circuit breakers and bulkheads • Integrating on the behalf of specific clients via gateway • Instrumenting apps for distributed tracing
  • 41.
    Capstone (3 of3) – Migrate Monolith to Microservices - M3 Decompose monolithic applications using three principles
  • 42.
  • 43.
    Spring Microservices –Azure Hosting Options Azure Spring Cloud Tanzu Application Service AKS VMs
  • 44.
    Session takeaways Learning Objective– be able to Takeaways Explain microservices Covered what and why for Monolith & N-tier to Microservice architecture transformation Dive deeper and go hands-on with Spring Cloud Covered base Spring Cloud components that are backbone for microservices
  • 45.
    Session resources 1– Spring Cloud Spring Cloud Config Server Spring Cloud Service Registry Spring Cloud Gateway Spring Cloud Load Balancer Spring Cloud Circuit Breaker Spring Cloud Sleuth and Zipkin
  • 46.
    Session resources 2- References
  • 47.
    Session resources 3– Azure Spring Cloud https://docs.microsoft.com/en-us/azure/spring-cloud/ https://github.com/microsoft/azure-spring-cloud-training https://github.com/Azure-Samples/azure-spring-cloud
  • 48.
  • 49.
    Azure Spring Cloud-- Workshop June 17, 2020
  • 50.
    Azure Spring Cloud AsirSelvasingh – Principal PM Architect, Microsoft Adib Saikali – Principal Platform Architect, VMware
  • 51.
    Industry Trends • CloudNative Usage of Cloud Native grew > 200% since Dec 2017 CNCF Survey Aug 2018 Frequent and Flexible deployments
  • 52.
    Spring Boot hasbecome the most popular Java web framework, adding 14% since last year. https://www.jetbrains.com/lp/devecosystem-2019/java/ 56%Spring Boot has the largest share of Java among application development frameworks Spring Nov 2018 Nov 2019 52.5 Million+ Spring Boot downloads per month 95 Million+ Spring Boot downloads per month
  • 53.
    Why Spring andSpring Cloud Apps “The Spring and Spring/Boot frameworks (57%) dominate today when it comes to building microservices ” – Jakarta EE Developer Survey
  • 56.
  • 57.
    App Configuration Event Hubs ServiceBus Storage Redis Functions Spring on Azure cloud.spring.io/spring-cloud-azure/ SQL Database MySQL PostgreSQL Maria DB Cosmos DB • SQL • MongoDB • Cassandra • Gremlin SQL Database PostgreSQL Active Directory (AAD) AAD B2C Microsoft 365 Microsoft Account Spring Cloud Spring Data Spring Security R2DBC Spring Cache Redis Cache Storage Spring Messaging Spring Resource Service Bus Micrometer Monitor (includes Log Analytics)
  • 58.
    Spring Boot Build anything SpringCloud Coordinate anything designed to get you up and running as quickly as possible, with minimal upfront configuration of Spring provides a set of tools that makes communication between microservices easier Spring-based Microservices
  • 59.
    Spring-based Microservices Spring Cloud Apps SpringCloud Components Spring Cloud Components Cloud Services App Consumers Breaker dashboard Service registry Distributed tracing Config dashboard IoT Mobile Browser API Gateway Microservices Microservices Microservices Message brokers Databases
  • 60.
    Common Impediments High effortrequired to manage cloud infrastructure for Spring boot applications Application lifecycle is difficult to manage Painful to troubleshoot application issues Spring Cloud Apps Spring Cloud Components Spring Cloud Components Cloud Services App Consumers Breaker dashboard Service registry Distributed tracing Config dashboard IoT Mobile Browser API Gateway Microservices Microservices Microservices Message brokers Databases
  • 61.
  • 62.
    Azure Spring Cloud Morechoices and full integration into Azure’s ecosystem and services Fully managed infrastructure Built-in app lifecycle management Ease of monitoring Enterprise ready A fully managed service for Spring Boot microservices
  • 63.
    Azure Spring Cloud Jointlydeveloped, operated, and supported Managed service Zero code changes Out-of-the-box monitoring and tracing
  • 64.
    Simplify your clouddevelopment for Spring applications Responsibilities DIY with Spring Boot Azure Spring Cloud Service Application iteration, debugging CI/CD Build and manage Clusters Host Spring Cloud Middleware Monitoring and logging Scaling Patching Support Customer VMware Microsoft Azure Database for MySQL Azure Cosmos DB Azure Cache for Redis User Git Repository Azure Spring Cloud agents Azure Spring Cloud VMware Tanzu Build Service Azure Kubernetes Service Service Binding Config Source Service RuntimeUser Environment App 1 App 2 App N Config Server Service Registry Lifecycle Mgmt. Log Stream Data Encryption App Resiliency Azure DevOps CI/CD GitHub Jenkins Custom Domain Self-Diagnostics Metrics Tracing Managed IdentitiesLogs Service Principals Azure Monitor Azure Active Directory
  • 65.
    Simplify your clouddevelopment for Spring applications Responsibilities DIY with Spring Boot Azure Spring Cloud Service Application iteration, debugging CI/CD Build and manage Clusters Host Spring Cloud Middleware Monitoring and logging Scaling Patching Support Customer VMware Microsoft Azure Database for MySQL Azure Cosmos DB Azure Cache for Redis User Git Repository Azure Spring Cloud agents Azure Spring Cloud VMware Tanzu Build Service Azure Kubernetes Service Service Binding Config Source Service RuntimeUser Environment App 1 App 2 App N Config Server Service Registry Lifecycle Mgmt. Log Stream Data Encryption App Resiliency Azure DevOps CI/CD GitHub Jenkins Custom Domain Self-Diagnostics Metrics Tracing Managed IdentitiesLogs Service Principals Azure Monitor Azure Active Directory
  • 66.
    Built-in Application LifecycleManagement Simple app lifecycle management Easily deploy source code or build artifacts Automatically wire your app with Spring Cloud components Integrated CI/CD pipeline for deployment
  • 67.
    Demo in Slides– Azure Spring Cloud
  • 68.
    Demo Deploy Spring Cloudapp to Azure without worrying about: Infrastructure and scaling Spring Cloud middleware – config, registry, tracing and gateway, or Monitoring
  • 69.
  • 70.
  • 71.
  • 72.
  • 73.
  • 74.
    Which App Instanceis misbehaving | slow?
  • 75.
  • 76.
  • 77.
  • 78.
    Side by side:Azure Spring Cloud & Tanzu Application Service Azure Spring Cloud Tanzu Application Service Managed vs Customized service Fully managed and built into Azure. No ops team required. Highly customized, yet customer-managed solution (runs in customer Azure subscription) Azure-integration vs Multi-cloud portability First-party service with deep Azure integrations to native services. Spring apps are always portable. Multi-cloud solution, with Azure integrations through service brokers Languages supported Highly optimized for Spring/Java (.NET-core support soon) Optimized for Spring/Java, .NET Core & .NET Framework on Windows, Python, Ruby, PHP and others Relationship between VMware & Microsoft Jointly engineered, operated and supported Built by VMware with Microsoft collaboration on Azure integrations General Availability GA - this summer. Enterprise customers building solutions now Has been in market since 2013. Dozens on F500 customers on Azure
  • 80.
    ©Microsoft Corporation Azure Working inthe Lab Use Git Bash for all command line snippets Use SHIFT + INSERT to paste into Git Bash (or right-click) Use browser inside the lab VM Do all work inside the Lab directory
  • 81.
    Azure Spring Cloud-- Workshop June 17, 2020
  • 82.
    Troubleshooting Spring Cloud Microservices AsirSelvasingh – Principal PM Architect, Microsoft Adib Saikali – Principal Platform Architect, VMware
  • 83.
    Troubleshooting • Debug locally •Get log stream • Query logs and metrics in Log Analytics, ELK or Splunk • Including logs and metrics from database, cache, messaging, directory, etc. • Spring Boot Admin Server • Spring Boot Actuators • Self diagnostics in Azure Portal • Use Application Insights • Use New Relic or Dynatrace or App Dynamics
  • 84.
    Demo – TroubleshootingSpring Cloud Microservices
  • 85.
    Demo Deploy Spring Cloudapp to Azure without worrying about: Infrastructure and scaling Spring Cloud middleware – config, registry, tracing and gateway, or Monitoring
  • 86.
  • 87.
  • 88.
  • 89.
  • 90.
  • 91.
  • 92.
    Which App Instanceis misbehaving | slow?
  • 93.
  • 94.
  • 95.
  • 96.
  • 97.
  • 98.
  • 99.
  • 100.
  • 115.
    Managed Identities forAzure Resources • Gives your Azure resource an identity on Azure Active Directory • A system managed identity will help you as follows: • Eliminate the need for credentials in your code. • Rotate credentials automatically. • Reduce your involvement in managing identities to a minimum. • A user assigned identity • Can be reused • Must be managed by you
  • 116.
    Azure role-based accesscontrol (RBAC) • What can I do with Azure RBAC? Some examples • Allow one user to manage virtual machines • Allow a DBA group to manage the Azure SQL databases • Allow an application to access resources in a resource group • Security principal • User • Group • Service Principal • Managed Identity • Roles
  • 117.
    Azure Key Vault •What does Azure Key Vault deliver? • Secrets management • Key Management • Certificate Management • Store secrets backed by Hardware Security Modules • Demo uses • Spring Boot Key Vault starter • Uses system assigned Managed Identity for application • Uses Access policies on Key Vault to allow application access • Uses Azure Key Vault to get application configuration (using secrets)
  • 118.
    Azure Spring Cloud-- Workshop June 17, 2020
  • 119.
    Azure Spring Cloud AsirSelvasingh – Principal PM Architect, Microsoft Adib Saikali – Principal Platform Architect, VMware
  • 120.
    Azure Spring Cloud– Recap & How to Get Help
  • 121.
    Azure Spring Cloud- Benefits Easily monitor your apps Built-in application lifecycle management Simplify infrastructure management Easily identify performance bottlenecks Spring Cloud componentsRun your Spring Boot apps Gain insight into app dependencies using Azure Monitor Deploy source code or build artifactsScalable global infrastructure Aggregate metrics Automatically wire your app with Spring Cloud infrastructure Reduce downtime and deployment risk
  • 122.
    Spring Azure App Configuration EventHubs Service Bus Storage Redis Functions cloud.spring.io/spring-cloud-azure/ SQL Database MySQL PostgreSQL Maria DB Cosmos DB • SQL • MongoDB • Cassandra • Gremlin SQL Database PostgreSQL Active Directory (AAD) AAD B2C Microsoft 365 Microsoft Account Spring Cloud Spring Data Spring Security R2DBC Spring Cache Redis Cache Storage Spring Messaging Spring Resource Service Bus Micrometer Monitor (includes Log Analytics)
  • 123.
    Need Microsoft Helpto Build or Migrate Your Java Apps to Azure Spring Cloud? (1 of 2) We can a) Guide your design and plan – thru architecture design session / workshop b) Help build representative proof of concepts or pilot • By customer and engineers in Java on Azure team Nominate yourself …
  • 124.
    Need Microsoft Helpto Build or Migrate Your Java Apps to Azure Spring Cloud? (2 of 2) http://aka.ms/pilot-my-spring-cloud-apps
  • 125.
    Build innovative customer-centric products • Adoptmodern product mindset for Dev Teams and LOB leaders • Master agile and lean methodologies • Kickstart a new software development culture • Drive alignment between IT and LOB teams Accelerated application migration to ASC • Realize the ROI benefits of replatforming • Establish the patterns for moving future workloads to Azure Spring Cloud” • Build the competency and skill of development teams Spring education & enablement • Accelerate transition to Cloud Native Devs and Architects • Document and refine the SDLC for Cloud Native Apps • Reduce software deployment costs and increase dev productivity Azure Spring Cloud Accelerator Services Start with a PAL Program for Spring App Modernization Start with a VMware Pivotal Labs Engagement Start with a Spring Application Transformation Engagement
  • 126.
    Azure Spring Cloud– Roadmap ( Calendar Year) Q3 2019 Q4 2019 Q1 2020 Q2 2020 Q3 2020 Future June Limited Private Preview • Application lifecycle mgmt • Config server • Eureka • Manual scaling Summer 2020 GA • 99.9 SLA • Available in more regions • Azure Virtual Network (VNET) • Auto Scaling in/out • Interactive self- diagnostics(v2) • Auto patching platform and app runtime • Resource management with Terraform • Data encryption with system assigned and your own key • Azure policy for security • Audit security related privilege actions • Service Tag November Standard Tier Public Preview • Full billing • Customer support October Private Preview public announcement • New Config server capabilities • Azure monitor • Diagnostics • Distributed tracing • Build service • Blue green deployment • Service binding • SSL • UX revamp • Documentation • Deployment w/ Maven Jan • Log streaming • Alerts based on metrics • CI/CD (GitHub Actions, Azure DevOps, Jenkins) guidance Candidates • Available in more regions • Steeltoe support in service runtime • Certificate based connection with Data services • Non transient outgoing public IPs • Data plane authentication with AAD • Support Micrometer / Resilience4J • Trace external dependencies in Application Map • Performance related improvements … West Europe East US Southeast Asia West US 2 Australia East, UK South North Europe, South Central US East US2, Central US West Europe East US Southeast Asia West US 2 West Europe East US May • Custom domain • Managed Identities • Interactive self- diagnostics(v1) • IntelliJ plugin
  • 127.
    Get started withSpring on Azure Try Azure Spring Cloud https://azure.microsoft.com/services/spring-cloud/ https://docs.microsoft.com/en-us/azure/spring-cloud/ Sign up for the Pilot program to get help specialized assistance for architecture design sessions and building proof of concepts http://aka.ms/pilot-my-spring-cloud-apps Learn Azure Spring Cloud with this self-paced workshop https://docs.microsoft.com/en-us/learn/modules/azure-spring-cloud-workshop/ Deploy an existing app to Azure Spring Cloud https://github.com/Azure-Samples/spring-petclinic-microservices https://github.com/azure-samples/azure-spring-cloud Use Azure Spring starters to interact with Azure services https://docs.microsoft.com/en-us/azure/developer/java/spring-framework/
  • 128.
    Azure Spring Cloud-- Workshop June 17, 2020
  • 129.