AZURE COMPUTE GALLERY AND VIRUAL MACHINE SCALE SET
December 24, 2024

AZURE COMPUTE GALLERY AND VIRUAL MACHINE SCALE SET


What is a calculation library?

Azure Compute Library (formerly Shared Image Library) is a feature in Microsoft Azure that helps you effectively manage and distribute custom virtual machine (VM) images across your organization. It allows you to build, share, and maintain image versions, making it easier to scale deployments and ensure consistency across virtual machines.


The main functions of the Azure computing library:

  1. Custom image management:

    • You can create and store custom virtual machine images for reuse across multiple deployments.
    • Supports creating multiple versions of images to manage updates and rollbacks.
  2. Picture sharing:

    • Images can be shared across subscriptions, regions, or with other Azure tenants.
    • Promote collaboration and standardization across teams.
  3. Expand deployment:

    • Distribute images to multiple Azure regions for faster VM deployment globally.
    • Replicate images across regions to ensure high availability.
  4. consistency:

    • Ensure consistent configuration by using the same image across different environments (e.g. development, test, production).
  5. Image copy efficiency:

    • Optimized for faster image replication, improving performance for large-scale deployments.
    • No need to maintain separate copies for each region, reducing storage costs.
  6. Supports multiple resource types:

    • You can store and distribute virtual hard disks (VHDs), hosted images, and custom VM configurations.
  7. RBAC integration:

    • Integrate with Azure role-based access control (RBAC) to securely share and manage images.


Typical use cases:

  • Standardized virtual machine deployment: Ensure that all virtual machines in the environment are built from a consistent base image.
  • Global application: Distribute custom virtual machine images for global applications across regions to minimize latency.
  • Multiple subscription management: Share custom VM images across multiple subscriptions within your organization.
  • Development and operation pipeline: Automatically build and share VM images as part of a CI/CD pipeline.

By using Azure Compute Library, organizations can simplify image lifecycle management, reduce deployment time, and maintain operational consistency.

What is a virtual machine scale set?
sky blue Virtual machine scale set (VMSS) is a service in Microsoft Azure that allows you to deploy and manage a set of identical load-balanced virtual machines (VMs). It is designed to automatically scale the number of virtual machines based on demand or planning, making it ideal for scenarios that require high availability and scalability.


Key features of virtual machine scale sets

  1. Auto scaling:

    • VMSS can use Azure Monitor autoscaling rules to automatically scale the number of execution instances based on CPU, memory, or custom metrics.
    • Supports scaling (adding virtual machines) and scaling down (removing virtual machines) based on demand or a predefined plan.
  2. load balancing:

    • Integrate with Azure Load Balancer or Azure Application Gateway to evenly distribute traffic among virtual machines.
    • Ensure high availability and fault tolerance.
  3. Unified or flexible orchestration:

    • Unified orchestration model: All virtual machines in a scale set are identical, ideal for stateless workloads.
    • Flexible orchestration mode: Allows running virtual machines with different configurations, suitable for stateful or mixed workloads.
  4. Comprehensive updates:

    • Facilitate rolling updates to minimize downtime when upgrading or patching virtual machines.
    • Supports versioning when used with Azure Compute Library to deploy specific image versions.
  5. High availability:

    • Distribute virtual machines across Availability Zones or fault domains to provide resiliency against hardware or data center failures.
  6. Custom images and extensions:

    • Use a custom VM image from the Azure Compute Library.
    • Use software installation extensions and custom scripts to configure virtual machines during deployment.
  7. Multi-region, cross-availability zone deployment:

    • Deploy virtual machines across regions or availability zones to meet redundancy and low-latency requirements.
  8. Support Spot VM:

    • Cost-effective option for executing interruptible workloads by using Azure Spot instances in scale sets.
  9. DevOps and Automation:

    • Integrate with Azure DevOps, CI/CD pipelines and Infrastructure as Code (IaC) tools such as ARM Templates, Terraform or Bicep.


Typical use cases

  1. web application:

    • Host large web applications or APIs with autoscaling to handle varying traffic loads.
  2. Big data and batches:

    • Run parallel batch jobs or distributed data processing workloads with dynamic scaling.
  3. microservices:

    • Deploy containerized applications where each virtual machine can host containers using Kubernetes or other orchestrators.
  4. High Performance Computing (HPC):

    • Scale up/down computing capabilities for intensive workloads such as simulation or AI/ML model training.
  5. Optimize costs with Spot VM:

    • Use Spot VM for non-critical workloads to save costs.


