Azure Archives - KarthikTechBlog https://karthiktechblog.com/category/azure/ Everyone can code! Sat, 27 Nov 2021 14:52:43 +0000 en-US hourly 1 https://wordpress.org/?v=6.5.2 https://karthiktechblog.com/wp-content/uploads/2022/08/cropped-lsc-logo-png-new-3-32x32.png Azure Archives - KarthikTechBlog https://karthiktechblog.com/category/azure/ 32 32 Provision virtual machines using ARM Templates | Implement IaaS solutions | Part 4 https://karthiktechblog.com/azure/provision-virtual-machines-using-arm-templates-implement-iaas-solutions-part-4/?utm_source=rss&utm_medium=rss&utm_campaign=provision-virtual-machines-using-arm-templates-implement-iaas-solutions-part-4 https://karthiktechblog.com/azure/provision-virtual-machines-using-arm-templates-implement-iaas-solutions-part-4/#respond Sat, 27 Nov 2021 14:52:43 +0000 https://karthiktechblog.com/?p=923 This post covers how to provision virtual machines using ARM Templates that is part 4 of Implement Iaas Solutions. We have been learning how to provision virtual machines using various methods like Azure Portal, CLI, Powershell. Let’s learn about ARM Templates. An ARM template is a JSON‑formatted file that is a configuration document that defines […]

The post Provision virtual machines using ARM Templates | Implement IaaS solutions | Part 4 appeared first on KarthikTechBlog.

]]>
This post covers how to provision virtual machines using ARM Templates that is part 4 of Implement Iaas Solutions. We have been learning how to provision virtual machines using various methods like Azure Portal, CLI, Powershell. Let’s learn about ARM Templates.

An ARM template is a JSON‑formatted file that is a configuration document that defines what resources you want to be deployed in Azure with their configurations. You can create any resource with an ARM template.

Provision virtual machines using ARM Templates | Implement IaaS solutions | Part 4

Understanding ARM Templates

I will be focusing on Virtual Machine in this ARM Template topic. ARM templates are a building block for deployment automation. Using ARM templates, you can parameterize the configuration elements for resources defined in an ARM template.

You can use parameters for commonly changed configuration elements such as virtual machine names and many more. Other elements are image names, network security, storage account name, and many more.

After that, you can then use that same ARM template repeatedly to deploy the environment defined in the template. However, use different parameters to customize each environment at deployment time.

For example, you can have each set of parameters for Dev, QA, Stage, and one for Production that will provide consistency to your deployments. 

How ARM Template works?

 You create an ARM template and then an ARM template is submitted to Azure Resource Manager for deployment. The tools used are Azure CLI, Powershell, Azure Portal.

Once the ARM Template is deployed, it reads the details inside the ARM Template like creating resources, depleting resources modifying existing properties or creating new properties.

Creating ARM Templates

  1. You can build and export an ARM template from the Azure portal.
  2. Write your own manually.
  3. Also, you can start from the Quickstart library, which is a collection of community templates available in the Azure portal in the Custom deployment blade.

In order to focus on the higher-level process of how ARM templates work, we will mainly cover the building and exporting of an ARM template in the Azure portal.

How it works?

After you deploy an ARM template, Resource Manager receives that template, formatted as JSON, and then converts the template into REST API operations. This means you can use ARM Templates using many tools that include Azure Portal, CLI, Powershell.

ARM Template Structure

Let’s go through the structure of the ARM Template.

{
    "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
    "contentVersion": "1.0.0.0",
	"apiProfile":"",
    "parameters": { },
    "variables": {},
	"functions": [],
    "resources": [],
    "outputs": {}
}

First, we have some header information. Schema is the location of the JSON schema file that describes the template’s language.

Content version is the version of the template, which is defined by you so that you can version control your templates.

apiProfile, which allows for versioning of the resource types that are defined in the template.

Parameters, which are used to provide values during deployment so that the same template can be reused for multiple deployments. This is where you’ll define deployment‑specific configuration parameters, and this is very useful when you want to be able to use that same template over and over again, but change out the parameters for specific deployments. Common parameters are resource groups, regions, resource names, and network configurations.

Variables define values that are reused in your templates and are often constructed from parameter values.

Functions allow you to create customized functions that simplify your templates and help enable reuse of templates. A common use for functions is generating a resource name based on the environment that it’s being deployed into.
To create your own functions, see User-defined functions.

The commonly used function is concat which combines multiple string values and returns the concatenated string, or combines multiple arrays and returns the concatenated array.

Example

{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "prefix": {
      "type": "string",
      "defaultValue": "prefix"
    }
  },
  "resources": [],
  "outputs": {
    "concatOutput": {
      "type": "string",
      "value": "[concat(parameters('prefix'), '-', uniqueString(resourceGroup().id))]"
    }
  }
}

for more information read it from string functions

DEMO

It is time for the demo, to get started we will log in to Azure Portal and create an ARM Template. Follow the instructions in detail of how to Provision virtual machines using the Azure portal | Implement IaaS solutions | Part 1

Once you are on the final page as shown in the image below.

Provision virtual machines using ARM Templates

Instead of clicking on create which we normally do, we will click on “Download a template for automation” to view the template. This creates the template and parameters JSON files needed for an ARM template‑based deployment for the virtual machine that we just configured.

From this screen at the top, we can click Download to download the template and parameters files, we can click Add to add them to a library for further deployments inside of Azure, or we can deploy them right from here.

Examining an ARM Template

Examining an ARM Template

In this template, we can see that we have three sections defined, Parameters, Variables, and Resources. It is important to note that not all the sections are mandated to fill, many are optional. If we don’t provide them, the default values will be taken.

In this template, we have 19 different parameters defined, 3 variables, and 5 resources.

Parameter section | ARM Template

The template starts with parameters, you can see that these are the parameters used to provide values for unique deployments allowing us to change them at runtime. In this section of a template, it’s just the declaration of the parameters. The actual parameters of values for this particular deployment are going to be in the parameters file.

Some of the exposed parameters in this template are location, networkInterfaceName, enableAcceleratedNetworking, networkSecurityGroupName, virtualNetworkName, networkSecurityGroupRules, and so on.

A collection of parameters are exposed in this template. The values are going to come from the parameters.json file. clicking on the parameter tab will present you with the following parameter values.

arm template parameter values

All the sections that we filled in the Azure portal to create a virtual machine are included in the parameter values.

Decoupling these values from the template allows us to use that template file over and over again, setting unique values for each deployment in this parameters file.

Variables section | ARM Template

Variables are used to define values for reuse in a template. And there are three variables in this template, we will look into those.

The first variable is nsgId. A system function being used, resourceId. This will return the resource ID of a defined resource. The value that is returned from that function is stored in the variable nsgId.

nsgId is reused within the ARM template so frequently.

Provision virtual machines using ARM Templates

We then see the virtual network name as the second variable that was passed in via a parameter. And then for the final variable, we see subnetRef. It’s going to use another system function, concat, to concatenate together the values of the vnetId variable, the string subnets, and a template parameter named subnetName. That’s going to combine those strings all together to set the value for subnetRef.

