Contents. Chapter 2: Getting Your Environment Ready for Office 365 Your Office 365 Cloud Environment Registering for Office 365 (Trial) Adding Users

Size: px
Start display at page:

Download "Contents. Chapter 2: Getting Your Environment Ready for Office 365 Your Office 365 Cloud Environment Registering for Office 365 (Trial) Adding Users"

Transcription

1

2 Contents Part I: An Introduction to Microsoft s Cloud Chapter 1: Welcome to the Cloud An Overview of the Cloud Why Use the Cloud Now? Understanding the Cloud Approach to Services Deciding to Move into the Cloud Windows Azure Platform Web Role Worker Role VM Role AppFabric Access Control Content Delivery Network (CDN) Caching Storage SQL Azure Windows Azure Appliance Windows Azure Marketplace Developer Story Office 365 SharePoint Online Exchange Online Lync Online Office Professional Plus and Office Web Apps Developer Story Chapter 2: Getting Your Environment Ready for Office 365 Your Office 365 Cloud Environment Registering for Office 365 (Trial) Adding Users Your Office 365 Development Environment 2

3 Using Virtualization for Your Development Environment Using Microsoft Trial Virtual Machines Using a Physical Machine for Your Development Creating an Office 365 Development Environment System Requirements Step 1: Installing Mandatory Software Step 2: Installing Service-Specific Software Step 3: Finalizing Installation Your First Office 365 Application Your First SharePoint Online Solution Your First Exchange Online Application Your First Lync Online Application Office 365 Development Challenges Office 365 Developer Resources Quick Start Office 365 Development Office 365 Community Office 365 Marketplace Part II: Office 365 Chapter 3: Office 365 Identity Services Understanding Identity Understanding Identity in Office 365 Establishing Identity Using Only Office 365 Identities Using Office 365 with On-Premises Active Directory Role-Based Administration Chapter 4: Introducing SharePoint Online SharePoint Online 101 SharePoint Online A Brief Technical Overview Deployment Options Programmable Scope SharePoint Online Versus SharePoint On-premises Licensing 3

4 Features and Functionality Cost Availability IT Professional Requirements Administrative Requirements Developer Requirements Developing for SharePoint Online Capabilities Tooling Part III: Developing Office 365 Chapter 5: SharePoint Online Development SharePoint Online Overview Developing in the Cloud Deploying and Debugging Your Solutions Example Cloud Scenarios Office 365 Overview Differences Between SharePoint On-Premises and Online What s in SharePoint Online in Office 365? What About Hybrid Solutions? Writing SharePoint Online Applications Identity and Authentication in Office 365 Developing for SharePoint Online Calling the Client Object Model List, View, and Event Enhancements List Enhancements View Enhancements Events Enhancements The Ribbon Status Bar and Notification Area Working with Dialogs Calling SharePoint Web Services Overview of Data Technologies SharePoint LINQ Support 4

5 Managed Client OM jquery and SharePoint Sandboxed Solutions Types of Solutions You Can Build Executing Code in the Sandbox Building Declarative Workflows SharePoint Designer Workflow Designer Building Workflow Actions in the Sandbox Building InfoPath Forms Using Access Services Connecting BCS to Windows Azure Creating the WCF Service Chapter 6: Exchange Online Development Introducing Exchange Online in Office 365 Exchange On-Premises Versus Exchange Online Introducing the Exchange Web Services Managed API Administering Exchange Online Using PowerShell Building Applications for Exchange Online The ExchangeService Object Working with the Autodiscover Service Working with Mailbox Items Working with Calendar Items Impersonating Other Users Working with Conversations Working with Streaming Notifications Chapter 7: Lync Online Development Introducing Lync Online in Office 365 Lync On-Premises Versus Lync Online Introducing the Lync 2010 SDK Developing Applications for Lync Online Working with the Lync Controls 5

6 Working with Conversations Starting Conversations Using Automation Working with Extensibility Applications Part IV: Working with Azure Chapter 8: Setting Up Azure Getting Windows Azure Registering for a Windows Azure Account A Tour of the Azure Portal Managing the Windows Azure Environment Hosted Services Storage Accounts Content Delivery Network A Tour of the Customer Portal Understanding Azure Roles Web Role Worker Role VM Role Getting Your Development Environment Ready System Requirements What Language Should You Choose? Getting the Developer Tools Windows Azure SDK Windows Azure SDK Tools Windows Azure Tools for Visual Studio Developing a Windows Azure Application Starting with Hello World Using Azure Table Storage Configuring Your Application Service Definition Service Configuration Using the Configuration Dialogs Deploying Your Applications Packaging and Uploading Deploying from Visual Studio 6

