SlideShare a Scribd company logo
簡化 JVM 上雲
范聖佑 (Shengyou Fan)


微軟最有價值專家


IT EXPLAINED 數位轉型攻略 IV
透過 Azure Spring Cloud
提升開發、發佈


及服務監控效率
本⽇⼤綱
• 回顧 JVM ⽣態系及上雲痛點


• Azure Spring Cloud 簡介


• ⽰範開發 Spring Boot 應⽤並部署⾄ Azure Spring Cloud


• 實作回顧及延伸討論


• 學習資源
Spring - 最受歡迎的 Java 框架
Source: State of Spring 2020 Report - https://tanzu.vmware.com/content/ebooks/state-of-spring-2020
的開發者使⽤ Spring Boot 做為他們唯
⼀或主要的開發平台
52%
顯著的年增成長及採⽤率
開發 Spring 應⽤的常⾒挑戰
管理 Spring Boot 應⽤的雲基
礎設施需要龐⼤的管理成本
難以管理應⽤程式的⽣命週期


為應⽤程式做故障排除很痛苦
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 的⽣態系及服務裡
完全託管的


基礎架構
內建應⽤程式


⽣命週期管理
易於使⽤的


監控服務
企業級應⽤
Azure Spring Cloud
由 Microsoft 與 VMware 共同建構與營運的 Spring Cloud 完全託管服務
Spring 與 Azure 的各項整合
App Configuration


Event Hubs


Service Bus


Storage


Redis


Functions
Spring Cloud
SQL Database


MySQL


PostgreSQL


Maria DB


Cosmos DB


• SQL


• MongoDB


• Cassandra
Spring Data
Active Directory (AAD)


AAD B2C


Spring Security
SQL Database


PostgreSQL


MySQL
R2DBC
Spring Cache
Redis Cache
Storage


Spring Resource
Spring Messaging
Service Bus
Micrometer
Monitor
只需幾⾏設定和少量的程式碼變更,Spring 開發者就可以連接到 30 多個 Azure 服務
強⼤的夥伴⽣態
Solution templates for
WebLogic on Azure IaaS
Confluent Cloud with Azure
Portal and CLI integration
Jointly built and operated
service—Azure Spring Cloud
Redis Enterprise on Azure
managed infrastructure
Solution templates for
WebSphere on Azure IaaS
Jointly supported JBoss EAP


on App Service and VMs
Elastic Cloud on Azure


Marketplace
Demo 1:建立 Spring Boot 應⽤程式
• ⼯具


- IntelliJ IDEA


- Azure Toolkit for IntelliJ


- Azure CLI


- Azure Spring Cloud extension for Azure CLI


• 步驟


- 使⽤ IntelliJ IDEA 建立 Spring Boot 專案


- 使⽤ Docker Compose 建立開發⽤ MySQL


- 本機測試
Demo 2:部署⾄ Azure Spring Cloud
• Azure 設定


- 建立 Azure Database for MySQL servers


- 建立 Azure Spring Cloud


- 建立 App


• 步驟


- 使⽤ Gradle 建立 (Fat) Jar 檔


- 使⽤ IntelliJ IDEA 或 Azure CLI 部署


- 取得測試位址
Demo 3:建立 Spring Cloud Config server
• 步驟


- 建立 Spring Cloud Config Repository


- Push ⾄ Git Repository


- 設定 Azure Spring Cloud Config Server 的 Repository
位置
Demo 4:導入微服務架構
• 步驟


- 在 Spring Boot 應⽤程式增加相依套件


- 修改程式碼讀取 Config Server 上的 Value


- 部署更新
Demo 5:建立 Spring Cloud Gateway
• Azure 設定


- 建立 App 並開啟 Public Access


• 步驟


- 建立全新 Spring Cloud Gateway 應⽤程式


- 設定 Application Configuration


- 使⽤ Gradle 建立 (Fat) Jar 檔


- 使⽤ IntelliJ IDEA 或 Azure CLI 部署
Demo 6:藍綠部署
• 步驟


- 修改 Spring Boot 應⽤程式⾏為


- 建立開發版 (Fat) Jar 檔


- 部署開發版


- 測試開發版⾏為


- 部署成正式版上線
Demo 7:查看服務架構地圖、調整 Scale、效能報表及 Log
• Azure 設定


- 服務架構地圖


- 調整 Scale


- 效能報表


- Log
實作回顧
延伸討論
• 導入 CI/CD ⼯具


