Costs saver for AzureThis package is designed to save on costs of resources in Azure. Usually, one is not using Test and Acceptance resources during nights and weekends, but not everybody can afford themselves to destroy those resources and recreate them (complex configurations, too much manual interventions, whateverYouNameIt). So, I designed this small script for VSTS, which requires your connection to Azure RM and wants your resource group name to proceed. If you select to downscale your resources (running at evening) - it will find all SQL databases and elastic pools, all web apps and all VMs belonging to given resource group and will downscale web apps, sql databases and elastic pools to lowest possible size, vm's will be deprovisioned. If you select to upscale resources - script will read tags on them and upscale resources (web app, sql databases and elastic pools), vm's will be started. SQL databases sizes tags are stored on SQL server resource, as they tend to dissappear from SQL database resource. Script locationTo improve reusability, script itself have been moved to Nuget - package CostsSaver-Azure.PowerShell; sources could be reviewed at other repository Issues
Use caseDownscale Azure resources for Testing and Acceptance environments during nights and weekends to save on costs. DetailsPlease, read post detailing usage and possible use cases as well. Changes historyVersion 0SQL database sizes are stored as 2 tags on SQL server resource Version 1Azure imposes limitation on amount of tags per resource - 15 tags. To overcome this, sql database sizes are written as a string value, which is split to 256 chars per tag (each tag could not have more than 256 characters in value) and written to sql database server resource. On upscaling, this tags are read and size is reconstructed. This solution was required for Sitecore 9, which deploys 14 database Version 2Fixes import of AzureRM modules on agent to use latest version; changes order of tag writing and actual down-/up- scaling; added retry feature for down-/up- scaling; Web apps without slots will be downscaled to Basic during downscale action. Manual package preparationInstall nuget package CostsSaver-Azure.PowerShell in temp directory. Then copy psm1 files from
|