azure-az104-flashcards

Section 3 - Deploy and Manage Azure compute resources

Azure Web Apps

Availability Set

Availability set can be specified only at the VM creation time.

Azure Bastion

Azure Bastion requires a dedicated subnet: AzureBastionSubnet. You must create this subnet in the same virtual network that you want to deploy Azure Bastion to. The subnet must have the following configuration:

VM creation

I cannot create a VM in a region different from the region of the corresponding virtual network.

Installing nginx

$ ssh user@ip
vm-ubuntu$ sudo apt-get update
vm-ubuntu$ sudo apt-get install nginx

Add the port 80 as Inbound port rules in the vm.

Accessing VM with SSH keys

$ chmod 400 vm-ubuntu-ssh_key.cer
$ ssh -i vm-ubuntu-ssh_key.cer enrico@13.79.186.11

Custom Script Extensions

The Custom Script Extension downloads and runs scripts on Azure virtual machines (VMs). This extension is useful for post-deployment configuration, software installation, or any other configuration or management task. You can download scripts from Azure Storage or GitHub, or provide them to the Azure portal at extension runtime.

The Custom Script Extension integrates with Azure Resource Manager templates. You can also run it by using the Azure CLI, PowerShell, the Azure portal, or the Azure Virtual Machines REST API.

Lab - Custom Script Extenson web server - Windows

  1. Create a storage account (required)
  2. Create a container
  3. Upload the custmom script extension file into the container
  4. Create a new vm in the same location of the storage account (required ?) with OS Windows Server 2019. Make sure to have the port 80/443 open.
  5. During the creation, advanced tab, click on Extensions/select an extension to install
  6. Select Custom Script Extension (Microsoft)
  7. Browse the storage account and the file to be loaded.
  8. Review / Create
  9. If you connect to the public IP of your VM you should see the web server running

Lab - Custom Script Extenson nginx - Linux

Follow the same steps as described here to deploy this file in order to install nginx on a ubuntu vm.

VM Boot Diagnostics

//TBD

VM Run Command

VM/Run Commmand/RunPowerShellScript

Example-adding http server

import-module servermanager
add-windowsfeature web-server -includeallsubfeature

VM Availability Zones

Availability Zones are unique physical locations within an Azure region. Zone-redundant services replicate your applications and data across Availability Zones to protect from single-points-of-failure. With Availability Zones, Azure offers industry best 99.99% VM uptime SLA. :bangbang:

There aint’t additional cost to add avaiability zones but there is bandwidth cost.

VM SLA

| Type | SLA | |:———-|————-:| | single - SSD | 99,5% | | single - premium SSD | 99,9% | | Availability set | 99,95% | | Availability Zones | 99,99% |

VM Scale Set

Orchestration mode:

Lab: Ubuntu/stress tool:

$ sudo stress --cpu 1000

cool down time(time to setup properly): during that time no scaling conditions will be applied.

Scale Up vs Scale Out

Scaling up is adding further resources, like hard drives and memory, to increase the computing capacity of physical servers.

Scaling out is adding more servers to your architecture to spread the workload across more machines.

DSC - Desired State Configuration extension handler

Azure Desired State Configuration

It’s about deployment of the application on the new instances created by auto scale.

One of the main advantages of Flexible orchestration is that it provides orchestration features over standard Azure IaaS VMs, instead of scale set child virtual machines. This means you can use all of the standard VM APIs when managing Flexible orchestration instances, instead of the Virtual Machine Scale Set VM APIs you use with Uniform orchestration.

Proximity Placement Group

A proximity placement group is a logical grouping used to make sure that Azure compute resources are physically located close to each other. Proximity placement groups are useful for workloads where low latency is a requirement.

Low latency between stand-alone VMs.

Other sections