7 Deploying from Staging to Production Handling Changes Programmatically Controlling Your Service Using the Services Runtime Understanding the Service Management API Chapter 9: Identity in Azure Identity in the Cloud Understanding Federated Identity Understanding Claims Windows Identity Foundation Overview Working with Windows Identity Foundation Creating a Claims-Aware Website Creating a Claims-Aware Web Service Deploying and Troubleshooting Getting WIF to Work on Windows Azure Diagnosing Issues Chapter 10: Leveraging Blob Storage Understanding Blobs and Blob Storage What Is Azure Storage? Understanding the Blob Hierarchy Programming Blob Storage Creating a Storage Account Overview of the Rest APIs Creating the Authorization Header Working with Containers Creating a Container Listing Containers Deleting a Container Working with Blobs Creating Blobs Retrieving Blobs Copying Blobs 7

8 Deleting Blobs Managing Permissions Part V: Programming Azure Chapter 11: SQL Azure SQL Azure Overview The Difference Between SQL Server and SQL Azure Getting Started with Your First SQL Azure Database Programming Databases Using SQL Server Management Studio Working with Logins and Users Creating Tables Creating Indexes Accessing SQL Azure from Applications Supported Client Libraries Accessing SQL Azure from Azure-Hosted Applications Accessing SQL Azure from On-Premises Applications Working with Transactions Troubleshooting Working with Firewalls Troubleshooting Connection Loss Reducing Latency Calculating Usage Additional Resources Chapter 12: An Azure Datamarket Overview What Is Windows Azure Datamarket? Working with Datamarket Working with the Service Explorer Managing Your Account Programming Datamarket Datamarket Concepts Building a Fixed Query Datamarket Application Building a Flexible Query Datamarket Application 8

9 Chapter 13: Service Bus What Is Service Bus? Understanding Service Bus Brokered Messaging Understanding Service Bus Relayed Messaging Other Features Programming Service Bus Brokered Messaging Understanding Prerequisites Building a Managed Queue Client Programming Topics and Subscriptions Building a REST Client Advanced Features Choosing Between Managed and REST Service Bus Clients Best Practices Comparing Service Bus Brokered Messaging to Azure Queues Service Bus Billing and Quotas Other Resources Chapter 14: AppFabric: Access Control Service What Is the Access Control Service? Access Control Service Architecture Access Control Service Fundamentals Getting Started with the Access Control Service Creating a Service Namespace Securing a Web Application Configuring Additional Identity Providers Customizing the Access Control Service Enhancing the Login Experience Working with Service Identities Federating from a Local Network with ADFS 2.0 Modifying the Token with Rule Groups Chapter 15: Azure Connect 9

10 What Is Azure Connect? Windows Azure Connect Versus Service Bus How the Azure Service Bus Works How Azure Connect Works Which Technology Should You Choose? Windows Azure Connect Fundamentals Network Policy Model The Azure Role Architecture Azure Connect Client Agent Setting Up Windows Azure Connect System Requirements Requesting Access to the Azure Connect CTP Enabling and Configuring Azure Connect for Azure Roles Enabling and Configuring Azure Connect for a VM Role Enabling and Configuring Your Local Machines Configure Your Network Connectivity Policy Testing Connectivity to SQL Server Troubleshooting Tips Building a Domain-Joined Configuration Troubleshooting Windows Azure Connect Chapter 16: Azure Diagnostics and Debugging What Is Windows Azure Diagnostics? Local Versus Cloud Debugging Using Intellitrace Using Profiling Using Windows Azure Diagnostics Configuring Azure Diagnostics Adding Tracing Using Performance Monitors Viewing Your Logs Windows Azure MMC 10

11 Chapter 17: When to Use Azure Versus Office 365 Which Service is More Flexible? How Does Each Service Handle Identity Federation? What Productivity Tools Does Each Offer? How Does Each Handle Cross-Platform Support How Do Service-Level Agreements Work? What Development Tools Do Azure and Office 365 Support? Comparison of Azure and Office 365 Introduction 11

12 Part I An Introduction to Microsoft s Cloud Chapter 1: Welcome to the Cloud Chapter 2: Getting Your Environment Ready for Office