Resources section | ARM Template

The last part is resources. There are 5 resources defined in this template. These are the actual resources being deployed in Azure by this ARM template.

In the resources section, we have an important section called the dependsOn section, which is a list of resources that this resource depends on before it gets deployed. And so this is a way for us to define some ordering and how resources in this template are created. This network interface won’t be created until these three other resources defined are deployed.

Similarly, all the other sections are defined in this way and the ARM template will deploy the dependent resources first before any other resources are deployed.

Deploying ARM Template

Provision virtual machines using ARM Templates | Implement IaaS solutions | Part 4

This downloads a zip file containing parameter.json and template.json files. If I wanted to deploy this template as is, I can click Deploy and that will take me to the custom deployment page to start a deployment. Clicking Deploy, you can see that it has prepopulated the parameters that we entered when we created the ARM template.

Deploy a custom template

Let me show you how to build this template from scratch. In the search box, search with “Deploy a custom template” and choosing this will present a screen to get started with our own template.

Provision virtual machines using ARM Templates | Implement IaaS solutions | Part 4

You need to provide an Admin password that was not in the downloaded template. You can edit the parameter file and update the admin password there or provide it in the Azure portal.

Now, it’s a regular step to click on create a virtual machine.

Deploying ARM Template using Powershell

#Let's login, may launch a browser to authenticate the session.
Connect-AzAccount -SubscriptionName 'Demo Account'


#Ensure you're pointed at your correct subscription
Set-AzContext -SubscriptionName 'Demo Account'


#If you resources already exist, you can use this to remove the resource group
Remove-AzResourceGroup -Name 'lscdemo-rg'


#Recreate the Resource Group
New-AzResourceGroup -Name 'lscdemo-rg' -Location 'EastUS'


#We can deploy ARM Templates using the Portal, Azure CLI or PowerShell
#Make sure to set the adminPassword parameter in parameters.json around line 80 "adminPassword" prior to deployment.
#Once finished, look for ProvisioningState Succeeded.
New-AzResourceGroupDeployment `
    -Name mydeployment -ResourceGroupName 'lscdemo-rg' `
    -TemplateFile './template/template.json' `
    -TemplateParameterFile './template/parameters.json' 

Using this template we can now deploy the virtual machine in Azure.

Clean up resource

Now the Demo is complete for creating a virtual machine. It is time to clean up the resources we used.

When no longer needed, you can delete the resource group, virtual machine, and all related resources.

Go to the resource group for the virtual machine, then select Delete resource group. Confirm the name of the resource group to finish deleting the resources.

Related resources

Conclusion

In this post, I have covered the topic of the Provision of virtual machines using ARM Templates. This is part of implementing IaaS solutions, part 4. Happy learning!.

The post Provision virtual machines using ARM Templates | Implement IaaS solutions | Part 4 appeared first on KarthikTechBlog.

]]>
https://karthiktechblog.com/azure/provision-virtual-machines-using-arm-templates-implement-iaas-solutions-part-4/feed/ 0 923
Provision virtual machines using PowerShell | Implement IaaS solutions | Part 3 https://karthiktechblog.com/azure/provision-virtual-machines-using-powershell-implement-iaas-solutions-part-3/?utm_source=rss&utm_medium=rss&utm_campaign=provision-virtual-machines-using-powershell-implement-iaas-solutions-part-3 https://karthiktechblog.com/azure/provision-virtual-machines-using-powershell-implement-iaas-solutions-part-3/#comments Wed, 03 Nov 2021 21:40:35 +0000 https://karthiktechblog.com/?p=881 Introduction This post covers how to provision virtual machines using PowerShell. This is part of implementing the IaaS solutions topic (AZ-204 Certification). This is a continuation of the previous post Provision virtual machines using Azure CLI. PowerShell scripts can be executed in various ways. You can use PowerShell from Azure Portal (Cloud Shell), PowerShell software, […]

The post Provision virtual machines using PowerShell | Implement IaaS solutions | Part 3 appeared first on KarthikTechBlog.

]]>
Introduction

This post covers how to provision virtual machines using PowerShell. This is part of implementing the IaaS solutions topic (AZ-204 Certification). This is a continuation of the previous post Provision virtual machines using Azure CLI.

Provision virtual machines using PowerShell | Implement IaaS solutions | Part 3

PowerShell scripts can be executed in various ways. You can use PowerShell from Azure Portal (Cloud Shell), PowerShell software, or using Visual Studio Code. I showed you how to use the PowerShell window in my previous demo. To install PowerShell in Visual Studio Code follow the instructions below.

The advantage of using Visual Studio Code IDE is that the syntax is nicely highlighted for the PowerShell commands. This helps in finding the issue upfront.

How to use PowerShell in Visual Studio Code IDE

Install Visual Studio Code IDE that is an open-source and free software from Microsoft.

Install PowerShell plugin from the extension. Refer to the below image.

PowerShell using Visual Studio Code editor

Install PowerShell on Windows, Linux, and macOS

Choose the right installation from this link. As of this writing, PowerShell 7 is the latest. To install the Azure Az module, use this link Install the Azure Az PowerShell module.

How to run PowerShell using Azure Cloud Shell – Azure Portal

Provision virtual machines using PowerShell | Implement IaaS solutions | Part 3

Log in to the Azure portal and on the top right side, click on “Cloud Shell”, which opens a prompt to choose either Bash or PowerShell.

Choose Bash to run Azure CLI commands. In our current demo, we will choose PowerShell. After choosing the PowerShell/Bash, it will prompt to install a Storage which will cost a small amount. This is really a small amount.

Provision virtual machines using PowerShell

Creating a virtual machine in Azure with Azure PowerShell using the Az module. Logically the process is the same as creating a virtual machine with Azure CLI.

The first step to creating a virtual machine in PowerShell is to create a PSCredential object which will hold the username and password.

This is used for the credential for the local administrator account on the virtual machine that is deployed.

To create that PSCredential, you define a username and password. Password should match the password requirement from Azure. E.g. combination of Capital letter, lower case letter, number, special characters and it should be 8 and 123 characters long.

Now, you need to convert the string password defined here into a secure string, and you can do that with the cmdlet ConvertTo‑SecureString

Once you have the username and password variables defined, you can create a new PSCredential object with New‑Object, specifying the PSCredential object type, and then passing in the username and password variables as parameters into New‑Object.

Complete PowerShell Commands to provision virtual machines

#This command is required only when you use PowerShell other than Azure Portal as Portal is signed i already we dont need this to run.
Connect-AzAccount -SubscriptionName 'Demo Account'
#Ensure you're pointed at your correct subscription (if you have more than one subscription)
Set-AzContext -SubscriptionName 'Demo Account'


#Create a Resource Group
New-AzResourceGroup -Name "LSCDemo-rg" -Location "EastUS"


#Create a credential to use in the VM creation
$username = 'demoadmin'
$password = ConvertTo-SecureString 'Strongpassword$%^&*' -AsPlainText -Force
$WindowsCred = New-Object System.Management.Automation.PSCredential ($username, $password)


#Create a Windows Virtual Machine, can be used for both Windows and Linux.
#Note, you can create Windows or Linux VMs with PowerShell by specifying the correct Image parameter.
New-AzVM `
    -ResourceGroupName 'LSCDemo-rg' `
    -Name 'LSCDemo-win-az' `
    -Image 'Win2019Datacenter' `
    -Credential $WindowsCred `
    -OpenPorts 3389


