Sunday, 15 March 2020

Azure VM Storage

Azure VM Storage

Disks used by VMs

  • Operating system disk: In Azure, every virtual machine will have an operating system disk.
  • Temporary disk: Each VM contains a temporary drive. The temporary disk provides short-term storage for applications and processes.
  • Data disk: A data disk is a VHD that's attached to a virtual machine to store application data or other data we need to keep.

Performance tiers

  • Standard Storage: It is backed by HDDs and deliver cost-effective storage while still being performant. It is ideal for development and testing, not-critical, and Infrequent access because the max throughput and IOPS per disk is 60MB/s and 500, respectively.
  • Premium Storage: It is backed by SSDs, and deliver high-performance, low-latency disk support for VMs running I/O-intensive workloads. The maximum throughput and IOPS per disk are 250MB/s and 7500, respectively.

Types of the disk in Azure

  • Unmanaged disks: It is the traditional type of disks that have been used by VMs. We can create our storage account and specify the storage account when you create the disk. The scalability targets of SA (20, 000 IOPS) are not exceeded.
  • Managed disks: Managed disks handles the storage account creation/management. We do not have to care about scalability limits the storage account. Microsoft always recommends us to use Azure Managed Disks for new VMs.

Disk encryption

  • Storage Service Encryption: Azure Storage Service Encryption provides encryption-at-rest and safeguards our data to meet our organizational security and compliance commitments. It is enabled by default for all Managed Disks, Snapshots, and Images in every region where managed disks are available.
  • Azure Disk Encryption: Azure Disk Encryption allows you to encrypt the OS and Data disks used by an IaaS Virtual Machine. For Windows, the drives are encrypted using industry-standard BitLocker encryption technology. For Linux, the disks are encrypted using the DM-Crypt technology.

Virtual Machine Availability

  • Availability Set: Availability Set is a logical grouping of VMs within a data center that allows Azure services to understand how our application is built to provide redundancy and availability. An availability set is composed of two additional groupings that protect against hardware failures and allow updates to be applied safely.
    • Fault domains- It is a logical group of the underlying hardware that shares a common network switch and power source, similar to a rack within an on-premises datacenter.
    • Update Domain: It is a logical group of the underlying hardware that will go under maintenance or be rebooted at the same time.
    • Managed Disk fault domains: For VMs using Azure Managed Disks, VMs are aligned with managed disk fault domains when using a managed availability set. This alignment ensures that all the managed disks attached to a VM are within the same managed disk fault domain.
  • Availability Zones: It is a physically separate zone within an Azure region. There are three Availability zones per supported within the Azure region. All availability zone has the same amount of power source, network, and cooling, and is separated from the other Availability Zones within the Azure region.

Storage Availability

  • Azure Managed Disks
    • Locally redundant storage (LRS): We will have three copies of the same data within the same facility. So, if there is a datacenter failure, then there is a high probability that we might lose the data.
  • Storage account-based disks
    • Locally redundant storage (LRS): It maintains three replicas with the facility.
    • Zone redundant storage (ZRS): It maintains three replicas but across facilities.
    • Geo-redundant storage (GRS): The replicas will be maintained in a paired region. For example - if our disk is in Central US, a copy will be kept in East US also.
    • Read-access geo-redundant storage (RA-GRS): The copy will be available for read-only access in a different region.

Creating Availability Set

We will see here how Azure evenly distributes your virtual machines into different fault and update domains of that availability set.
Step 1: Click on New, then type in an Availability set, and press enter. Now, Click on Create.
Azure VM Storage
Step 2: You are currently on the Availability set creation page. Fill in all the required details as shown in the figure below, and click on Create.
Azure VM Storage
Step 3: Now Click on Go to resource to open the Availability set.
Azure VM Storage
Step 4: Click on Virtual Machine. Any virtual machine that you have added to this Availability set will show here.
Azure VM Storage
This is how you can make a web server farm tolerant of both unplanned outages and planned outages.

Azure Virtual Machines - 2