13 Chapter 1 Welcome to the Cloud What s in this Chapter Learning the various approaches for cloud computing Learning about factors that impact moving to the cloud Understanding the Microsoft Azure Platform Understanding the Office 365 offering This chapter helps you gain a better understanding of Microsoft s two primary cloud technologies Office 365 and Microsoft Azure. You also learn about various approaches towards cloud computing and how Microsoft aligns its strategy with these approaches. Toward the end, this chapter touches on the various challenges and risks that are associated with cloud computing in general. An Overview of the Cloud The word cloud, without any doubt, is one of the most ambiguous words out there in the information technology industry today. You ask ten people about how they define the cloud and you will get ten different replies what constitutes the cloud is rather complex question. However, there is one common factor that most replies share: Cloud is anything that can be offered as a service for which you don t need to bother about how it s implemented and maintained. Also, it s generally agreed that to utilize the cloud you must have Internet access, without which the concept of cloud does not exist. For the purpose of this book, cloud computing refers to a varied range of scalable services that are available to you on-demand. In order to utilize these services, you need an Internet connection, preferably one with higher bandwidth and low latency. Vendors like Microsoft, IBM, Oracle, and others provide various cloud-based services for which businesses pay as they consume the services. The concept of service offerings in the Internet world is nothing new. Take, for example, well known providers (such as AOL, Yahoo, and Microsoft). They offer free services (like POP, IMAP, and so on) as well as other services (like forwarding and advance spam filters), and additional storage at extra cost. This means consumers are intrinsically comfortable these days with the dynamics behind this service model. What is missing, however, is a detailed view of various approaches that most commercial vendors follow when they offer their cloud services. Later in this chapter you learn more about these approaches. Why Use the Cloud Now? 13

14 You may be wondering why the cloud has gained so much attention in recent years. Perhaps the biggest factor is that it offloads the cost of hardware and software ownership to vendors and allows you to use the cost savings to grow your business. Because information technology is mainly an enabler, cloud carries serious weight as a proposition for many businesses. If you find it difficult to keep up with the hardware and software updates, moving to the cloud makes perfect sense you avoid upgrades and let someone else handle that work for you. Another motivation makes the cloud more relevant now than ever before the low barrier to entry. As more and more Internet-based businesses start up and grow at a greater pace, their growth demands a working model where businesses can pay and expand as they grow rather than making investments up front for capacity that they may not need. For medium and large businesses cloud services offer even more varied solutions. For example, businesses can use cloud services mainly for SDLC and QA purposes and still keep their production environment on-premises. Conversely, if high availability and fault tolerance is desired, cloud services provide an excellent way to mitigate risks in the case of a disaster. Figure 1-1 illustrates these concepts. Figure 1-1 Understanding the Cloud Approach to Services Today, there is a wide spectrum of services available in the cloud, including messaging 14

15 solutions, collaborative solutions, identity management solutions, storage solutions, customer relationship management, and many more. Major vendors have also released cloud services based on their widely used on-premises software products. For example, Microsoft has released Office 365, which provides an online version of SharePoint Server, Exchange Server, and Lync Server. Microsoft also provides the Windows Azure platform, which makes the Windows Server operating system and other features available as services. How Pixar Produced Toy Story 3 in 3D in the cloud When Pixar produced Toy Story 3 in 3D, it faced a real computation challenge. Toy Story 3 is a three-hour movie with approximately 290,000 frames (for 3D) with every frame taking roughly eight hours to completely render. Even with some of the fastest servers in the market it was a real computational challenge for Pixar to process the movie s visual effects within a reasonable time frame and to keep the cost minimal. This was where cloud computing perfectly fit Pixar s needs and rescued the project. Pixar chose the Windows Azure Platform to run the rendering software in the cloud, which allows the user to easily increase and decrease the number of servers required for rendering. In fact, Pixar went a step further and offered its rending software as a service to smaller studios that would otherwise have been unable to afford the hardware and software required to render visual effects. Notice how the Windows operating system (which the Azure Platform offers) and Microsoft Office server and client products (which Office 365 offers) are fundamentally different. An operating system provides a core set of functionality (hence the term platform) and what actually sits on top of it can be practically anything from an e-commerce website to complex video processing software. However, products such as Microsoft Exchange, which is a messaging solution, provide a well-defined set of features that target specific needs. This leads to an important observation: The number of ways and degrees to which a service is consumed and utilized can vary broadly. To address this in the world of cloud computing there are three different approaches to cloud-based services: Infrastructure as a Service (IaaS) Platform as a Service (PaaS) Software as a Service (SaaS) Infrastructure as a Service (IaaS) With Infrastructure as a Service (IaaS), you can basically outsource typical elements of infrastructure like virtualization, storage, networking, load balancers and so on, to a vendor of choice. The vendor offering IaaS bills you for the infrastructure services usage as per its service level agreement (SLA). One of the biggest benefits of IaaS is that it provides granular control, in which you can choose the core components for your infrastructure. With the launch of the VM Role on Azure, Microsoft has entered into the IaaS space along with vendors such as Amazon EC2, GoGrid, and OpSource, which already are key players in the IaaS market. For more information on the Azure 15

