IaaS Solutions Flashcards

1
Q

What are the components of Virutual Machines

A

(1) Resource Group
(2) VM Size
(Can upgrade and downgrade after deployment)
(3) Network
(Internal IP to connect to other Azure services or expose a public IP)
(4) Images
(Contains operating systems etc)
(5) Virtual Disks
(At least one disk but a additional disks to support application data)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the ways (tools) to deploy VM’s?

A

(1) Azure Portal
(2) Azure CLI
(3) PowerShell
(4) ARM Templates

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Basic steps to create a VM

A

(1) Subscription
(2) Resource Group
(3) VM Name
(4) Region
(5) Availability Options
(6) Image
(7) Azure Spot Image
(8) Size
(9) Adminsitrator credentials

Azure Spot Image - allows Azure to stop and deallocate a VM if it needs the compute capcity for any region

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are the available services and ports available when provisioning a VM?

A

(1) HTTP (80)
(2) HTTPS (443)
(3) SSH (22)
(4) RDP (3389)

By default none of these services are available by default. They must be enabled during setup. More more configuration options, go to advanced settings.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Az Commands to create a VM

A

az vm create
–resource-group $rgname
–name $vmname
–image “win2019datacenter”
–admin-username “username”
–admin-password “password”
for linux replace –admin-password parameter
–authentication-type “ssh”
–ssh-key-value ~/.ssh/di-rsa.pub

Remember to create the resource group if needed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Az commands to enable Remote Access to a VM

A

az vm open-port
–resource-group $rg-name
–name $vmname
–port “3389” (–port “22” for Linux)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Az command to retrieve list of IP addresses for VM

A

az vm list-ip-addresses
–resource-group $rgname
–name $vmname

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Basic PowerShell Commands to provision a VM

A

New-AzVm `
-ResourceGroupName ‘myResourceGroup’ `
-Name ‘myVM’ `
-Location ‘East US’ `
-VirtualNetworkName ‘myVnet’ `
-SubnetName ‘mySubnet’ `
-SecurityGroupName ‘myNetworkSecurityGroup’ `
-PublicIpAddressName ‘myPublicIpAddress’ `
-OpenPorts 80,3389

New-AzResourceGroup -Name ‘myResourceGroup’ -Location ‘EastUS’

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are the ARM template sections

A

(1) $schema
(2) contentVersion
(3) parameters
(4) variables
(5) functions
(6) resources
(7) outputs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the purpose of the parameters section in ARM Templates?

A

Allow you to pass different values to the ARM template for using during deployment.
This allows your templates to by more dynamic when deploying accross multipe environments

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the purpose of the functions section in ARM templates?

A

Allow you to create complicated expression that you don’tw want to repeat throughout the template.
An example of a use for a function is for generating unique names for resources

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is the purpose of the variables section in ARM templates?

A

Allows you to define and use values throughout your template
i.e.
“variables”: {
“location”: “westus2”
}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are the purpose of the resources section in ARM Templates?

A

Defines what Azure resources to deploy with the template anywhere from a small Network Security Group to a VM, Storage Account, or Azure Function

Basic definition
“name”: “MyEventGrid”,
“type”: “Microsoft.EventGrid”,
“apiVersion”: “<api>",
"tags": { "key": "value" },
"location": "westus2",
"dependsOn": [],
"properties": {}</api>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

NOTES

(1) JSON files that define your resources
(2) Building blocks for automation
(3) Templates are submited Azure Resource Manager for provisioning
(4) Export an ARM template in Azure Portal
(5) Write your own
(6) Deploy from the Quickstart template library

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Ways to deploy an ARM Template

A

(1) Azure Portal
(2) Azure CLI
(3) PowerShell (Az Module)
(4) REST API
(5) Azure Cloud Shell

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Example of using a variable within an ARM Template

A

“location”: “[variables(‘location’)]”

for parameters, it will be “[parameters(‘param1’)]”

17
Q

PowerShell command for deployment

A

New-AzResourceGroupDeployment
–Name
–ResourceGroupName
–TemplateFile
–TemplatgeParameterFile

18
Q

Containers

Identity the container fundelmentals

A

(1) Binaries => libraries and other components
(2) Container Image => binary application package
(3) Container => running container image
(4) One app inside a container
(5) General very small and very portable
(6) Container Registries => enables exchanging of container images

19
Q

NOTE

A
20
Q

Basics of a Dockerfile

A

FROM => runtime
RUN => set directory
WORKDIR => set working directory
COPY => copy from the publishing folder
COPY => copy config.sh file
RUN => bash config.sh
EXPOSE => Port
ENTRYPOINT => [“dontnet”, “webapp.dll”]

docker build -t webappimage:v1

21
Q

Containers

What is the ACR and key functions?

A

Azure Container Registry
(1) Build, store, and manage container images
(2) Key component of buildingthe CI/CD pipeline
(3) ACR Tasks for container image automation
(4) Services tiers [Basic, Standard, Premium]

22
Q

Containers

Types of authentications in ACR?

A

(1) Azure Active Directory Identities
Users
Service Principals
(2) ACR Admin

ACR provides Role-based access controls

23
Q

Types of users/roles in ACR

A

(1) Owner
(2) Contributor
(3) Reader
(4) AcrPush
(5) AcrPull
(6) AcrDelete

Roles are assigned to tools

24
Q

Containers

Az Command to create ACR

A

az acr create
–resource-group $rsname
–name $acrname
–sku “Standard”

az acr login –name $acrname

25
Q

Information - Pushing an image into ACR

ACR_NAME = ‘kevinacr’
ACR_LOGINSERVER = $(az acr show –name $ACR_NAME –query
loginService –output tsv)

docker tag webappimage:v1 $ACR_LOGINSERVER/webappimage:v1
docker push $ACR_LOGINSERVER/webappimage:v1

az acr build –image “webimage:v1-acr-task” –registry $ACR_NAME

A
26
Q

Containers

What are Azure Container Instances

A

Is a service (serverless) that enables developers to deploy containers without having to provision or manage any underlying infrasture

27
Q

Information - Creating a Service Principal For ACI to PULL from ACR

A
28
Q

Containers

Creating a ACR using Az Commands

A

az container create
–resource-group
–name
–dns-name-label
–ports
–image $ACR_LOGINSERVER/webappimage:v1
–registry-login-server @ACR_LOGINSERVER
–registry-username
–registry-password

ACR_LOGINSERVER = $(az acr show –name $ACR_NAME –query loginService –output tsv)