Coder Social home page Coder Social logo

eolver / azure-automation-powerapps Goto Github PK

View Code? Open in Web Editor NEW
2.0 4.0 3.0 21 KB

Automate your Azure resources for cost saving using Azure Automation , MS Flow and MS PowerApps

Home Page: http://app.etsolutionsau.com

PowerShell 100.00%
azure-automation ms-powerapps azure-resources scale sql-scale money power-platform

azure-automation-powerapps's Introduction

Azure-Automation and PowerApps

Overview

Step by Step guide to understand how to script and automate scaling of resources in Azure in a simple yet powerful fashion to help save you money in the cloud using multiple Microsoft tools. Azure Automation runbooks to code your Azure PowerShell scripts, MS Flow as your orchestration tool and MS PowerApps as your friendly, simple UI

As part of my organisation adopting SAFe recently and wanting to have a more 'scale on demand' approach, I produced this demo to share at a tech conference and wanted to share witht he broader community.

Automation

Deploy your Resources

For this demo I will deploy Azure App Service Plans, Azure SQL Databases and Virtual machines to demonstrate how scaling and automation can save money

Create and update your Automation Account

Creating an Automation account is simple, browse to 'create a resource' and follow standard steps subscription, resource group name and location. When create be sure to create the 'Azure run As account' as this is crucial for authenticating with Azure to manage Azure resources.

Deploy

Once you have created the resource, the first thing I would suggest doing is installing the required modules for this particular demo which includes
-AzureRM.Resources
-AzureRM.Profile

Create your Azure PowerShell Runbooks

Create the runbooks by going to the Runbooks blade, name your runbook appropriately for this demo I have created 6 runbooks one for each resources and its purpose.

For this demo I have attached the PowerShell scripts for each resource type to the repo.

-Scale Up SQL
-Scale Up ASP
-Start VM
-Scale Down SQL
-Scale Down ASP
-Stop VM

runbooks

This is extremly powerful where for every new resouce added, the powerscript will get all resources of that type and execute so make sure resource groups are segregated as required for each environment

Demonstrate how to schedule runbooks

All your runbooks can be scheduled and automated to run for desired length of time, particular days of the week and timeframe or continuously with no expiry, its pretty self explanatory once you create the runbook. For an enterprise for non-production you would want it to scale down end of business hours and at the weekend.

Create and link Microsoft Flow to to your Azure Automation runbooks

Once you have created you runbooks, tested and published them you can then login to MS Flow to create and link your PowerApp Flow button to your automation runbook in Azure

Create Flow Configure Flow Flow

Check that when you trigger or run that flow button it triggers in azure under the automation account > Jobs blade

Automation Jobs

Create your PowerApp and link to your Flow button

Once you have created your PowerApp flow buttons login to MS PowerApps with a work/school account. This should give you the option to create a blank canvas for Mobile or tablet. you can then begin to customise the PowerApp with text labels, colour and buttons which you can then link to your Flow Buttons as below

Create PowerApp Link Flow Action

Demo App Demo App

azure-automation-powerapps's People

Contributors

eolver avatar msftgits avatar

Stargazers

 avatar  avatar

Watchers

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