Microsoft Azure Notes
Microsoft Azure Notes
SPI
Next comes how cloud services are categorized. S stand for Software, P
stands for Platform and I for Infrastructure in SPI. SaaS is Software as a
service; PaaS is Platform as a service and IaaS is Infrastructure as a
Service.
2
The overall cost is low as the resources are allocated on demand and servers are
automatically updated.
It is less vulnerable as servers are automatically updated and being checked for
all known security issues. The whole process is not visible to developer and thus
does not pose a risk of data breach.
Since new versions of development tools are tested by the Azure team, it
becomes easy for developers to move on to new tools. This also helps the
developers to meet the customer’s demand by quickly adapting to new
versions.
Cons
There are portability issues with using PaaS. There can be a different
environment at Azure, thus the application might have to be adapted
accordingly.
3
It becomes necessary to understand the pros and cons of both services in
order to choose the right one according your requirements. In conclusion it
can be said that, PaaS has definite economic advantages for operations
over IaaS for commodity applications. In PaaS, the cost of operations
breaks the business model. Whereas, IaaS gives complete control of the OS
and application platform stack.
Azure Management Portal
Azure Management Portal is an interface to manage the services and
infrastructure launched in 2012. All the services and applications are
displayed in it and it lets the user manage them.
Getting started
A free trial account can be created on Azure management portal by visiting
the following link - manage.windowsazure.com
The screen that pops up is as shown in the following image. The account
can be created using our existing Gmail, Hotmail or Yahoo account.
Once logged in, you will be redirected to the following screen, where there
is a list of services and applications on the left panel.
When you click on a category, its details are displayed on the screen. You
can see the number of applications, virtual machine, mobile services and so
on by clicking on the menu item.
The next chapter contains a detailed explanation of how to use this portal to
manage Azure services.
As seen in the above image, there are different models such as Web App,
Virtual Machine, Mobile Service, Cloud Service, and Batch Service. These
models can be used either separately or in combination as per the
requirement.
Data Management
Data management can be done by using SQL server Database component
or the simple data storage module offered by Windows Azure. SQL server
4
database can be used for relational database. The storage module can store
unrelated tables (without foreign key or any relation) and blobs. Blobs
include binary data in the form of images, audio, video, and text files.
Networking
Azure traffic manager routes the requests of a user intelligently to an
available datacenter. The process involves finding the nearest datacenter to
the user who makes the request for web application, and if the nearest
datacenter is not available due to various reasons, the traffic manager
deviates the request to another datacenter. However, rules are set by the
owner of the application as to how a traffic manager should behave.
The virtual network is another feature that is part of networking in services
offered by Windows Azure. The virtual network allows a network between
local machines at your premise and virtual machine in Azure Datacenter.
IPs to virtual machines can be assigned in a way that makes them appear
to be residing in your own premise. The virtual network is set up using a
Virtual Private Network (VPN) device.
The following image shows how these two features actually look in Azure
portal.
Caching
Microsoft Azure offers two kinds of caching which are in-memory Caching
and Content Delivery Network (CDN) for caching frequently accessed data
5
and improves the application performance. CDN is used to cache the blob
data that will be accessed faster by users around the world.
Identity and Access
This component is about management of users, authentication and
authorization. Active directory stores the information of users accessing the
application and also the organization’s information. It can synchronize with
the related information on local machines residing on premises. Multifactor
Access (MFA) service is built to address the security concerns such as only
the right user can access the application.
Mobile Service
Windows Azure offers a very easy platform to develop mobile application.
You can simply start using mobile development tools after logging into your
account. You don’t have to write big custom codes for the mobile
application if you use this service. The push notifications can be sent, data
can be stored and users can be authenticated in very less time.
Backup
The site recovery service replicates the data at secondary location as well
as automates the process of recovery of data in case of data outage.
Similarly Azure backup can be used to backing up the on premise data in
clouds. Data is stored in encrypted mode in both the cases. Windows Azure
offers a very effective and reliable backup service to clients and ensures
they don’t face inconvenience in case of hardware failures.
Media
This service addresses multiple concerns related to uploading media and
making it available to end users easily. Users can manage tasks related to
the media like encoding, ad insertion, streaming, etc. easily.
Commerce
Windows Azure offers the opportunity to users to buy or sell applications
and data through their platform. The applications are put in the
marketplace or Azure store from where they can be accessed and bought by
other users.
Software Development Kit (SDK)
Azure applications can be produced by the developers in various
programming languages. Microsoft currently provides language-specific
6
SDKs for Java, .NET, PHP, Node.js, Ruby, and Python. There is also a
general Windows Azure SDK that supports language, such as C++.
When you go back to the main screen, it will show the website just created.
And when you click the website URL, it will take you to the website.
The following image shows how your website will look when you click the
URL.
Similarly, you can choose ‘From Gallery’ when creating a web app instead of
‘Quick Create’. This will let you choose the development framework in which
you want to create your app.
Windows Azure supports .Net, Java, PHP, Python, Node.js and Ruby. There
are several ways of publishing the code to Azure server. It can be published
using FTP, FTPs, Microsoft Web Deploy technology. Various source control
tools such as GitHub, Dropbox and Codeplex can also be used to publish the
code. It provides a very interactive interface to keep track of changes that
have been published already and also unpublished changes.
Create a Virtual Machine
Step 1 − Click on ‘Virtual Machine’ from the list.
Step 2 − Then click ‘From Gallery’.
Step 3 − Choose the Operating System or Program you want to run.
7
Step 4 − Choose the configuration and fill in the details.
The Username and Password you set up here will be needed to access the
virtual machine every time.
On the next two screens you can leave the default values on for the first
time.
Step 5 − The virtual machine just created will be displayed when you click
on ‘Virtual Machine’ on the left panel as shown in following image. It might
take a few minutes to show up.
Step 6 − Once the machine is created you can connect to it by clicking on
the connect icon displayed at the bottom of the screen. It will save a .rpd
file on your machine as shown in the following image. Chose ‘save file’ on
the screen and it will save in ‘downloads’ or the in the set location on your
machine.
Step 7 − Open that .rpd file and you can connect to the VM by filling in the
credentials into the following screen.
You can also use your own image by capturing the image of an existing
virtual machine or virtual hard drive. Virtual machines are beneficial in
several ways.
A user can try new operating system without actually installing them.
A VM can be deleted when you are done with the operating system.
New versions of an operating system can be tried and tested before the user
installs them on the machine.
VM provides a very economical and hassle free way of using a development
framework or a tool that runs on specific version of OS.
Step 2 − Fill in the URL. Select the database, region and backend.
Step 3 − Tick the check box if you want to configure the advance push
settings. This option allows us to configure our Mobile Service to use an
existing notification hub or specify the name of a new one. If you leave this
8
checkbox unmarked, a new hub will be created in a new namespace with a
default name.
Creating Batch Service
Batch service is needed when a large scale application is run and a parallel
high performing computing is required. The developers can create batches
to run a task parallel that eases the workload at no extra cost. Azure
charges for only the virtual machines which are being used. They can
schedule a task, put them in queues and manage the workload in cloud.
Batch creation does not involve setting up a separate VM, cluster or job
scheduling.
To creating a batch service follow the similar steps for creating other
services under Compute model. The following image shows how a batch
service can be created quickly.
Once you have created a batch service, you can see the details by selecting
it from the left panel. The following image pops up on the screen.
9
Medium 3.5 GB Dual core 1.6 GHz 490 GB
When a user chooses one of the virtual machine, the operating system,
patch updates and software updates are performed by fabric controller. It
decides where the new application should run which is one of the most
important functions of Fabric Controller. It also selects the physical server
to optimize hardware utilization.
When a new application is published in Azure, an application configuration
file written in XML is also attached. The fabric controller reads those files in
Microsoft datacenter and makes the setting accordingly.
In addition to managing the allocation of resources to a specific application,
it also monitors the health of compute and storage services. It also makes
the failure recoveries for a system.
Imagine a situation where four instances of web role are running, and one
of them dies. The fabric controller will initiate a new instance to replace the
dead one immediately. Similarly, in case any virtual machine fails, a new
one is assigned by the fabric controller. It also resets the load balancers
after assigning the new machine, so that it points to the new machine
instantaneously. Thus, all the intelligent tasks are performed by the Fabric
Controller in Windows Azure architecture.
Step 2 − Click on ‘Quick Create’ and it will ask for ‘Account Name’.
You can see there are four options in the ‘Replication’ dropdown. A copy of
the data is kept so that it is durable and available at high speed. It is
retained even in case of hardware failure. Let’s see what these options
mean −
10
Locally redundant storage − Copy of the data is created in the same region
where storage account is created. There are 3 copies of each request made
against the data that resides on separate domains.
Zone-redundant storage (available for blobs only) − Copy of the data is
created on separate facilities either in the same region or across two regions.
The advantage is that even if there is failure on one facility, the data still can be
retained. Three copies of data are created. One more advantage is that data can
be read from a secondary location.
Geo-redundant storage − `Copy is created in a different region which means
data is retained even if there is a failure in the complete region. The numbers of
copies of data created are 6 in this case.
Read-access geo-redundant storage − This option allows reading of data
from a secondary location when data on the primary location is not available.
The number of copies created is 6. The main advantage here is that availability
of data can be maximized.
There are different price plans for each replication option and the ‘Local
Redundant’ is the cheapest of them all. So, choosing the replication of data
depends on the cost and individual requirements.
Storage Account Endpoints
Step 1 − Click on the ‘Storage Account’ it will take you to the next screen.
Step 2 − Click on ‘Dashboard’ from top horizontal menu.
Here you can see four items under services. You can create blobs, tables,
queues and files in this storage account.
There will a unique URL for each object. For example, here account name is
‘tutorialspoint’ then the default URL for blob
is https://tutorialspoint.blob.core.windows.net Similarly, replace blob
with table, queue and file in the URL to get the respective URLs. To access
an object in the location is appended in the URL. For
example,http://tutorialspoint.blob.core.windows.net/container1/bl
ob1
Generating an Access Key
Access key is used to authenticate the access to the storage account. Two
access keys are provided in order to access the account without interrupting
it, in case, one key has to be regenerated.
To get the Access Keys, click on ‘Manage Access Keys’ in your storage
account. The following screen will come up.
11
How can you upload or download data to Azure store? There are many ways
to do it, but it can’t be done within the Azure portal itself. You will have to
either create your own application or use an already built tool.
There are many tools available for accessing the data in an explorer that
can be accessed by clicking on ‘Storage Explorer’ under ‘Get the Tools’ in
your Azure storage account. Alternatively, an application can also be built
using Software Development Kit (SDK) available in Windows Azure Portal.
Using the PowerShell commands is also an option to upload data.
PowerShell is a command line application that facilitates administering and
managing the Azure storage. Preset commands are used for different tasks
to manage the storage.
You can install PowerShell by going to ‘Downloads’ on the following screen
in your account. You will find it under Command-Line tools.
There are specific commands for each task. You can manage you storage
account, create a new account, and create a container. Additionally, blobs,
tables, queues messages can also be managed using PowerShell.
There are three options in the Access dropdown which sets the permission
of who can access the blobs. ‘Private’ option will let only the account owner
to access it. ‘Public Container’ will allow anonymous access to all the
contents of that container. ‘Public blob’ option will set open access to blob
but won’t allow access to the container.
12
Upload a Blob using PowerShell
Step 1 − Go to ‘Windows PowerShell’ in the taskbar and right-click. Choose
‘Run ISE as Administrator’.
Step 2 − Following command will let you access your account. You have to
change the fields highlighted in all the commands.
$context = New-AzureStorageContext -StorageAccountName tutorialspoint
StorageAccountKey
iUZNeeJD+ChFHt9XHL6D5rkKFWjzyW4FhV0iLyvweDi+Xtzfy76juPzJ+mWtDmbqCWjsu/nr+1pqBJj
rdOO2+A==
Step 3 − Run the following command. This will get you the details of you
Azure account. This will make sure that your subscription is all set.
Get-AzureSubscription
Step 5 − To check if the file is uploaded, run the following command.
Get-AzureStorageBlob -Container $ContainerName -Context $ctx | Select Name
Download a Blob
Step 1 − Set the directory where you want to download the file.
$localTargetDirectory = "C:\Users\Sahil\Downloads"
14
Retrieve a Queue
$QueueName = "thisisaqueue"
Delete a Queue
$QueueName = "thisisaqueue"
iUZNeeJD+ChFHt9XHL6D5rkKFWjzyW4FhV0iLyvweDi+Xtzfy76juPzJ+mWtDmbqCWjsu/nr+1pqBJj
rdOO2+A==
Step 2 − Specify the storage account you want to use.
Set-AzureSubscription –SubscriptionName "BizSpark" -CurrentStorageAccount tutorialspoint
Step 3 − Retrieve the queue and then insert the message.
$QueueName = "myqueue"
$Queue = Get-AzureStorageQueue -Name $QueueName -Context $ctx
15
Managing Queues using Azure Storage Explorer
Step 1 − Select the storage account from the dropdown at the top right.
Accounts will be displayed if you have added them during your previous
use. If not, you can add account and it will ask for your credentials. After
signing in, you will be logged into your account in Azure Storage Explorer.
Step 2 − You can add a new queue by selecting ‘Queues’ from the left
panel and clicking ‘New’ as shown in the following image.
Step 3 − Enter the name of Queue and it is created in your storage
account.
Step 4 − Add and delete the messages by selecting the queue in the left
panel.
You can see that it has given the following end point as a result.
https://tutorialspoint.table.core.windows.net/Book
Similarly, you can retrieve, delete and insert data into the table using
preset commands in PowerShell.
Retrieve Table
$tabName = "Book"
Get-AzureStorageTable –Name $tabName –Context $Ctx
Delete Table
$tabName = "Book"
Remove-AzureStorageTable –Name $tabName –Context $Ctx
param(
$table,
[String]$partitionKey,
[String]$rowKey,
[String]$title,
[Int]$id,
[String]$publisher,
[String]$author
)
$entity.Properties.Add("Title", $title)
$entity.Properties.Add("ID", $id)
$entity.Properties.Add("Publisher", $publisher)
$entity.Properties.Add("Author", $author)
$result = $table.CloudTable.Execute(
[Microsoft.WindowsAzure.Storage.Table.TableOperation]
17
::Insert($entity))
}
$StorageAccountName = "tutorialspoint"
$StorageAccountKey = Get-AzureStorageKey -StorageAccountName $StorageAccountName
$Ctx = New-AzureStorageContext $StorageAccountName - StorageAccountKey
$StorageAccountKey.Primary
$TableName = "Book"
$TableName = "Book"
18
$entities | Format-Table PartitionKey, RowKey, @{ Label = "Title";
Expression={$_.Properties["Title"].StringValue}}, @{ Label = "ID";
Expression={$_.Properties[“ID”].Int32Value}}, @{ Label = "Publisher";
Expression={$_.Properties[“Publisher”].StringValue}}, @{ Label = "Author";
Expression={$_.Properties[“Author”].StringValue}} -AutoSize
The output will be as shown in the following image.
$tableResult = $table.CloudTable.Execute(
[Microsoft.WindowsAzure.Storage.Table.TableOperation]
::Retrieve(“Partition1”, "Row1"))
$entity = $tableResult.Result;
Step 6 − If you already have any tables in storage you will see in the left
panel under ‘Tables’. You can see the rows by clicking on them.
Create a Table
Step 1 − Click on ‘New’ and enter the table name as shown in the following
image.
Step 4 − To see the rows created click on the table name in the left panel.
Azure Storage Explorer is very basic and easy interface to manage tables.
You can easily create, delete, upload, and download tables using this
interface. This makes the tasks very easy for developers as compared to
writing lengthy scripts in Windows PowerShell.
Manage CDN
Step 1 − Click on the Name of the CDN you want to manage in the list
displayed in CDN services.
Step 2 − Click on ‘manage cdn’.
Step 6 − Select the country in the next screen and you are done.
Analytics − You can see very useful figures in this section. For example,
number of overall hits or in a specific geographic region. The report will also
show how many times requests are served from CDN endpoints and how
many of them are going back to the original server.
Step 9 − Click on ‘Analytics’ in menu items at the top of the page. You will
see a list of all the reports in the left panel as shown in the following image.
Step 10 − Additionally, you can download the report as an excel file by
clicking on the excel icon at the top right corner.
Map a Custom Domain Name
You might want to use a custom domain name instead of CDN endpoint that
is autogenerated by Azure service. Windows Azure has provided a new
feature that allows you to map a custom domain name to his application’s
CDN endpoint. Let’s see how it is done in Azure Portal.
Step 1 − Click on ‘Manage Domain’ Button on the bottom horizontal menu.
Step 2 − Enter the custom URL in the text box and its done.
Step 5 − Enter the details and you are done. In the following image,
‘tutpoint’ is the domain name. Enter a domain name which is a temporary
DNS. Once its directory is created, you can map it to your own domain.
Creating Users
Step 1 − Click on ‘Add User’ button at the bottom of the screen.
Step 2 − The following screen pops up. You can create a new user or link
an existing Microsoft account. You can even import a user from other
directory in Azure. Let’s choose ‘Create a new user’ here.
Step 4 − Enter other details and choose the role for the user.
Step 5 − Click next arrow and it will create a user for your application and
give you a temporary password which can be changed by the user.
Integrating with Azure Active Directory
Step 1 − Locate and click ‘Application’ at top of screen.
Step 2 − Click on ‘Add’ displayed at the bottom of the screen. A pop up
shown in the following image will be seen on the screen.
Step 3 − If you click the first option, it will take you to the following
screen. You can enter the name of the application and follow the wizard.
Step 4 − Similarly, if you choose the second option in ‘What do you want to
do’ pop up, it will let you choose an application from the gallery as shown in
the following screen.
24
Click on the ‘Directory Integration’ from the top menu. An on-premise
directory can be connected using the three steps as shown in the following
image.
Reports
This is a very useful feature of Active Directory as it shows different reports
such as number of times a user is signing in, or signing in from an unknown
device can be seen here.
25
Performance − You should select the nearest datacenter to the users of
your application. The performance can be affected by the relative location of
the users who want to access the application. If a user is closer to the
datacenter, the performance will be better.
Cost − The price of hosting the application may also increase or decrease
depending upon the datacenter you choose. Price actually can vary
according to the database hosting location or any other service being used
by the application. You should choose the same location for all the services
that are being used by your application. For example, database or any
media service. If they are kept in separate datacenter there will be charges
per transaction, but anything extra won’t be charged if they are kept at the
same datacenter.
Legal Aspect − Laws vary from country to country and restrictions could
be enforced in some regions on what information can be shared and what
cannot.
26
There are situations for an organization where they need to reduce loads
from their onpremise systems for a certain period of time or on a regular
basis. This could be easily achieved by using Windows Azure services at a
very low cost. Clients have to pay for only those transactions made on their
application instead of paying for entire hardware and software.
This is an extremely cost-efficient way of using new resources for the
organization. Azure in this context offers quite quick growth to businesses
by extending resources on cloud when needed.
Enterprise Application Integration
This is commonly called as EAI scenario. Let us think of a scenario, when
there is need for two different organizations to send and receive data
between applications which is further processed by those applications. The
cross-enterprise application integration can be done using Windows Azure.
The service is called BizTalk service, which facilitates B2B messaging
between on-premise or on-cloud applications of different organizations.
This service enables a connection between applications even if they are
following different transport protocols. The process also includes validating
and extracting the properties as required by the application at the receiving
end. In a normal scenario, where communication is needed between
applications of two organizations, the interaction will have to bypass the
firewall by completing the due process. However, in the service offered by
Windows Azure, the communication between applications does not need to
bypass the organization’s firewall.
Since here we have an application already running, you can see a list of
them. Your account will be empty for the first time. Left panel categorizes
the application and the middle part lists all the application in the account.
27
Create a New Application
Step 1 − Click on the ‘New’ left bottom corner.
Step 2 − Following screen will come up and you can choose what you want
to create.
Step 2 − Click on ‘View more details’. It will take you to the following
screen. This screen will show you all the details of your subscription,
spending, and data usage.
As the spending limit is set here, it says ‘Remove Spending Limit’. If the
limit would not have been set, it would have said ‘Set Spending Limit’. This
way you can set a spending limit for you. Your services will be stopped once
you reach the spending limit.
If you scroll down on the page in the above image, you can see all that is
available with your subscription and see the details on the right side.
You are absolutely in control of your spending. The green block in which
‘Credit’ button is displayed will change color if you are about to fall short of
your credit. This is calculated by your average per day spending and it
would tell you in how many days your credit is going to get over.
Add a New Subscription
Step 1 − Click on your account e-mail id or on the picture at the top right
corner.
Step 2 − Click on ‘View my bill’ in the list.
Step 3 − It will take you the following screen. Click on ‘add subscription’.
Step 4 − Choose the subscription from the list in the following screen.
Step 5 − Enter the name and leave all other fields as they are except
location. You don’t need to specify anything in this case since everything
will be decided by Azure itself.
Step 6 − Click on ‘Create a Virtual Network’ and it is done.
Creating a Virtual Network in Cloud Only
(Advanced Settings)
Step 1 − Click on ‘custom create’ instead of ‘quick create’ when creating a
new virtual network and the following screen will appear.
Step 2 − Enter the name of the ‘Network’ and choose a location. You will
see that it will draw an image at the bottom.
Step 4 − Click the next arrow and a virtual network is created.
29
You can add DNS servers and local network even after creating a virtual
network.
Step 3 − Alternatively, click ‘New’ at the bottom left corner and then click
‘Compute’ → ‘Virtual Machine’ →‘Quick Create’.
Step 4 − Enter DNS name. This has to be unique. The DNS name is used to
connect to the virtual machine.
Step 5 − Select the image and size from the dropdown list. The size affects
the cost of running virtual machine.
Step 6 − Enter username and password. You must remember to log in to
the virtual machine later.
Step 7 − Select the relevant region.
Step 8 − Click on ‘Create a virtual machine’ and you are ready to use your
new machine. It will take a few seconds for the machine to be created.
Create Virtual Machine with Advanced Settings
Step 1 − Choose ‘Custom Create’ instead of ‘Quick Create’ in the options
and you will be taken to the following screen.
Step 2 − Choose an image from the list. In this screen, you find that
choosing an image is easier based on their category shown on the left side.
Let us create a virtual machine for SQL Server for which we have chosen
SQL Server on the left side and all the software in this category are shown
in the middle.
Step 3 − Click on the Next arrow.
Step 4 − Choose Version Release Date and enter the VM’s name.
Step 5 − Select the Tier. The size dropdown would change items according
to tier. In the basic version, you will get only first 5 options, while in the
30
standard version you will get more options. It should be according to you
and you image’s requirements. For example, in this case let’s choose SQL
server. It requires minimum A4 machine with 8 cores and 14GB memory.
Step 6 − Enter the username and password and click Next arrow.
Step 7 − Enter DNS name which should be unique as mentioned earlier and
select the region.
Under the storage account, it will display the storage accounts that you
have already created. As seen in the following screen, an account name is
shown in the dropdown which is a storage account created earlier. You can
choose an already created account or even use an automatically generated
account.
Step 8 − Next is Availability set. This option lets you create a set of virtual
machines that will ensure that if a single point fails, it doesn’t affect your
machine and keeps the work going on. Let’s choose the option ‘none’ here.
The last option is End Points. End points are used to communicate with
virtual machines by other resources you can leave. In a subsequent
chapter, we will provide a detailed illustration to configure endpoints.
Step 9 − Click on Next and the virtual machine will be created in a few
seconds for you.
Connecting with a Virtual Network
Step 1 − Create a virtual machine using the steps described earlier. If you
already have a virtual network created in Azure, it will be diplayed in the
highlighted dropdown list as shown in the following screen. You can choose
the network as shown in following picture.
Step 2 − When you go to your Virtual Network and management portal
created earlier, click on ‘Dashboard’. The virtual machine will be displyed in
the resources of that network as shown in the following picture.
31
You must go through the costs that will be incurred based on the size you
choose for the virtual machine beforehand, to make sure it is in control.
If you use the already created storage account you will be able to manage
things better.
Step 4 − Select the name from dropdown. Alternatively, you can enter a
custom name. Here let’s select Http from options. It will assign unused
ports automatically. Or you can enter it manually.
Step 5 − If you tick ‘Create a Load Balanced Set’, it will allow distributing
the load across virtual machines. Let’s leave it unchecked here because it
can be configured later, if needed.
Step 6 − The ‘Enable Direct Server Return’ is checked when SQL server’s
‘Always On’ feature is required, so let’s leave it unchecked.
Step 7 − Click on Next arrow.
32
We can grant or deny the access of services to an individual host or
network. If nothing is specified, the endpoint can be accessed from any host
and network.
Step 1 − Select ‘Manage ACL’ as shown in the following image.
Step 6 − Enter the Gateway subnet and click ‘Save’. Message shown in the
following screen will pop up.
33
Step 7 − Click Yes and a point-to-site connectivity is done.
Step 2 − Enter Network’s name, select location and click on Next.
Step 3 − On the next screen, Select ‘Configure a point-to-site VPN’ and
click next.
Step 4 − You can select or enter starting IP and select CIDR.
Step 5 − Enter Subnet and click ‘Add Gateway Subnet’ as done earlier and
enter the required information.
Step 7 − Click on the name of the network, as it is ‘MyNet’ in the above
image.
Step 8 − Click on ‘Dashboard’ as shown in the following screen.
You will see that the gateway is not created yet. For it to happen, you will
have to generate a certificate first.
Generate Certificates
The point-to-site VPN supports only self-signed certificate.
Create a Certificate
Step 1 − Go to the link msdn.microsoft.com or google ‘windows SDK for
8.1’. Then go to msdn link or the version of Windows for which you want
the tool.
Step 2 − Download the encircled file as shown in the following image. It
will be saved as .exe file named sdksetup on your machine.
34
Step 3 − Run the file. While running the installation wizard, when you
reach the following screen uncheck the encircled part. By default they are
checked.
First command will change the directory in command prompt. In the above
command change the highlighted part to the name of your network.
Step 6 − Next enter the following command for creating client certificate.
makecert -n "CN=MyNetClient" -pe -sky exchange -m 96 -ss My -in "MyNet" -is my -a sha1
Step 7 − Look for ‘mmc’ on your computer and run it.
Step 11 − Expand ‘Current User’ in the left panel, then ‘Personal’ and then
‘Certificates’.
Step 13 − Follow the wizard. You will have to name the certificate and
select a location to save it.
Upload the Certificate
Step 1 − Login to Azure management portal.
Step 2 − Go to the network and click ‘Certificate’ and then click ‘Upload
Root Certificate’.
Step 3 − Click browse and select the location of the certificate you just
created.
Download the Client VPN Package
Client VPN Package will connect you to the network.
Step 1 − Go to network’s dashboard in azure management portal.
35
Step 2 − Scroll down and locate the following options at the right side of
the screen.
Step 3 − Select the suitable option and download it. You will see a similar
file on your computer. Run and install it.
Step 4 − When you’ll install it, Windows might try to prevent it. Choose
‘Run Anyway’ if this happens.
Step 5 − Go to ‘Networks’ on your machine and you will see a VPN
connection available as shown in the following image.
Step 6 − Click on that network as in this example ‘MyNet’ and connect. You
will be connected to the network.
Step 2 − Enter the name of the network and select the region.
Step 3 − Enter the DNS name for name resolution if you want, otherwise
you can leave it empty if you want it to be automatically done by Azure.
Step 4 − Check the ‘Configure site-to-site VPN’ option.
Step 5 − Enter the details of your VPN device in the address space as
shown in the following image.
36
Step 6 − Enter the details of your virtual network in the address space.
Step 7 − After entering the subnets, enter the gateway subnet for your
virtual network.
Step 3 − Enter the DNS prefix and select the Load Balancing Method.
There are three options in this dropdown.
Performance − This option is ideal when you have endpoints in two different
locations. When a DNS is requested, it is redirected to the region closest to the
user.
Round Robin − This option is ideal when you want to distribute the traffic
among multiple endpoints. Traffic is distributed in round robin fashion by
selecting a healthy endpoint.
Failover − In this option, a primary access point is set up, but in case of failure
alternate endpoints are made available as backup.
37
Step 4 − Based on your needs you can choose a load balancing method.
Let’s choose performance here.
Step 5 − Click create.
You will see the traffic manager created and displayed in your management
portal. Its status will be inactive until it is configured.
Step 3 − The screen shown in the following image will appear. Choose the
service type and items under that service will be listed.
Step 4 − Select the service endpoints and proceed.
Step 3 − You can change the load balancing method here by choosing a
desired method from the dropdown. Here, let’s choose ‘Performance’ as
chosen earlier.
Step 4 − If you scroll down, you will see heading ‘Monitoring Setting’. You
can choose the protocol; enter port number and relative path for a service
to be monitored.
Step 3 − In the following screen, locate ‘command-line tools’ and then
‘Windows Azure PowerShell’. Click ‘Install’ listed under it to download the
setup and install it.
Step 2 − Pin it to the taskbar. You can run it as ISE by pinning it to the
taskbar in Windows 8. Somehow, if it doesn’t show the option of ‘Run ISE
as Administrator’ it is in programs. ISE lets copy paste commands easily.
Step 3 − Right-click on ‘Microsoft Azure PowerShell’ and select ‘Run ISE as
Administrator’.
Step 2 − The screen shown in the following image will pop up and ask for
credentials of your account. Enter the credentials and sign in.
39
Step 3 − Now you are ready to perform tasks in Azure using Azure
PowerShell.
Using Certificate
In this method, you can download a certificate on your machine and login to
our account using that certificate.
Step 1 − Enter the following cmdlet in PowerShell. You will be prompted to
save a file and the file will be downloaded on your computer with the
extension. publishsettings.
Get-AzurePublishSettingsFile
Step 2 − Enter the following cmdlet. Highlighted part is the path of the file
downloaded in previous step. Also replace the name of the file with yours
Import-AzurePublishSettingsFile C:\Users\Sahil\Downloads\BizSpark-11-5-
2015credentials.publishsettings
Step 3 − Just to make sure that everything has gone right. Run the
following cmdlet. It will display the details of your account and subscription.
Get-AzureAccount
Get-AzureSubscription
Get Help
The following cmdlet will list all the commands available for Azure tasks.
Get-Help Azure
There are lots of tasks that can be managed using PowerShell such as
creating and managing web applications, storage accounts, virtual
machines, etc. In fact, many users find it quicker and better as compared to
Azure Management Portal. To manage the Azure Storage using PowerShell
refer to Table, Blobs and Queues chapter in this tutorial.
You can see 5 key terms on the above screen. It seems pretty complicated
at first glance but when you look carefully, you can see that each line on
the graph is in a different color which matches the color of the term. For
example, CPU Percentage is in purple color and the purple line on the graph
represents it. The machine shown in the above image is quite new. The
following sections will explain how figures are read.
CPU Percentage
CPU percentage is the most common statistics to check whenever there is a
performance issue in an application. It tells the processor’s utilization in
percentage. In the following image, you can see that in the last dropdown
at the right top corner 1 hour is selected and, highest utilization is at 3:15
which is 0.13%.
In the image above, you can see the highest point in disk read is 218.35
byte/sec at 3:25. You can see the last hour’s data because ‘1 Hour’ is
41
selected in the dropdown. You can also see data for last 24 hours and 7
days.
Network In
Monitoring the network traffic can be done by looking at the ‘network in’
figures in the ‘Monitor’ section. The network-in statistics can be in bytes or
TCP segments received.
Network Out
Network-out statics tells about TCP segments sent per second. You can also
see relative or absolute statistics by selecting an option from dropdown
encircled in the following image.
Similarly, you can choose the duration from the dropdown highlighted in the
following image.
You can also choose particular metrics, by clicking on ‘Add Metrics’ at the
bottom of the screen. The following screen will appear, in which you can
check the desired metrics.
Enable Diagnostics
Enabling diagnostics allows you to collect logs. Azure will collect logs and
store in a storage account you specified. We can enable diagnostics by
switching to the ‘Preview Portal’. Diagnostic figures help in troubleshooting
as the logs for errors can be tracked in the storage account.
Step 1 − Switch to the ‘preview portal’.
Step 2 − Locate the ‘Virtual Machine (classic)’ in the left panel.
Step 3 − Select the Machine and ‘All Settings’.
Step 4 − Scroll down and locate ‘Diagnostics’. Select ‘Diagnostic’ as shown
in the following image.
Step 5 − Select ‘On’ in the next panel displayed on the right side. By
default it will be set off.
Step 6 − Since it uses a storage account to store the logs you will have to
configure the setting for the storage account by clicking on the encircled
part in the following image.
Step 7 − You can also select or deselect the type of logs you want to keep.
You will also see a panel at the bottom with the heading ‘Monitoring’. This
section displays the same metrics that we discussed in the section above.
42
These figures help users to identify the causes of performance slide of an
application. They can also generate alerts for these features; they go above
the set limits.
Step 4 − Enter the name for alert and enter other information.
Step 5 − In the following screen that pops up, select condition. It can be
greater than, less than or equal to.
Step 6 − Enter the threshold value which will be in percentage. In this
example, let’s enter 85 which means you will get an e-mail when utilization
for processor of your virtual machine reaches the 85% average over the
last 10 minutes.
You can set maximum 10 alerts for each subscription. Alerts can be sent to
the administrator’s e-mail plus one more e-mail provided at the time of
setting up an alert.
Similarly, you can set alerts for other Azure services like web applications
and mobile applications.
43
Deploying a Web App from PowerShell
To get started with the PowerShell, refer to ‘PowerShell’ chapter in the
tutorial. In order to deploy a website from PowerShell you will need the
deployment package. You can get this from your website developers or you
if you are into web deployment you would know about creating a
deployment package. In the following sections, first you will learn how to
create a deployment package in Visual Studio and then using PowerShell
cmdlets, you will deploy the package on Azure.
Create a Deployment Package
Step 1 − Go to your website in Visual Studio.
Step 2 − Right-click on the name of the application in the solution explorer.
Select ‘Publish’.
Step 3 − Create a new profile by selecting ‘New Profile’ from the dropdown.
Enter the name of the profile. There might be different options in dropdown
depending on if the websites are published before from the same computer.
Step 4 − On the next screen, choose ‘Web Deploy Package’ in Publish
Method.
Step 5 − Choose a path to store the deployment package. Enter the name
of site and click Next.
Step 6 − On the next screen, leave the defaults on and select ‘publish’.
After it’s done, inside the folder in your chosen location, you will find a zip
file which is what you need during deployment.
Create a Website in Azure using PowerShell
Step 1 − Enter the following cmdlets to create a website. Replace the
highlighted part. This command is going to create a website in free
subscription. You can change the subscription after the website is created.
New-AzureWebsite -name "mydeploymentdemo" -location "East US"
If cmdlet is successful, you will see all the information as shown in the
above image. You can see the URL of your website as in this example it is
mydeploymentdemo.azurewebsites.net.
Step 2 − You can visit the URL to make sure everything has gone right.
Deploy Website using Deployment Package
44
Once the website is created in Azure, you just need to copy your website’s
code. Create the zip folder (deployment package) in your local computer.
Step 1 − Enter the following cmdlets to deploy your website.
Publish-AzureWebsiteProject -name "mydeploymentdemo" -package
"C:\Users\Sahil\Desktop\deploymentDemo\MyWebsiteOnAzure.zip"
Here in above commandlet, the name of the website just created is given
and the path of the zip file on the computer.
Step 2 − Go to your website’s URL. You can see the website as shown in
the following image.
Step 3 − Enter the name of vault and select the region. It will be created
and displayed in your management portal.
Step 4 − Select the vault and click ‘Download Vault Credentials’ as shown
in the following image.
Step 7 − Agent’s setup will be saved on your computer. You will have to
install it by following the wizard. There is nothing very specific in the
installation process.
45
Step 8 − At the end of the installation, you will see a button at the bottom
of pop-up window ‘Proceed to Registration’. Click that button and the
following screen will appear.
Step 9 − First step is vault identification. Browse the credentials file on
your computer which was saved in the last step.
Step 10 − Next step in the registration wizard is choosing the encryption
setting. You can enter your own passphrase or let the wizard generate it by
itself. Here let’s choose ‘Generate Passphrase’.
Step 11 − Browse for the location where you want to save the passphrase.
Keeping this passphrase file safe is very important as you won’t be able to
restore backups without it.
Step 12 − Click on Next and the file will be saved on your selected
location.
Schedule a Backup
After the wizard in the above section is finished, you will see the following
program that was installed in the previous step, running on your computer.
You will come across selecting the data folder from your computer you want
to back up on Azure and the frequency of backup in this wizard.
Step 1 − Click ‘Schedule Backup’ from the right panel.
Follow the steps as pop up on the screen and are quite understandable. You
are allowed to back up 3 times maximum and you can choose from daily
and weekly frequency.
Step 2 − In the following step, select how long you want to keep the
backup in your online storage. Set it according to your need.
Step 3 − You can choose the ‘Backup Now’ in the left panel of backup
agent. It will save a copy of your data that very moment. Then you can see
it in your management portal by selecting the backup vault and going to its
dashboard.
You can see in the following image that there is one item listed under ‘Jobs’
section as data has been backed up by selecting ‘backup now’. This section
46
will display all the activities in backup task. Details of the backup schedule
is displayed under ‘Status’ section.
Step 4 − You can recover the data by selecting ‘Recover Data’ in backup
agent and following the wizard.
47
Microsoft Azure - Multi-Factor
Authentication
All of us at some point have encountered multi-factor authentication. For
example, customers of some banks receive a call or one-time password as
text message on their mobile phones while signing in to their bank account
online. The multi-factor authentication refers to the system in which more
than one system authenticates the user to access an application. The multi-
factor authentication offers better security for Azure clients. It lets the client
choose if they want to use more than one system of credentials to allow the
users to access the applications. Multi-factor authentication can be used to
protect both on-premise and on-cloud directories.
In this process, the user first signs in with the username and password in a
normal way. The credentials are verified and then if the automated call
authentication is activated, the user receives a call and is asked to confirm
the sign-in attempt.
Mobile App − Mobile apps for all platforms (Android, iOS and Windows) are
available. This app pushes a notification when a sign-in attempt is made and
then the user can choose to authenticate, if it is genuine attempt.
Text Message − This method sends a one-time password to the registered
mobile phone of the user. They either reply from their phone or enter the one-
time password into their sign-in page.
Automated Call − The automated call asks for the user to validate the sign-in
attempt by pressing a key on their phone’s dial pad.
Step 4 − Next, there is an option, if you wish to link the existing directory
or not. Here, let’s link an existing directory name ‘tutorialspoint’ that was
previously created to this multi-factor provider.
Step 5 − After you click ‘Create’, it will be listed in your services list. Select
the multi-factor provider you just created and you will the following screen.
48
Step 6 − Select ‘Manage’ at the bottom of the screen and you will be taken
to a new page as shown in the following image.
Step 7 − Select ‘Configure’ to choose the authentication.
Step 8 − You can set the number of attempts, change the phone number
from where the call is made (default number is already there), two-way
message timeout (default is 60 seconds), one-time password’s timeout
(default is 300 seconds) under general settings. You can also provide an e-
mail address where you can be notified if one-time password is bypassed.
Step 9 − Scroll down the page and you will see fraud settings. Under Fraud
Setting, you can choose to allow the users to send fraud alerts, block the
user if an alert is reported and also set an e-mail address where alerts are
sent.
After the multi-factor authentication is activated for the users, they will be
asked to choose one of the three methods (automated message, text
message or mobile app) when they sign in to their account next time. The
chosen method will be used to authenticate them each time they sign in to
their account.
Enable the Multi-Factor Authentication for
Existing Directory
One way is to link the directory to multi-factor authentication provider while
creating it, as we seen in the previous section. However, you can also do it
in the following way for a particular user.
Step 1 − Go to your directory by choosing it from the left panel and click
‘Manage MultiFactor Auth’ at the bottom of the screen.
Step 2 − It will take you to the following screen. Here you can select the
user and enable or disable the multi-factor authentication for the user.
49
install the authentication server by clicking the highlighted link. Then you
can configure the setting as desired.
Step 1 − Click the link encircled in the following image.
Step 2 − You will be taken to the following screen, download the setup and
generate activation credentials in order to login to the server.
Once you have downloaded and installed the tool, you have to simply follow
the wizard, in order to connect your FIM information with on-cloud Azure
Active Directory.
50
Microsoft Azure - Data Import & Export
Job
This is very useful service for the clients in case a large amount of data
cannot be accessed over the network from their storage account. Azure
gives an option to its clients that they can put their data on a hard drive
and ship them to Azure datacenters. That data is then uploaded to their
storage account. Similarly, if data is needed to be downloaded by the client
that is not viable to do over the network, they can ship an empty hard drive
to the datacenter and Azure team will copy the data to that drive and ship it
back to the client. In both cases, the data is encrypted.
Data Export Job
Let’s assume you have a large amount data in your Azure storage account
and you want a copy of that data.
Create an Export Job
In this process, you will be given a shipping address, to where the empty
hard drives needs to be shipped.
Step 1 − Login to Azure management portal and select the ‘Storage’ from
the left panel.
Step 2 − Select the storage account.
Step 3 − Click ‘Import/Export’ from the top menu.
Step 4 − Create ‘Export Job’.
Step 5 − On clicking the next arrow, you will see the following screen,
where you will have to provide your contact and shipping details.
Step 6 − In the next screen, you will have to select the Blob Data you want
to export. You can specify the path or choose to export all blob data from
the storage account.
Step 7 − Enter a name for job in lower case letters. Address you can see
here is the address where the hard drives is to be shipped. This address is
based on the location of my storage account.
Step 8 − In the next step, you will have to provide the shipping details of
the hard drive for delivery to datacenter and return to your location.
51
Step 9 − Click next and you are done.
Hard Drives to Be Shipped
In order to determine how many hard drives you need for the Blob data,
you will have to use Microsoft Azure Import/Export Tool. You will have
to download and install this tool on your machine. Only 3.5 inch SATA hard
drive I/II are up to 6TB supported.
Ship the Hard Drives
You need to ship the hard drives to the shipping address obtained while
creating the export job. Then you need to come back to the management
portal to enter the tracking number, in case you chose to provide the
tracking number after shipping in the screen above.
Decrypt the Data
You will have to enter the decryption key before reading the data on hard
drives. You can get the decryption key from your management portal by
selecting the job name.
Data Import Job
If you want to store the large amount of data to your storage account, you
can do so by saving it on the hard drive and shipping it to the datacenter.
Prepare the Hard Drives
You will have to use Microsoft Azure Import/Export Tool to prepare the
hard drives. As mentioned in earlier section, the only 3.5 inches SATA hard
drives are supported for this purpose. This process will create a drive
journal file that you will need while creating the import job in management
portal. The journal file will be saved on your computer.
Create Import job
Step 1 − Login into the management portal and go to the storage account.
Step 2 − Select ‘import/export’ at the bottom of the screen.
Step 3 − Select ‘Create Import Job’.
Step 4 − Check the checkbox and click Next.
Step 5 − In the next screen, provide the contact details of the return
shipping address. Enter the details and click Next.
Step 6 − Upload the Drive Journal File that was created while preparing the
hard drive.
52
Step 8 − Enter the shipping details for the delivery of hard drives to the
datacenter and return to your location.
Ship the Hard Drives to the Datacenter
Ship the hard drive to the address obtained while creating import job in the
management portal. Enter the shipping tracking number for the job in the
management portal in order to complete the job.
Step 3 − Enter the details as shown in the picture above and click ‘Create
Web App’.
Step 4 − Go back to websites in your management portal and you will see
it listed. Click the URL.
53
Step 3 − In this step, you need to connect to Azure subscription account in
order. Click ‘Import’.
Step 5 − For the first time, you will have to ‘Download Subscription file’.
Step 6 − The above step will download a file with extension .publishsetting
on your computer (if you are not logged in, it will ask you to login before
downloading).
Step 7 − Come back to the same pop-up and now browse for the file that
was just downloaded.
Step 8 − Now expand the dropdown and you will see the websites available
in your subscription. As in the picture below you can see two websites. Let’s
select ‘tutorialsPoint’.
Step 9 − On the following screen, leave the defaults on. There are many
options for public methods. We need ‘Web Deploy’ method here. Click
‘Validate Connection’.
Step 10 − On the next screen, again the leave the defaults on.
Step 11 − Finally on the last screen, click publish.
Step 12 − Go to the URL of website and you will see your content.
You can see how easy it is to deploy a website in Azure using Visual Studio.
You can make changes in Visual Studio and publish it from there itself. This
makes testing of applications very easy.
Monitoring the Website
In the management portal, if you go to the website’s dashboard you can
see the figures related to the website. You can control lots of things related
to your website from this section of your management portal. You can see
the website metrics, create backup, configure setting, and scale the
website.
Step 1 − To see the website metric, select monitor from top menu and you
will see the following screen.
Step 2 − Go to the website and select ‘Dashboard’ from the top menu.
54
Step 3 − Scroll down and you will see the following information.
Staged Publishing
Windows Azure enables the deployment of a website in stages. You can
create the deployment slots.
Free 1 No
Shared 1 No
Basic 3 No
Standard 10 Yes
Premium 50 Yes
55
In free and shared service plan, you cannot scale the application as only
one instance is available. In basic plan, you can scale the application
manually. This means you have to check the metrics manually to see if
more instances are needed and then can increase or decrease them from
your Azure management portal. In standard and premium plan, you can
choose to auto scale based on few parameters.
To see the all options available in different plans −
Step 1 − Go to your web app in the management portal and select ‘scale’
from the top menu. You can see under free service plan only 1 instance is
created.
Step 2 − Under shared plan, you can create 1 instance but you don’t have
the option of auto scaling.
Step 3 − Under basic service plan, you can create up to 3 instances but do
have option to auto scale. That means you can increase instances manually
when you need to. Moreover, you can choose the size of the instance.
Step 4 − Under standard service plan, you can chose auto-scaling based on
−
CPU percentage − You can choose to increase the instances depending
upon the average CPU percentage over a specified period of time. In the
following image, you can see we have chosen to increase the instances up
to 3 if average CPU usage gets between 60% and 80%.
Schedule − You can set the number of instances that should run for a
particular day of the week or for a particular time in a day. Additionally, you
can specify the dates when you need to increase the instances.
Here premium option for this application is not discussed. You might see
different options based on your subscription for service plans. But the
concept will remain the same.
Things to Consider
You can change the service plan even after creating it.
All the instances are from the same service plan. You cannot have one instance
from shared and another from standard for the same application. Thus, you
cannot mix and match instances from different service plans for the same
application.
Even if you have opted for auto-scaling, you should keep a check on metrics and
performance of your application for the best out of Azure. This way you would
be able to save money as well as optimize the performance of the applications.
56
Microsoft Azure - Disk Configuration
You would have noticed that we can attach a disk to a virtual machine that
we create in Azure. We will be discussing those disks in this chapter. Disk
here is referred to the data disks that can be stored on Azure. All kinds of
disks are virtual hard drives with .vhd extensions. Vhds are the image file
that stores the contents of physical hard drive. So they are images of the
files, which we usually find on our computer’s hard drive. There are two
types of virtual hard disks −
Operating system VHDs and Data Disks
Image VHDs
On the basis of the extendibility, there are two types of VHDs −
Fixed Size
Dynamically Expanding
Azure supports only fixed sized VHDs. If you have to upload expandable
VHD you will have to first convert it to fixed size VHDs. Maximum size
supported by Azure is 1 terabyte for a disk.
Virtual Machine and Disks
When we create a virtual machine, it always resides in a storage account in
Azure account. If there is no existing storage account in Azure, while
attempting to create a virtual machine, Azure will automatically create one.
If you already have a storage account, it will ask you to choose the storage
account while creating a virtual machine. There is a detailed how-to on
creating a virtual machine in this tutorial.
Create/Attach a Disk in Virtual Machine
Step 1 − Go to the virtual machine.
Step 2 − Select ‘Dashboard’ from the top menu.
Step 3 − Click ‘Attach disk’ → Attach empty disk at the bottom of the
screen.
Step 4 − Enter the details in the following screen that pops up.
It will take few seconds to attach the disk to the virtual machine.
Configure the Disk in Virtual Machine
Step 1 − Connect to the virtual machine through .rpd file downloaded on
your local machine.
Step 2 − In the virtual machine, right-click the windows icon at the left
bottom corner and select ‘Disk Management’.
57
Step 3 − You will see a message saying Disk is available on the screen.
This is the same disk that you attached in the previous step.
Step 4 − Before you can use it, you need to allocate it. You will see that it
is still unallocated. Scroll down on the same screen and locate the disk as
shown in the following image, it is Disk 2. Right-click on it and select ‘New
Simple Volume’.
Step 5 − Follow the wizard. It will ask very general things, like naming the
drive and file system. In the last screen, make sure to keep the quick
format option checked.
Step 6 − After the wizard’s job is over, you will be ready to use the disk. In
this example, we have created the ‘F’ drive. You can create the folder and
files or copy your data in the F drive.
Step 4 − All the vhds in that storage account will be listed. This list will also
contain the vhds from other virtual machines so be very careful while
selecting the vhd.
Step 5 − Select the vhd you want to delete. You must know the name of
the disk in order to identify it among the several vhds in the list (when you
attach the disk you are prompted to enter the name of the disk).
Image Disks
Create an image from Virtual Machine
Step 1 − Go to the management portal.
Step 2 − Select the virtual machine you want to create an image of.
Step 3 − Click ‘Dashboard’ from the top menu.
Step 4 − Click the ‘Capture’ icon at the bottom of the window.
58
Step 5 − Name the image and enter the description.
Step 6 − Once capturing is done, to find the image, follow the points given
below −
Select Virtual Machines from the panel. All the virtual machines in your account
will be listed there.
Click ‘Images’ from the top menu.
Considerations
You might get confused with the names of vhds, when you have multiple
virtual machines under the same storage account. A way of knowing the
name of the vhds associated with a particular machine is running ‘Get-
AzureDisk’ cmdlet in Windows PowerShell. This cmdlet will get you all the
details of disks in each virtual machine.
Step 2 − Locate your virtual machine name in the list. Under that virtual
machine, check the diskname and medialink for your vhd name and link.
Step 3 − You will see the following screen which is the dashboard of your
Azure account. The tiles in the middle of the screen are some of the
common tasks performed by Azure preview portal. To personalize these
tiles click the ‘Settings Icon’ encircled.
Step 4 − It will take you to the following screen. You can maximize the
screen by clicking on the button encircled. You can choose from the
available themes which will change the background color of the screen. On
the same screen, you can choose to show/hide the command labels that
60
display the name of the command. Similarly, you can enable/disable the
animations.
Step 5 − If you scroll down, you will see an option to change the language.
Step 6 − You can also change the size of the tile. You can make it bigger or
smaller. For example, on the following screen if you want my resource
groups bigger −
Right-click on the tile and choose customize.
Alternatively, choose ‘customize’ from the top strip of the tile. It will appear
when you hoover your cursor over it.
Choose the size of the tile. Click ‘Done’ on the top of the screen.
Step 7 − You can also customize your dashboard by moving the tiles as per
your choice. You just have to drag and drop the tile to a different location
on the screen.
Step 8 − You can pin any of your resources to the dashboard.
Go to the resource. Right-click on it or click the three dots.
Step 4 − Click ‘Try Azure Active Directory Premium Now’ and it will be
activated for that directory.
Refresh your page as it might take a few seconds to update and show up on
your portal. Once it is activated, you will see the plan under ‘Licenses’ tab.
Customize Branding
Before moving ahead, make sure that the images (logo, background, square background) you want to
display on the sign-in page are of correct sizes and dimensions. If you don’t take care of this, you would
waste your time uploading images and then ultimately you will find that branding changes are not
done. Here are certain specifications −
Image Size in kb Recommended Maximum Supported
Dimensions Dimensions Format
After you are done, do look for the notifications at the bottom of the
window to make sure that changes are accepted. In the following image,
you can see a notification in red outline which shows that it wasn’t
62
successful in a previous attempt and threw an error. If the changes are not
accepted and an error occurs, click ‘Details’ button to find the cause.
Usually this occurs when the size and dimension of images to be uploaded
are not correct.
Things to Consider
Domain name should be active.
It might take up to an hour for changes to appear on the sign-in page.
To test, choose ‘in-private’ session of internet explorer (or corresponding session
in other browser where cookies don’t affect your browsing).
Step 5 − Click ‘Yes’ to enable users for password reset as shown in the
following picture and scroll down to set the policy.
Step 6 − You can choose to allow users to reset their password in certain
groups.
Step 7 − Refer to the image above; you have four options to choose from
to authenticate the password reset. For example, let’s choose two of them
here. Users in this case will be able to use their mobile phone or alternate
e-mail address to verify the password reset.
63
Step 8 − In ‘Number of Authentication Methods Required’ dropdown, if you
choose 2 than users will have to provide two identification information (e.g.
mobile phone and office phone). In this example, let’s leave it as one.
Step 9 − Next option is whether you want them to register for self-
password reset or not. If you choose ‘No’, the administrator will have to do
it for each user individually.
Step 10 − ‘Customize "Contact Your Administrator" link. You can give a
specific webpage link or an e-mail id where the user can contact when he
encounters a problem while resetting his password.
Step 11 − Click ‘Save’ at the bottom of the screen.
Next time when users login to access their account, they will be asked to
register for password reset service where they can feed in their phone
number or e-mail address. This information will be used when they
forget/lose their password. In this example, as the policy set, they can
choose from one of the options for verification code, through a call on their
mobile phone, a text on their mobile phone or through an e-mail to an
alternate email address.
Step 4 − Choose ‘My groups/All’ from the dropdown at the top.
Step 5 − Click on ‘Create new Group’.
Step 6 − The following screen will pop up. Enter the name and description
of the group.
Step 7 − You can let all users to join the group or choose them to ask for
the group owner’s approval before joining the group. I have chosen the first
option in which approval of the owner is required. This means users who
want to join the group other than users added, will have to ask for
approval.
Step 8 − Choose the desired option and click ‘Create’.
Step 9 − Come back to the ‘Groups’ page. To add members to the group,
select the group. In this case, let’s select ‘Developers Group’.
Step 11 − The following pop-up will list all the users in the directory. You
can add the members by clicking on their name.
Step 12 − You can add/delete member, edit group’s description, and delete
group on this page. Also you can make someone else the owner of this
group.
65
If someone wants to join the group, he will ask for the owner’s approval.
The owner will get a notification and will see the request in ‘approvals’ tab
of the access panel as shown in the image above. Also, if someone has
requested to join a group that is owned by someone else, he will see his
requests here.
Activity Reports
On the same screen, if you scroll down you will see few reports under the
heading ‘Activity Report’. These are the activities like password reset,
registration, etc. Each report name is self-explanatory. Currently, there are
4 types of reports under this category.
If you click on one of them, you will be shown the details as in the following
image. Here, let’s look for the audit report. You can see 1 activity has come
up. All other kinds of reports are listed in the left panel where you can
easily navigate through them. Also, you can download the report in CSV
format by clicking on the ‘Download’ button at the bottom of the screen.
Integrated Application
This category contains the reports of the usage of cloud application in the
organization. This category provides an interactive way to monitor the
applications usage.
66
For example, in the following screen when you click on ‘Application Usage’
in the left panel, you can see that there are 12 sign-ins in App Access Panel
and 3 in Visual Studio application.
In the above screen, we have searched by entering the display name of the
user and the user’s activity details with time and date are listed on the
screen.
Azure Active Directory Editions and Reports
All kinds of reports are not available in all the editions of Azure Active
Directory. The following table lists the types of reports available in three
editions of Azure Active Directory.
Step 3 − Click Data Services → Recovery Services −> Site Recovery Vault
→ Quick Create.
Step 4 − Enter the name and select the region. Make sure this vault is in
the same region where virtual machines and networks are residing.
67
Step 5 − You will be redirected to the following screen. On the following
screen, you can see a dropdown. If you expand the dropdown, you will see
the different scenarios in which recovery can be configured.
When you select this scenario from the dropdown you have to follow the
five steps encircled in the picture above.
Between On-premises Hyper-V Site and Azure
This option is chosen for the replication of virtual machines residing on-
premises Hyper-V server. The choice is suitable when Hyper-V server is
running but VMM is not available.
Prerequisites (on-premises)
On-site host should be Windows server 2012 R2 with Hyper-V role.
Hyper-V should have at least one virtual machine.
68
Master Target Server − The master target server stores the data that is
replicated from protected items.
69
continuously. It is done by Hyper-V recovery manager remotely from Azure.
This procedure consists of collecting the metadata of virtual machines which
is used for recovery.
What is happening in Azure Site Recovery is, the metadata is continuously
collected for recovery purpose. Every time when data is transferred as a
function of continuous health monitoring, it is always encrypted, thus it is
safe and secure.
The data is replicated at the secondary site. The secondary site is made
available in case of failover. In order to ensure that everything is working
fine, test failover can be carried out. Planned and unplanned failovers are
two circumstances in which the secondary site is to be made available. The
planned failover is usually done for testing, maintenance, etc. while
unplanned failover happens when a disaster occurs. No matter what kind of
failover, the virtual machines on the primary site are continuously
monitored and the metadata is collected. Thus, continuous health
monitoring is a feature that keeps the data at the secondary site always
available.
In addition to the back-up and orchestrated recovery, Azure Site Recovery
continuously monitors the health of all its resource instances.
Step 4 − Enter the deployment label name and upload .cspkg and .cscfg
files.
Step 5 − Select the role you want to update or select ‘all’ if want to update
all roles.
Step 6 − Check the checkbox as required and click the ‘Arrow’ on the right
side.
VIP (Virtual IP) Swap
70
You might come across a scenario, when you need to make changes to the
architecture of service. Azure provisions a way which can handle the
upgrading easily. There are two deployment environments - production and
staging. Let’s assume that your service is at production, but you can deploy
the new version in the staging environment. After that you just test it and if
everything is fine, you swap it with the production deployment. Behind the
scene, the virtual IPs of production and staging deployment are swapped,
hence staging becomes production and production becomes staging. While
the swapping happens, the service is not interrupted. All this is done with
no downtime for service. It also makes it easy to rollback to older
production version in case you need to do it.
Step 1 − Login to the management portal.
Step 2 − Go to the service. Select ‘Instances’ from the top menu. You can
see in the following screen, two instances are there for this service.
Step 3 − When you have deployed the service in staging and production
you will see that ‘Swap’ at that bottom of the screen is activated. You just
have to click that Swap icon and it will be done.
Considerations
You can’t swap if you have different number of endpoints for each deployment.
It does not change the IP address of your service.
71