SlideShare ist ein Scribd-Unternehmen logo
1 von 24
Downloaden Sie, um offline zu lesen
簡化 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 粉專
保持交流

Weitere ähnliche Inhalte

Was ist angesagt?

Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to docker
John Willis
 

Was ist angesagt? (20)

VPC Implementation In OpenStack Heat
VPC Implementation In OpenStack HeatVPC Implementation In OpenStack Heat
VPC Implementation In OpenStack Heat
 
Microservices with Java, Spring Boot and Spring Cloud
Microservices with Java, Spring Boot and Spring CloudMicroservices with Java, Spring Boot and Spring Cloud
Microservices with Java, Spring Boot and Spring Cloud
 
Containers and Docker
Containers and DockerContainers and Docker
Containers and Docker
 
初探 Kotlin Multiplatform
初探 Kotlin Multiplatform初探 Kotlin Multiplatform
初探 Kotlin Multiplatform
 
Azure DevOps for Developers
Azure DevOps for DevelopersAzure DevOps for Developers
Azure DevOps for Developers
 
Introduction to Spring Boot
Introduction to Spring BootIntroduction to Spring Boot
Introduction to Spring Boot
 
Spring bootでweb セキュリティ(ログイン認証)編
Spring bootでweb セキュリティ(ログイン認証)編Spring bootでweb セキュリティ(ログイン認証)編
Spring bootでweb セキュリティ(ログイン認証)編
 
PUC SE Day 2019 - SpringBoot
PUC SE Day 2019 - SpringBootPUC SE Day 2019 - SpringBoot
PUC SE Day 2019 - SpringBoot
 
Spring boot
Spring bootSpring boot
Spring boot
 
Clean backends with NestJs
Clean backends with NestJsClean backends with NestJs
Clean backends with NestJs
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to docker
 
[OpenInfra Days Korea 2018] (Track 4) - Grafana를 이용한 OpenStack 클라우드 성능 모니터링
[OpenInfra Days Korea 2018] (Track 4) - Grafana를 이용한 OpenStack 클라우드 성능 모니터링[OpenInfra Days Korea 2018] (Track 4) - Grafana를 이용한 OpenStack 클라우드 성능 모니터링
[OpenInfra Days Korea 2018] (Track 4) - Grafana를 이용한 OpenStack 클라우드 성능 모니터링
 
Continuous Integration With Jenkins
Continuous Integration With JenkinsContinuous Integration With Jenkins
Continuous Integration With Jenkins
 
stupid-simple-kubernetes-final.pdf
stupid-simple-kubernetes-final.pdfstupid-simple-kubernetes-final.pdf
stupid-simple-kubernetes-final.pdf
 
Spring Boot
Spring BootSpring Boot
Spring Boot
 
Maven 3 Overview
Maven 3  OverviewMaven 3  Overview
Maven 3 Overview
 
Docker 101 - from 0 to Docker in 30 minutes
Docker 101 - from 0 to Docker in 30 minutesDocker 101 - from 0 to Docker in 30 minutes
Docker 101 - from 0 to Docker in 30 minutes
 
用 Kotlin 做自動化工具
用 Kotlin 做自動化工具用 Kotlin 做自動化工具
用 Kotlin 做自動化工具
 
Maven ppt
Maven pptMaven ppt
Maven ppt
 
Jenkins를 활용한 Openshift CI/CD 구성
Jenkins를 활용한 Openshift CI/CD 구성 Jenkins를 활용한 Openshift CI/CD 구성
Jenkins를 활용한 Openshift CI/CD 구성
 

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

Lab01 cloud project
Lab01 cloud projectLab01 cloud project
Lab01 cloud project
Jeff Chu
 
深入研究雲端應用程式平台-AppFabric
深入研究雲端應用程式平台-AppFabric深入研究雲端應用程式平台-AppFabric
深入研究雲端應用程式平台-AppFabric
John Chang
 
微軟實戰課程日:玩轉雲端 技術與架構
微軟實戰課程日:玩轉雲端 技術與架構微軟實戰課程日:玩轉雲端 技術與架構
微軟實戰課程日:玩轉雲端 技術與架構
Jeff Chu
 
P6 Primavera 客户端的安装和配置
P6 Primavera 客户端的安装和配置P6 Primavera 客户端的安装和配置
P6 Primavera 客户端的安装和配置
epst
 
