Code Monkey home page Code Monkey logo

arm-templates's Introduction

Azure Resource Manager (ARM) Example Templates

NOTE: This repo has been consolidated so that only the latest versions of templates are accessible in the master branch. For reference only please refer to the archive branch which contains all the old templates.

This repository contains ARM templates that can be used to create various Chef solutions:

  • Chef Automate Cluster
  • Chef Workstation
  • Chef Nodes

The templates can be used on their own or there are some that combine many templates into one. Of course it is possible to create your own templates that consume other templates within the solutions folder.

Please refer to the README file in the solutions directory for more information about the individual templates.

Deploying Templates

In order to help with the deployment of templates into Azure and manage the Resource Groups a number of Thor tasks have been created. To use them please ensure that you run bundle so that Thor is installed.

NOTE: The Azure XPlat CLI tools must be installed for these tasks to be used.

To see what tasks are available run the following:

thor -T

Thr output will be similar to the following:

deploy
------
thor deploy:create [URI] [PARAMETERS_PATH] [GROUP]  # Create a deployment in Azure
thor deploy:status [RESOURCE_GROUP]                 # Check the status of a deployment in Azure

deploy:create

The following shows how the deploy:create task can be used to deploy the Chef Automate cluster template.

thor deploy:create https://raw.githubusercontent.com/chef-partners/arm-templates/master/solutions/automatecluster-infranodes.json local/automatecluster.parameters.json chef-automate

If this is the first time the command has been run a new resource group will be created called chef-automate-1. This is tracked by a file which will be created in .thor/deploy.json.

Subsequent runs of the task will destroy the old resource group and then create a new one with the number incremented. This allows for the rapid testing of templates.

When using the task there are two rules that must be followed:

  1. The path to the template MUST be a full URI to the template
  2. The URI must represent a Public URL that Azure is able to access. The entire solution folder must be available from the parent folder as specified in the URI.
    • Use GitHub branches for testing for example
    • Upload files to your own webspace

The following table shows the additional options that can be passed to the task.

Option Description Default
--count The index to use for the resource group 1
--no-delete Do not delete the previous resource group
--location Where the deployment should occur in Azure westeurope
--dryrun Perform a dryrun to determine what will happen
--no-wait Do not block the command line for the deployment. Deployment status can be retrieved from the Azure Portal or using the deploy:status task

In the above example the parameters file comes from a local directory in the repo. If this folder is created it will be ignored by git. It is recommended that any parameters files are created in here especially if they contain passwords and / or private keys.

deploy:status

This task checks the status of a deployment to the resource group. Only the latest deployment status is displayed.

thor deploy:status chef-automate

NOTE: Do not append the index to the resource group as this will be done by the task from the tracking file

arm-templates's People

Contributors

russellseymour avatar grdnrio avatar stuartpreston avatar

Watchers

 avatar Losang Jinpa, PhD, MCSE/MCT, Cloud Monk avatar

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.