16 VM Role, visit Platform as a Service (PaaS) Platform as a Service (PasS) provides a core platform from which custom applications can deploy. With PaaS, you don t have to work with infrastructure level elements and low level configuration of networking, security, and load balancers; all this is done for you by the vendor. The vendor provides you with a fully functional operating system with major platform software. For example, the Microsoft Azure platform provides support for the latest version of the.net framework. This type of service offering means you can focus on deploying your custom applications on the platform and can easily configure your applications to scale up or down as demands change. One of the key advantages of PaaS is that you don t have to worry about performing operating system or application platform updates (for example, service packs) and hardware upgrades. The vendor regularly patches your operating system, whatever platform features are being offered (such as the core.net platform or SQL database engine) and updates hardware on demand to meet your needs. Microsoft offers the Azure platform as a PaaS because it supports various types of Worker Roles and different types of applications. For example, you can run web applications with the Web Role, as well as host middle tier applications, such as Workflow, in the Worker Role. Similarly, SQL Azure provides Microsoft s core relational database engine as a platform service. For more information about the Windows Azure Platform, visit Software as a Service (SaaS) With Software as a Service (SaaS), the vendor manages everything from infrastructure, including load balancers and firewalls, to platforms, such as operating systems and virtual runtime environments like.net and Java, all the way up to a complete line of business applications and services, such as or a Customer Relationship Management product. SaaS provides you with fully provisioned and finished services with a well-defined feature set, which you can potentially later customize to a certain degree. Vendors usually provide browser-based interfaces so users can easily access and customize these services. APIs are also usually made available for developers. Microsoft Office 365 also offers these types of services, which currently include SharePoint Online, Exchange Online, Lync Online, and Office Professional Plus. Most of these online services have subset of the features of their onpremises counterparts. For more detailed information on various services and plans for Office 365 visit Deciding to Move into the Cloud The cloud is neither a panacea nor a silver bullet that magically solves your business IT problems. So how easy it is to move to and/or embrace the cloud? The answer is it 16

17 depends. It s clear that the cloud has major benefits but every organization should look at other factors to determine if the cloud is the way to go. The advantages of cost savings and on-demand scalability are obvious temptations to move to the cloud, but an organization should also consider the disadvantages of the cloud, such as poor network connectivity issues and lack of global Information Protection laws. Although it s impossible to cover every aspect that goes into the process of deciding whether to move to the cloud, the following list points out some key items you need to consider: Are network connectivity issues tolerable? This involves such problems as poor bandwidth and low latency. Will moving to the cloud impact your company s organizational IP (information protection) policies? Not every country/region follows the same practices and policies; the information stored in the cloud (stored at the vendors data center) may be subject to government audits or other policies. In addition, if the cloud provider hosts your data in datacenters outside of your country, you may run afoul of legislation. What if the service becomes unavailable? How will this impact overall business productivity? How will you handle information leaks? You need an action plan in case critical information is intentionally/accidentally leaked from the cloud. Leaked information can, for instance, include addresses and your company s financial forecast. How will moving to the cloud impact your processes, policies, and procedures? The vendor s Service Level Agreement must always fully align with your organization s operational needs and legal policies. Windows Azure Platform Microsoft first revealed the Windows Azure Platform to the attendees of the Microsoft Developers Conference (PDC) in At the same conference, Microsoft released a Community Technology Preview (CTP) version of Windows Azure, meant only for testing and early feedback purposes. At that time, all Windows Azure services were offered free of charge. At the 2009 PDC, Microsoft announced that it was transitioning Azure from the CTP stage to a major release for businesses. Initially, it released a pricing model, SLA details, and a mandatory signup process for new Windows Azure Platform customers, but it waived the fees for the month of January, Starting in February 2010, Microsoft released a version of the Windows Azure Platform that charged customers for their usage per its agreement. Since then, Microsoft has occasionally added to and updated various sets of the Azure Platform components as well as the pricing. These updates primarily keep up with technological changes occurring in the world of cloud computing. This book covers the Windows Azure Platform in detail. Specific chapters are dedicated to individual components of the platform. The following is a list of those 17

