INTRODUCTION TO WINDOWS AZURE WEB SITES

I’ll make a quick observation on the past experiences of many web developers who tried to put a website on “the cloud” — it really wasn’t very good. Most of us didn’t know where to start, and even if you were very familiar with the steps, you needed a careful and calculated approach to configure and move your site into the sky. Missteps cost hours and there was little support or collective knowledge to help resolve issues.

Throw all that away. If you have been burned in a similar scenario, you can forget about those experiences; you are going to be pleasantly surprised with the offering of Windows Azure Web Sites. A point-and-click interface gives you the power to scale your site to support tens of thousands of users, with publishing simplified to the point of one-button deployment. You can wire different configurations and transformations into your website and automate the process of moving your application into staging and production environments with tools you likely already know.

The keen reader may have already noticed the spelling of “Web Sites” versus “website.” While “website” is the generally accepted spelling for the application that lives on the other end of a URL, the product name is officially “Windows Azure Web Sites.” Throughout the book, “Web Sites” or even WAWS refers to the product proper.

WHO THIS BOOK IS FOR

The content of this book is well suited to developers using the .NET Framework to build web applications, to folks who are building applications on PHP or Node.js, and to programmers and managers who are interested in learning more about how to deploy and manage websites in the cloud. This is not a book about learning to program or building a site, but about learning how to get your site onto the Internet using the features of Windows Azure Web Sites.

Maybe you’re a .NET developer but you want to learn more about alternative development platforms and where they fit in Azure. Or, perhaps you’re from a different technology stack and you want to equip yourself with information on Azure, and how you could use it in your context. Chapters 5 and 7 will be most relevant to you, exploring a PHP site from an open-source forum project and later using the Azure Management Portal to grow your site.

If you have general familiarity with Windows Azure and are already comfortable working in the Azure Management Portal, you might be most interested in using the first few chapters as a reference when required and jumping straight to Chapter 4, which introduces management of WAWS from the console. Chapters 7 and 8 discuss configuring, monitoring, and scaling your site, and walk you through a sample deployment.

WHAT THIS BOOK COVERS

This book provides a walk-through of the Windows Azure Web Sites features that matter to developers and explains how they can be leveraged, as illustrated by an accompanying project. Readers can expect to walk away with an understanding of the supported technologies, site deployment and management tools, and how to monitor and scale their application. Covered in the book and its accompanying materials are the following:

  • Creation, deployment, and scaling of applications
  • Supported project types and technologies
  • Source control integration and release management
  • A detailed walk-through of an application, including prepping it and moving it to the cloud using techniques and features discussed throughout the book

HOW THIS BOOK IS STRUCTURED

If you have built and deployed a website to any server, then you likely already know all the basics needed to build and deploy a website to the cloud. Windows Azure Web Sites has its own nuances and differences from what some would consider traditional deployment. This book is arranged in such a way that regardless of your background, if you are familiar with web development you should gain a better understanding of the process in the context of Windows Azure Web Sites.

The culmination of what you learn in the early chapters arrives in Chapter 8, where you will take a pre-built ASP.NET MVC application and prepare to move it to the cloud.

Chapter 1: Introduction to Windows Azure and Fundamental Concepts

Windows Azure Web Sites provide a very low-friction starting point for new and low-volume websites, as well as a clean way to scale up your application as its popularity and resource demands grow. You will work through several starting points to warm up and then take a sample application — something comparable to a real-world application that would be deployed to physical hardware — and see what it takes to bring it to the cloud and manage it while it’s there.

Chapter 2: Moving an Application to the Cloud

Working from a simple sample application you’ll be introduced to the bare essentials of moving an IIS-based deployment to the cloud. There are a number of tools that allow direct publishing, enabling you to selectively move files or publish your entire site; these are the ones that are most like the familiar “xcopy” deployment.

Chapter 3: Managing Deployments via Source Control

The websites you’re building are likely much more than single, static pages. Many developers work on teams with a central code repository, but even if they’re working alone most developers have adopted source control as part of their toolkit. In this chapter you will become familiar with source control deployments in the context of Windows Azure Web Sites and learn how deployments can be created from various source control servers, largely automated and initiated simply by checking your code in.

Chapter 4: Managing Windows Azure Web Sites from the Console

This chapter provides an overview of the command-line tools available for cross-platform management of your Windows Azure account. While not limited to Web Sites, the console enables you to perform most actions you can carry out in the portal from your local machine. Understanding the pieces of WAWS that can be scripted is critical to automating your build process and incorporating WAWS as part of a continuous deployment project.

Chapter 5: Working with Other Flavors of Windows Azure Web Sites

Not all websites need to be built on ASP.NET, and not all sites have to be built from scratch. Here you’ll be introduced to the alternative options for development languages and some of the kick-start apps developers can use as a base for their site. Specifically, you’ll have the opportunity to walk through creating, altering, and deploying a PHP site using tools native to the Azure developer.

Chapter 6: Using Peripheral Features with Windows Azure Web Sites

Building a website on Windows Azure Web Sites means that you can also easily leverage other assets you’ve built on Azure. In this chapter you use the Management Portal to link those resources to your website and learn how to share access to those resources with others.

