/Azure-CLI-and-ARM-Templates

Azure CLI scripts - implementation of multi-tier architecture and Virtual network peering.

Primary LanguagePowerShell

Azure-CLI --

✔The Repo consists of Azure CLI scripts for reference

⭐ Multi-Tier Architecture Implementation --

✨ A virtual network for multi-tier applications using an Azure CLI script.

This script sample creates a virtual network with front-end and back-end subnets.
Traffic to the front-end subnet is limited to HTTP and SSH, while traffic to the back-end subnet is limited to MySQL, port 3306.
After running the script, you have two virtual machines, one in each subnet, that you can deploy web server and MySQL software to.

✔Steps used --

    - Created a virtual network with front-end and back-end subnet
    - Created an NSG for backend subnet
    - Created an NSG rule to allow HTTP traffic in from the internet to the frontend subnet
    - Created an NSG rule to allow SSH traffic in from the internet to the frontend subnet
    - Associated the front-end NSG with frontend subnet
    - Created an NSG for backend subnet
    - Created an NSG rule to block all outbound traffic from the back-end subnet to the Internet
    - Associated the back-end NSG to the back-end subnet
    - Created a public IP address for the webserver VM.
    - Created a NIC for the webserver VM.
    - Created a Web Server VM in the front-end subnet
    - Created a public IP address for the MySQL VM
    - Created a NIC for the MySQL VM
    - Created a MySQL VM in the back-end subnet

⭐ Virtual Network Peering --

✨Virtual network peering enables you to seamlessly connect networks in Azure Virtual Network. The virtual networks appear as one for connectivity purposes. The traffic between virtual machines uses the Microsoft backbone infrastructure. Like traffic between virtual machines in the same network, traffic is routed through Microsoft's private network only.

Azure supports the following types of peering:

    - Virtual network peering: Connect virtual networks within the same Azure region.
    - Global virtual network peering: Connecting virtual networks across Azure regions.


The benefits of using virtual network peering, whether local or global, include:

  • A low-latency, high-bandwidth connection between resources in different virtual networks.
  • The ability for resources in one virtual network to communicate with resources in a different virtual network.
  • The ability to transfer data between virtual networks across Azure subscriptions, Azure Active Directory tenants, deployment models, and Azure regions.
  • The ability to peer virtual networks created through the Azure Resource Manager.
  • The ability to peer a virtual network created through Resource Manager to one created through the classic deployment model.
✔Steps Used --
    - Created a resource group
    - Created virtual network 1
    - Created virtual network 2
    - Getting the id for VNet1
    - Getting the id for VNet2
    - Peering VNet1 to VNet2
    - Peering VNet2 to VNet1

⭐ Cleaning up Deployment --

    - az group delete --name MyResourceGroup --yes

Deletes the created resources on the portal.

⭐ Creating VM from a Snapshot --

    - Get a snapshot using snapshot name
    - Created a disk configuration. This configuration is used with the disk creation process
    - Created a manage disk
    - Created a VM configuration. This configuration includes information such as VM name, operating system, and administrative credentials.
    - Attach the managed disk as OS disk to the virtual machine
    - Created a public IP address
    - Created a network interface
    - Created a virtual machine
    - Remove the resource group and all resources contained within


⭐ Recovery Service Vault --

✔A Recovery Services vault is a storage entity in Azure that houses data. The data is typically copies of data, or configuration information for virtual machines (VMs), workloads, servers, or workstations. You can use Recovery Services vaults to hold backup data for various Azure services such as IaaS VMs (Linux or Windows) and Azure SQL databases. Recovery Services vaults support System Center DPM, Windows Server, Azure Backup Server, and more. Recovery Services vaults make it easy to organize your backup data, while minimizing management overhead.

    - Created a Recovery Service Vault
    - Applied a backup policy
    - Trigger the initial backup
    - Verified backup job status


That's it!
This how Multi-Tier Architecture and Vnet Peering are being implemented in Azure
For more reference you can read and refer the following documentation ➡ Documentation

Cheerio!! 🙋🏻‍♀️