#Get the Public IP Address (select-object  is used to pick require property alone from entire JSON response)
Get-AzPublicIpAddress `
    -ResourceGroupName 'LSCDemo-rg' `
    -Name 'LSCDemo-win-az' | Select-Object IpAddress

In this demo, the screenshot shows how Azure rejects if the password does not match the requirements.

Provision virtual machines using PowerShell
Provision virtual machines using PowerShell

Now the VM is created and we have a public IP to remote login using RDP. You can check this post on how to log in to VM and install Web Server for application deployment.

Video tutorial

Clean up resource

Now the Demo is complete for creating a virtual machine. It is time to clean up the resources we used.

When no longer needed, you can delete the resource group, virtual machine, and all related resources.

Go to the resource group for the virtual machine, then select Delete resource group. Confirm the name of the resource group to finish deleting the resources.

Related resources

Conclusion

In this post, I have covered the topic of the Provision of virtual machines using Azure PowerShell that is part of implementing IaaS solutions. This post also covers various other PowerShell tools to use. For more, refer to AZ-204 Certification. Happy learning!.

The post Provision virtual machines using PowerShell | Implement IaaS solutions | Part 3 appeared first on KarthikTechBlog.

]]>
https://karthiktechblog.com/azure/provision-virtual-machines-using-powershell-implement-iaas-solutions-part-3/feed/ 1 881
Provision virtual machines using Azure CLI | Implement IaaS solutions | Part 2 https://karthiktechblog.com/azure/provision-virtual-machines-using-azure-cli-implement-iaas-solutions-part-2/?utm_source=rss&utm_medium=rss&utm_campaign=provision-virtual-machines-using-azure-cli-implement-iaas-solutions-part-2 https://karthiktechblog.com/azure/provision-virtual-machines-using-azure-cli-implement-iaas-solutions-part-2/#respond Tue, 02 Nov 2021 19:10:35 +0000 https://karthiktechblog.com/?p=860 Introduction This post covers how to Provision virtual machines using Azure CLI. This is part of implementing the IaaS solutions topic. This is a continuation of the previous post Provision virtual machines using the Azure portal. This module’s topics are part of implementing IaaS solutions and I will cover “Provision Virtual Machine”. Provision virtual machines […]

The post Provision virtual machines using Azure CLI | Implement IaaS solutions | Part 2 appeared first on KarthikTechBlog.

]]>
Introduction

This post covers how to Provision virtual machines using Azure CLI. This is part of implementing the IaaS solutions topic. This is a continuation of the previous post Provision virtual machines using the Azure portal.

This module’s topics are part of implementing IaaS solutions and I will cover “Provision Virtual Machine”.

provision windows and linux virtual machine

Provision virtual machines using Azure CLI

In order to work with Azure CLI, first, we should download the Azure CLI and install it. I have a windows machine so I choose to download CLI for windows.

Install Azure CLI on Windows

The Azure CLI is available to install in Windows, macOS, and Linux environments. It can also be run in a Docker container and Azure Cloud Shell. View complete details here

Now, I have installed Azure CLI. Let’s get started with its usage.

How to use CLI

After CLI installation, you can use the windows command prompt or PowerShell.

I have used PowerShell for the demo.

Open PowerShell for CLI

Click on start or windows key => type “powershell” => open Windows PowerShell

On the PowerShell window, enter the script as below and log in interactively. Login interactively meaning, a browser will open and you need to sign in to Azure Portal with your Azure portal credentials.

az login

az stands for azure and will be recognized once Azure CLI is installed in your machine.

Provision virtual machines using Azure CLI

Azure CLI commands to provision windows virtual machines

There are a lot many az vm commands. the below commands are used to create a VM with minimum required configurations. to check the full command list check az vm commands.

#Login interactively and set a subscription to be the current active subscription. My subscription name is "Demo Account", chnage to your subscription name

az login
az account set --subscription "Demo Account"


#Create a Windows VM.

#check existing group listed in table format 
az group list --output table 


#Create a resource group.
az group create --name "LSCDemo-rg" --location "eastus"


#Creating a Windows Virtual Machine (for image, choose any avilable name)
az vm create 
    --resource-group "LSCDemo-rg" 
    --name "LSCDemo-win-cli" 
    --image "win2019datacenter" 
    --admin-username "demoadmin" 
    --admin-password "jsfdhsd$$Ddd$%^&*" 


#Open RDP for remote access, it may already be open
az vm open-port 
    --resource-group "LSCDemo-rg" 
    --name "LSCDemo-win-cli" 
    --port "3389"


#Get the IP Addresses for Remote Access
az vm list-ip-addresses 
    --resource-group "LSCDemo-rg" 
    --name "LSCDemo-win-cli" 
    --output table

Provision virtual machine using Azure CLI | Implement IaaS solutions | Part 2

Verify and Log into the Windows VM via RDP

This topic is already covered in my previous post, if you haven’t read the post, check here Provision virtual machines using the Azure portal | Implement IaaS solutions | Part 1

Azure CLI commands to provision linux virtual machines

Creating Linux virtual machines is almost the same as creating a Windows VM. There are only a few changes and the authentication mechanism needs to be changed. Let’s dive in and learn.

The authentication mechanism used for Linux is SSH. First, we need to generate a public/private RSA key pair, to do so you can use “ssh-keygen” available in your machine.

Steps

  1. Type “ssh-keygen” in run command. This opens up a terminal.
  2. “Enter file in which to save the key (C:\Users\karth/.ssh/id_rsa):” for this promt, leave it. Just press enter. This action will create a folder under current user name.
  3. Enter passphare. enter a password here and then enter again when asked.
  4. That’s it, the file is created.
ssh-keygen for rsa key
ssh-keygen to generate RSA key for Linux
#Creating a Linux Virtual Machine
az vm create 
    --resource-group "LSCDemo-rg" 
    --name "LSCDemo-linux-cli" 
    --image "UbuntuLTS" 
    --admin-username "demoadmin" 
    --authentication-type "ssh" 
    --ssh-key-value ~/.ssh/id_rsa.pub 


#OpenSSH for remote access, it may already be open
az vm open-port 
    --resource-group "LSCDemo-rg" 
    --name "LSCDemo-linux-cli" 
    --port "22"



#Get the IP address for Remote Access
az vm list-ip-addresses 
    --resource-group "LSCDemo-rg" 
    --name "LSCDemo-linux-cli" 
    --output table