Azure Virtual machine will let us create and use virtual machines in the cloud as Infrastructure as a Service. We can use an image provided by Azure, or partner, or we can use our own to create the virtual machine.
Virtual machines can be created and managed using:
  • Azure Portal
  • Azure PowerShell and ARM templates
  • Azure CLI
  • Client SDK's
  • REST APIs
Following are the configuration choices that Azure offers while creating a Virtual Machine.
  • Operating system (Windows and Linux)
  • VM size, which determines factors such as processing power, how many disks we attach etc.
  • The region where VM will be hosted
  • VM extension, which gives additional capabilities such as running anti-virus etc.
  • Compute, Networking, and Storage elements will be created during the provisioning of the virtual machine.

VM Sizes

It is important to select the right VM size and type for the working of our virtual machine perfectly. So, these are the VM sizes that are available within Azure.
TypeSizesDescription
General-purposeB, Dsv3, Dv3, DSv2, Dv2, DS, D, Av2, A0-7It has balanced CPU-to -memory ratio, It is ideal for testing and development, small to medium databases, and low to medium traffic web servers.
Compute-optimizedFsv2, Fs, FIt has a high CPU-to-memory ratio. It is suitable for medium traffic web servers, network appliances, batch processes.
Memory-optimizedEsv3, Ev3, M, GS, G, DSv2, DS, Dv2, DIs has a high memory-to-CPU ratio. Great for relational database servers, medium to large caches, and in-memory analytics.
Storage optimizedLsIt has high disk throughput and IO that is Ideal for Big Data, SQL, and NoSQL databases.
GPUNV, NC, NCv2, NDIt is a specialized virtual machine that is targeted for heavy graphic rendering and video editing. Available with single or multiple GPUs.
High performance computeH, A8-11It is the fastest and most powerful CPU virtual machine with optional high-throughput network interfaces (RDMA).

Creating Azure Virtual machine in Azure Portal

Step 1: Click on All services and then click on the Virtual machine button, as shown in the following image.
Azure Virtual Machines
Step 2: Click on create, then you will be redirected to the Create Virtual machine page.
Azure Virtual Machines
Step 3: Now, select the image for your virtual machine from the Azure marketplace by clicking on "Create VM from Azure marketplace".
Azure Virtual Machines
Step 4: After selecting the image, the first thing you need to do is to provide a name to your virtual machine.
Azure Virtual Machines
Step 5: Now select the size and type of VM according to your requirements. After that, set a User name and password for your Virtual Machine then click next.
Azure Virtual Machines
Step 6: You are on the disk tab now, Select the disk type you need then click next to redirect on the networking page.
Azure Virtual Machines
Step 7: Select the virtual network, subnet, and IP address for the Virtual machine. We are leaving it as default because we are creating it for the training purpose.
Azure Virtual Machines
Step 8: Now select the management tab, and choose the boot and OS diagnostic option. Then click next.
Azure Virtual Machines
Step 9: In advanced settings, you can embed an extension to the virtual machine.
Azure Virtual Machines
Step 10: Now, on the review and create a window, click on the create button.
Azure Virtual Machines
Step 11: When you click on Create, the further process will start. Wait for a few minutes to complete the processing.
Azure Virtual Machines
Azure Virtual Machines
When your Virtual Machine is created, the following window will appear. You can now use your virtual machine.
Azure Virtual Machines

Next TopicAzure VM Storage

Azure Compute Service -1

The word compute here refers to the hosting model for the computing resources on which our application runs. Azure compute service can be divided broadly into three categories.
  • Infrastructure as a service
  • Platform as a service
  • Serveless services
The most fundamental building block is the Azure virtual machine. Using Azure virtual machine, we can able to deploy different services such as Windows, Linux within the Azure cloud. When we implement a virtual machine, every virtual machine will have an associated OS and data disk.
Azure Compute Service

Azure compute options