Chapter 7: Scaling, Configuring, and Monitoring Your Site

As a site grows in popularity it often requires additional resources to accommodate the growth, and good business dictates that you maximize the resources you have to keep your expenses in check. Developers also have to consider branding and how users access a site. This chapter demonstrates how to use the Management Portal to monitor website growth, how to use custom domains, and finally how to scale when the time is right.

Chapter 8: Deploying and Configuring a Cloud Application

To close the book, you’ll explore a pre-built reference application, examining the key components of the application and how these pieces interact. You’ll learn to work with connection strings and application settings and deploy an application using GitHub.

WHAT YOU NEED TO USE THIS BOOK

All the software used in this book to build, deploy, and maintain your website is either free or free for trial use. Much of it can be downloaded from Microsoft’s various web properties.

The easiest way to get the tooling for the .NET projects is to visit http://asp.net/mvc and use the Web Platform Installer. You can also use the links in the Management Portal to get some of the software running locally. You’ll want to install the following:

  • Visual Studio 2012 — Web, Professional, or Ultimate trial versions are OK to work with in this book. Be sure to get the latest updates to VS and NuGet (you’ll be prompted when you run the IDE).
  • Azure SDK 2.0 — This updates tooling in VS and enables the latest features to manage your site remotely.
  • WebMatrix 3 — Completely Azure-enabled and tied to your subscription, this is an alternate development environment for those who don’t require the beefy install of Visual Studio 2012.

You’ll also get a chance to try out some online services and see how they integrate or can coexist with your development efforts. To do this, you should create an account with the following properties if you don’t already have one:

CONVENTIONS

To help you get the most from the text and keep track of what’s happening, we’ve used a number of conventions throughout the book.


NOTE
Notes, warnings, tips, hints, tricks, and asides to the current discussion are offset and placed in italics like this.

As for styles in the text:

  • We highlight new terms and important words when we introduce them.
  • We show keyboard strokes like this: Ctrl+A.
  • We show filenames, URLs, and code within the text like so: persistence.properties.

We present code in one of two ways:

We use a monofont type with no highlighting for most code examples.
We use bold to highlight code of particular importance.

SOURCE CODE

As you work through the examples in this book, you may choose either to type in all the code manually or to use the source code files that accompany the book. All the source code used in this book is available for download at http://www.wrox.com. If there are any files to be downloaded to work through a chapter, the filenames and/or project names will be noted in a list at the beginning of the chapter. Once at the site, simply locate the book’s title (either by using the Search box or by using one of the title lists) and click the Download Code link on the book’s detail page to obtain all the source code for the book.


NOTE
Because many books have similar titles, you may find it easiest to search by ISBN; this book’s ISBN is 978-1-118-67864-0 (ePDF) or 978-1-118-74979-1 (ePub).

Once you download the code, just decompress it with your favorite compression tool. Alternately, you can go to the main Wrox code download page at www.wrox.com/dynamic/books/download.aspx to see the code available for this book and all other Wrox books.

ERRATA

We make every effort to ensure that there are no errors in the text or in the code. However, no one is perfect, and mistakes do occur. If you find an error in one of our books, such as a spelling mistake or a faulty piece of code, we would be very grateful for your feedback. By sending in errata you may save another reader hours of frustration and at the same time you will be helping us provide even higher quality information.

To find the errata page for this book, go to http://www.wrox.com and locate the title using the Search box or one of the title lists. Then, on the book details page, click the Book Errata link. On this page you can view all errata that has been submitted for this book and posted by Wrox editors. A complete book list, including links to each book’s errata, is also available at www.wrox.com/misc-pages/booklist.shtml.

If you don’t spot “your” error on the Book Errata page, go to www.wrox.com/contact/techsupport.shtml and complete the form there to send us the error you have found. We’ll check the information and, if appropriate, post a message to the book’s errata page and fix the problem in subsequent editions of the book.

P2P.WROX.COM

For author and peer discussion, join the P2P forums at p2p.wrox.com. The forums are a web-based system for you to post messages relating to Wrox books and related technologies and interact with other readers and technology users. The forums offer a subscription feature to e-mail you topics of interest of your choosing when new posts are made to the forums. Wrox authors, editors, other industry experts, and your fellow readers are present on these forums.

At http://p2p.wrox.com you will find a number of different forums that will help you not only as you read this book, but also as you develop your own applications. To join the forums, just follow these steps:

1. Go to http://p2p.wrox.com and click the Register link.
2. Read the terms of use and click Agree.
3. Complete the required information to join as well as any optional information you wish to provide and click Submit.
4. You will receive an e-mail with information describing how to verify your account and complete the joining process.

NOTE
You can read messages in the forums without joining P2P but in order to post your own messages, you must join.

Once you join, you can post new messages and respond to messages other users post. You can read messages at any time on the web. If you would like to have new messages from a particular forum e-mailed to you, click the Subscribe to this Forum icon by the forum name in the forum listing.

For more information about how to use the Wrox P2P, be sure to read the P2P FAQs for answers to questions about how the forum software works as well as many common questions specific to P2P and Wrox books. To read the FAQs, click the FAQ link on any P2P page.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset