Azure Classroomnotes 28/Apr/2022

Azure VMSS Contd..

  • Virtual Machine Scale Set (VMSS) is a compute resource that can be use to deploy and manage a set of identical virtual machines.
  • By default VMSS supports upto 100 instances, However it is possible to create upto 1000 instances by placing instances in multiple placement groups.
  • How can two virtual machine be identical?
    Preview
  • Generally in VMSS we would have vm with our application running in it, so we need to create a VM Image which has our application preinstalled and configured in it.

Building an VM Image

  • Lets create an ubuntu 20.04 server
  • Login into the server and install apache server with php modules
sudo apt update
sudo apt install apache2 -y
sudo apt install php libapache2-mod-php php-mysql -y
echo '<?php phpinfo(); ?>' | sudo tee /var/www/html/info.php
sudo systemctl restart apache2
  • Now navigate to the public ip http://<publicip>/info.php
    Preview
  • We can use any of the available metrics for scaling
    Preview
  • Now, in the case of virtual machine scale sets we need to use metrics, so artifically create load on the virtual machine using a tool stress, where we increase stress on cpu, ram , disk and use the metric for enabling the scale up or down
sudo apt install stress -y

Preview
* Azure VM Image is a snapshot of a disk (compressed backup of disk) with user information removed and some metadata.
* To create a VM Image we need to remove the user information and after that the vm which we created becomes unusable as there is no user in it. so generally after creating a reusable vm image we delete this vm.
Preview
Preview
Preview
*

Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Social Network Widget by Acurax Small Business Website Designers

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Visit Us On FacebookVisit Us On LinkedinVisit Us On Youtube