Following are the main compute options available in Azure:
  • Virtual Machine: It is an IaaS service, allowing us to deploy and manage VMs inside a virtual network (VNet).
  • App Service: It is a managed PaaS offering for hosting web apps, mobile app back ends, RESTful APIs, or automated business processes.
  • Service Fabric: It is a platform that can run on any environment, including Azure or on-premises. It is an orchestrator of micro-services across a cluster of machine
  • Azure Kubernetes Services: It manages a hosted Kubernetes service for running containerized applications.
  • Azure Container Instances: It offers the fastest and most straightforward way to run a container in Azure without having to provision any virtual machines and without having to adopt a high-level service.
  • Azure Functions: It is a managed FaaS service.
  • Azure Batch: It is a managed service for running large-scale parallel and high-performance computing (HPC) applications.
  • Cloud Services: It is a managed service for running cloud applications. It uses a PaaS hosting model.
When you are deploying any virtual machine, such as running some scripts, etc.. For that purpose, Azure provided several extensions such as custom script, PowerShell DSC, which stands for desired state configuration. You can have a diagnostic extension to collect all the logs that are emitted from that virtual machine. Also, we can have anti-malware software installed on that virtual machine to protect against viruses, etc.
Using App service, we can deploy web applications, mobile backend services, API Apps, etc. If we have a requirement to deploy a microservices-based application, then we can use service fabric.
Within the serverless service, we have Azure functions and logic apps. Using which we can able to deploy snippets of code on the cloud and trigger them without worrying about the underlying infrastructure.
Three key services are associated with Azure compute service:
Azure security center: It is used to understand the security posture of your virtual machines. We can define policies, and based on the policies, we can collect the information from Azure virtual machines and identify the threat. It will provide recommendations associated with that.
Active Directory: It is used to control that who can access virtual machines or scale sets or availability sets or in-fact any other Azure services within Azure.
Key Vault: It is used to store certificated keys or any sensitive information within Azure securely.

Azure Portal Overview