18 chapters with a brief description of what is covered. Chapter 9, Identity in Azure : Describes how the identity system works in Azure. Walkthroughs are provided on how to develop, test, and deploy a service project using WIF as well as how to build a local custom STS. Chapter 10, Leveraging Blob Storage : Provides an understanding of Azure BLOB storage. It also demonstrates how to programmatically access BLOBs using the REST API, setting permissions on BLOBs, copying and downloading BLOBs, and optimizing BLOB storage. Chapter 11, SQL Azure : Discusses SQL Azure service and how it works. This chapter provides a walkthrough on how to create and work with the SQL Azure service, as well as on how to manage users and logins. This chapter also has sections on SQL Azure troubleshooting, which covers firewalls, sessions, transactions, latency, and so on. Chapter 12, Azure Datamarket Overview : Provides an overview of the Azure Datamarket and how to sign up for it and register to get an account key. A walkthrough demonstrates various programming techniques that you can use to work with and access Datamarket data. Chapter 13: AppFabric: Service Bus : In this chapter, you dive into the concept of a Service Bus. The chapter describes the Service Bus architecture fundamentals and includes hands-on exercises that cover various programming techniques, including programming relays and queues. Chapter 14, AppFabric: Access Control Services : Provides an understanding of the Access Control Services architecture and how to work with it using various APIs. The walkthrough shows how to create a service namespace, work with service tokens, modify client applications to use Access Control Services, and work with SAML and ADFS 2.0. Chapter 15, AppFabric: Connect : Discusses the concept behind Connect and its core fundamentals. It also dives into programming WF and WCF with Connect, including how map to your legacy Line of Business (LOB) systems. Chapter 16, Azure Diagnostics : Covers the key aspects of debugging Azure projects, including the challenges of local versus cloud debugging, using Intellitrace, Azure Diagnostics, and common gotchas that you might encounter together with how to avoid them. Chapter 17, When to Use Azure Versus Office 365 : Discusses important aspects of decision-making related topics that you need to know about when deciding when to use Azure and when to use Office 365. Figure 1-2 illustrates the major components of Windows Azure Platform. The rest of this section briefly covers some of the key components. If you are already familiar with them, you can skip to the next section, Office 365. Figure

19 Web Role Windows Azure Web Role essentially provides features and functionality to host front end web applications in the cloud. This role comes with a dedicated IIS (Internet Information Services) web server which allows you to deploy web-based applications on this role. As with other roles, you can easily scale up and down the resources using the configuration file. Microsoft Azure SDK comes with tools that integrate with Microsoft Visual Studio, which let developers build, test, and deploy web-based applications on Web Role. For more information on the Web Role please visit Worker Role Although Web Role is ideal for hosting web-based applications, it does not provide features to execute long running tasks like business workflows or complex 19

20 calculations that require lengthy processing. To decouple back-end operations from the front end, the Worker Role was introduced. The core function of the Worker Role is to process tasks that are considered too costly for the Web Role. Commonly, Web Role delegates processing to a Worker Role and focuses only on front end related activities, like hosting web sites that provide a user interface. Azure allows you to scale up and down both Worker Roles and Web Roles independently. This means you can increase or decrease the number of roles based on your specific needs rather than consuming resources that you don t need. To see more, visit VM Role Recently added to the Windows Azure platform, the VM Role enables you to run a virtual hard disk (VHD) image of Windows Server on the Windows Azure Platform. You can create a VHD file on premises and then upload it to the Windows Azure Platform. The VM Role is unique in a sense that it allows you to perform a great number of customizations at the operating system level. It also provides you with the flexibility to migrate existing applications to the cloud. Administrators can remotely log in into the VHD and perform administrative tasks as needed. However, unlike Web and Worker Roles, operating system patches are not automatically applied to the VM Role; it s your responsibility to keep the operating system updated with the desired patches. In a nutshell, the VM Role brings you the ability to perform customizations at the operating system level, which is absent from the other roles. For more information on the VM Role please visit AppFabric Windows AppFabric acts as a cloud middleware service stack that has services like caching, access control, identity management, and more. These services help developers to develop, deploy, and manage robust Azure applications in the cloud. Because developers can decouple the application development pieces into logical components, the application development itself is rather simplified. For example, rather than worry about providing access control features, developers can rely on the Access Control Service for that. Access Control Windows Azure decouples management of identities and access control from the rest of the application development process. This offloads the plumbing that developers usually need to integrate their applications and replaces it with a variety of prebuilt identity providers. Access control is also provided as a feature of Windows Azure and it takes care of integrating your application with commonly used identity providers like Active Directory, Windows Live ID, Google, Yahoo, and Facebook. Access control also enables developers to create authorization rules to manage permissions 20