• 實作 Transaction Script pattern (Spring Cloud OpenFeign)


• Auto-Scaling
成功案例
https://docs.microsoft.com/en-us/
azure/spring-cloud/quickstart
Azure Spring Cloud
官⽅說明⽂件
https://github.com/microsoft/
azure-spring-cloud-training
快速上⼿教材
https://azure.microsoft.com/en-
us/develop/java/
Java on Azure
入⼝⾴
https://azure.microsoft.com/en-us/
services/spring-cloud/
Azure Spring Cloud
產品⾴
⽰範專案


—
https://github.com/shengyou/azure-spring-cloud-demo
👈 歡迎加 FB 好友


范聖佑 (Shengyou Fan)


shengyoufan@gmail.com
關注 Azure 粉專
保持交流

More Related Content

PDF
[JCConf 2022] Compose for Desktop - 開發桌面軟體的新選擇
PDF
introduction to Vue.js 3
PDF
Why Vue.js?
PDF
Redmineのバージョンアップに追従していくための一工夫
PPTX
Jenkins tutorial for beginners
PDF
[MOPCON 2022] 以 Kotlin Multiplatform 制霸全平台
PPTX
Introduction to Node js
PPTX
Introduction to node.js
[JCConf 2022] Compose for Desktop - 開發桌面軟體的新選擇
introduction to Vue.js 3
Why Vue.js?
Redmineのバージョンアップに追従していくための一工夫
Jenkins tutorial for beginners
[MOPCON 2022] 以 Kotlin Multiplatform 制霸全平台
Introduction to Node js
Introduction to node.js

What's hot (20)

PPTX
Jenkins CI presentation
PDF
TypeScript Best Practices
PDF
Unit Testing with Jest
PDF
NodeJS for Beginner
PDF
Electron JS | Build cross-platform desktop applications with web technologies
PPTX
Unit Testing And Mocking
PDF
Ter Web Service Intro
PPTX
PDF
Angular Advanced Routing
PPTX
Node.js Express
PDF
Jbatch実践入門 #jdt2015
PDF
Vue.js for beginners
PPTX
Basic Concept of Node.js & NPM
PDF
Typescript in React: HOW & WHY?
PDF
Use Node.js to create a REST API
PPTX
Express js
ODP
Dependency Injection in Spring in 10min
PDF
How to go about testing in React?
PDF
VueJS Introduction
ODP
Routing & Navigating Pages in Angular 2
Jenkins CI presentation
TypeScript Best Practices
Unit Testing with Jest
NodeJS for Beginner
Electron JS | Build cross-platform desktop applications with web technologies
Unit Testing And Mocking
Ter Web Service Intro
Angular Advanced Routing
Node.js Express
Jbatch実践入門 #jdt2015
Vue.js for beginners
Basic Concept of Node.js & NPM
Typescript in React: HOW & WHY?
Use Node.js to create a REST API
Express js
Dependency Injection in Spring in 10min
How to go about testing in React?
VueJS Introduction
Routing & Navigating Pages in Angular 2
Ad

Similar to 簡化 JVM 上雲 - 透過 Azure Spring Cloud 提升開發、發佈及服務監控效率 (20)

PPTX
Big Data Technology - Cloud Computing
PPT
那些雲端運算教我的事
PDF
企業導入微服務實戰 - updated
PDF
廣宣學堂: 企業導入微服務實戰
PDF
20090605 行動雲端運算創新應用趨勢探索 大廠觀察(上)
PDF
課程1 1:雲端運算初探
ODP
雲端技術的新趨勢
PDF
企業導入微服務實戰 - updated
PDF
破雲而出 — 重新發現您的雲端策略
PDF
架構這件事 - Azure 可以幫助什麼 - 如何選擇使用什麼 Azure 服務
PPT
Challenges and opportunities computing Kuo-Yi Chen
PDF
網頁標記語言1
PDF
20210308-Cloud-Computing-Fields
PDF
twMVC#05 |開發與移轉 ASP.NET MVC 4.0 應用程式到 Windows Azure Platform
PPTX
微服務的基礎建設 - Service Discovery, Andrew Wu
PPTX
Service oriented computing and cloud computing
PDF
PPTX
使用Asp.net mvc搭配windows azure建構可擴展網站
PDF
雲端技術的新趨勢
PPTX
1011812 雲端應用發展趨勢 (1) (1)
Big Data Technology - Cloud Computing
那些雲端運算教我的事
企業導入微服務實戰 - updated
廣宣學堂: 企業導入微服務實戰
20090605 行動雲端運算創新應用趨勢探索 大廠觀察(上)
課程1 1:雲端運算初探
雲端技術的新趨勢
企業導入微服務實戰 - updated
破雲而出 — 重新發現您的雲端策略
架構這件事 - Azure 可以幫助什麼 - 如何選擇使用什麼 Azure 服務
Challenges and opportunities computing Kuo-Yi Chen
網頁標記語言1
20210308-Cloud-Computing-Fields
twMVC#05 |開發與移轉 ASP.NET MVC 4.0 應用程式到 Windows Azure Platform
微服務的基礎建設 - Service Discovery, Andrew Wu
Service oriented computing and cloud computing
使用Asp.net mvc搭配windows azure建構可擴展網站
雲端技術的新趨勢
1011812 雲端應用發展趨勢 (1) (1)
Ad

