Skip to content

phydroxide/azure

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Azure training 2024

I lost my job in February. The community support has been overwhelmingly positive. Very early on I had a number of colleagues reach out to me confident that my experience will land me a job fast. It did, thankfully.

In the meantime, I had applied to a remote position for which I was super-qualified but I didn't have Azure experience, or really any Microsoft Cloud experience beyond around 2012.

So today I launched a free Azure account to kick the tires. This is my effort to pay it forward to the community or otherwise showcase my competency to a prospective employer.

Ultimately the goal was to create a Kali box from an Azure Debian Image, which I achieved.

Create Github Account

Create Azure Account

Creating Resources

Create Github Account

Microsoft will prompt you to select a login for Azure portal. If you don't have a Microsoft account you'll be prompted to create one. You may want to create a Github account if you don't have one.

https://github.com/signup Github Signup

Creating Azure Account

Login

Navigate to https://portal.azure.com to login. Portal Login

Create Profile

You'll be prompted to provide profile information for your Azure account.

Create Profile

Credit Card Verification

You need to provide a credit card for account verification. You have not chosen to be billed and can still take advantage of a free account trial period.

Credit Card Verification

Getting Started Checklist

Azure will present you with training modules to get started.

Get Started Checklist

Creating Resources

You can create resources using the portal or cli.

You will need to create a resource group first

az group create --name PLW-AZURE2 --location westus3

You can do this also in the portal.

Create Resource Group

When creating a VM you first need to create the ssh-key which is used to access the host as azureuser.

Create SSH Key

ssh-keygen -t rsa -b 4096 -C "Comment"

Create a VM with the Portal

The home page will present options to create resources. Home Page

You can select an option top create a resource such as a Virtual Machine. Create VM

Select your free Azure Subscription, Region, Availability Zone, instance size and OS Image.

I selected Ubuntu on x64 in a physically separated region within the US West region, where I am. I started with a standard D2s size, which is about 70 dollars / month if I keep it running, but I've since switched this to a DS1_v2 with 1vCPU and 3.5 GB of RAM.

VM Size

Spot discount

B1ls with 1 vcpu and only a half gig of memory is 4 dollars / month. B1 Size

However, this size does not support Spot Discount which saves cost by allowing Microsoft to evict your host when costs or capacity limits are exceeded.

Click "See all sizes" and enable a filter for monthly cost to compare price.

Spot Discount \

In any case I entered a maximum price of 5 dollars. I read of Troy Hunt's recent nightmares with cost control for Cloud Flare and I'd rather not add a huge cloud bill to my unemployment situation. Select Size

Create a VM with the CLI

The alternative is to build these with the CLI. First you need to install it. It does not install happily on Kali linux, so I built a container image for this.

Azure CLI container image

docker build -f tools/Dockerfile ./tools -t azure-cli

docker run --rm -it azure-cli

docker$ az configure
docker$ az login
docker$ az vm list-sizes westus3

Let's create the VM as Debian so I can convert it into a Kali Server

docker$

az vm  create --location westus3 \
                         --name plw-cli-vm \
                         --resource-group PLW-AZURE \
                         --image Debian11 --size Standard_B1ls \
                         --ssh-key-values /root/id_rsa.pub 

ssh -i ~/.ssh/id_rsa azureuser@20.163.83.243

CLI Login Code

Install CLI console

Linux CLI

curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash

Using Azure CLI

Here are some quick and handy azure cli commands. For more detail see the Azure CLI Readme

az vm show --resource-group PLW-AZURE --name plw-vm --show-details

az vm stop --resource-group PLW-AZURE --name plw-vm
az vm deallocate --resource-group PLW-AZURE --name plw-vm
az ssh vm --resource-group PLW-AZURE --name plw-vm

About

Azure training 2024

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published