Asp.net mvc網站的從無到有
Asp.net mvc網站的從無到有Asp.net mvc網站的從無到有
Asp.net mvc網站的從無到有
Wade Huang
 
Eucalyptus安装及实例映像制作
Eucalyptus安装及实例映像制作Eucalyptus安装及实例映像制作
Eucalyptus安装及实例映像制作
liangxiao0315
 
ASP.Net MVC2 简介
ASP.Net MVC2 简介ASP.Net MVC2 简介
ASP.Net MVC2 简介
Allen Lsy
 
利用 ASP.NET MVC 提升您的 Web 應用程式
利用 ASP.NET MVC 提升您的 Web 應用程式利用 ASP.NET MVC 提升您的 Web 應用程式
利用 ASP.NET MVC 提升您的 Web 應用程式
Chui-Wen Chiu
 

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

Lab01 cloud project
Lab01 cloud projectLab01 cloud project
Lab01 cloud project
 
twMVC#05 |開發與移轉 ASP.NET MVC 4.0 應用程式到 Windows Azure Platform
twMVC#05 |開發與移轉 ASP.NET MVC 4.0 應用程式到 Windows Azure PlatformtwMVC#05 |開發與移轉 ASP.NET MVC 4.0 應用程式到 Windows Azure Platform
twMVC#05 |開發與移轉 ASP.NET MVC 4.0 應用程式到 Windows Azure Platform
 
深入研究雲端應用程式平台-AppFabric
深入研究雲端應用程式平台-AppFabric深入研究雲端應用程式平台-AppFabric
深入研究雲端應用程式平台-AppFabric
 
VCACICM6_M07_Extensibility.pptx
VCACICM6_M07_Extensibility.pptxVCACICM6_M07_Extensibility.pptx
VCACICM6_M07_Extensibility.pptx
 
twMVC#04 | ASP.NET MVC 4 新功能介紹(快速上手)
twMVC#04 | ASP.NET MVC 4 新功能介紹(快速上手)twMVC#04 | ASP.NET MVC 4 新功能介紹(快速上手)
twMVC#04 | ASP.NET MVC 4 新功能介紹(快速上手)
 
ASP.NET MVC 4 新功能介紹(快速上手) -twMVC#4
ASP.NET MVC 4 新功能介紹(快速上手) -twMVC#4ASP.NET MVC 4 新功能介紹(快速上手) -twMVC#4
ASP.NET MVC 4 新功能介紹(快速上手) -twMVC#4
 
[2020 .NET Conf] 企業Azure DevOps Service 實際應用架構與秘辛
[2020 .NET Conf] 企業Azure DevOps Service 實際應用架構與秘辛[2020 .NET Conf] 企業Azure DevOps Service 實際應用架構與秘辛
[2020 .NET Conf] 企業Azure DevOps Service 實際應用架構與秘辛
 
微軟實戰課程日:玩轉雲端 技術與架構
微軟實戰課程日:玩轉雲端 技術與架構微軟實戰課程日:玩轉雲端 技術與架構
微軟實戰課程日:玩轉雲端 技術與架構
 
P6 Primavera 客户端的安装和配置
P6 Primavera 客户端的安装和配置P6 Primavera 客户端的安装和配置
P6 Primavera 客户端的安装和配置
 
MiCloud服務提供者訓練
MiCloud服務提供者訓練MiCloud服務提供者訓練
MiCloud服務提供者訓練
 
Asp.net mvc網站的從無到有
Asp.net mvc網站的從無到有Asp.net mvc網站的從無到有
Asp.net mvc網站的從無到有
 
Asp.net mvc 從無到有 -twMVC#2
Asp.net mvc 從無到有 -twMVC#2Asp.net mvc 從無到有 -twMVC#2
Asp.net mvc 從無到有 -twMVC#2
 
twMVC#02 | ASP.NET MVC 從無到有
twMVC#02 | ASP.NET MVC 從無到有twMVC#02 | ASP.NET MVC 從無到有
twMVC#02 | ASP.NET MVC 從無到有
 
Global Azure Bootcamp 2015 at Study4
Global Azure Bootcamp 2015 at Study4Global Azure Bootcamp 2015 at Study4
Global Azure Bootcamp 2015 at Study4
 
