Microsoft Azure Essentials
- for developers
VAIBHAV GUJRAL
@VABGUJRAL
About Me
Vaibhav Gujral
http://vaibhavgujral.wordpress.com
Twitter: @vabgujral
GitHub: vabgujral
Skype: vaibhav.gujral
Technical architect with 10+ years of
extensive experience in designing,
architecting, developing and delivering
enterprise class applications.
Building Azure Solutions since 2010
Full Stack Developer. Key skills include
.Net technologies, AngularJS, SQL
Getting Started
with Microsoft
Azure
• WHAT IS AZURE?
• AZURE SERVICES
• SUBSCRIPTION MANAGEMENT
• BILLING
• AZURE PORTAL
What is cloud computing?
Not new – extension to what existed before
Provides a modern alternative to the traditional on-premises datacenter
Pay-as-you-go model
All resources are accessible over network
Benefits includes - Cost, Speed, Global Scale, Productivity, Performance,
Reliability etc.
Security Concerns
Cloud Deployment Models
Cloud Service Models
What is Microsoft Azure?
Microsoft’s cloud computing platform
Global Presence with 38 datacenters
Seamless online portal experience
Supports public, private and hybrid cloud models
Azure supports IaaS and PaaS models – Office 365 is SaaS offering
Azure Stack is Private cloud offering which is an add-on in Windows Server 2016
Global Presence
Azure Services
Compute services This includes the Azure Virtual Machines—both Linux and Windows, Cloud Services, App Services (Web Apps, Mobile Apps, Logic Apps, API Apps, and Function Apps), Batch (for large-scale parallel and batch compute jobs), Service Fabric, and the Azure Container Service.
Data services This includes Microsoft Azure Storage (comprised of the Blob, Queue, Table, and Azure Files services), Azure SQL Database, DocumentDB, StorSimple, and the Redis Cache.
Application services This includes services that you can use to help build and operate your applications, such as Azure Active Directory (Azure AD), Service Bus for connecting distributed systems, HDInsight for processing big data, Azure Scheduler, and Azure Media Services.
Network services This includes Azure features such as Virtual Networks, ExpressRoute, Azure DNS, Azure Traffic Manager, and the Azure Content Delivery Network.
Azure Services
Subscription Management
To start with - sign up for a free trial at azure.microsoft.com – 200$ free credit for one month
Activate the Azure benefits included in MSDN subscription
Check out Purchase Options at https://azure.microsoft.com/pricing/purchase-options/
Check out Member Offers at https://azure.microsoft.com/pricing/member-offers/
Visual Studio Dev Essentials – 300$ credit for a year – 25$ per month
Billing/Pricing
Pricing for Azure infrastructure can be estimated by using the pricing calculator found at
http://azure.microsoft.com/pricing/calculator/
Most services are offered in – Basic, Standard and Premium tiers
Each tier differ in price and performance levels
To see current usage, click the Subscriptions tile in the Dashboard of the Azure portal
Resource cost visible per resource
Helpful in managing Azure costs
Azure Portal
Build, manage, and monitor everything from simple web apps to complex cloud applications in
a single, unified console
Currently two versions –
Azure Portal - https://portal.azure.com
Classic Portal - https://manage.windowsazure
Azure Portal - Demo
Management
Tools
• AZURE MANAGEMENT TOOLS
• DEMO
Azure Management Tools - Overview
Tools to aid in the development and management of Azure solutions
Microsoft Visual Studio
Azure Powershell
Azure cross-platform command-line (CLI)
Azure SDK
Azure Management REST APIs
Feature Specific tools-
Azure SQL Database – SQL Server Management Studio
Azure Virtual Machines - Microsoft System Center, OMS, Puppet, Chef, Powershell DSC
Azure Storage – Cloud Explorer (inside VS), AzCopy, Azure Storage Explorer
Azure Service Bus – Service Bus Explorer
Azure Management - Demo
Azure
Deployment
Models
• CLASSIC MODEL (ASM)
• AZURE RESOURCE MANAGER (ARM)
• ARM VS CLASSIC MODEL
Classic Model - ASM
Azure originally provided only the classic deployment model
Each resource exists independently and cannot be grouped
Manage resources in a coordinated approach
Deploy/Delete all the resources in the correct order
Tags are not supported
Azure Resource Manager (ARM)
Resource manager provides template based repeatable deployment model for all Azure
resources
Behaves as control planes for Azure services
Within Resource Manager, resources can be grouped, deployed, managed and monitored as a
resource group
Faster than classic Azure Service Management (ASM) model
Reusable/linkable JSON template
Mark one resource dependable on another
Supports tagging of resources
Microsoft recommends all the new Azure resources should be created using ARM
Resource Groups
Under ARM, all the resources are grouped into a Resource Group
All of the resources in a resource group share the same lifecycle
A resource can only be assigned to one group at a time
A resource can be added to or removed from a resource group at any time.
Most types of resource can be moved to a different resource group at any time
The resources in a resource group can be in different regions
You can use a resource group to control access for the resources therein
Resource Providers
Offers a set of resources and operations for working with an Azure service
Microsoft.AppService
Microsoft.AzureActiveDirectory
Microsoft.Compute
Microsoft.DocumentDB
Microsoft.EventHub
Microsoft.Sql
Microsoft.Storage
….
Role based Access Control
Fine-grained control over the operations and scope with which a user can perform an action
Permissions at resource level against Co-administrators
Supported roles-
Owner
Reader
SQL DB contributor
SQL Security Manager
Storage Account Contributor
VM Contributor
Custom Roles
Supports Service Principals
Resource Manager Template
Resource Manager Template
Azure Resource Manager - Demo
Azure App
Service
• APP SERVICE
• SERVICE PLANS
• WEB APPS DEMO
• CONFIGURING, SCALING
& MONITORING WEB APPS
Azure App Service
Azure App Service
App Service Plans
An App Service plan defines the capacity and resources to be shared among one or more
app services that are assigned to that plan.
The following are some of the criteria to be considered when creating an App Service plan.
Location (such as West US)
Instance count
Pricing tier (such as Free, Standard, or Premium) providing distinct settings for a variety of performance
and service capabilities:
Number of cores or instance size
Amount of memory
Amount of storage
Maximum number of instances
Autoscaling options (depends on tier—automatic, manual, or none)
Azure Web App
Hosted in an Azure App Service
Enables deployment of web applications quickly
Supported languages include .NET, Java, PHP, Node.js, and Python
Available templates includes - WordPress, Umbraco, Joomla!, and Drupal
Supports continuous deployment with Team Foundation Server (TFS), GitHub, TeamCity,
Jenkins, or BitBucket
For diagnostics, provides performance statistics, application logging, web server logging, IIS
logs, and IIS Failed Request logs.
Supports remote debugging using Visual Studio
Azure Web App - Demo
Azure Virtual
Machines
• INTRODUCTION TO AZURE VIRTUAL
MACHINES
• DEMO
Azure Virtual Machines - Overview
IaaS offering – you own the VM – though it runs on Microsoft’s datacenter
Supports Windows as well as Linux images
Supports two types of disks-
OS Disk – which holds OS and is required
Data Disk – which holds data and is optional
Ideal for workloads like Database Servers, Sharepoint servers, Identity Servers, Domain Controllers
Lift and Shift on-premise workloads/VMs to Azure
Charged hourly for the VM and storage charges for holding VHDs are extra
Three status – Running, Stopped, Stopped (Deallocated)
User powershell or CLI to stop a VM but keep it allocated
Virtual Machines - Demo
Azure Storage
• STORAGE ACCOUNTS
• Blobs
• Tables
• Queues
• Files
• DEMO
Azure Storage - Overview
Microsoft-managed service providing durable, scalable, and redundant storage
Includes following services-
Blob Storage
Table Storage
Queue Storage
File Storage
Storage Accounts
Secure account to give access to Azure Storage services
Unique namespace for storage resources
Types of storage accounts-
General-purpose storage accounts
Blob storage accounts
100 storage accounts per subscription
Each storage account has 500TB of storage limit
Shared Access Signatures
Provides controlled access to Azure storage resources
A shared access signature (SAS) is a token that can be appended to a URL that enables
delegated access to a storage resource
Anyone who possesses the token can access the resource it points to with the permissions it
specifies, for the period of time that it is valid
Two types-
Service SAS
Account SAS
Redundancy options
Protects data and preserves application up-time in the event of transient hardware failures
Replication copies data, either within the same data center, or to a second data center
Replication Types
Locally-redundant storage (LRS)
Zone-redundant storage (ZRS)
Geo-redundant storage (GRS)
Read-access geo-redundant storage (RA-GRS)
Azure Blob Storage
Large amounts of unstructured object data
Highly cost-effective and scalable
Every blob is organized into a container
http://<storage account>.blob.core.windows.net/<container>/<blob>
Blob types includes-
Block blobs
Append blobs
Page blobs
Useful for storing media files like videos, audios, images
Useful for back-up
Azure Table Storage
Microsoft's NoSQL key/attribute store – schema-less design
Highly available, massively scalable storage for structured data
Collection of entities – where a collection of properties and their values comprise an entity
http://<storage account>.table.core.windows.net/<table>
Two entities in the same table can contain different collections of properties, and those
properties can be of different types
An entity always has 3 properties – PartitionKey, RowKey and TimeStamp
The combination of PartitionKey and RowKey should always be unique to serve as primary key
All entities with same partition key are stored on same storage node
RowKey denotes uniqueness within the partition
Each entity can have 252 properties or key/value pairs
Azure Table Storage
Azure Storage Queues
Reliable messaging solution for asynchronous communication
Supports managing asynchronous tasks and building process workflows
A message can be up to 64KB of size
http://<storage account>.queue.core.windows.net/<queue>
Time-to-live(TTL) for a message can be up to 7 days
Maintains all server-side logs for all the transactions against the queue
Preferable when queue size grows over 80 GB in size
Azure File Shares
Cloud-based SMB file shares
Idle for moving legacy applications to Azure that rely on file shares
A virtual machine can mount a file share just as a desktop application mounts a typical SMB
share
Based on SMB-3, it can be mounted on Windows VM across Azure regions or on-premise
Accessible over REST API anywhere
Maximum size can be up to 5 TB and each file can be of 1 TB maximum size
Multiple VMs can share same Azure File Share
Azure Storage - Demo
SQL Database
• INTRODUCTION TO SQL
DATABASE
• SQL SERVER IN A VM
• DEMO
Azure SQL Database - Overview
Managed Cloud Database as a Service
Based on SQL Server Engine
Each database in Azure SQL Database is associated with a logical server
Scale on the fly
It can be
A single database with its own set of resources (DTUs)
Part of an elastic pool that shares a set of resources (eDTUs)
Azure SQL Database – Size Chart
Azure SQL Database – Elastic Pool
Simple, cost-effective solution for managing and scaling multiple databases that have varying
and unpredictable usage demands
The databases in an elastic pool are on a single Azure SQL Database server and share a set
number of resources at a set price
Optimizes the price performance for a group of databases within a prescribed budget while
delivering performance elasticity for each database.
When to consider a pool?
Well suited for a large number of databases with low average utilization with relatively
infrequent utilization spikes
The more the number of databases added to a pool the greater are the savings
Azure SQL Database
On-premise SQL Server database need some re-engineering before migrating from on premise
to Azure SQL Database
Does not supports Windows Authentication, but supports Azure Active Directory authentication
Unsupported features includes – Always On Availaibility Groups, BACKUP, CLR, Database
Mirroring, Database Snapshots, SSIS, SSRS, SSAS, etc.
Complete list is here
Unsupported T-SQL statements includes – HAS_DBACCESS, sp_configure, EXECUTE AS LOGIN,
fn_get_sql, etc.
Complete list is here
T-SQL debugging is not supported
Differences with On-premise SQL Server
Azure SQL Database - Demo
SQL Server in a VM
Useful when SQL Database doesn’t offers the required features
Things to consider while opting for SQL server on a VM:
Pricing might includes OS license cost, SQL Server license cost
You can bring your own licenses
Pricing also includes Azure Storage cost which is used for storing VHDs
At Least DS2 VM for standard edition
At least DS3 VM for Enterprise edition
Azure will offer high availability of VM overall but not the SQL Server instance
Choose SQL Server in a VM if high level of control is desired
Also useful for lift-and-shift database migrations
Consider other databases to bring down the costs – MySQL is available on Azure
SQL Server in a VM - Demo
Q&A
References• MICROSOFT AZURE ESSENTIALS:
FUNDAMENTALS OF AZURE