ebook img

Zen of Cloud: Learning Cloud Computing by Examples on Windows Azure PDF

508 Pages·2014·78.007 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Zen of Cloud: Learning Cloud Computing by Examples on Windows Azure

Information Technology B Zen of Cloud This book explains the various concepts of Azure in a logical and clear manner. ... The a book consists of 69 complete, end-to-end examples that provide step-by-step guidance on i implementing typical cloud-based scenarios. The examples cover a wide range of application types and technologies with different levels of difficulties. —Pierre Masai, CIO of Toyota Motor Europe Learning Cloud Computing by Examples Zen of Cloud: Learning Cloud Computing by Examples on Microsoft Azure provides comprehensive coverage of the essential theories behind cloud computing and the Windows Azure on Microsoft Azure cloud platform. Sharing the author’s insights gained while working at Microsoft’s headquarters, Z it presents nearly 70 end-to-end examples with step-by-step guidance on implementing typical cloud-based scenarios. e The book is organized into four sections: cloud service fundamentals, cloud solutions, devices and n cloud, and system integration and project management. Each chapter contains detailed exercises that provide readers with the opportunity to develop valuable hands-on skills in cloud service development. o • Explains how to prepare for Microsoft Azure development and how to use Microsoft Azure Management Portal • Provides best practices for designing cloud-based applications f • Includes online access to updated examples and answers to the exercises C Supplying comprehensive coverage of the Windows Azure cloud platform, the book provides a practical understanding and powerful tips that readers can immediately apply to their own work— l making it ideal for cloud system developers, architects, and IT professionals. Organized into easily o digestible sessions, it is also ideal for use in instructional settings. u d K22024 ISBN: 978-1-4822-1580-9 90000 6000 Broken Sound Parkway, NW Suite 300, Boca Raton, FL 33487 Haishi Bai 711 Third Avenue New York, NY 10017 9 781482 215809 an informa business 2 Park Square, Milton Park www.crcpress.com Abingdon, Oxon OX14 4RN, UK w w w. c r c p r e s s . c o m K22024 cvr mech.indd 1 7/15/14 9:08 AM Zen of Cloud Learning Cloud Computing by Examples on Microsoft Azure Zen of Cloud Learning Cloud Computing by Examples on Microsoft Azure Haishi Bai CRC Press Taylor & Francis Group 6000 Broken Sound Parkway NW, Suite 300 Boca Raton, FL 33487-2742 © 2015 by Taylor & Francis Group, LLC CRC Press is an imprint of Taylor & Francis Group, an Informa business No claim to original U.S. Government works Version Date: 20140624 International Standard Book Number-13: 978-1-4822-1581-6 (eBook - PDF) This book contains information obtained from authentic and highly regarded sources. Reasonable efforts have been made to publish reliable data and information, but the author and publisher cannot assume responsibility for the valid- ity of all materials or the consequences of their use. The authors and publishers have attempted to trace the copyright holders of all material reproduced in this publication and apologize to copyright holders if permission to publish in this form has not been obtained. If any copyright material has not been acknowledged please write and let us know so we may rectify in any future reprint. Except as permitted under U.S. Copyright Law, no part of this book may be reprinted, reproduced, transmitted, or uti- lized in any form by any electronic, mechanical, or other means, now known or hereafter invented, including photocopy- ing, microfilming, and recording, or in any information storage or retrieval system, without written permission from the publishers. For permission to photocopy or use material electronically from this work, please access www.copyright.com (http:// www.copyright.com/) or contact the Copyright Clearance Center, Inc. (CCC), 222 Rosewood Drive, Danvers, MA 01923, 978-750-8400. CCC is a not-for-profit organization that provides licenses and registration for a variety of users. For organizations that have been granted a photocopy license by the CCC, a separate system of payment has been arranged. Trademark Notice: Product or corporate names may be trademarks or registered trademarks, and are used only for identification and explanation without intent to infringe. Visit the Taylor & Francis Web site at http://www.taylorandfrancis.com and the CRC Press Web site at http://www.crcpress.com Contents Foreword ...........................................................................................................................xiii SeCtion i CLoUD CoMPUtinG FUnDAMentALS 1 Overview of Cloud Computing ....................................................................................3 1.1 History ....................................................................................................................3 1.2 Essence of Cloud Computing ..................................................................................5 1.2.1 Elasticity .....................................................................................................6 1.2.1.1 On and Off Mode ......................................................................7 1.2.1.2 Rapid-Growth Mode ..................................................................8 1.2.2 Availability .................................................................................................8 1.2.2.1 Fault Domain .............................................................................9 1.2.2.2 Update Domain .........................................................................10 1.2.3 Scalability ..................................................................................................10 1.3 Microsoft Azure Overview .....................................................................................11 1.3.1 IaaS (Infrastructure as a Service) ...............................................................11 1.3.2 PaaS (Platform as a Service) ......................................................................12 1.3.3 SaaS (Software as a Service) .......................................................................13 1.3.4 Cost Calculation ........................................................................................15 1.4 Preparing the Development Environment for Microsoft Azure...............................16 1.4.1 Subscribe to Microsoft Azure .....................................................................16 1.4.2 Install Software Development Kit .............................................................16 1.5 Introduction of Microsoft Azure Management Portal .............................................16 1.5.1 Sign In .......................................................................................................17 1.5.2 Page Layout ...............................................................................................17 1.6 Summary ................................................................................................................19 2 Building Websites on the Cloud .................................................................................21 2.1 Microsoft Azure Websites .......................................................................................21 2.2 Website Deployment and Upgrade .........................................................................25 2.3 Integration with Source Control Systems...............................................................32 2.4 Scaling of Websites ................................................................................................37 v vi ◾ Contents 2.4.1 Vertical Scaling .........................................................................................37 2.4.2 Horizontal Scaling ....................................................................................39 2.4.3 Autoscaling ...............................................................................................39 2.5 Migrating Existing ASP.NET Websites .................................................................40 2.5.1 Azure Websites Runtime Environment .....................................................40 2.5.2 Data Storage ..............................................................................................41 2.5.3 Session States .............................................................................................41 2.6 Website Gallery ......................................................................................................41 2.7 Website Configuration...........................................................................................42 2.8 Website Diagnostics and Monitoring .....................................................................49 2.8.1 Website Diagnostics ..................................................................................49 2.8.2 Website Monitoring ...................................................................................52 2.8.3 Custom Domain Names ...........................................................................54 2.9 Summary ................................................................................................................55 3 Cloud Service Fundamentals ......................................................................................57 3.1 Microsoft Azure Cloud Services .............................................................................57 3.2 Cloud Services and Roles ........................................................................................61 3.2.1 Role ..........................................................................................................63 3.2.2 Cloud Service ...........................................................................................63 3.3 Basic Steps of Cloud Service Deployment ..............................................................64 3.4 Cloud Service Deployments and Upgrades ............................................................69 3.4.1 Incremental Updates (Update Domain Walk) ..........................................70 3.4.2 Simultaneous Updates ..............................................................................70 3.4.3 Multiple Deployment Environments ........................................................70 3.5 Instances and Load Balancing ................................................................................74 3.5.1 Instances ...................................................................................................75 3.5.2 Load Balancing ..........................................................................................76 3.6 Configuration File and Definition File ..................................................................79 3.6.1 Cloud Service Definition File (.csdef) .......................................................80 3.6.2 Cloud Service Configuration File (.cscfg) ..................................................81 3.7 Summary ...............................................................................................................84 4 Advanced Cloud Service .............................................................................................85 4.1 Endpoint Types ......................................................................................................85 4.1.1 Input Endpoint ..........................................................................................85 4.1.2 Internal Endpoint ......................................................................................85 4.1.3 InstanceInput Endpoint ............................................................................86 4.2 Worker Role ..........................................................................................................88 4.2.1 Worker Role Application Scenarios ...........................................................90 4.3 Inter-Role Communications ..................................................................................96 4.3.1 Options for Inter-Role Communication ...................................................96 4.4 Role Lifecycle ......................................................................................................100 4.4.1 Process of Deploying and Launching a Role Instance .............................100 4.4.2 Role Instance Statuses .............................................................................101 4.5 Startup Tasks ........................................................................................................102 Contents ◾ vii 4.5.1 Defining Startup Tasks ............................................................................102 4.5.2 Startup Task Properties ...........................................................................103 4.6 Diagnostics and Debug ........................................................................................109 4.6.1 Debugging Locally ..................................................................................109 4.6.2 Microsoft Azure Diagnostics ...................................................................109 4.6.3 IntelliTrace ..............................................................................................114 4.6.4 Monitoring Cloud Service .......................................................................119 4.7 Developer Community ........................................................................................123 4.8 Summary ..............................................................................................................125 5 Data Storage: Relational Database ...........................................................................127 5.1 Microsoft Azure Data Storage Solutions ..............................................................127 5.2 SQL Database Overview ......................................................................................129 5.2.1 Differences between an SQL Database and an SQL Server ......................129 5.3 SQL Database Management and Optimization ....................................................139 5.3.1 SQL Server Management Studio .............................................................139 5.3.2 Microsoft SQL Server Data Tools ............................................................144 5.3.3 Dynamic Management Views ..................................................................145 5.3.4 Query Optimization ................................................................................146 5.4 Data Sync and Migration .....................................................................................149 5.4.1 Data-Tier Application ..............................................................................149 5.4.2 Data Sync ................................................................................................152 5.5 Periodically Backup Your SQL Databases .............................................................157 5.6 Use MySQL Database ..........................................................................................159 5.6.1 Microsoft Azure Store ..............................................................................159 5.6.2 Purchasing MySQL Service .....................................................................160 5.6.3 Other Means to Run MySQL ..................................................................161 5.7 Summary ..............................................................................................................161 6 Data Storage: Storage Services .................................................................................163 6.1 Local Storage ........................................................................................................163 6.2 Overview of Microsoft Azure Storage Services .....................................................164 6.2.1 Microsoft Azure Storage Account ............................................................165 6.2.2 Provisioning a Windows Storage Account ...............................................167 6.2.3 Storage Account Access Keys ...................................................................168 6.3 Using BLOB Storage ............................................................................................170 6.3.1 BLOB Storage Overview .........................................................................170 6.3.2 Block BLOB and Page BLOB ..................................................................184 6.3.3 ETag and Snapshots .................................................................................187 6.3.4 REST API ...............................................................................................187 6.3.5 Shared Access Signature and Stored Access Policies .................................188 6.3.6 BLOB Update, Copy, and Lease ..............................................................190 6.3.7 Error Handling ........................................................................................190 6.4 Using Table Storage ..............................................................................................190 6.4.1 Table Storage Overview ...........................................................................190 6.4.2 Optimizing Data Partition ......................................................................191 viii ◾ Contents 6.4.3 Query Table Data ...................................................................................204 6.4.4 Other Operations ...................................................................................204 6.4.5 Batch Operations ....................................................................................205 6.4.6 Dynamic Table Entities ..........................................................................205 6.4.7 Shared Access Signatures ........................................................................206 6.5 Use Queue Storage ..............................................................................................206 6.5.1 Queue Storage Overview ........................................................................206 6.5.2 Programmatically Operate Queues .........................................................207 6.6 Monitor Storage Accounts ...................................................................................209 6.6.1 Configure Storage Service Monitoring.....................................................210 6.6.2 Cost of Service Monitoring ......................................................................211 6.7 Summary ..............................................................................................................211 7 Virtual Machines and Virtual Networks ..................................................................213 7.1 Microsoft Azure IaaS ............................................................................................213 7.2 Disk Images and Virtual Disks ............................................................................220 7.3 Virtual Machine Communications ......................................................................228 7.3.1 Virtual Machine Endpoints ....................................................................228 7.3.2 Virtual Machines under the Same Cloud Service ...................................230 7.4 Virtual Networks .................................................................................................234 7.4.1 Virtual Networks Overview ....................................................................235 7.4.2 Point-to-Site Virtual Network ................................................................237 7.4.3 Site-to-Site Virtual Network ...................................................................243 7.4.4 ExpressRoute ..........................................................................................243 7.5 Summary .............................................................................................................243 SeCtion ii CLoUD SoLUtionS 8 Cloud Solution Architecture ....................................................................................247 8.1 Client/Server ........................................................................................................247 8.1.1 Characteristics of Client/Server Architecture ...........................................247 8.1.1.1 Benefits ....................................................................................247 8.1.1.2 Shortcomings ...........................................................................249 8.1.2 Client/Server Architecture on Cloud .......................................................249 8.1.3 Multitenant System Design .....................................................................251 8.1.4 Migrating Client/Server Systems to Cloud ..............................................253 8.1.5 Client/Server Systems on Microsoft Azure ...............................................253 8.1.6 Mobile Clients ........................................................................................254 8.2 Browser/Server .....................................................................................................254 8.2.1 Characteristics of Browser/Server Architecture ........................................255 8.2.2 Browser/Server Architecture on Cloud.....................................................256 8.2.3 Difficulties of Adapting an Existing Single-Tenant Browser/Server Application for Multitenancy..................................................................264 8.2.4 Host Single-Tenant Systems on Microsoft Azure for Multiple Tenants ......267 8.3 n-Tiered Architecture ..........................................................................................269 8.3.1 Characteristics of n-Tiered Architecture .................................................269

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.