This is the first post and introduction for the mini-series entitled “Hosting SQL Server in Window Azure IaaS Fundamentals”.
This blog series targets the IT Ops person who is either new to Windows Azure IaaS (Infrastructure as a Service), or has some experience with it, and is wanting to understand the key points to consider when installing and hosting SQL Server on a Windows Azure IaaS Virtual Machine (VM). My goal is to empower personnel from typically a smaller IT department trying merely to accomplish a basic install of SQL Server in the Azure IaaS environment. This person is not concerned about optimizing storage or access, or building in advanced enterprise features like data replication or high availability.
In this introduction I will discuss briefly the terms PaaS (Platform as a Service) and IaaS (Infrastructure as a Service) in terms of Windows Azure and the different levels of involvement, application, and responsibilities when using either in Azure. We’ll look at some of the compelling reasons as to why you would want to consider using SQL Server in an Azure IaaS environment. You will need to have an in-depth and thorough understanding of Azure disks and images which we will give you not only from an Azure standpoint but also how it applies to SQL Server in Azure IaaS. There are four common ways to provision and install SQL Server on Azure IaaS VMs depending upon your licensing scheme and need to preserve existing on premises SQL Server installations. And finally you will need to know the different responsibilities you have for administrating SQL Server on an Azure IaaS VM.
SaaS, PaaS, and IaaS
Let’s touch very briefly on the three common service terms just to make sure you understand them.
SaaS – Software as a Service. We will not spend any time on Software as a Service in this course. With this model you are just a consumer of the Cloud resources, such as using Office 365 and just paying to use that service.
PaaS – Platform as a Service. In Azure these are all the services you can leverage for simplifying the building and deploying your Azure Web applications. For instance, ACS, Service bus, HDInsight, WAAD, and Azure SQL Database. Note this the use of SQL Server in Azure IaaS VM in not the same as using Azure SQL Database, which is a PaaS-based relational database service offered by Azure to abstract away the low-level management details of SQL Server. Azure SQL Database is a subset of SQL Server and offered as a database service for you to quickly and easily get SLQ Server functionality for your Azure applications. We are talking here about using an Azure IaaS VM and installing a full version of Microsoft SQL Server – the same one you may use today in your application environment – onto that VM.
A common reason why you would use SQL Server over Azure SQL database is scope of functionality. For instance, Azure SQL Database supports only a subset of Transact-SQL for SQL Server. Azure SQL Database does not participate in distributed transactions, and does not use SQL Server agent jobs. And there are other differences as well. So customers will typically SQL Server instead of Azure SQL Database to take advantage of full SQL Server functionality to which they are used to.
IaaS – This model is where you basically rent one or more virtual servers and their virtual networks (if needed) to host your SQL Server, AD, SPS, etc enterprise services upon. This is what we will be focusing on in this course.
There are different levels of responsibility you assume in each of the models. With SaaS you don’t assume any of the responsibility for the apps, data, OS, network, and storage as it’s all done by the vendor.With PaaS you manage your apps and data, but the vendor manages the rest. In the case of Azure PaaS the vendor is Microsoft of course and they manage the updates as needed. You don’t have to mess with updates and maintenance.For IaaS, you manage more of the stack than PaaS but less than SaaS. You now manage the OS and patching/updating manually. More responsibility lies with the IT Ops team than for the other options.
Why SQL Server in IaaS?
So you may be asking why would I want to move my SQL Server installation to an Azure IaaS virtual machine environment. Why not just run it in-house or better yet from a hosting provider? That’s a legitimate question to ask and there are valid reasons why in some cases you may want to remain out of the Azure Cloud. Both the Azure PaaS (Platform as a Service), which is all about your applications and storage in the Cloud, and the Azure IaaS (Infrastructure as a Service), more about Virtual Machines (VMs) and Virtual Networks, provide advantages over running in a public hosting provider or on premises.
• Operation expenditure vs. Capital Expenditures
• Rent vs buy – every three year PC replenish cycle
• Less support duties for IT Ops – at the hardware level such as resourcing hardware, managing uptime, and updates of machines
• Global locality- data and apps near your customers
• Quick provisioning – hours instead of weeks/months. This is especially useful in a testing or development environment where you can quickly spin up various testing configurations
• Auto-scalability and load-balancing for multiple VMs
• Availability SLAs – 99.95% availability for two or more VMs
• Flexible licensing and deployment options to match your budget or licensing strategy. This leads me nicely into this next slide…
These points describe the flexible options for SQL Server deployment into Azure IaaS.
Installing SQL Server on IaaS VM
To use SQL Server on an IaaS VM you will first have to decide how to install it. Remember, with an IaaS VM it’s like your own greenfield system. Outside of a core OS installation, you install, delete, and update, and manage the configuration on the VM all yourself.
So we will look at the different ways to get SQL Server running within Azure IaaS.
1. You can forklift an existing VHD image or disk with SQL Server already installed into the Azure Cloud.
2. You can install a clean Windows Server VM and install SQL Server on it manually.
3. You can select one of the standard SQL Server gallery images to give you a Windows VM with SQL Server already installed.
4. You can capture an image of an existing Azure VM with SQL Server currently installed as a base image from which you can create multiple VMs running SQL Server.
Administering SQL Server on IaaS VM
Once we have SQL Server installed we will look at different options to administer SQL Server using SQL Server Management Studio run locally, or via remote desktop into the VM hosting SQL Server. We will see how to configure the correct protocols, create inbound firewall rules, configure a login account for use the correct form of SQL Server login authentication, and expose a management endpoint on the SQL Server VM to allow this remote management.
An important issue when running SQL Server in the Cloud is how to backup SQL Server. There are different approaches you can take to be able to back-up a SQL Server database running in Azure. After the data is backed up you will want to understand where to store it as well.
And finally, monitoring SQL Server in Azure IaaS. You can do this simply using the Azure Portal to monitor basic VM counters only. Or you can use third party tools, such as Azure Watch, to get more detailed and in-depth monitoring capabilities, including different ways to aggregate the SQL Server performance counter metrics followed by subsequent automated actions that can be triggered by alerts.
The rest of the posts for this mini-series will expand upon most of these topics we discussed here and dig into detail for you.