Azure portal is a platform where we can access and manage all our applications at one place. We can build, manage, and monitor everything from simple web-apps to complex cloud applications using a single console.
So, first of all, to log into the Azure portal, we need to register. And, if we are registering for the first time, we will get 12 months of popular free services. And also, depending on the country, we will get some amount of free credit that needs to be consumed within 30 days. And in addition to all these things, we will get some services that are free forever.
So, make sure you are completely ready to try all the services before you register for Azure because that credit is only available for 30 days.
Creating an Azure Account
Step 1: Open https://azure.microsoft.com/en-us/free/ then click on Start free; it will redirect you to the next step.
Azure Portal Overview
Step 2: It will ask you to login with your Microsoft account. If you already have a Microsoft account, you can fill the details and login. And if you don?t have one, you must signup first to proceed further.
Azure Portal Overview
Step 3: After logging in to your Microsoft Account. You will be redirected to the next page, as shown below. Here you need to fill the required fields, and they will ask for your credit card number to verify your identity and to keep out spam and bots. You won’t be charged unless you upgrade to paid services.
Azure Portal Overview
Step 4: After filling all the details, it will ask you to check the privacy and agreement. Click the checkbox and then click on Sign up.
Azure Portal Overview
Step 5: Your free Account is created, and you will be redirected to the Azure homepage, as shown in the figure below. You can take a tour of Azure services.
Azure Portal Overview
When you log-in to Azure for the first time. The Azure portal looks similar to the picture given below. We will see popular tools and services on the homepage.
Azure Portal Overview
Creating a Resource
To create a resource, you can select any resource form the homepage.
Or, if you want to create another resource that is not on the homepage, you can browse the Navigation Drawer on the top left corner of the screen.
Azure Portal Overview
In case if you can't find the right resource in the navigation drawer, you may click on "All Service" in the navigation drawer, and the following window will appear with all the services available in Azure.
Azure Portal Overview
There is one more way to create a resource. Click on "Create a resource" and then type the desired resource name in the search box.
This portal not only includes the services provided by Azure but also includes service provided by the third-party providers on the platform of Azure. They were using CPU or virtual machines of Azure and deployed their platform on it and offering that platform as a Service to you on a pay as you go basis.
Resource Group: A container that holds the related resources for an Azure solution. It can include all the resources for the solution or include only those resources which you want to manage as a group. Resource groups are containers of resources that have a common lifecycle or share an attribute such as "all SQL servers" or "Application Attendance".
Creating a Resource Group
Step 1: Hover your cursor over the "Resource groups" button inside the navigation drawer, then click on "Create" in the appeared pop up.
Azure Portal Overview
Step 2: In the next window, you have to fill the "Subscription" type, Resource group name, and Region. Then click review + create or next (to add tags).
Azure Portal Overview
Step 3:You are now on the Tags window, where you can create a tag to organize Azure resources by categories logically. We have to give it a name and value. Click Next
Azure Portal Overview
Step 4: You are now on the Review + Create window, Check the details shown below, if they are correct, then click on create.
Azure Portal Overview
Step 5: You will be redirected to the homepage, and a notification will appear showing the Resource group is created.
Azure Portal Overview
Step 6: Click on Go to Resource group to view the resource group window.
Azure Portal Overview
Let's have a quick look at the menu item of this page, but remember it may be different for different resources. For example, the configuration setting will be different for VMs as compared to databases.
1) Overview: On the overview pan, we can see all the resources that belong to that resource group and also some Metadata of the resource groups such as to which subscription it belongs to, any tags associated with it, what deployments had been carried out, etc.
2) Activity log: It provides administrative activity data that has been carried out on that particular resource. So, in this case, we create a resource group. Hence we have one update resource succeeded. So when we click on it, we can see the Metadata associated with it, and when we click on JSON, we can see what operations have been carried-out (See figure below).
Azure Portal Overview
3) Access control (IAM): If we want to delegate access to any resource to somebody else, then we can assign a contributor role or owner role to any resource group to somebody. And the details of this role-based access control we can find on the Security Services page of this tutorial.
4) Tags: We can assign Tags to any resource in Azure to classify them into categories.
5) Events: Any events that are happening in any particular resource group, we can subscribe to those events and do something with it. For example, a virtual machine has been started or stopped. In that case, we can capture the event and send an email to somebody.
6) Deployment: We can see any implementations that happened here.
7) Policies: We can create and view policies here.
8) Cost Management: We can view the resource cost here.
9) Monitoring: We can set alerts, see the metrics associated with this resource group, diagnostic settings, and so on.
Subscription
To view subscription. Go on the search box and type subscription and click on "Subscription," as shown in the figure below. You can see the subscribed services here.
Azure Portal Overview
We are subscribed to the Free Trial here. See the figure below.
Azure Portal Overview
When you click on the subscription, you can view all the details, which includes the subscription name, Cost, ID, to which directory it belongs to, and billing period.
Azure Portal Overview
There is an integrated management portal, which we need to see.
Azure Portal Overview
It is a portal where we can see all the subscriptions we have.
Azure Portal Overview
So we can see here, we have one free subscription. If we click on Free Trial, we can see all the costs we have incurred, and we can see the billing history, and also we can set alerts. For example, if the cost is crossing a certain limit, then we will get alerted.
Azure Portal Overview
And on the right-hand side tile below, we have options to manage the payment methods, download the details of the uses, contact Microsoft support and change the subscription details, edit subscription details, change address, change partner, etc.
Azure Portal Overview

Azure Introduction to Cloud Computing

Introduction to Cloud Computing

Cloud Computing is the delivery of computing services such as servers, storage, databases, networking, software, analytics, intelligence, and more, over the Cloud (Internet).
Introduction to Cloud Computing
Cloud Computing provides an alternative to the on-premises datacentre. With an on-premises datacentre, we have to manage everything, such as purchasing and installing hardware, virtualization, installing the operating system, and any other required applications, setting up the network, configuring the firewall, and setting up storage for data. After doing all the set-up, we become responsible for maintaining it through its entire lifecycle.
But if we choose Cloud Computing, a cloud vendor is responsible for the hardware purchase and maintenance. They also provide a wide variety of software and platform as a service. We can take any required services on rent. The cloud computing services will be charged based on usage.
Introduction to Cloud Computing
The cloud environment provides an easily accessible online portal that makes handy for the user to manage the compute, storage, network, and application resources. Some cloud service providers are in the following figure.
Introduction to Cloud Computing