Eucalyptus安装及实例映像制作
Eucalyptus安装及实例映像制作Eucalyptus安装及实例映像制作
Eucalyptus安装及实例映像制作
 
ASP.NET MVC 6 新功能探索
ASP.NET MVC 6 新功能探索ASP.NET MVC 6 新功能探索
ASP.NET MVC 6 新功能探索
 
使用 ASP.NET 5 實戰開發雲端應用程式
使用 ASP.NET 5 實戰開發雲端應用程式使用 ASP.NET 5 實戰開發雲端應用程式
使用 ASP.NET 5 實戰開發雲端應用程式
 
ASP.Net MVC2 简介
ASP.Net MVC2 简介ASP.Net MVC2 简介
ASP.Net MVC2 简介
 
利用 ASP.NET MVC 提升您的 Web 應用程式
利用 ASP.NET MVC 提升您的 Web 應用程式利用 ASP.NET MVC 提升您的 Web 應用程式
利用 ASP.NET MVC 提升您的 Web 應用程式
 
twMVC#42 Azure DevOps Service Pipeline設計與非正常應用
twMVC#42 Azure DevOps Service Pipeline設計與非正常應用twMVC#42 Azure DevOps Service Pipeline設計與非正常應用
twMVC#42 Azure DevOps Service Pipeline設計與非正常應用
 

Mehr von Shengyou Fan

[JCConf 2023] 從 Kotlin Multiplatform 到 Compose Multiplatform:在多平台間輕鬆共用業務邏輯與 U...
[JCConf 2023] 從 Kotlin Multiplatform 到 Compose Multiplatform:在多平台間輕鬆共用業務邏輯與 U...[JCConf 2023] 從 Kotlin Multiplatform 到 Compose Multiplatform:在多平台間輕鬆共用業務邏輯與 U...
[JCConf 2023] 從 Kotlin Multiplatform 到 Compose Multiplatform:在多平台間輕鬆共用業務邏輯與 U...
Shengyou Fan
 

Mehr von Shengyou Fan (20)

[JCConf 2023] 從 Kotlin Multiplatform 到 Compose Multiplatform:在多平台間輕鬆共用業務邏輯與 U...
[JCConf 2023] 從 Kotlin Multiplatform 到 Compose Multiplatform:在多平台間輕鬆共用業務邏輯與 U...[JCConf 2023] 從 Kotlin Multiplatform 到 Compose Multiplatform:在多平台間輕鬆共用業務邏輯與 U...
[JCConf 2023] 從 Kotlin Multiplatform 到 Compose Multiplatform:在多平台間輕鬆共用業務邏輯與 U...
 
[Kotlin 讀書會第五梯次] 深入淺出 Kotlin 第一章導讀
[Kotlin 讀書會第五梯次] 深入淺出 Kotlin 第一章導讀[Kotlin 讀書會第五梯次] 深入淺出 Kotlin 第一章導讀
[Kotlin 讀書會第五梯次] 深入淺出 Kotlin 第一章導讀
 
[WebConf Taiwan 2023] 一份 Zend Engine 外帶!透過 Micro 讓一次打包、多處運行變得可能
[WebConf Taiwan 2023] 一份 Zend Engine 外帶!透過 Micro 讓一次打包、多處運行變得可能[WebConf Taiwan 2023] 一份 Zend Engine 外帶!透過 Micro 讓一次打包、多處運行變得可能
[WebConf Taiwan 2023] 一份 Zend Engine 外帶!透過 Micro 讓一次打包、多處運行變得可能
 
How I make a podcast website using serverless technology in 2023
How I make a podcast website using serverless technology in 2023How I make a podcast website using serverless technology in 2023
How I make a podcast website using serverless technology in 2023
 
[Effective Kotlin 讀書會] 第八章 Efficient collection processing 導讀
[Effective Kotlin 讀書會] 第八章 Efficient collection processing 導讀[Effective Kotlin 讀書會] 第八章 Efficient collection processing 導讀
[Effective Kotlin 讀書會] 第八章 Efficient collection processing 導讀
 
Using the Exposed SQL Framework to Manage Your Database
Using the Exposed SQL Framework to Manage Your DatabaseUsing the Exposed SQL Framework to Manage Your Database
Using the Exposed SQL Framework to Manage Your Database
 
