DEV Community

Cover image for Creating and connecting to a Linux Virtual Machine Scale Set
Ayodeji Alofun
Ayodeji Alofun

Posted on

Creating and connecting to a Linux Virtual Machine Scale Set

Below is a step by step guide with screenshots on how to create and connect to a Linux Virtual Machine Scale Set.

  • Log into Azure Portal.
    Proceed to the Azure Portal and use your Azure account to log in.

  • To create Virtual Machines Scale Set (VMSS), make sure you have the required rights and a current subscription

  • Type vmss in the search bar as shown below.

vmss search

  • Click on either of the create word as shown below.

create vmss

  • Select active subscription from the drop down.

subs

  • Create a new resource group and or select already created one from the dropdown. For the purpose of this tutorial, we are creating a new resource group.

resource

  • Create a virtual machine scale set name and select other fields as shown below.

fields

  • Select Autoscaling and click on configure to set the parameters.

configure

  • click on pencil like object as shown below to edit the default setting.

pencil

  • Ensure the following fields are set as shown below, and save.

below field

fields cont

save this

  • Scoll down and select the following fields as shown below for scale in policy.

scale in

  • Ensure you select the following fields for image, architecture and size.

size etc

  • Ensure you completed the highlighted fields as shown below and click on next to continue.

new fields

  • Click on next until you get to networking page and click on pencil like icon as shown below to edit.

pencil

  • Ensure to complete the highlighted fields as shown below and click ok to continue.

highlights

  • To set the load balancing, check the Azure load balancer as shown below and click on create button to configure a new one.

load

  • Give the load balancer a name and maintain other default parameters, then create as shown below.

load bal

  • Now that the load balancer has been configured and selected as shown below, click on Review + create to continue.

review

  • After validation has been passed, click on create to continue.

validation

  • Download the private key and ensure you note where the file is downloaded in your system.

private

  • Wait for few minutes and allow the deployment to initialize, submit and complete. Click on Go to resource as shown below to continue.

resource

  • Instances configured can be connected to at thesame time by load balancing instead of connecting to the instances individually as shown below.

load

connect inst

  • Click on view inbound NAT rules to continue.

inbound NAT

NAT rules

  • To connect, search for the command prompt, right click to run as administrator and type ssh space -i space(input file path location by right clicking on the downloaded file, click properties, security and copy the objectname path) space username(Azureuser)@public IP address space -p space 50000 and click enter to continue. Type yes whenever confirmation is required as shown below.

file path

command

  • To update, run at the command prompt by typing sudo (space) apt-get (space)-y (space) update to continue.

update

  • To install, run at the command prompt by typing sudo (space) apt-get (space)-y (space) install (space) nginx to continue.

install

  • Paste your IP address on the browser to open the nginx welcome page.

nginx

Top comments (0)