#Log into the Linux VM over SSH (paste the ip from above command, see image)
ssh demoadmin@PASTE_PUBLIC_IP_HERE

Provision virtual machines using Azure CLI

Connect to Linux VM

Once you attempt to connect to the VM, it will prompt for the passphrase that was used to create ssh file. Provide the same passphrase to connect to VM.

Provision virtual machine using Azure CLI | Implement IaaS solutions | Part 2

Video tutorial

Clean up resource

Now the Demo is complete for creating a virtual machine. It is time to clean up the resources we used.

When no longer needed, you can delete the resource group, virtual machine, and all related resources.

Go to the resource group for the virtual machine, then select Delete resource group. Confirm the name of the resource group to finish deleting the resources.

Related resources

Conclusion

In this post, I have covered the topic of the Provision of virtual machines using Azure CLI that is part of implementing IaaS solutions. This post covers CLI commands for creating both Windows and Linux VM. Other parts of this exam are covered in other posts. Happy learning!.

The post Provision virtual machines using Azure CLI | Implement IaaS solutions | Part 2 appeared first on KarthikTechBlog.

]]>
https://karthiktechblog.com/azure/provision-virtual-machines-using-azure-cli-implement-iaas-solutions-part-2/feed/ 0 860
Provision virtual machines using the Azure portal | Implement IaaS solutions | Part 1 https://karthiktechblog.com/azure/provision-virtual-machines-using-the-azure-portal-implement-iaas-solutions-part-1/?utm_source=rss&utm_medium=rss&utm_campaign=provision-virtual-machines-using-the-azure-portal-implement-iaas-solutions-part-1 https://karthiktechblog.com/azure/provision-virtual-machines-using-the-azure-portal-implement-iaas-solutions-part-1/#respond Tue, 02 Nov 2021 13:07:23 +0000 https://karthiktechblog.com/?p=840 Introduction As part of Azure AZ-204 certification, this post will cover Provision virtual machines using the Azure portal that are part of Implement IaaS solutions. This module’s topics are part of implementing IaaS solutions and I will cover “Provision Virtual Machine”. What is infrastructure as a service (IaaS)? This is the foundational category of cloud […]

The post Provision virtual machines using the Azure portal | Implement IaaS solutions | Part 1 appeared first on KarthikTechBlog.

]]>
Introduction

As part of Azure AZ-204 certification, this post will cover Provision virtual machines using the Azure portal that are part of Implement IaaS solutions.

This module’s topics are part of implementing IaaS solutions and I will cover “Provision Virtual Machine”.

Provision virtual machines VM | Implement IaaS solutions

What is infrastructure as a service (IaaS)?

This is the foundational category of cloud computing services. With IaaS, you rent IT infrastructure—servers and virtual machines (VMs), storage, networks, and operating systems. You can use cloud providers such as Microsoft Azure on a pay-as-you-go basis.

What is Virtual Machine VM ?

A virtual machine, commonly shortened to just VM, is no different than any other physical computer like a laptop, smartphone, or server.

It has a CPU, memory, disks to store your files, and can connect to the internet if needed. While the parts that make up your computer (called hardware) are physical and tangible.

VMs are often thought of as virtual computers or software-defined computers within physical servers, existing only as code.

Virtual Machines used for the following

Building and deploying apps to the cloud

Trying out a new operating system (OS), including beta releases.

Backing up your existing OS

Spinning up a new environment to make it simpler and quicker for developers to run dev-test scenarios.

Accessing virus-infected data or running an old application by installing an older OS.

Running software or apps on operating systems that they weren’t originally intended for.

From Microsoft

Methods of Provision virtual machines VM.

Four ways you could create VM, Azure Portal, Azure CLI, Azure PowerShell, and Azure ARM Templates.

Video tutorial

Provision virtual machines VM using portal

Create Windows virtual machines in Azure

Azure VMs are an on-demand scalable cloud-computing resource. You can start and stop virtual machines anytime, and manage them from the Azure portal or with the Azure CLI.

You can also use a Remote Desktop Protocol (RDP) client to connect directly to the Windows desktop user interface (UI) and use the VM as if you were signed in to a local Windows computer.

Steps

Sign in to the Azure portal. If you do not have an account, don’t worry it is free to start with. Check out below for details.

Getting started with Azure
  • On the Azure portal, under Azure services, select Create a resource. The Create a resource pane appears.
  • In search services search box, search for “virtual” as you will see “Virtual machine”, click on it.
  • In the Basics tab, under Project details, make sure the correct subscription is selected and then choose to Create new resource group.
  • Choose an existing resource group or create a new one. I have named my new resource group as “LSCDemo-VM”.
  • Fill up the instance details as per the screenshot below. Here we have named “LSCVMDemo” as VM name and selected the region for our VM deployment.
  • pick up an image from the drop down, I picked “windows server 2016 datacenter” with standard power for this demo.
  • Chose a size of the VM as per the need.
Provision virtual machines using the Azure portal | Implement IaaS solutions  | Part 1
  • Provide Administarator account details like username and password.
  • Under Inbound port rules, choose Allow selected ports and then select RDP (3389) and HTTP (80) from the drop-down.
  • Leave the remaining defaults and then select the Review + create button at the bottom of the page.
  • After validation runs, select the Create button at the bottom of the page.
  • After deployment is complete, select Go to resource. Here you can see all the details of the newly created VM.
Provision virtual machines using the Azure portal RDP configuration

Deployment of VM completed.

Connect to virtual machine

VM dashboard

On the resource dashboard page, all the details of the virtual machine appear. select the Connect button then select RDP

Click on download RDP and open it. Depending on your machine be it MAC or Windows, the appropriate RDP file will be downloaded,

connect VM using RDP

Log into VM using username and password.

server configuration

Installation of web server in VM

Open a PowerShell prompt on the VM and run the following command:

Install-WindowsFeature -name Web-Server -IncludeManagementTools

To open PowerShell in windows, click on the start or run command, type “Powershell”. This will open the PowerShell window.

Installation of web server in VM

The webserver is now installed. To open Internet Information Service (IIS), go to Tools => Internet Information Service (IIS).

Now, we can deploy the applications to IIS.

Installation of web server in VM  open IIS

Clean up resource

Now the Demo is complete for creating a virtual machine. It is time to clean up the resources we used.

When no longer needed, you can delete the resource group, virtual machine, and all related resources.

Go to the resource group for the virtual machine, then select Delete resource group. Confirm the name of the resource group to finish deleting the resources.

Related resources

Resources

1. MSDN: Quickstart: Create a Windows virtual machine in the Azure portal

2. AZ-204 Developing Solutions for Microsoft Azure

Conclusion

In this post, I have covered the topic of the Provision of virtual machines using the Azure portal that is part of implementing IaaS solutions. Other parts of this exam are covered in other posts. Happy learning!.

