1 / 27

開放源碼技術如何運用 Windows Azure 平台

開放源碼技術如何運用 Windows Azure 平台. Eric ShangKuan ( 上官林傑 ) Technical Evangelist Microsoft Facebook: @ EricSkript Twitter: @ ericsk. 大綱. 跨平台命令列工具:使用、整合及擴充 使用網站服務 使用儲存體服務 管理 Windows Azure 其它未提及的服務. 跨平台命令列工具. 支援 Windows 、 Mac 、 Linux. 使用命令列執行 Windows Azure 操作 ( 如 : 建立網站、擴充虛擬機器資源等 )

rae-garza
Télécharger la présentation

開放源碼技術如何運用 Windows Azure 平台

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 開放源碼技術如何運用 Windows Azure 平台 Eric ShangKuan (上官林傑) Technical Evangelist Microsoft Facebook: @EricSkript Twitter: @ericsk

  2. 大綱 跨平台命令列工具:使用、整合及擴充 使用網站服務 使用儲存體服務 管理 Windows Azure 其它未提及的服務

  3. 跨平台命令列工具

  4. 支援 Windows、Mac、Linux 使用命令列執行 Windows Azure 操作 (如: 建立網站、擴充虛擬機器資源等) 可結合其它 script 進行操作 命令列工具以 node.js 寫成,相依:Azure SDK for Node.js 使用教學: http://www.windowsazure.com/en-us/manage/linux/how-to-guides/command-line-tools/ 原始碼可以參考:https://github.com/WindowsAzure/azure-sdk-tools-xplathttps://github.com/WindowsAzure/azure-sdk-for-node

  5. 使用命令列建立 Website # 先下載帳號設定檔 $ azure account download # 此時會開瀏覽器登入 Windows Azure 下載 publisher settings 檔案 $ azure account import <PublisherSettings檔案> ... # 建立一個放在東亞的網站, 可以交談式操作也可以直接用參數下 # 以下指令會建立一個 website, 用git部署, $ azure site create azuredaydemo --git --location "East Asia" ... ... help: Please provide the username for Git deployment. Publishing username: ericsk ...

  6. Windows Azure 命令列工具 (Mac OSX)

  7. 自訂或擴充命令列工具 修改/usr/local/azure (或安裝路徑) 下的相關檔案 從github下載需搭配azure-sdk-for-node以及azure-sdk-tools-xplat這兩個專案 修改原則: • 命令列選項、操作邏輯是修改azure-sdk-tools-xplat • 與 Windows Azure 溝通或是 REST API 的操作則是修改azure-sdk-for-node的部份

  8. Windows Azure 網站服務

  9. 立刻上線的網站服務 支援 ASP.NET、PHP、Node.js以及 Python 所寫成的網站應用程式 • ASP.NET 3.5, 4.5 • PHP 5.3, 5.4 • Node.js使用iisnode來運作, 支援 0.6.17, 0.6.20 或 0.8.4 • Python 則透過 Python 2.7 以及wfastcgi.py 可透過 Web Deploy、FTP、Dropbox、TFS、Git、Mercurial 等方式部署網站 有免費、共享、保留模式 支援 auto-scale 以應付需求

  10. 使用版本控制部署網站 可以切換各個 Repositories 作上線

  11. 使用 Git部署 PHP 網站到 Windows Azure 網站服務

  12. Windows Azure 虛擬機器服務

  13. Windows Azure 虛擬機器服務設定

  14. Windows Azure 儲存體服務

  15. Windows Azure Storage 提供Blob storage service, Table Service (nosql), 以及 Queue service 提供權限管理 提供 REST API 存取 提供地理複寫 (geo-replication) 以提升檔案可用度

  16. Blob Storage 結構

  17. 範例:上傳檔案至 Windows Azure Blob Storage (PHP) <?php # 按照說明安裝 Windows Azure SDK for PHP require_once'vendor/autoload.php'; useWindowsAzure\Common\ServicesBuilder; useWindowsAzure\Blob\Models\CreateBlobOptions; useWindowsAzure\Common\ServiceException; # 建立 blob service instance 進行操作 $blobRestProxy=ServicesBuilder::getInstance()->createBlobService(<connection string>); # 讀取上傳的檔案 $file=fopen($_FILES['file']['tmp_name’], 'r'); $blobName=$_FILES['file']['name']; # 設定 blob storage 的屬性 $createBlobOptions=newCreateBlobOptions(); $createBlobOptions->setBlobContentType('image/jpeg'); # 上傳檔案 $blobRestProxy->createBlockBlob(<container name>, $blobName, $file, $createBlobOptions);

  18. 使用 Windows Azure SDK for PHP 來存取 Windows Azure 儲存服務的檔案

  19. Windows Azure Service Bus

  20. Windows Azure Service Bus 總覽 Messaging Queuing Pub/Sub Reliable Transfer Notification Multiplatform Easily Scale out Connectivity Service Relay Protocol Tunnel Eventing Integration Routing Coordination Transformation Svc Management Naming, Discovery Monitoring • Content-based routing, document transformation, and process coordination. • Reliable, transaction-aware cloud messaging infrastructure for business apps. • Push notifications to large number of mobile devices. • Rich options for interconnecting apps across network boundaries • Consistent management surface and service observation capabilities ?

  21. 跨應用程式類型、雲端或機房 也可使用 AMQP 1.0 協定傳輸

  22. R R 各種通訊方式 R S S R Topic Sub R Queue Sub S R Queue Sub R R R

  23. 使用 Windows Azure SDK 處理訊息佇列的傳遞 (PHP & Python)

  24. 還有什麼沒提到的服務? Windows Azure Media Services Windows Azure Mobile Services Windows Azure Notification Hubs Windows Azure HDInsight (Hadoop) Windows Azure Service Management API

  25. 回想一下 Windows Azure 是一大堆雲端服務的集合 很多服務都有提供 REST API 來操作 先找找http://github.com/WindowsAzure看看有沒有工具或 SDK

  26. http://www.windowsazure.com/zh-tw/

More Related