Advantages of cloud computing

  • Cost: It reduces the huge capital costs of buying hardware and software.
  • Speed: Resources can be accessed in minutes, typically within a few clicks.
  • Scalability: We can increase or decrease the requirement of resources according to the business requirements.
  • Productivity: While using cloud computing, we put less operational effort. We do not need to apply patching, as well as no need to maintain hardware and software. So, in this way, the IT team can be more productive and focus on achieving business goals.
  • Reliability: Backup and recovery of data are less expensive and very fast for business continuity.
  • Security: Many cloud vendors offer a broad set of policies, technologies, and controls that strengthen our data security.

Types of Cloud Computing

Introduction to Cloud Computing
  • Public Cloud: The cloud resources that are owned and operated by a third-party cloud service provider are termed as public clouds. It delivers computing resources such as servers, software, and storage over the internet
  • Private Cloud: The cloud computing resources that are exclusively used inside a single business or organization are termed as a private cloud. A private cloud may physically be located on the company’s on-site datacentre or hosted by a third-party service provider.
  • Hybrid Cloud: It is the combination of public and private clouds, which is bounded together by technology that allows data applications to be shared between them. Hybrid cloud provides flexibility and more deployment options to the business.

Types of Cloud Services

Introduction to Cloud Computing
  1. Infrastructure as a Service (IaaS): In IaaS, we can rent IT infrastructures like servers and virtual machines (VMs), storage, networks, operating systems from a cloud service vendor. We can create VM running Windows or Linux and install anything we want on it. Using IaaS, we don’t need to care about the hardware or virtualization software, but other than that, we do have to manage everything else. Using IaaS, we get maximum flexibility, but still, we need to put more effort into maintenance.
  2. Platform as a Service (PaaS): This service provides an on-demand environment for developing, testing, delivering, and managing software applications. The developer is responsible for the application, and the PaaS vendor provides the ability to deploy and run it. Using PaaS, the flexibility gets reduce, but the management of the environment is taken care of by the cloud vendors.
  3. Software as a Service (SaaS): It provides a centrally hosted and managed software services to the end-users. It delivers software over the internet, on-demand, and typically on a subscription basis. E.g., Microsoft One Drive, Dropbox, WordPress, Office 365, and Amazon Kindle. SaaS is used to minimize the operational cost to the maximum extent.
Introduction to Cloud Computing

Microsoft Azure Tutorial

Microsoft Azure is a cloud computing platform that provides a wide variety of services that we can use without purchasing and arranging our hardware. It enables the fast development of solutions and provides the resources to complete tasks that may not be achievable in an on-premises environment. Azure Services like compute, storage, network, and application services allow us to put our effort into building great solutions without worrying about the assembly of physical infrastructure.
This tutorial covers the fundamentals of Azure, which will provide us the idea about all the Azure key services that we are most likely required to know to start developing solutions. After completing this tutorial, we can crack job interviews or able to get different Microsoft Azure certifications.

What is Azure

Microsoft Azure is a growing set of cloud computing services created by Microsoft that hosts your existing applications, streamline the development of a new application, and also enhances our on-premises applications. It helps the organizations in building, testing, deploying, and managing applications and services through Microsoft-managed data centers.

Azure Services

  • Compute services: It includes the Microsoft Azure Cloud Services, Azure Virtual Machines, Azure Website, and Azure Mobile Services, which processes the data on the cloud with the help of powerful processors.
  • Data services: This service is used to store data over the cloud that can be scaled according to the requirements. It includes Microsoft Azure Storage (Blob, Queue Table, and Azure File services), Azure SQL Database, and the Redis Cache.
  • Application services: It includes services, which help us to build and operate our application, like the Azure Active Directory, Service Bus for connecting distributed systems, HDInsight for processing big data, the Azure Scheduler, and the Azure Media Services.
  • Network services: It helps you to connect with the cloud and on-premises infrastructure, which includes Virtual Networks, Azure Content Delivery Network, and the Azure Traffic Manager.

