How to Create Ubuntu 22.0.4 Virtual Machines(VM) in Azure portal? Creating Virtual Machine is easy and straight forward in Azure Cloud. Let us see how to do that in Azure portal.
Pre-requisites:
Azure account subscription, click here if you dont have one.
Watch Steps in YouTube channel:
Steps to create Ubuntu 22.0.4 Virtual Machine in Azure
Let us learn how to configure a self-hosted agent using Docker in Azure DevOps pipelines.
What is an Agent?
An agent is computing infrastructure with installed agent software that runs one job at a time.To build your code or deploy your software using Azure Pipelines, you need at least one agent. As you add more code and people, you'll eventually need more.
When your pipeline runs, the system begins one or more jobs.
In Azure pipelines, there are two types of build agents:
Microsoft-hosted agents - This is a service totally managed by Microsoft and it's cleared on every execution of the pipeline (on each pipeline execution, you have a fresh new environment).
Self-hosted agents - This is a service that you can to set up and manage by yourself. This can be a custom virtual machine on Azure or a custom on-premise machine inside your infrastructure. In a self-hosted agent, you can install all the software you need for your builds, and this is persisted on every pipeline execution. A self-hosted agent can be on Windows, Linux, macOS, or in a Docker container.
You can set up a self-hosted agent in Azure Pipelines to run inside a Windows Server Core (for Windows hosts), or Ubuntu container (for Linux hosts) with Docker.We will learn in this article on how to host Ubuntu Docker container on Linux machines.
Let's learn how to connect to a Virtual machine running in Azure cloud from your local machine. Your local machine can be a Windows laptop or MacBook laptop.
Pre-requisites:
1. Keys(for e.g., yourkey.pem) already downloaded in your local machine, preferably in downloads folder. 2. Azure VM is up and running 3. SSH client - for Windows laptop, you need to install an SSH client such as Git bash or putty. You can download Git from this URL - https://git-scm.com/downloads. For Apple laptop you need to download iTerm from here.
Windows Laptop instructions 5. Go to your local machine, Open Git Bash in Windows
make sure you are in downloads directory where your keys got downloaded. Type the below commands:
type below commands:
pwd
this should tell you which directory you are and then navigate to downloads dir.
cd ~/downloads
Now copy the value from Example in the above screen
ssh -i myAzVMKey.pem azureuser@104.43.214.12
and then type enter, say yes and enter
now you should be in Azure cloud, screen should show something like this, It means you are successfully connected to VM instance running on Azure cloud.
Mac Book Laptop or iMac Instructions
Open iTerm window, type the below command to go to downloads directory.
cd downloads
For few Mac laptops, it may add .txt in the end of pem file. in that case you need to remove .txt in the end
ssh -i myAzVMKey.pem azureuser@104.43.214.12
pwd and then execute below command to make sure the keys have only read permissions.
chmod 400 *.pem
6. Paste the url from example highlighted above in step # 4.
ssh -i myAzVMKey.pem azureuser@104.43.214.12
7. type yes when it is asking to connect.
8. now you should be in Azure cloud, screen should show something like this, It means you are successfully connected to VM instance running on Azure cloud.