[COSCUP 2022] 讓黑畫面再次偉大 - 用 PHP 寫 CLI 工具
[COSCUP 2022] 讓黑畫面再次偉大 - 用 PHP 寫 CLI 工具[COSCUP 2022] 讓黑畫面再次偉大 - 用 PHP 寫 CLI 工具
[COSCUP 2022] 讓黑畫面再次偉大 - 用 PHP 寫 CLI 工具
 
[PHP 也有 Day #64] PHP 升級指南
[PHP 也有 Day #64] PHP 升級指南[PHP 也有 Day #64] PHP 升級指南
[PHP 也有 Day #64] PHP 升級指南
 
以 Kotlin Multiplatform Mobile (KMM) 開發跨平台行動應用
以 Kotlin Multiplatform Mobile (KMM) 開發跨平台行動應用以 Kotlin Multiplatform Mobile (KMM) 開發跨平台行動應用
以 Kotlin Multiplatform Mobile (KMM) 開發跨平台行動應用
 
Composer 經典食譜
Composer 經典食譜Composer 經典食譜
Composer 經典食譜
 
老派浪漫:用 Kotlin 寫 Command Line 工具
老派浪漫:用 Kotlin 寫 Command Line 工具老派浪漫:用 Kotlin 寫 Command Line 工具
老派浪漫:用 Kotlin 寫 Command Line 工具
 
[Kotlin Serverless 工作坊] 單元 4 - 實作 RSS Aggregator
[Kotlin Serverless 工作坊] 單元 4 - 實作 RSS Aggregator[Kotlin Serverless 工作坊] 單元 4 - 實作 RSS Aggregator
[Kotlin Serverless 工作坊] 單元 4 - 實作 RSS Aggregator
 
[Kotlin Serverless 工作坊] 單元 3 - 實作 JSON API
[Kotlin Serverless 工作坊] 單元 3 - 實作 JSON API[Kotlin Serverless 工作坊] 單元 3 - 實作 JSON API
[Kotlin Serverless 工作坊] 單元 3 - 實作 JSON API
 
[Kotlin Serverless 工作坊] 單元 2 - 簡介 Kotlin Serverless
[Kotlin Serverless 工作坊] 單元 2 - 簡介 Kotlin Serverless[Kotlin Serverless 工作坊] 單元 2 - 簡介 Kotlin Serverless
[Kotlin Serverless 工作坊] 單元 2 - 簡介 Kotlin Serverless
 
[Kotlin Serverless 工作坊] 單元 1 - 開發環境建置
[Kotlin Serverless 工作坊] 單元 1 - 開發環境建置[Kotlin Serverless 工作坊] 單元 1 - 開發環境建置
[Kotlin Serverless 工作坊] 單元 1 - 開發環境建置
 
用 Kotlin 打造讀書會小幫手
用 Kotlin 打造讀書會小幫手用 Kotlin 打造讀書會小幫手
用 Kotlin 打造讀書會小幫手
 
Kotlin 讀書會第三梯次第一章
Kotlin 讀書會第三梯次第一章Kotlin 讀書會第三梯次第一章
Kotlin 讀書會第三梯次第一章
 
用 OPENRNDR 將 Chatbot 訊息視覺化
用 OPENRNDR 將 Chatbot 訊息視覺化用 OPENRNDR 將 Chatbot 訊息視覺化
用 OPENRNDR 將 Chatbot 訊息視覺化
 
[JCConf 2020] 用 Kotlin 跨入 Serverless 世代
[JCConf 2020] 用 Kotlin 跨入 Serverless 世代[JCConf 2020] 用 Kotlin 跨入 Serverless 世代
[JCConf 2020] 用 Kotlin 跨入 Serverless 世代
 
[PHP 也有 Day] 垃圾留言守城記 - 用 Laravel 阻擋 SPAM 留言的奮鬥史
[PHP 也有 Day] 垃圾留言守城記 - 用 Laravel 阻擋 SPAM 留言的奮鬥史[PHP 也有 Day] 垃圾留言守城記 - 用 Laravel 阻擋 SPAM 留言的奮鬥史
[PHP 也有 Day] 垃圾留言守城記 - 用 Laravel 阻擋 SPAM 留言的奮鬥史
 

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