More from Shengyou Fan (20)

PDF
[JCConf 2024] Kotlin/Wasm:為 Kotlin 多平台帶來更多可能性
PDF
[GDG Kaohsiung DevFest 2023] 以 Compose 及 Kotlin Multiplatform 打造多平台應用程式
PDF
[JCConf 2023] 從 Kotlin Multiplatform 到 Compose Multiplatform:在多平台間輕鬆共用業務邏輯與 U...
PDF
[Kotlin 讀書會第五梯次] 深入淺出 Kotlin 第一章導讀
PDF
[WebConf Taiwan 2023] 一份 Zend Engine 外帶!透過 Micro 讓一次打包、多處運行變得可能
PDF
How I make a podcast website using serverless technology in 2023
PDF
[Effective Kotlin 讀書會] 第八章 Efficient collection processing 導讀
PDF
Using the Exposed SQL Framework to Manage Your Database
PDF
[COSCUP 2022] 讓黑畫面再次偉大 - 用 PHP 寫 CLI 工具
PDF
[COSCUP 2022] Kotlin Collection 遊樂園
PDF
初探 Kotlin Multiplatform
PDF
[PHP 也有 Day #64] PHP 升級指南
PDF
以 Kotlin Multiplatform Mobile (KMM) 開發跨平台行動應用
PDF
Composer 經典食譜
PDF
老派浪漫:用 Kotlin 寫 Command Line 工具
PDF
[Kotlin Serverless 工作坊] 單元 4 - 實作 RSS Aggregator
PDF
[Kotlin Serverless 工作坊] 單元 3 - 實作 JSON API
PDF
[Kotlin Serverless 工作坊] 單元 2 - 簡介 Kotlin Serverless
PDF
[Kotlin Serverless 工作坊] 單元 1 - 開發環境建置
PDF
用 Kotlin 打造讀書會小幫手
[JCConf 2024] Kotlin/Wasm:為 Kotlin 多平台帶來更多可能性
[GDG Kaohsiung DevFest 2023] 以 Compose 及 Kotlin Multiplatform 打造多平台應用程式
[JCConf 2023] 從 Kotlin Multiplatform 到 Compose Multiplatform:在多平台間輕鬆共用業務邏輯與 U...
[Kotlin 讀書會第五梯次] 深入淺出 Kotlin 第一章導讀
[WebConf Taiwan 2023] 一份 Zend Engine 外帶!透過 Micro 讓一次打包、多處運行變得可能
How I make a podcast website using serverless technology in 2023
[Effective Kotlin 讀書會] 第八章 Efficient collection processing 導讀
Using the Exposed SQL Framework to Manage Your Database
[COSCUP 2022] 讓黑畫面再次偉大 - 用 PHP 寫 CLI 工具
[COSCUP 2022] Kotlin Collection 遊樂園
初探 Kotlin Multiplatform
[PHP 也有 Day #64] PHP 升級指南
以 Kotlin Multiplatform Mobile (KMM) 開發跨平台行動應用
Composer 經典食譜
老派浪漫:用 Kotlin 寫 Command Line 工具
[Kotlin Serverless 工作坊] 單元 4 - 實作 RSS Aggregator
[Kotlin Serverless 工作坊] 單元 3 - 實作 JSON API
[Kotlin Serverless 工作坊] 單元 2 - 簡介 Kotlin Serverless
[Kotlin Serverless 工作坊] 單元 1 - 開發環境建置
用 Kotlin 打造讀書會小幫手

簡化 JVM 上雲 - 透過 Azure Spring Cloud 提升開發、發佈及服務監控效率