Advantages of Virtual Machine Scale Sets

  • elasticity: Automatically adjust resources to meet demand, optimizing performance and cost.
  • High availability: Redundant virtual machines ensure minimal downtime during failures.
  • Centralized management: Simplify operations by managing identical virtual machines in a group.
  • global influence: Facilitates seamless deployment across multiple Azure regions and zones.

In summary, VMSS is a powerful tool for building scalable, reliable, and cost-effective applications in Azure. It is particularly suitable for workloads that require dynamic scaling or high fault tolerance.
.

Steps on Azure Compute Library and Virtual Machine Scale Sets

                     (part 1)
Enter full screen mode

Exit full screen mode

  • Sign in to your Azure account.

– Search in the toolbox, select and create a virtual machine.

– If you have already set up a virtual machine, you can start Do it again.

  • In the search bar, search for settings and Select disk. There are OS (operation disk) disk and data disk. Since we want to store the images, we want to create space on the data disk.

  • Click the Data Disks section and generate the required number of disks** (LUNs)** Disk name (data disk), storage type(Choose standard SSD) Make the system run smoother and faster SizeGiB (disk memory required). Leave everything as default, then, Apply rule.

  • Disk attached.

  • Select the Connect icon and then Native RDP button,choose*Select button.
    *

  • Selecting the Select button will open the RDP page, where you will click on the configured button and click “Download RDP”.

  • Download the RDP file to connect to the virtual machine

  • In a virtual machine environment, search for Disk managementclick on it, and you will be given the following environment. Click OK to initialize the created content.

Click on the created data disk, right-click, and you will find “New Simple Volume Wizard”click Next button

  • Keep clicking the Next button until you find the area that identifies the disk partition. Give it a name, e.g. data disk. Click the Next button to complete the process.

  • In the following interface, the partition is completed, click *Done button. The disk is then ready for use. *

                           Part 2

                 Azure Compute Gallery Creation
Enter full screen mode

Exit full screen mode

Azure Compute Library (formerly Shared Image Library) is a service in Microsoft Azure that simplifies the process of sharing and managing virtual machine (VM) images at scale. It enables you to efficiently build, manage and replicate virtual machine images across multiple regions and subscriptions.

program;

  • Sign in to your Azure account and search for Azure Compute Library, which is its own application in Azure.

  • create resource group, give it a name, describe and select Review + Create.

  • Return to the established VM and select capture.

  • Select on capture button image icon

  • When creating a Compute Gallery resource group, make sure that the virtual machine resource group is the same as it.

  • However, when setting up a compute library and capturing an image on a virtual machine, for the operating system state, you can choose Broadly speaking and specialized. Choosing the “Universal” option will make people become attached to using it and keep asking for username and password. But Specialized will automatically log into the website.

  • The next step is to click Target a VM image definitiona box with a title will pop up next to it Create a VM image definitionwrite out VM image definition name and click OK

  • When imaging, imaging stops the virtual machine that was executing before the image was created.

  • In addition, during the virtual machine scale set process, there is so-called horizontal scaling. That is, when there is too much traffic, when too many people want to log into the application, horizontal scaling (scaling out the number of virtual machines) occurs, and many virtual machine instances appear. When the number decreases, it shrinks and shuts down the number of established virtual machines.

Create a virtual machine using the created image

  • After deploying the capture image go to resources.

  • The image created is part of an image instance.

                          PART 3
            HOW TO CREATE VIRTUAL MACHINE SCALE SET
Enter full screen mode

Exit full screen mode

  • Go to the resource of the created Azure repository and select + Create VMSS icon

  • Choosing an arrangement mode

orchestration mode Is the type of mode in which the virtual machine scale set wants to operate. Choose how the scale set manages virtual machines. In elastic orchestration mode, you can manually create virtual machines of any configuration and add them to a scale set. In unified orchestration mode, you define a virtual machine model and Azure will spawn identical instances based on that model.

It is divided into two parts;
flexible: Achieve large-scale high availability using the same or multiple virtual machine types.
uniform: Optimized for large-scale stateless workloads. Stateless means that something does not store information about what it does.

  • Scaling: Option to manually scale virtual machines as the number of users grows.

  • Click the **View+Create button*and then create*

  • Go to the expansion icon and manually expand the virtual machine to as many instances as required. and save.

  • Return the virtual machine icon to view the number of instances selected to be created and the instances that have been created.

2024-12-24 02:53:35

Leave a Reply

Your email address will not be published. Required fields are marked *