Git Product home page Git Product logo

azurejanitor's Introduction

AzureJanitor

This repo contains all ther necesaary components needed to deploy and onboard to AzureJanitor. See the Contribution guide for how to use or contribute to this repo.

Introduction

AzureJanitor is a Serverless Service which enables subscription owners to configure auto-deletion (along with verbose monitoring/alerting) of stale resources to save usage costs. A resource is said to be a stale resource if it is not used and hence, is a waste cost to the organization. Integrate this app with Azure subscriptions and it will take care of the cleanup. The cleanup is based on the age of the resources defined by the sub admin. The resources owner can override the deletion conditions afterwards though.

Architecture

AzureJanitor Design can be split into 4 major parts as following:

1. Recognizing the stale resources :

Resource Group Tags

Before diving into this option of recognizing the stale resources, a major azure resource used for this approach is Azure Policy. Azure policy is a resource which enforces built-in/custom rules capabilities at subscription level.

Firstly we will be defining an azure policy which will be shared/assigned across all the onboarded subscriptions. The policy will auto-tag any new resource group added to the policy as following:

Key : CreationDate

Value : utcNow()

Key : DaysUntilDeletion

Value : 15

Existing resource groups can be remediated by triggering a remediation task. If the tag exists with a different value it will not be changed.

Example of the Azure Policy which enables adding above tags on resource groups: https://github.com/stefanrothnet/azure-policy/blob/master/append-date-tag-resource-group/azurepolicy.json

Resource Insights

2. Auto-Alerting

3. Auto-Deletion

4. Onboarding

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

azurejanitor's People

Contributors

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