Giter Site home page Giter Site logo

simplifiedlinkedarmtemplates's Introduction

Deploying Azure Resources using Linked Templates - Simplified

Table of Contents


Objectives

Provide a flexible and simplified method for deploying custom network, NIC and compute resources into Azure

Overview

Azure Resource Manager is a consistent management layer that enables you to create, update, and delete resources in your Azure subscription. However, adding resources, updating, or removing can be tricky due to the nature of JSON. Also, testing ARM deployments can be challenging and time consuming.

These linked templates and simplified parameters JSON file allow for easy updates or additions to building out defined Azure networks, NICs and compute.

The linked templates support conditions so there is no need to create different ARM templates based on different deployment scenarios. All that is necessary is to update the parameters file with your values. An array of VM's is deployed using a defined configuration that is unique to each VM.

  • Deploy generalized or specialized Windows or Linux operating systems
  • Deploy networks with the ability to define subnets and address prefixes
  • Set custom DNS server settings
  • Define custom IP address for NICs
  • Assign NICs to defined networks
  • Support single or dual NIC computer resources
  • Easily assign public IP addresses to compute
  • Define the compute size for each specific VM in the array

Prerequisites

  1. Create a Storage Account, a Storage Container for the virtual network, NIC and compute templates, as well as a Storage Container for any specialized VHD images and storing the VHD(s) being created for the VM(s)
  2. Copy the files in the LinkedTemplates folder to the Storage Container created in step 1
  3. Modify the vhdStorageAccountUrl parameter in the parameter file to reflect the path to the VHD Storage Container created in step 1
  4. Run Connect-AzureRmAccount to connect PowerShell to Azure

StorageContainer

Testing Your Azure ARM Templates

This command will validate your ARM template, prior to production deployment. It is important to do this to confirm there are no errors. It will also provide valuable debugging information if there is a problem.

PowerShell

.\deploy.ps1 -DeploymentName 'TestDeployment' -TemplateFile .\azure.json -TemplateParameterFile `
.\azure.parameters.json -TemplateContainerName '<NameOfContainer>' -StorageAccountName '<NameOfStorageAccount>' -LinkedTemplatePath '<URLToContainer>' -Debug

Deploy

This command will deploy the resources to Azure, after any issues found during the debug process have been resolved.

PowerShell

.\deploy.ps1 -DeploymentName 'Deployment' -TemplateFile .\azure.json -TemplateParameterFile `
.\azure.parameters.json -TemplateContainerName '<NameOfContainer>' -StorageAccountName '<NameOfStorageAccount>' -LinkedTemplatePath '<URLToContainer>'

Parameters JSON Schema

targetItemName: Name assiged to the VM

vhdUrl: URL to the generalized/specialized VHD that will be used during the creation of the VM

vmSize: Compute size assigned to the VM

osType: The type of operating system of the VM (Windows or Linux)

pip: If a Public IP address will be assigned to the compute (true or false)

networks: Array or networks that will be assigned to the compute

name: Name assigned to the NIC

IPAddress: IP address assigned to the first NIC

subnetName: Subnet name of the NIC should be attached

Example Paremeter Files

multiDomainControllers - Demonstrates how to deploy specialized VHDs to deploy two Domain Controllers

syspreppedWindowsImage - Demonstrates how to deploy two sysprepped Windows images

sccmInfrastructure - Demonstrates how to deploy Domain Controllers, SCCM Site Servers, and a test server with a public IP

References

Linked ARM Template Microsoft Docs Page

simplifiedlinkedarmtemplates's People

Contributors

brianwest avatar cacarroll avatar

Stargazers

Joseph A Streeter avatar

Forkers

dn61858

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.