Code Monkey home page Code Monkey logo

zombie-projects-watcher's Introduction

Zombie Projects Watcher

Helps your team control infra costs by pointing potential unused 'zombie' projects.

If you use the Slack integration, the Owners of the Projects receive messages like this one:

Example Slack message

If you use the Google Chat integration, messages similar to this one are sent to your Chat Space:

Example Chat message

Installation

Dependencies and Config

Clone this repository.

Install Python dependencies and prepare the config file:

pipenv install --ignore-pipfile --dev
cp example-config.yaml config.yaml

Change config.yaml to fit your needs.

Usage as a CLI command

If you want to execute the program using your GCP user credentials, use the commands below:

gcloud auth application-default login
gcloud config set project PROJECT_ID

Instead of using your GCP user credentials, you can use a Service Account Key. In this case, use the following command:

export GOOGLE_APPLICATION_CREDENTIALS='service-account-key.json'

Run the following command:

pipenv run python main.py

If you have created an API token for the Slack integration, execute the following commands:

export SLACK_API_TOKEN=<your Slack API token>
pipenv run python main.py

See the example-bigquery-billing-costs-view.sql file of an example query to use for adding Project cost information from your Billing Export data in BigQuery.

Usage as a Google Cloud Function

If you want to deploy the code as a Cloud Function, run the following command:

gcloud functions deploy zombie-project-watcher \
    --entry-point=http_request \
    --runtime python38 \
    --trigger-http

If you need to run or debug the Google Cloud Function locally, run the command:

functions-framework --target http_request --debug

zombie-projects-watcher's People

Contributors

akieras avatar andersonj-cit avatar dependabot-support avatar dependabot[bot] avatar kieras avatar romanini-ciandt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

zombie-projects-watcher's Issues

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.