Giter Club home page Giter Club logo

power-management-automation-azure's Introduction

ANS Power Management Automation for Azure

Deploy to Azure

How to deploy

Click the blue "Deploy to Azure" button

Or if you prefer commandline;

  1. Clone the repository git clone https://github.com/ans-cloud/power-management-automation-azure.git
  2. Ensure you have az cli installed
  3. Run az login
  4. Switch to the correct subscription
az account set -s "YOUR_SUBSCRIPTION_ID"
  1. Create a resource group (optional)
az group create \
  --name "name-for-resource-group" \
  --location "uksouth or another region of your choice"
  1. Update the values in example.parameters.json (Optional)
  2. Run the following command to deploy the ARM template
az deployment group create \
  --name "deploy-power-management-automation" \
  --resource-group "name-of-existing-resource-group" \
  --template-file "azure-deploy.json" \
  --parameters "example.parameters.json"

What will this deploy?

This ARM (Azure Resource Manager) template will deploy a logicapp, upon creation you can choose whether to use an existing or new resource group

What do I need to do post deployment?

  1. Navigate to your root management group (or each subscription manually)
  2. Assign Virtual Machine Contributor rights to the logicapp's managed identity

How will this know which VMs to Power On or Off?

  • You will need to add the AutoOn and AutoOff tags to your virtual machines.
  • These tags follow the format HH:mm (Note: These must be in increments of 15 minutes)

How will this handle different timezones

  • This script is built to use UTC as the primary timezone, with a check for BST (British Summer Time) which adds an hour during the summer months.
  • For this to work with other timezones, once deployed, remove the actions Are_we_in_BST, If_are_we_in_BST and change the timezone on the trigger to your timezone of choice

power-management-automation-azure's People

Contributors

dewhurstwill avatar purekiller11 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.