The post Provision virtual machines using the Azure portal | Implement IaaS solutions | Part 1 appeared first on KarthikTechBlog.

]]>
https://karthiktechblog.com/azure/provision-virtual-machines-using-the-azure-portal-implement-iaas-solutions-part-1/feed/ 0 840
AZ-204 Developing Solutions for Microsoft Azure https://karthiktechblog.com/azure/az-204-developing-solutions-for-microsoft-azure/?utm_source=rss&utm_medium=rss&utm_campaign=az-204-developing-solutions-for-microsoft-azure https://karthiktechblog.com/azure/az-204-developing-solutions-for-microsoft-azure/#respond Fri, 29 Oct 2021 21:35:50 +0000 https://karthiktechblog.com/?p=834 Introduction In this post, I will provide guidance on preparing Exam AZ-204 Developing Solutions for Microsoft Azure. Preparing for certification is a crucial activity for any IT or development professional Learn new skills to boost your productivity. Earn certifications that show you are keeping pace with today’s technical roles and requirements. In this guide, you […]

The post AZ-204 Developing Solutions for Microsoft Azure appeared first on KarthikTechBlog.

]]>
Introduction

In this post, I will provide guidance on preparing Exam AZ-204 Developing Solutions for Microsoft Azure.

Preparing for certification is a crucial activity for any IT or development professional

Learn new skills to boost your productivity. Earn certifications that show you are keeping pace with today’s technical roles and requirements.

In this guide, you will learn everything you need to know to help you prepare for the Certified Azure Developer Associate certification.

The content of this exam was updated on March 26, 2021. Please download the skills measured document for more information.

Whom Exam AZ-204 certification is for ?

Microsoft is now going in the direction of career-focused certifications rather than certifications for specific technologies.

The Certified Azure Developer Associate (AZ-204) certification is for someone who wants to become or is a developer.

The core technologies used are Azure SDKs, serverless, containerization, security, and automation. Instead of focusing solely on a piece of technology, the certification is focused on the tools that will help you either fill in the Azure developer gaps or learn to become a developer in Azure.

AZ-204 Developing Solutions for Microsoft Azure

Getting Started

Azure getting started - AZ-204 Developing Solutions for Microsoft Azure

AZ-204 Developing Solutions for Microsoft Azure Skills Measured

  • Develop Azure compute solutions (25-30%)
  • Develop for Azure storage (15-20%)
  • Implement Azure security (20-25%)
  • Monitor, troubleshoot, and optimize Azure solutions (15-20%)
  • Connect to and consume Azure services and third-party services (15-20%)

I have covered each of the topics under the above sections in detail. You will get to read about the step by step tutorial and also real-time lab exercise on my Youtube channel

Develop Azure compute solutions (25-30%)


Implement IaaS solutions


Create Azure App Service Web Apps

  • create an Azure App Service Web App
  • enable diagnostics logging
  • deploy code to a web app
  • configure web app settings including SSL, API settings, and connection strings
  • implement autoscaling rules including scheduled autoscaling and autoscaling by operational or system metrics


Implement Azure functions

  • create and deploy Azure Functions apps
  • implement input and output bindings for a function
  • function triggers by using data operations, timers, and webhooks
  • implementing Azure Durable Functions
  • implementation of custom handlers

Develop for Azure storage (15-20%)

Develop solutions that use Cosmos DB storage

  • select the appropriate API and SDK for a solution
  • implement partitioning schemes and partition keys
  • perform operations on data and Cosmos DB containers
  • set the appropriate consistency level for operations
  • manage change feed notifications

Develop solutions that use blob storage

  • move items in Blob storage between storage accounts or containers
  • set and retrieve properties and metadata
  • perform operations on data by using the appropriate SDK
  • implementing storage policies, and data archiving and retention

Implement Azure security (20-25%)

Implementing user authentication and authorization

  • authenticate and authorize users by using the Microsoft Identity platform
  • authenticate and authorize users and apps by using Azure Active Directory
  • create and implement shared access signatures

Implement secure cloud solutions

  • secure app configuration data by using App Configuration Azure Key Vault
  • develop code that uses keys, secrets, and certificates stored in Azure Key Vault
  • implement Managed Identities for Azure resources
  • implement solutions that interact with Microsoft Graph

Monitor, troubleshoot, and optimize Azure solutions (15-20%)

Integrate caching and content delivery within solutions

  • configure cache and expiration policies for Azure Redis Cache
  • implement secure and optimized application cache patterns including data sizing, connections, encryption, and expiration

Instrument solutions to support monitoring and logging

  • configure an app or service to use Application Insights
  • analyze and troubleshoot solutions by using Azure Monitor
  • implement Application Insights web tests and alerts

Connect to and consume Azure services and third-party services (15-20%)

Implement API Management

  • create an APIM instance
  • configure authentication for APIs
  • define policies for APIs

Develop event-based solutions

  • implement solutions that use Azure Event Grid
  • implement solutions that use Azure Event Hubs

Develop message-based solutions

  • implement solutions that use Azure Service Bus
  • implement solutions that use Azure Queue Storage queues

For each of these topics, the study link will be provided, and video tutorials.

Conclusion

The Certified Azure Developer Associate (AZ-204) certification is for someone who wants to become or is a developer. Not everyone learns the same way. Some read book cover to cover, some watch videos, some practice more in the lab. Whatever the path is, this guide can help you finish this certification. You can do this if you work hard. All the best, happy coding!.

The post AZ-204 Developing Solutions for Microsoft Azure appeared first on KarthikTechBlog.

]]>
https://karthiktechblog.com/azure/az-204-developing-solutions-for-microsoft-azure/feed/ 0 834
Microsoft Azure Developer: Create Serverless Functions in Azure Portal https://karthiktechblog.com/azure/microsoft-azure-developer-create-serverless-functions-in-azure-portal/?utm_source=rss&utm_medium=rss&utm_campaign=microsoft-azure-developer-create-serverless-functions-in-azure-portal https://karthiktechblog.com/azure/microsoft-azure-developer-create-serverless-functions-in-azure-portal/#respond Sun, 05 Jul 2020 15:24:23 +0000 https://karthiktechblog.com/?p=556 Create Serverless Functions in the Azure Portal. Azure functions have the capability to greatly speed up your development, reduce your cost, and allows you to automatically scale to meet the high demand. What is Azure Functions? Functions as a Service (FaaS) – A platform for running “functions”, which are nothing but your code running in […]

The post Microsoft Azure Developer: Create Serverless Functions in Azure Portal appeared first on KarthikTechBlog.

]]>
Create Serverless Functions in the Azure Portal. Azure functions have the capability to greatly speed up your development, reduce your cost, and allows you to automatically scale to meet the high demand.

What is Azure Functions?

Functions as a Service (FaaS) – A platform for running “functions”, which are nothing but your code running in response to an event.

Features of Serverless Functions

  • Automated and flexible scaling based on your workload volume.
  • Integrated programming model based on triggers and bindings.
  • End-to-end development experience, from building and debugging to deploying and monitoring with integrated tools and built-in DevOps capabilities.
  • Variety of programming languages and hosting options.
azure functions supported language

Triggers

