Loading ...
brandonmount
Technology & Engineering
28
0
Try Now
Log In
Pricing
<p>Fundamentals of Azure Microsoft Azure Essentials Michael Collier Robin Shahan • Hundreds of titles available – Books, eBooks, and online resources from industry experts • Free U.S. shipping • eBooks in multiple formats – Read on your computer, tablet, mobile device, or e-reader • Print & eBook Best Value Packs • eBook Deal of the Week – Save up to 60% on featured titles • Newsletter and special offers – Be the first to hear about new releases, specials, and more • Register your book – Get additional benefits microsoftpressstore.com Visit us today at Get the latest news from Microsoft Press sent to your inbox. • New and upcoming books • Special offers • Free eBooks • How-to articles Sign up today at MicrosoftPressStore.com/Newsletters Hear about it first. Wait, there’s more... Find more great content and resources in the Microsoft Press Guided Tours app. The Microsoft Press Guided Tours app provides insightful tours by Microsoft Press authors of new and evolving Microsoft technologies. Download from Windows Store • Share text, code, illustrations, videos, and links with peers and friends • Create and manage highlights and notes • View resources and download code samples • Tag resources as favorites or to read later • Watch explanatory videos • Copy complete code listings and scripts Microsoft Press Free ebooks From technical overviews to drilldowns on special topics, get free ebooks from Microsoft Press at: www.microsoftvirtualacademy.com/ebooks Download your free ebooks in PDF, EPUB, and/or Mobi for Kindle formats. Look for other great resources at Microsoft Virtual Academy, where you can learn new skills and help advance your career with free Microsoft training delivered by experts. 1 PUBLISHED BY Microsoft Press A division of Microsoft Corporation One Microsoft Way Redmond, Washington 98052-6399 Copyright © 2015 Microsoft Corporation. All rights reserved. No part of the contents of this book may be reproduced or transmitted in any form or by any means without the written permission of the publisher. ISBN: 978-0-7356-9722-5 Microsoft Press books are available through booksellers and distributors worldwide. If you need support related to this book, email Microsoft Press Book Support at mspinput@microsoft.com. Please tell us what you think of this book at http://aka.ms/tellpress. This book is provided “as-is” and expresses the authors’ views and opinions. The views, opinions, and information expressed in this book, including URL and other Internet website references, may change without notice. Unless otherwise noted, the companies, organizations, products, domain names, e-mail addresses, logos, people, places, and events depicted in examples herein are fictitious. No association with any real company, organization, product, domain name, e-mail address, logo, person, place, or event is intended or should be inferred. Microsoft and the trademarks listed at http://www.microsoft.com on the “Trademarks” webpage are trademarks of the Microsoft group of companies. All other marks are property of their respective owners. Acquisitions, Developmental, and Project Editor: Devon Musgrave Editorial Production: nSight, Inc. Copyeditor: Teresa Horton Cover: Twist Creative 2 To my wife, Sonja, and son, Aidan; I could not have written this book without your immense support and patience. —Michael S. Collier I dedicate this book to my friend Carol Schultz, who passed away earlier this year. She always believed in me. —Robin E. Shahan 3 Table of Contents Foreword .................................................................................................................................................................. 11 Introduction ............................................................................................................................................................ 12 Who should read this ebook...................................................................................................................... 12 Assumptions ............................................................................................................................................... 12 This ebook might not be for you if… ...................................................................................................... 13 Organization of this ebook ......................................................................................................................... 13 Conventions and features in this ebook ............................................................................................... 14 System requirements..................................................................................................................................... 14 Acknowledgments .......................................................................................................................................... 15 Errata, updates, & support .......................................................................................................................... 16 Free ebooks from Microsoft Press ........................................................................................................... 16 We want to hear from you ......................................................................................................................... 16 Stay in touch ..................................................................................................................................................... 16 Chapter 1 Getting started with Azure .......................................................................................................... 17 What is Azure? ................................................................................................................................................. 17 Overview of cloud computing ............................................................................................................ 17 Comparison of on-premises versus Azure ............................................................................... 18 Cloud offering............................................................................................................................................ 19 SaaS: Software as a Service ............................................................................................................. 19 PaaS: Platform as a Service ............................................................................................................. 19 IaaS: Infrastructure as a Service .................................................................................................... 19 Azure services ............................................................................................................................................ 20 Introduction to portals ................................................................................................................................. 20 Azure Preview Portal ............................................................................................................................... 21 Blades and journeys .......................................................................................................................... 22 4 Customizing the Startboard .......................................................................................................... 27 Azure Management Portal ................................................................................................................... 28 Subscription management and billing ................................................................................................... 32 Available subscriptions ........................................................................................................................... 32 Share administrative privileges for your Azure subscription .................................................. 33 Add administrative privileges in the Azure Preview Portal ............................................... 34 Add a co-administrator in Azure Management Portal ....................................................... 38 Pricing calculator ...................................................................................................................................... 39 Billing ............................................................................................................................................................ 41 Chapter 2 Azure Websites and Azure Cloud Services ............................................................................ 46 Creating and configuring websites ......................................................................................................... 46 What is Azure Websites? ....................................................................................................................... 46 Creating a new website.......................................................................................................................... 47 Using the portal .................................................................................................................................. 47 Websites gallery .................................................................................................................................. 51 Configure and scale a website ...................................................................................................... 53 Configuration....................................................................................................................................... 53 Scaling .................................................................................................................................................... 59 Deploying and monitoring websites ...................................................................................................... 61 Options for creating websites ............................................................................................................. 61 Notepad or an HTML editor .......................................................................................................... 61 WebMatrix ............................................................................................................................................ 62 Visual Studio ........................................................................................................................................ 62 Publishing a website from Visual Studio ........................................................................................ 63 Monitoring a website ............................................................................................................................. 65 PaaS Cloud Services ....................................................................................................................................... 66 Creating a cloud service ........................................................................................................................ 66 5 Publishing a cloud service .................................................................................................................... 69 Scaling and monitoring a cloud service .......................................................................................... 72 SCALE options ............................................................................................................................................ 72 Monitoring .................................................................................................................................................. 74 Miscellaneous points ..................................................................................................................................... 77 Configuration in the portal .................................................................................................................. 77 Production and staging slots in the portal .................................................................................... 77 Worker roles ............................................................................................................................................... 77 Chapter 3 Azure Virtual Machines ................................................................................................................. 78 What is Azure Virtual Machines?.............................................................................................................. 78 VM status ..................................................................................................................................................... 79 IP address .................................................................................................................................................... 80 Billing............................................................................................................................................................. 80 Create and configure virtual machines .................................................................................................. 80 Create a virtual machine with the Azure Preview Portal .......................................................... 81 Connect to a virtual machine .............................................................................................................. 84 Configure disks ................................................................................................................................................ 84 Caching......................................................................................................................................................... 85 Attach a disk ............................................................................................................................................... 85 Formatting disks ....................................................................................................................................... 87 Disk performance ..................................................................................................................................... 89 Endpoints ..................................................................................................................................................... 89 Virtual machine management ................................................................................................................... 91 Availability set ............................................................................................................................................ 92 Service level agreement ......................................................................................................................... 93 Scalability ..................................................................................................................................................... 94 Image capture............................................................................................................................................ 97 6 Chapter 4 Azure Storage ................................................................................................................................ 101 Blob storage ................................................................................................................................................... 101 Azure Files (preview) .................................................................................................................................. 102 Table storage ................................................................................................................................................. 103 Queues ............................................................................................................................................................. 104 Redundancy ................................................................................................................................................... 106 Creating and managing storage ........................................................................................................... 107 Create a storage account ................................................................................................................... 107 Create a container and add blobs .................................................................................................. 112 Create a table and add records ....................................................................................................... 116 Chapter 5 Azure Virtual Networks .............................................................................................................. 119 What is a virtual network ......................................................................................................................... 119 Overview ................................................................................................................................................... 119 Definitions ................................................................................................................................................ 120 Virtual network address spaces ................................................................................................. 120 Subnets ................................................................................................................................................ 120 DNS servers........................................................................................................................................ 121 Creating a virtual network ....................................................................................................................... 121 Quick Create ............................................................................................................................................ 122 Custom Create ........................................................................................................................................ 122 Using a network configuration file ....................................................................................................... 125 Export the network configuration file ........................................................................................... 125 Import the network configuration file .......................................................................................... 126 What ifs ..................................................................................................................................................... 127 What if you add a network? ............................................................................................................. 127 What if you remove a network? ...................................................................................................... 127 What if you change a network? ...................................................................................................... 128 7 Cross-premises connection options ..................................................................................................... 129 Site-to-site connectivity ...................................................................................................................... 129 Point-to-site connectivity .................................................................................................................. 129 Comparing site-to-site and point-to-site connectivity .......................................................... 130 Private site-to-site connectivity (ExpressRoute) ........................................................................ 130 Point-to-site network ................................................................................................................................. 131 Overview of setup process ................................................................................................................. 131 Configuring point-to-site VPN ........................................................................................................ 132 Create a virtual network ............................................................................................................... 132 Deploy a virtual machine into the virtual network ............................................................ 133 Create the VPN gateway .............................................................................................................. 136 Create an authentication certificate for your virtual network ...................................... 137 Upload the self-signed root certificate .................................................................................. 140 Install the client certificate (.pfx) to authenticate the virtual network ...................... 140 Install the client VPN package ................................................................................................... 141 Connect to the virtual network through the VPN client ................................................. 141 Connect to the VM using the internal IP address .............................................................. 143 Test the VPN connection ............................................................................................................. 145 Chapter 6 Databases ........................................................................................................................................ 146 Azure SQL Database ................................................................................................................................... 146 Administration ........................................................................................................................................ 149 Firewall settings ............................................................................................................................... 149 Connect using SQL Server Management Studio ................................................................ 153 Billing.......................................................................................................................................................... 154 Business continuity ............................................................................................................................... 154 Database Copy ................................................................................................................................. 158 Import and Export .......................................................................................................................... 158 8 Standard Geo-Replication ........................................................................................................... 162 Active Geo-Replication ................................................................................................................. 162 Geo-Restore ...................................................................................................................................... 165 Service Level Agreement .............................................................................................................. 167 Applications connecting to Azure SQL Database ........................................................................... 168 SQL Server in Azure Virtual Machines ................................................................................................. 169 Billing.......................................................................................................................................................... 169 Virtual machine configuration ......................................................................................................... 170 Business continuity ............................................................................................................................... 170 Comparing Azure SQL Database with SQL Server in Azure Virtual Machines .................... 171 Database alternatives ................................................................................................................................. 173 MySQL ........................................................................................................................................................ 173 NoSQL options ....................................................................................................................................... 175 DocumentDB .................................................................................................................................... 175 Table storage .................................................................................................................................... 175 Chapter 7 Azure Active Directory................................................................................................................ 176 Overview of Azure Active Directory ..................................................................................................... 176 What is Azure Active Directory? ...................................................................................................... 176 Active Directory editions .................................................................................................................... 177 Creating a directory .................................................................................................................................... 178 Custom domains .................................................................................................................................... 180 Delete a directory .................................................................................................................................. 186 Users and groups ......................................................................................................................................... 186 Add users .................................................................................................................................................. 187 Add groups .............................................................................................................................................. 194 Multi-Factor Authentication ............................................................................................................. 196 Azure Multi-Factor Authentication .......................................................................................... 197 9 Multi-Factor Authentication for Azure administrators .................................................... 199 Application gallery ...................................................................................................................................... 201 Adding gallery applications .................................................................................................................... 201 Assigning users to applications ............................................................................................................. 204 MyApps ........................................................................................................................................................... 206 Chapter 8 Management Tools ...................................................................................................................... 208 Management tool overview .................................................................................................................... 208 Visual Studio 2013 and the Azure SDK ............................................................................................... 209 Install the Azure SDK............................................................................................................................ 210 Manage resources with Server Explorer ....................................................................................... 212 Create an Azure resource ................................................................................................................... 218 Windows PowerShell .................................................................................................................................. 219 Azure PowerShell cmdlet installation ............................................................................................ 220 Connecting to Azure ............................................................................................................................ 223 Connecting using a Microsoft account .................................................................................. 223 Connect using a management certificate ............................................................................. 224 Azure PowerShell modes .................................................................................................................... 226 Usage ................................................................................................................................................... 227 Cross-Platform Command-Line Interface .......................................................................................... 228 Installation ................................................................................................................................................ 228 Installing on Windows ................................................................................................................... 228 Installing on Linux ........................................................................................................................... 231 Connecting to Azure ............................................................................................................................ 232 Connect using a management certificate ............................................................................. 232 Connect using a work or school account .............................................................................. 233 Usage ................................................................................................................................................... 233 Chapter 9 Business Cases ................................................................................................................................ 236 10 Development and test scenarios ........................................................................................................... 236 Hybrid scenarios........................................................................................................................................... 238 Network connectivity ........................................................................................................................... 238 Internet connectivity ............................................................................................................................ 239 Application and infrastructure modernization and migration .................................................. 240 Azure Mobile Services................................................................................................................................ 241 About the Authors ............................................................................................................................................. 243 11 Foreword I’m thrilled to be able to share these Microsoft Azure Essentials ebooks with you. The power that Microsoft Azure gives you is thrilling but not unheard of from Microsoft. Many don’t realize that Microsoft has been building and managing datacenters for over 25 years. Today, the company’s cloud datacenters provide the core infrastructure and foundational technologies for its 200-plus online services, including Bing, MSN, Office 365, Xbox Live, Skype, OneDrive, and, of course, Microsoft Azure. The infrastructure is comprised of many hundreds of thousands of servers, content distribution networks, edge computing nodes, and fiber optic networks. Azure is built and managed by a team of experts working 24x7x365 to support services for millions of customers’ businesses and living and working all over the globe. Today, Azure is available in 141 countries, including China, and supports 10 languages and 19 currencies, all backed by Microsoft's $15 billion investment in global datacenter infrastructure. Azure is continuously investing in the latest infrastructure technologies, with a focus on high reliability, operational excellence, cost-effectiveness, environmental sustainability, and a trustworthy online experience for customers and partners worldwide. Microsoft Azure brings so many services to your fingertips in a reliable, secure, and environmentally sustainable way. You can do immense things with Azure, such as create a single VM with 32TB of storage driving more than 50,000 IOPS or utilize hundreds of thousands of CPU cores to solve your most difficult computational problems. Perhaps you need to turn workloads on and off, or perhaps your company is growing fast! Some companies have workloads with unpredictable bursting, while others know when they are about to receive an influx of traffic. You pay only for what you use, and Azure is designed to work with common cloud computing patterns. From Windows to Linux, SQL to NoSQL, Traffic Management to Virtual Networks, Cloud Services to Web Sites and beyond, we have so much to share with you in the coming months and years. I hope you enjoy this Microsoft Azure Essentials series from Microsoft Press. The first three ebooks cover fundamentals of Azure, Azure Automation, and Azure Machine Learning. And I hope you enjoy living and working with Microsoft Azure as much as we do. Scott Guthrie Executive Vice President Cloud and Enterprise group, Microsoft Corporation 12 Introduction Microsoft Azure is Microsoft's cloud computing platform, providing a wide variety of services you can use without purchasing and provisioning your own hardware. Azure enables the rapid development of solutions and provides the resources to accomplish tasks that may not be feasible in an on-premises environment. Azure's compute, storage, network, and application services allow you to focus on building great solutions without the need to worry about how the physical infrastructure is assembled. This ebook covers the fundamentals of Azure you need to start developing solutions right away. It concentrates on the features of the Azure platform that you are most likely to need to know rather than on every feature and service available on the platform. This ebook also provides several walkthroughs you can follow to learn how to create VMs and virtual networks, websites and storage accounts, and so on. In many cases, real-world tips are included to help you get the most out of your Azure experience. In addition to its coverage of core Azure services, the ebook discusses common tools useful in creating and managing Azure-based solutions. The ebook wraps up by providing details on a few common business scenarios where Azure can provide compelling and valuable solutions. Who should read this ebook This ebook focuses on providing essential information about the key services of Azure for developers and IT professionals who are new to cloud computing. Detailed, step-by-step demonstrations are included to help the reader understand how to get started with each of the key services. This material is useful not only for those who have no prior experience with Azure, but also for those who need a refresher and those who may be familiar with one area but not others. Each chapter is standalone; there is no requirement that you perform the hands-on demonstrations from previous chapters to understand any particular chapter. Assumptions We expect that you have at least a minimal understanding of virtualized environments and virtual machines. There are no specific skills required overall for this ebook, but having some knowledge of the topic of each chapter will help you gain a deeper understanding. For example, the chapter on virtual networks will make more sense if you have some understanding of networking, and the chapter on databases will be more useful if you understand what a database is and for what you might use one. Web development skills will provide a good background for understanding websites, and some understanding of identity will be helpful when studying the chapter on Active Directory. 13 This ebook might not be for you if… This ebook might not be for you if you are looking for an in-depth developer or architecture-focused discussion on a wide range of Azure features, or if you are looking for details on other public or private cloud platforms. Organization of this ebook This ebook explores six foundational features of the Microsoft Azure platform, along with insights on getting started with Azure, management tools, and common business scenarios. There are many services in the Azure platform that are not in the scope of this ebook, such as HDInsight (Azure's Hadoop service), Service Bus, and Azure Automation, to mention just a few. To learn about all of the services available in the Azure platform, start your journey at http://azure.microsoft.com. The topics explored in this book include: Getting started with Azure: Understand what cloud computing is, visit the management portals, and learn about billing. Websites and Cloud Services: Learn about Azure Websites, from deployment to monitoring, and gain an understanding of the web and worker roles used in Azure Cloud Services. Virtual Machines: Explore the basic features of Azure Virtual Machines, including how to create, configure, and manage them. Storage: Read about the basics of Azure Storage, including blobs, tables, queues, and file shares. Virtual Networks: Learn the basics of virtual networks, including how to create one, and why a virtual network might be necessary. This also covers site-to-site and point-to-site networking, as well as ExpressRoute. Databases: Explore two relational database options available in Azure: Azure SQL Database and SQL Server in Azure Virtual Machines. Azure Active Directory: Explore basic features of Azure AD, including creating a directory, users and groups, and using the application gallery. Management Tools: Explore three common tools for working with Azure: Visual Studio 2013 and the Azure SDK, Azure PowerShell cmdlets, and the Cross-Platform Command-Line Interface Business Scenarios: Explore four common scenarios for utilizing Azure features: development and test, hybrid, application and infrastructure modernization, and Azure Mobile Services. 14 Conventions and features in this ebook This ebook presents information using conventions designed to make the information readable and easy to follow: To create specific Azure resources, follow the numbered steps listing each action you must take to complete the exercise. There are currently two management portals for Azure: the Azure Management Portal at http://manage.windowsazure.com and the new Azure Preview Portal at http://portal.azure.com. It is necessary to move between both portals to explore all Azure features; unless otherwise specified, assume the Azure Preview Portal is used. Boxed elements with labels such as “Note” or "See Also" provide additional information. A plus sign (+) between two key names means that you must press those keys at the same time. For example, “Press Alt+Tab” means that you hold down the Alt key while you press Tab. A right angle bracket between two or more menu items (e.g., File Browse > Virtual Machines) means that you should select the first menu or menu item, then the next, and so on. System requirements For many of the examples in this ebook, you need only internet access and a browser (Internet Explorer 10 or higher) to access the Azure portals. Chapter 2, "Azure Websites and Azure Cloud Services," and Chapter 4, "Azure Storage," use Visual Studio to show some concepts used in developing applications for Azure. For these examples, you will need Visual Studio. The system requirements are: Windows 7 Service Pack 1, Windows 8, Windows 8.1, Windows Server 2008 R2 SP1, Windows Server 2012, or Windows Server 2012 R2 Computer that has a 1.6GHz or faster processor (2GHz recommended) 1 GB (32 Bit) or 2 GB (64 Bit) RAM (Add 512 MB if running in a virtual machine) 20 GB of available hard disk space 5400 RPM hard disk drive DirectX 9 capable video card running at 1024 x 768 or higher-resolution display 15 DVD-ROM drive (if installing Visual Studio from DVD) Internet connection After installing Visual Studio, you must also install the Azure Tools and SDK version 2.4 or higher. You can do this using the Web Platform Installer at http://azure.microsoft.com/en-us/downloads/, or, if preferred, you can manually install and configure the required components by following the instructions here: http://www.microsoft.com/en-us/download/details.aspx?id=43709 (SDK 2.4) or here: http://www.microsoft.com/en-us/download/details.aspx?id=44938 (SDK 2.5). Links to both version 2.4 and version 2.5 are provided here because version 2.5 has some breaking changes. If you have any other Azure solutions that use SDK 2.4, you should read the release notes for version 2.5 before upgrading: http://msdn.microsoft.com/en-us/library/azure/dn873976.aspx. The system requirements for the Azure SDK that are not included in the Visual Studio system requirements are as follows: IIS7 with ASP.NET and WCF HTTP Activation, Static Content, IIS Management Console, and HTTP Redirection Web Deployment Tools 2.1 or up Internet Explorer 10 or higher Depending on your Windows configuration, you might require Local Administrator rights to install or configure Visual Studio 2013. Acknowledgments The Azure community is made up of many people bound together by this one technology. We are honored to be members of this community, and we thank you for your help and support. We would like to especially thank Neil Mackenzie, Mike Martin, Gaurav Mantri, and Fabien Lavocat for their detailed technical reviews and feedback. All of them provided additional insights that greatly enhanced the overall quality and value of this ebook. Special thanks to the team at Microsoft Press for their unwavering support and guidance on this journey. It was a pleasure to work with our editor, Devon Musgrave. Devon provided immensely helpful advice from the days when this ebook was just an idea, all the way through to final copy. Most importantly, we are profoundly grateful to our families and friends for their love, encouragement, and patience. Many nights and weekends were sacrificed in the writing of this ebook. 16 Errata, updates, & support We’ve made every effort to ensure the accuracy of this ebook. You can access updates to this ebook— in the form of a list of submitted errata and their related corrections—at: http://aka.ms/FundAzure If you discover an error that is not already listed, please submit it to us at the same page. If you need additional support, email Microsoft Press Book Support at mspinput@microsoft.com. Please note that product support for Microsoft software and hardware is not offered through the previous addresses. For help with Microsoft software or hardware, go to http://support.microsoft.com. Free ebooks from Microsoft Press From technical overviews to in-depth information on special topics, the free ebooks from Microsoft Press cover a wide range of topics. These ebooks are available in PDF, EPUB, and Mobi for Kindle formats, ready for you to download at: http://aka.ms/mspressfree Check back often to see what is new! We want to hear from you At Microsoft Press, your satisfaction is our top priority, and your feedback our most valuable asset. Please tell us what you think of this book at: http://aka.ms/tellpress We know you’re busy, so we’ve kept it short with just a few questions. Your answers go directly to the editors at Microsoft Press. (No personal information will be requested.) Thanks in advance for your input! Stay in touch Let’s keep the conversation going! We’re on Twitter: http://twitter.com/MicrosoftPress 17 Chapter 1 Getting started with Azure The purpose of this book is to help you understand the fundamentals of Microsoft Azure so you can hit the ground running when you start using it. If you don’t have an Azure account, you should consider signing up for a free trial at azure.microsoft.com. If you have an MSDN subscription, you should activate the included Azure benefits and use the associated monthly credit. With an Azure account, you can work through the demos in this book and use them as hands-on labs. What is Azure? Overview of cloud computing With an on-premises datacenter you have to handle and manage everything, including purchasing and installing the hardware, virtualization, installing the operating system and any required applications, setting up the network (including running wires), configuring the firewall, and setting up storage for data. Having done all that, you then become responsible for maintaining it through its entire lifecycle. This imposes both significant capital cost for the hardware and significant operational cost for its maintenance. You do have the luxury of choosing whatever hardware and software you like—but you also have to pay for it, regardless of whether you are using it. Cloud computing provides a modern alternative to the traditional on-premises datacenter. A public cloud vendor is completely responsible for hardware purchase and maintenance and typically provides a wide variety of platform services that you can use. You lease whatever hardware and software services you require on an as-needed basis, thereby converting what had been a capital expense for hardware purchase into an operational expense. It also allows you to lease access to hardware and software resources that would be too expensive to purchase. Although you are limited to the hardware provided by the cloud vendor, you only have to pay for it when you use it. Cloud environments typically provide an online portal experience, making it easy for users to manage compute, storage, network, and application resources. For example, a user can use the portal to create a virtual machine (VM) configuration specifying the following: the compute node size (with regard to CPU, RAM, and local disks), the operating system, any predeployed software, the network configuration, and the location of the node. The user then can deploy the VM based on that configuration and within a few minutes access the deployed compute node. This quick deployment compares favorably with the previous mechanism for deploying a VM, which could take weeks just for the procurement cycle. In addition to the public cloud just described, there are private and hybrid clouds. In a private cloud, you create a cloud environment in your own datacenter and provide self-service access to compute 18 resources to users in your organization. This offers a simulation of a public cloud to your users, but you remain completely responsible for the purchase and maintenance of the hardware and software services you provide. A hybrid cloud integrates public and private clouds, allowing you to host workloads in the most appropriate location. For example, you could host a high-scale website in the public cloud and link it to a highly secure database hosted in your private cloud (or on-premises datacenter). Microsoft provides support for public, private, and hybrid clouds. Microsoft Azure, the focus of this book, is a public cloud. The Windows Azure Pack is a free add-on to Microsoft System Center that allows you to host many of the core Azure services in your own datacenter and provide a self-service portal experience to your users. You can integrate these into a hybrid cloud through the use of a virtual private network. Comparison of on-premises versus Azure With an on-premises infrastructure, you have complete control over the hardware and software that you deploy. Historically, this has led to hardware procurement decisions focused on scaling up; that is, purchasing a server with more cores to satisfy a performance need. With Azure, you can deploy only the hardware provided by Microsoft. This leads to a focus on scale-out through the deployment of additional compute nodes to satisfy a performance need. Although this has consequences for the design of an appropriate software architecture, there is now ample proof that the scale-out of commodity hardware is significantly more cost effective than scale-up through expensive hardware. Microsoft has deployed Azure datacenters in 19 regions across the globe from Melbourne to Amsterdam and Sao Paulo to Singapore. Additionally, Microsoft has an arrangement with Via21Net, making Azure available in two regions in China. Only the largest global enterprises are able to deploy datacenters in this manner, so using Azure makes it easy for enterprises of any size to gain the ability to deploy their services close to their customers, wherever they are in the world. And you can do that without ever leaving your office. For startups, Azure allows you to start with very low cost and scale rapidly as you gain customers. You would not face a large up-front capital investment to create a new VM—or even several new VMs. The use of cloud computing fits well with the scale fast, fail fast model of startup growth. Azure provides the flexibility to quickly set up development and test configurations. These can be scripted, giving you the ability to spin up a development or test environment, do the testing, and spin it back down. This keeps the cost very low, and maintenance is almost nonexistent. Another advantage of Azure is that you can try new versions of software without having to upgrade on-premises equipment. For example, if you want to see the ramifications of running your application against Microsoft SQL Server 2014 instead of Microsoft SQL Server 2012, you can create a SQL Server 2014 instance and run a copy of your services against the new database, all without having to allocate hardware and run wires. Or you can run on a VM with Microsoft Windows Server 2012 R2 instead of Microsoft Windows Server 2008 R2. 19 Cloud offering Cloud computing usually is classified in three categories: SaaS, PaaS, and IaaS. However, as the cloud matures, the distinction among these is being eroded. SaaS: Software as a Service SaaS is software that is centrally hosted and managed for the end customer. It usually is based on a multitenant architecture—a single version of the application is used for all customers. It can be scaled out to multiple instances to ensure the best performance in all locations. SaaS software typically is licensed through a monthly or annual subscription. Office 365 is a prototypical model of a SaaS offering. Subscribers pay a monthly or annual subscription fee, and they get Exchange as a Service (online and/or desktop Outlook), Storage as a Service (OneDrive), and the rest of the Microsoft Office Suite (online, the desktop version, or both). Subscribers are always provided the most recent version. This essentially allows you to have a Microsoft Exchange server without having to purchase a server and install and support Exchange—the Exchange server is managed for you, including software patches and updates. Compared to installing and upgrading Office every year, this is much less expensive and requires much less effort to keep updated. Other examples of SaaS include Microsoft One Drive, Dropbox, WordPress, and Amazon Kindle. PaaS: Platform as a Service With PaaS, you deploy your application into an application-hosting environment provided by the cloud service vendor. The developer provides the application, and the PaaS vendor provides the ability to deploy and run it. This frees up developers from infrastructure management, allowing them to focus strictly on development. Azure provides several PaaS compute offerings, including Azure Websites and Azure Cloud Services (web and worker roles). In either case, developers have multiple ways to deploy their application without knowing anything about the nuts and bolts supporting it. Developers don’t have to create VMs, use Remote Desktop (RDP) to log into each one, and install the application. They just hit a button (or pretty close to it), and the tools provided by Microsoft provision the VMs and then deploy and install the application on them. Scaling out an Azure compute service generally is as simple as incrementing the instance count, at which point Azure deploys new VMs and deploys the software on them. Azure even handles the load balancing automatically. To deploy a new version, you just republish, and Azure updates all of the VMs for you. IaaS: Infrastructure as a Service An IaaS cloud vendor runs and manages server farms running virtualization software, enabling you to create VMs that run on the vendor’s infrastructure. Depending on the vendor, you can create a VM running Windows or Linux and install anything you want on it. Azure also provides the ability to set up 20 virtual networks, load balancers, and storage and to use many other services that run on its infrastructure. You don’t have control over the hardware or virtualization software, but you do have control over most everything else. In fact, unlike PaaS, you are completely responsible for it. Azure Virtual Machines, the Azure IaaS offering, is a popular choice when migrating services to Azure because it enables the ―lift and shift‖ model for migration. You can configure a VM similar to the infrastructure currently running your services in your datacenter and migrate your software to the new VM. You might need to make tweaks, such as URLs to other services or storage, but many applications can be migrated in this manner. Azure services Azure includes many services in its cloud computing platform. Let’s talk about a few of them. Compute services This includes the Microsoft Azure Cloud Services (web and worker roles), Azure Virtual Machines, Azure Websites, and Azure Mobile Services. Data services This includes Microsoft Azure Storage (comprised of the Blob, Queue, Table, and Azure Files services), Azure SQL Database, and the Redis Cache. Application services This includes services that you can use to help build and operate your applications, such as the Azure Active Directory, Service Bus for connecting distributed systems, HDInsight for processing big data, the Azure Scheduler, and Azure Media Services. Network services This includes Azure features such as Virtual Networks, the Azure Content Delivery Network, and the Azure Traffic Manager. When migrating an application, it is worthwhile to have some understanding of the different services available in Azure, because you might be able to use them to simplify the migration of your application and improve its robustness. Introduction to portals An online management portal provides the easiest way to manage the resources you deploy into Azure. You can use this to create virtual networks, use cloud services, set up VMs, set up storage accounts, define websites, and so on, as listed in the previous section. There currently are two versions of the portal. The one in production is called the Azure Management Portal. The new one under construction is called the Azure Preview Portal. The two portals have a completely different look and feel, and you navigate each one differently. Not all features (or all parts of all features) have been migrated to the Azure Preview Portal yet. For example, virtual networks are not in the new portal yet; scaling an Azure website has some of the scaling options available in the new portal, but the old portal has all of them. Some features are only in the new portal, such as enabling and managing the Redis Cache. 21 The current portal is a single resource point of view: you can act on a single resource at a time. The Azure Preview Portal allows you to display and manage multiple resources with a Resource group. In the Preview Portal, you can define a Resource group by specifying a combination of services that work together, such as a website and the database used by that website. This allows you to manage the life cycle of all related assets by managing the Resource group. For more information about Resource groups, check out http://azure.microsoft.com/en-us/documentation/articles/azure-preview-portal-using-resource-groups /. Let’s take a look at the two portals and how you navigate through them. Azure Preview Portal The Azure Preview Portal is located at portal.microsoft.com. When you open this the first time, it will probably look similar to Figure 1-1. FIGURE 1-1 Azure Preview Portal. Down the left side, you have buttons for HOME, NOTIFICATIONS, BROWSE, ACTIVE, and BILLING. The central part of the screen with all the tiles is called the Startboard. Figure 1-1 shows the defaults, 22 which include helpful tiles such as the service health and the billing information for the selected subscription. You can customize your Startboard by accessing the Settings (click your account in the upper-right corner) or right-clicking the Startboard itself. Let’s talk about the buttons on the left side of the screen. HOME takes you back to this screen. NOTIFICATIONS will display alerts and notifications from the last 24 hours. This includes messages such as ―Your VM was created successfully.‖ BROWSE (Figure 1-2) allows you to filter and jump to some maintenance-related operations. For example, if you administer multiple subscriptions, you can filter so you only see one of them. You can jump to the Portal Settings or the Service Health webpage to see how things are going. Initially, your BROWSE blade will look like the one in Figure 1-2. After you start adding resources to your subscription, more items will show up on the BROWSE blade. Until then, or if the service you’re looking for is not displayed, you can browse to Everything by clicking the arrow in the upper-right corner of the screen (Figure 1-3). ACTIVE will show the active journeys that you have open. Journeys is covered in more detail in the next section of this chapter. BILLING will show your month-to-date billing information. Billing is discussed in the last section of this chapter. 23 FIGURE 1-2 Browse blade. 24 FIGURE 1-3 Browse Everything. Blades and journeys The subscription used in this example has three VMs deployed, a virtual network, and a website. Two of the VMs are in the virtual network; the other is not. If we browse to Virtual Machines (BROWSE > Everything > Virtual Machines), we will see three VMs (Figure 1-4). The window to the right that displays the VMs is called a blade. 25 FIGURE 1-4 Blade displaying VMs in the subscription. Next, if we click ContosoVM1, it scrolls to the right and opens another blade showing the properties for ContosoVM1 (Figure 1-5). 26 FIGURE 1-5 Blade to the right showing ContosoVM1. At this point, clicking Settings on this blade opens another blade the right and scrolls to it. This whole chain of selections is called a journey. At this point, if we go back to the leftmost menu and click BROWSE again, but this time select Virtual Networks, the journey we created to the VM Settings is hidden and it will show a blade for virtual networks instead. Then, if you select a virtual network, it will open a blade to the right showing information for that virtual network. This is another journey. 27 At this point, clicking ACTIVE will display both of those journeys (Figure 1-6), and you can click either one to go all the way back out to the rightmost blade without renavigating the entire way. FIGURE 1-6 Window that appears when clicking the ACTIVE button in the left column. To clear the list of active journeys, you can just hover over one of them and click the X when it appears in the upper-right corner of that row. Customizing the Startboard When you create new resources, an Add To Startboard check box is available (Figure 1-7). If you select this check box, it will pin a tile to the Startboard for the new resource that acts as a shortcut to that resource. FIGURE 1-7 Add a new resource to the Startboard. 28 If we create a new VM called testazurefiles and ask for it to be pinned to the Startboard, a new tile shows up as displayed in Figure 1-8. FIGURE 1-8 New resource pinned to the Startboard. You also can right-click the Startboard to put it in ―edit‖ mode. The options to edit the new tile are shown in Figure 1-9. FIGURE 1-9 Customize a new tile. Be careful when doing this, because if you unpin something you have to track it down and re-pin it. There is no undo option. Azure Management Portal The current production version of the Azure Management Portal is at manage.windowsazure.com. Let’s navigate to the same subscription used in the sample for the Azure Preview Portal. 29 After logging in, you can see all of the resources being used in that subscription (Figure 1-10). FIGURE 1-10 All items in the Azure Management Portal. 30 On the left side of the screen is a list of resource types (Figure 1-11). The displayed list is abbreviated for space; it actually includes all resource types. FIGURE 1-11 Left side menu listing all resource types. This list allows you to look at a specific resource type. For example, to look at your VMs, click VIRTUAL MACHINES. In our case, this brings up the list of VMs (Figure 1-12). FIGURE 1-12 The list of the resources that are virtual machines. Click ContosoVM1. This opens the Dashboard for that VM (Figure 1-13). 31 FIGURE 1-13 VM Dashboard. 32 The menu for navigating the various features of the VM is across the top: DASHBOARD, MONITOR, ENDPOINTS, and CONFIGURE. There is a summary for the performance of the VM and various general information such as the DNS NAME available. The menu options and Dashboard change depending on the type of resource, and the contents of the menu options also rely on the type of resource. For example, the CONFIGURE screen for a website has a .NET version, PHP version, Java version, and Python version, but these are not relevant to a VM, so they don’t show up on a VM’s Dashboard. Across the bottom is a menu, or command bar, that is context aware. It changes based on the resource being acted on. For example, for VMs it looks like Figure 1-14. FIGURE 1-14 Actions for the selected resource, which in this case is a VM. This menu also changes depending on the displayed</p>