How Azure works

It is essential to understand the internal workings of Azure so that we can design our applications on Azure effectively with high availability, data residency, resilience, etc.
What is Azure
Microsoft Azure is completely based on the concept of virtualization. So, similar to other virtualized data center, it also contains racks. Each rack has a separate power unit and network switch, and also each rack is integrated with a software called Fabric-Controller. This Fabric-controller is a distributed application, which is responsible for managing and monitoring servers within the rack. In case of any server failure, the Fabric-controller recognizes it and recovers it. And Each of these Fabric-Controller is, in turn, connected to a piece of software called Orchestrator. This Orchestrator includes web-services, Rest API to create, update, and delete resources.
When a request is made by the user either using PowerShell or Azure portal. First, it will go to the Orchestrator, where it will fundamentally do three things:
  1. Authenticate the User
  2. It will Authorize the user, i.e., it will check whether the user is allowed to do the requested task.
  3. It will look into the database for the availability of space based on the resources and pass the request to an appropriate Azure Fabric controller to execute the request.
Combinations of racks form a cluster. We have multiple clusters within a data center, and we can have multiple Data Centers within an Availability zone, multiple Availability zones within a Region, and multiple Regions within a Geography.
  • Geographies: It is a discrete market, typically contains two or more regions, that preserves data residency and compliance boundaries.
  • Azure regions: A region is a collection of data centers deployed within a defined perimeter and interconnected through a dedicated regional low-latency network.
Azure covers more global regions than any other cloud provider, which offers the scalability needed to bring applications and users closer around the world. It is globally available in 50 regions around the world. Due to its availability over many regions, it helps in preserving data residency and offers comprehensive compliance and flexible options to the customers.
What is Azure
  • Availability Zones: These are the physically separated location within an Azure region. Each one of them is made up of one or more data centers, independent configuration.

Azure Pricing

It is one of the main reasons to learn Microsoft Azure. Because Microsoft is providing free Credits in the Azure account to access Azure services for free for a short duration. This credit is sufficient for people who are new at Microsoft Azure and want to use the services.
Microsoft offers the pay-as-you-go approach that helps organizations to serve their needs. Typically the cloud services will be charged based on the usage. The flexible pricing option helps in up-scaling and down-scaling the architecture as per our requirements.

Azure Certification

Microsoft Azure helps to fill the gap between the industry requirement and the resource available. Microsoft provides Azure Certification into three major categories, which are:
  • Azure Administrator: Those who implement, monitor, and maintain Microsoft Azure solutions, including major services.
What is Azure
  • Azure Developer: Those who design, build, test, and maintain cloud solutions, such as applications and services, partnering with cloud solution architects, cloud DBAs, cloud administrators, and clients to implement these solutions.
What is Azure
  • Azure Solution Architect: Those who have expertise in compute, network, storage, and security so that they can design the solutions that run on Azure.
What is Azure
All these certifications are divided into different levels. If anyone is planning to get certified, then he/she first has to get an associate-level certification and then go for the advanced level.

Prerequisite

Before Learning AWS, one should have basic knowledge of cloud computing and computer fundamentals.

Audience

Our Microsoft Azure tutorial is designed for students and working IT professionals who are new to Cloud Computing and want to pursue or switch their career path as Microsoft Azure Developer or Administrator.

Scope of this tutorial

We will see the overview of cloud computing, the inner working of Azure, and how azure allocate resources. After that, we will dive into the different areas of Azure services i.e., Storage services, Compute services, Network services, App services, Data Bases, Analytics, Integration services, IoT, Security services, Monitoring and Diagnostics, and Tools. This tutorial also provides the idea about creating VMs, website and storage accounts, etc.