Various triggers used to invoke Azure Functions.

  • A function runs at a specific time using a timer trigger.
  • Message Trigger: Listen to a message in a queue and process it as and when a message arrives.
  • HTTP Request: create a web API that responds to different HTTP methods.
  • Azure functions respond to the webhook callback. Third-party service triggers callbacks.
azure serverless functions trigger
Triggers

Bindings

Binding to a function is used to connect another resource to the function.

Different bindings, input bindings, output bindings, or both can be used. Data from bindings are provided to the function as parameters.

You can mix and match different bindings to suit your needs. Bindings are optional. A function might have one or multiple inputs and/or output bindings.

azure serverless functions bindings

Read more on Azure Functions triggers and bindings concepts this has details on supported bindings.

Serverless Architecture

What is Serverless Architecture? what are the benefits that brings to us ?

  • Azure will manage servers.
  • Per-second billing model. Pay only when your code runs. There is also a monthly free grant which is sufficient for any developers who are exploring serverless functions.
  • Automatic scaling. Application demands met automatically.

Azure functions is simpler, cheaper and more scalable.

azure serverless functions hosting models

Creating Functions in the Azure Portal

In this module, I will show how to create azure functions in a azure portal.

Visit https://Portal.azure.com and login with your azure portal account.

If you are new or do not have Azure subscription, visit Create your Azure free account today and get your free $200 credit.

Create Azure Function App

Search for “Function App” in the search box in the top and click on “Function App” to create.

Creating Functions in the Azure Portal
dashboard of function app

Above page is the dashboard of Function App. Click on “Create Function App” to create a new one.

Basic Configuration

creating function app basic configuration

Always create a new resource group for any new service that you create. This will help in managing it easily.

What is a resource group? A resource group is a container that holds related resources for an Azure solution.

Choose a unique name for the Function App. I have provided as “karthiktechblog-function-app” that will end up forming a base URL as http://karthiktechblog-function-app.azurewebsites.net/.

Choose the publish option as code or docker. In this example, we choose as code and in docker post, I will show how to use Docker as publish option.

Next is to choose the Runtime Stack and its version. last part in the basic configuration section is to choose the region. Choose the close one near by your location.

Hosting Configuration

creating function app hosting configuration

Monitoring Configuration

creating function app monitoring configuration

Select Application Insights which is useful to find details of request in case of error.

Tags used to apply in your Azure resources, resource groups, and subscriptions to logically organize them into a taxonomy. Each tag consists of a name and a value pair. To read more about Tags visit here Use tags to organize your Azure resources and management hierarchy

Review & Create Configuration

This is the final page to verify the configuration made so far.

Review and create function app

Alright, now we have successfully created Function App. Now its time to create a new function and consume it from portal.

Creating a Function in Azure Portal

azure function app dashboard

From the azure Function App dashboard, click on Function in the left navigation bar. This will show you the available functions under this Function App.

azure function dashboard

Click on Add to create a new Function.

Next is to choose a template. There are many inbuilt templates that are available to the right-side panel, choose the one that fits your requirement. In my example, I will choose the HTTP Trigger.

azure function template

Next is to name the function and select the authorization level for the function.

function trigger details
  • anonymous: No API key is required.
  • function: A function-specific API key is required. This is the default value if none is provided.
  • admin: The master key is required.
Microsoft Azure Developer: Create Serverless Functions in Azure Portal

Now the function is ready. Click on Code and Test, you will see the default code created by the template.

This simple API will read the request and try to find a parameter called “name” and send a hello message. If name parameter is not sent, you will get a Bad Request (HTTP 400 status code).

Output is seen in the output tab and logs can be seen in the console.

Related Post

This post is part of Implement Azure functions, skill measured in AZ-204 and Exam AZ-203: Developing Solutions for Microsoft Azure

Conclusion

In this post, I showed you how to create Serverless Functions in the Azure Portal. That’s all from this post. If you have any questions or just want to chat with me, feel free to leave a comment below.

The post Microsoft Azure Developer: Create Serverless Functions in Azure Portal appeared first on KarthikTechBlog.

]]>
https://karthiktechblog.com/azure/microsoft-azure-developer-create-serverless-functions-in-azure-portal/feed/ 0 556
How to Create an Azure Web App for containers https://karthiktechblog.com/azure/how-to-create-an-azure-web-app-for-containers/?utm_source=rss&utm_medium=rss&utm_campaign=how-to-create-an-azure-web-app-for-containers https://karthiktechblog.com/azure/how-to-create-an-azure-web-app-for-containers/#respond Wed, 05 Feb 2020 05:09:29 +0000 https://karthiktechblog.com/?p=368 Introduction In this post, I show how to create an Azure Web App for containers and also explain what are containers. It has never been so easy to deploy container-based web apps in seconds. Just pull container images from Docker Hub or a private Azure Container Registry. Web App for Containers will deploy the containerized […]

The post How to Create an Azure Web App for containers appeared first on KarthikTechBlog.

]]>
Introduction

In this post, I show how to create an Azure Web App for containers and also explain what are containers. It has never been so easy to deploy container-based web apps in seconds.

Just pull container images from Docker Hub or a private Azure Container Registry. Web App for Containers will deploy the containerized app with your preferred dependencies to production in seconds. The platform automatically takes care of OS patching, capacity provisioning, and load balancing.

Before we start looking at how to create an Azure Web App for containers, let’s understand what are containers and why it is so useful.

What are containers?

Let’s understand this with an example. When a developer develops a new application and completes it, they would hand this application to the operation team that were then supposed to install it on the production servers and get it running.

If the operation team had got enough documentation from the developer on how and what to install on the production machine, his life is good and application will start as expected.

However, when there were many teams of developers in an enterprise that created quite different types of applications, yet all needed to be installed on the same production servers and run them.

In most cases, each application has its own dependencies such as framework, libraries and so on. Some time, in our .net world, different dot net application developed in different framework e.g. .net framework 2.0, 4.7 or even asp net core.

Here comes the challenge for the operation team, installing required framework and libraries in the production server might conflict application and some application might fail due to installations that was done for other application.

containers
containers

What are the ways to solve this problem?

A first approach was to use virtual machines (VMs). Instead of running multiple applications all on the same server, companies would package and run a single application per VM. With VM the compatibility problems were gone but one VM for one application is heavy as they carry their own OS and other dependencies and also it is costly for companies.

With containers we still need to buy hardware for our applications and instead of virtualization operating system, I can use a container engine to virtualize the operating system. That is a important point to note. With this, we don’t need to virtualize hardware to create multiple virtual machines, containers virtualize the operating system. Now I can have different applications running on the container and the application will think it is running on its own operating system which has its dedicated hardware. However, in reality, the host which has one operating system and hardware is been shared across all the containers.

Because with the container, I’m not duplicating operating system, the memory is not duplicated anywhere.

I will be able to place more and more applications on my hardware as I have more room to accommodate.

As a developer, containers are useful to make quick, iterative deployment of the application and these deployments have a high success rate of working in both test and production environment.

Read more on containers in my short post What are containers

