Linux Distributions endorsed on Azure
- Microsoft endorses some linux distributions Refer Here
- Microsoft also providers guidelines to bring your own linux to azure. For that Refer Here
- For Azure Tuned Kernels information Refer Here
Every Azure VM Has a Agent running
- Every Azure VM will have an agent running
- You can use the capability of agents to perform some activities
- Basic (WAAgent):
- Change Password
- Serial console
- Basic (WAAgent):
Can i Install Agents
- Microsoft calls these agents as extensions or it will allow you to install agents using extensions
- Extensions are differnet for
- Linux VM Agents
- Windows VM Agents
- Popular extensions are chef, puppet, powershell dsc, Antivirus like Symantec, Vulnerability tools such as Qualys, Rapid7 and app montioring tools liks DynaTrace, Site24x7
- Where can i find these extensions
- Linux Extensions:
- Windows Extensions:
- Linux Extensions:
- Can i Run commands in Linux or Windows Machine without logging in
- Linux:
- Windows:
- Linux:
Exercise: Navigate through the Azure Portal through every tab for Virtual Machine creation
- Go through every tab for VM Creation and Make a note of parameters
- This helps in understanding the things that can be done while creating the VM
- Configure VM Details
- Size
- Credentials
- Configure Network Details
- Configure Storage Details
- Management
- Log information
- Auto Shutdown
- Assign Identity
- Enable Backup
- Advanced
- Cloud-init
- Extensions to be installed
- Configure VM Details
VM Image:
-
Consider you have create a VM, Logged into it and configured vm with all the necessary stuff (installing software, configuring security etc) so that this VM Matches your organizational expectation.
-
How can you save the effort of redoing all of the above activities for future VM’s with same OS?
- Answer is Azure VM Image which can be created by the user
- VM Images are provided by
- Microsoft/Microsoft Approved
- Third Parties (Shared Images)
- Custom Images created by Users (Private )
-
How can VM Images be Created for Private Usage?
- From Portal: After you configure existing vm with all the softwares, just do as shown below and from there on you can use private images (my items section)
- Other Options:
- Azure CLI
- Azure Powershell
- Effective IMage creation: By an Automation tool called as Packer.
- Pros:
- Easy for the upcoming VMS bcoz user just has to create
- Cons:
- Changes in the needs might lead to new VM Images
- Extra cost to be paid for storage
- From Portal: After you configure existing vm with all the softwares, just do as shown below and from there on you can use private images (my items section)
-
How can i Share VM Images for Public Usage?
- Answer is shared image, for more info refer here
Steps involved in Creating VM Image
- Azure VM image is not supposed to have specific username and password like aws.
- Azure VM images should be generalized (no specific user information)
- Note: VM which is used to create a VM Image in Azure becomes unusable after image creation, so better delete it
- Steps:
- Generalize the VM
- Deallocate the VM
- Copy of harddisk is taken as a snapshot
- Metadata is added to it to create a VM Image
Cloud-init:
- Cloud-init is a startup script generally executed on linux flavors which is supported on multiple clouds
- To use cloud-init, user is expected to write a yaml file
- Refer Here
Exercise:
- Create a Ubuntu Linux VM Image by creating a Linux VM B1s with the following softwares installed
sudo apt-get update
sudo apt-get install stress -y
sudo apt-get install apache2 -y
sudo apt install php libapache2-mod-php php-mysql -y
sudo systemctl restart apache2
sudo nano /var/www/html/info.php
<?php
phpinfo();
?>
http://<publicip>/info.php
- After naviagating to ip address as mention in above steps it should look like
- Now create a VM Image