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.

 » Read more..

How Do You Upgrade Python 2.x to Python 3.7 in Debian or Ubuntu Linux?

Problem scenario
You have a virtual server running Ubuntu 18.x in Azure. It has Python 2.x. How do you upgrade to Python 3.x?

Solution
1. Run these two commands:
sudo apt -y update
sudo apt -y install python 3.7

2. Find where the binary python3.7 is by running this: sudo find / -name python3.7
Make a mental note of the result.

 » Read more..

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.

 » Read more..

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],  » Read more..

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.  » Read more..

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.  » Read more..

How Do You Use AKS with the Azure CLI?

Problem scenario
You want to use Azure’s PaaS for Kubernetes without using a web UI. What do you do?

Solution
Warning: this will cost money. This will create resources in Azure.

Prerequisites
i. You have the Azure CLI installed. If you need assistance with this, see How Do You Install the Azure CLI on a Debian/Ubuntu Linux Server?

 » Read more..

How Do You Create a Server in Azure with Terraform?

Problem scenario
You want to use Terraform to create a virtual machine in Azure. What do you do?

Solution
Prerequisites

i. Terraform must be installed on a Linux server. If you need assistance with this, see this posting.
ii. The Azure CLI must be installed and configured on the Linux server. If you need assistance with this, see this posting.

 » Read more..

How Do You Install the Azure CLI on a Debian/Ubuntu Linux Server?

Problem scenario
You want to use the Azure CLI on a Debian/Ubuntu Linux server.

Solution

1. Run these commands:

sudo apt-get -y update
sudo apt-get install -y curl apt-transport-https lsb-release gpg
curl -sL https://packages.microsoft.com/keys/microsoft.asc | \
gpg –dearmor | \
sudo tee /etc/apt/trusted.gpg.d/microsoft.asc.gpg /dev/null
AZ_REPO=$(lsb_release -cs)
echo “deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $AZ_REPO main” | \
sudo tee /etc/apt/sources.list.d/azure-cli.list
sudo apt-get -y update
sudo apt-get -y install azure-cli

2.

 » Read more..

How Do You Find the Resource Group Names in your Azure Account?

Problem scenario
You want to use an existing Resource Group name.  How do you find which ones you have created?

Solution
1.  Log into the web UI for the Azure Portal.
2.  On the left there often will be an item “Resource Groups” (under favorites).  Click on it.  If it is not there, search for “Resource Groups”

 » Read more..