Now, before we proceed further, I’m assuming that you already have some knowledge on dockers and created docker image with your application ready to deploy. In my below step by step screen, I will show how to just create web app for containers and cover detailed topic on how to create containers and deploy application in a separate post.

Create an Azure Web App for containers

Go to search bar and type “Web app for containers”, you will get an option to select this from Market place. Click on this option to proceed.

Provide all the appropriate details for mandatory fields and click on next which is to configure docker.

Create an Azure Web App for containers

Configure your docker details.

Create an Azure Web App for containers

Also see step by steps on

Azure comes with free service. According to Microsoft, there are many free services for 12 months and always free services. You can refer this information in the FAQ mentioned in the this link.

Great, you are now all set to use Azure Web App for containers.

Conclusion

In this post, I showed how to Create an Azure Web App for containers. This post is part of learning track for azure AZ-203 certification. That’s all from this post. If you have any questions or just want to chat with me, feel free to leave a comment below.

The post How to Create an Azure Web App for containers appeared first on KarthikTechBlog.

]]>
https://karthiktechblog.com/azure/how-to-create-an-azure-web-app-for-containers/feed/ 0 368
Enabling Diagnostics Logging in Azure App Service https://karthiktechblog.com/azure/enabling-diagnostics-logging-in-azure-app-service/?utm_source=rss&utm_medium=rss&utm_campaign=enabling-diagnostics-logging-in-azure-app-service https://karthiktechblog.com/azure/enabling-diagnostics-logging-in-azure-app-service/#respond Wed, 05 Feb 2020 00:21:25 +0000 https://karthiktechblog.com/?p=346 Introduction If you are looking at this post “enabling diagnostics logging” then you are already familiar with building and hosting web application with in a azure app service. You may also be looking for options to support your application. I will show how to use diagnostics logs that are available with in azure app service. […]

The post Enabling Diagnostics Logging in Azure App Service appeared first on KarthikTechBlog.

]]>
Introduction

If you are looking at this post “enabling diagnostics logging” then you are already familiar with building and hosting web application with in a azure app service. You may also be looking for options to support your application.

I will show how to use diagnostics logs that are available with in azure app service. I will show the options available to configure diagnostics logs.

Reasons for logging

There are various reasons why we log information. However, we should not log for each and every scenario in our application which then creates too much of information from which an useful information can be taken.
To mitigate this problem, Logging Strategies are in place to clarify what, when and why something should be logged.

Most important logging strategies are listed below.

Auditing

This type of information helps to find who has logged in and who performed a particular action in business context. This acts as tracking mechanism.

Detecting Suspicious Activity

Auditing helps in determining any Suspicious Activity by hackers to break into your system by many login attempts or SQL injection, XSS and etc.

Performance Monitoring

Useful logs created to perform an baseline performance and to see whether application is performing as expected.

Error Notification

Generated error logs are useful in timely notification to the team to inform error occurred and you can act accordingly.

Tracing

To troubleshoot issues that do occur in your application, trace messages can be added to the application logic that helps to create path that user has navigated to reach to your application.

Difference between enabling diagnostics logging and application insights

Diagnostic logs has built-in diagnostics to assist with debugging an App Service web app. It can only track just the app Service instance and allow basic log viewing and downloading.

It does supports trace messages and will not capture AI trace or Exceptions from your application. All the logged data are available in files that needs to be manually analysed. This logging affects web app performance.

Application Insights, a feature of Azure Monitor, is an extensible Application Performance Management (APM) service. It can trace across all the layers in a web application and has enhanced analytics. Also, application insights has SDK with enhanced custom telemetry. E.g. Exceptions and traces plus Pageviews, Events and Metrics.
App insights can also capture diagnostics trace messages. Compared to diagnostics logs, the impact on your app’s performance is very small.

Read more about application insights

You might feel by now that we can go with application insight instead of leaning diagnostics log. You might be here to learn about diagnostics log as this is part of azure AZ-203 certification skill assessment.

To configure the logging, go to your app service and search with keyword “Monitoring” as shown in the below image. You will see “App Service Log” menu in the left side menu.

Enabling Diagnostics Logging in Azure App Service

Types of Diagnostic Logs

There are four types of diagnostics logging namely

  • Application Logging
  • Web Server Logging
  • Detailed Error Message
  • Failed Request Tracing

Application Logging:

Application logging is the place where the coded trace message can be viewed. Each trace messages give specific log level.

Log Levels

  1. Off
  2. Error
  3. Warning
  4. Info
  5. Verbose
Enabling Diagnostics Logging in Azure App Service

You can see that each log level has been given a level number to it, you can choose this level when configuring the application log to see the highest level of logging.

For example, if you choose Warning when configuring, then the Info and Verbose are ignored.

Application logging in file system

Application Logging (Blob)

You can store the log in Blob. If you wish to choose, then you need to create a container first and then use it.

Application logging in blob storage

Web Server Logging:

This contains the Raw HTTP data, like IIS logs that helps to capture the URI, client IP address, port, browser and much more for troubleshooting.

Quota option is used to configure the space used to store the logs.

Retention period option will delete the logs older than the specified number of days.

web server logging

Detailed Error Message:

With custom error response, you can hide the server error response. For example, when there is an 500 – Internal server error occurs, the use gets to see custom error page that is configured instead of seeing server error page.

Detailed error message logging
Detailed error message that is part of Enabling Diagnostics Logging in Azure App Service

Failed Request Tracing:

This is a detailed error logging that shows almost all the logs that you can trace and find the cause of error.

Failed request logging

Diagnose and Solve Problems

There are different types of App Service Diagnostics available. You can choose one or more from the listed options. Each option is useful in its own way of solving problems.

Diagnose and Solve Problems

Conclusion

In this post, I showed enabling diagnostics logging in app service and showed various options that are available for Azure App Service. The details in this post will help to cover a part of knowledge required to complete Azure AZ-203 certification.

That’s all from this post. If you have any questions or just want to chat with me, feel free to leave a comment below.

The post Enabling Diagnostics Logging in Azure App Service appeared first on KarthikTechBlog.

]]>
https://karthiktechblog.com/azure/enabling-diagnostics-logging-in-azure-app-service/feed/ 0 346
What are containers and their benefits https://karthiktechblog.com/azure/what-are-containers-and-their-benefits-in-software-industry/?utm_source=rss&utm_medium=rss&utm_campaign=what-are-containers-and-their-benefits-in-software-industry https://karthiktechblog.com/azure/what-are-containers-and-their-benefits-in-software-industry/#respond Sat, 01 Feb 2020 01:20:33 +0000 https://karthiktechblog.com/?p=360 Introduction In this short post, I explain what are containers and their benefits. To help understand what problems does this container solves in the software industry. What are containers? A software container is a pretty abstract thing and it will be easy if we start with an analogy that is familiar to most of the […]

The post What are containers and their benefits appeared first on KarthikTechBlog.

]]>
Introduction

In this short post, I explain what are containers and their benefits. To help understand what problems does this container solves in the software industry.

What are containers?

