How Do You Scale Out the Nodes of an AKS Cluster?

Problem scenario
You are using AKS (Azure Kubernetes Service). You have a cluster that you want to have more nodes. (Please do not confuse nodes with pods; see this posting if you are not sure about the difference.) What should you do?

Solution
You need to know the name of the cluster and the resource group it is in. Draft a command like this:

az aks scale –name foocluster –node-count 5 –resource-group barrg

-Replace “5” with the number of nodes you want to scale up.

 » Read more..

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?

 » Read more..

How Do You Use Azure Repositories?

Problem scenario
You want to use Git in an Azure Repository. What do you do?

Prerequisites
You have a Linux VM with Git installed.

Procedures
1. Log into Azure.
2. Go to https://dev.azure.com/
3. Click on “New Project”
4. Enter a project name. For your first project, you should probably have “Project visibility” set to “Private.”
5.

 » Read more..

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..