How Do You Create a Build Pipeline in Azure?

Problem scenario
You want to use an Azure pipeline. You want it to perform a build. What should you do?

Solution
Prerequisites
i. You must have a supported code versioning system with certain files. As of 10/7/19 the options are Azure Repos Git, Bitbucket Cloud, GitHub, GitHub Enterprise Server, other Git repositories or Subversion. If you follow steps 1 through 4 of How Do You Build a Java Program with Maven?

How Do You Deploy AKS (Azure’s Kubernetes) Using the GUI?

Problem scenario
You want to use Azure’s Kubernetes PaaS offering using the GUI. What do you do?

Solution

1. Sign into the Azure portal.
2. Click on “Services” on the left.
3. Click on “Containers”.
4. Click on “Kubernetes services”.
5. Click “Add”.
6. Fill out the required fields.
7. Click the “Review + create” button.

How Do You Troubleshoot The Terraform Error “Authentication using either SSH …must be enabled in Linux profile”?

Problem scenario
You try to run terraform apply to create an Azure VM but you receive a message like this:

Error: Error applying plan:

1 error(s) occurred:

* azurerm_virtual_machine.myterraformvm: 1 error(s) occurred:

* azurerm_virtual_machine.myterraformvm: compute.VirtualMachinesClient#CreateOrUpdate: Failure sending request: StatusCo” Message=”Authentication using either SSH or by user name and password must be enabled in Linux profile.” Target=”linux”

What should you do?

Solution
1.

How Do You Get Azure PowerShell Commands Involving Storage to Work when They Are Returning an Error “not recognized”?

Problem scenario
Many Azure commands are failing. You installed the Azure module. But commands related to “Azure Storage” all return “not recognized as the name of a cmdlet, function, script file or operable program.”

You see messages like this:

New-AzureStorageAccount : A parameter cannot be found that matches parameter name ‘ResourceGroupName’.
At line:4 char:25
+ New-AzureStorageAccount -ResourceGroupName “contIntGroup” -AccountNam …
+ ~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [New-AzureStorageAccount], …

How Do You Use a PowerShell Command to Stop an Azure VM?

Problem scenario
You have a server in Azure you want to turn off. What should you do to stop it?

Solution
Prerequisite
You need to know the server’s name and resource group. You can do this by finding the server in the Azure Portal.

Procedures
Run this command:

Stop-AzureRmVM -ResourceGroupName $nameOfResourceGroup -Name $nameOfVM

# Replace $nameOfResourceGroup with the name of the Resource Group. …

How Do You Use a PowerShell Command to Destroy an Azure VM?

Problem scenario
You have a server in Azure you no longer need. You want to save money by deleting it. What should you do to eliminate it?

Solution
Prerequisite
You need to know the server’s name and resource group. You can do this by finding the server in the Azure Portal.

Procedures
Run this command:

Remove-AzureRmVM -ResourceGroupName $nameOfResourceGroup -Name $nameOfVM

# Replace $nameOfResourceGroup with the name of the Resource Group. …