A software container is a pretty abstract thing and it will be easy if we start with an analogy that is familiar to most of the readers. The analogy is a shipping container in the transportation industry.

Let me demonstrate with an example. A construction company from one city brings in Concrete Bricks in a truck to the port and then transferred to a ship that will transport the Concrete Bricks overseas.
Likewise, another construction company brings in Burnt Clay Bricks to the same port to get it transferred to overseas.

Every type of goods was packaged in its own way and thus had to be handled in its own way.

Any loose goods risked being stolen or damaged in the process. Then, there came the container, and it totally revolutionized the transportation industry.

The container is just a metallic box with standardized dimensions. The length, width, and height of each container is the same. This is a very important point. Without the world agreeing on a standard size, shipping containers would not have become so successful.

What are containers
containers

Example

If a company wants to transport their goods from point A to point B, they simply call transport company and specify the place where goods are present. Transport company then transport the goods in the container which is a metallic box with standardized dimensions.

Containers with fixed dimensions

By now you should have some good understanding of why shipping containers are so important.

Let’s understand what happens in our software world. When a developer develops a new application and completes it, they would hand this application to the operation team. Operation team installs it on the production servers and get it running.

If the operation team had got enough documentation from the developer on how and what to install on the production machine, his life is good and application will start as expected.

However, when there were many teams of developers in an enterprise created quite different types of applications. All the installation has to go on the same production servers and run them.

In most cases, each application has its own dependencies such as framework, libraries and so on. Some time, in our .net world, different dot net application developed in different framework e.g. .net framework 2.0, 4.7 or even asp net core.

Here comes the challenge for the operation team, installing required framework and libraries in the production server might conflict application and some application might fail due to other application installations.

What are the ways to solve this problem?

A first approach was to use virtual machines (VMs). Instead of running multiple applications all on the same server, companies would package and run a single application per VM. Now the compatibility problems were gone but one VM for one application is heavy as they carry their own OS and other dependencies and also it is costly for companies.

If you relate this with transportation company carrying one container from one construction company in a huge ship!!

Rescue

Then comes to rescue the software packaging mechanism was the Docker container. Developers use Docker containers to package their applications, frameworks, and libraries, and then they ship those containers to the operations team or to the testers.

The container is just a black box. Crucially, it is a standardized black box. All containers, no matter what application it has and runs inside them, can be treated equally. Now with this in place, our problems that operation team had has solved completely.

Containers is helpful to package the software into Standardized Units for Development, Shipment and Deployment.

example of application hosted in a single server using multiple containers

Why are containers important?

Improving security, Simulating production-like environments and Standardizing infrastructure.

As you know there are many cyber attacks starting from a small company to big giants like Microsoft. Many well known companies by security breaches and Highly sensitive customer data lost every day.

Containers can help in many way. One of the way is that container images are immutable, it is easy to have them scanned for known vulnerabilities and exposures, and in doing so, increase the overall security of our applications.

Apart from security, container can be helpful to Simulate production-like environments in local laptop. The operation team can now standardize their infrastructure as containers are standard. Every server becomes just another Docker host. Operation team no need to know knowledge on what application is running inside the container.

Resources

To know more about docker containers, visit docker resource.

Conclusion

In this post, I explained with simple example on what are containers and their benefits. The details in this post will help to cover a part of knowledge required to complete Azure AZ-203 certification.

That’s all from this post. If you have any questions or just want to chat with me, feel free to leave a comment below.

The post What are containers and their benefits appeared first on KarthikTechBlog.

]]>
https://karthiktechblog.com/azure/what-are-containers-and-their-benefits-in-software-industry/feed/ 0 360
Configure elastic pools for Azure SQL Databases https://karthiktechblog.com/azure/configure-elastic-pools-for-azure-sql-databases/?utm_source=rss&utm_medium=rss&utm_campaign=configure-elastic-pools-for-azure-sql-databases https://karthiktechblog.com/azure/configure-elastic-pools-for-azure-sql-databases/#respond Sat, 11 Jan 2020 01:15:52 +0000 https://karthiktechblog.com/?p=315 Introduction This post, I show how to configure elastic pools for Azure SQL Database. Microsoft Azure SQL Database are great for both predictable and unpredictable workloads. Unpredictability is specially challenging for software as service or called as SaaS Providers. SaaS providers have hundreds or even thousands of customers who then have their own unique mix […]

The post Configure elastic pools for Azure SQL Databases appeared first on KarthikTechBlog.

]]>
Introduction

This post, I show how to configure elastic pools for Azure SQL Database. Microsoft Azure SQL Database are great for both predictable and unpredictable workloads.

Unpredictability is specially challenging for software as service or called as SaaS Providers. SaaS providers have hundreds or even thousands of customers who then have their own unique mix of performance demands.

A common output is found that SaaS providers over provision their databases to meet variable and peak demands(resource demands) which is not cost effective and brings in management issues.

To solve this and operate cost effective, a predictable cost can be found by using elastic pool databases.

What are SQL elastic pools

SQL Database elastic pools are a simple, cost-effective solution for managing and scaling multiple databases that have varying and unpredictable usage demands.

Elastic pools help solve this problem by enabling you to set a policy for a group of elastic database ensuring that databases get the performance resources they need when they need it.

They provide a simple resource allocation mechanism within a predictable budget.

You don’t need to worry about each database or over provisioning for peak demands.

To check price for various service tier, visit Explore all SQL Database pricing options

Configure elastic pools for Azure SQL Database

Within the database server blade, you can see I have many databases. simply click on Add Pool.

Configure elastic pools for Azure SQL Databases
providing name for elastic pool

Next is to give it a name. Provide name to the pool .

To choose different elastic pool configuration, click on ConfigurePool option as shown in the above image.

Configure elastic pools for Azure SQL Databases

There are many Service Tier available and the pricing differ for each one. Once you chose the right options, click on Databases.

Choose database for elastic pool

Click on the Plus symbol to see the available databases. Choose the databases from the right side menu.

choosing service tier and configure elastic pool

Next option is to choose “PerDatabase” configuration and click on Apply.

Right side you can see the pricing shown per month. Likewise, you can see pricing for different option that you may choose.

Now you will see “Your deployment is underway” message, please be patience and give few minutes time for the process to complete.

Important to note:

There is no per-database charge for elastic pools. You will be billed for each hour a pool exists at the highest eDTU or vCores, regardless of usage or whether the pool was active for less than an hour.

When should you consider a SQL Database elastic pool

Pools are well suited for a very large number of databases with specific utilization patterns. The more databases you can add to a pool the greater your savings become.

Conclusion

In this post, I showed how to configure elastic pools for Azure SQL Database. The details in this post will help to cover a part of knowledge required to complete Azure AZ-203 certification.

That’s all from this post. If you have any questions or just want to chat with me, feel free to leave a comment below.

The post Configure elastic pools for Azure SQL Databases appeared first on KarthikTechBlog.

]]>
https://karthiktechblog.com/azure/configure-elastic-pools-for-azure-sql-databases/feed/ 0 315