All Projects → doitintl → iris

doitintl / iris

Licence: MIT license
Automatically tag Google Cloud resources for better manageability and billing reporting

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to iris

hysds
Hybrid Cloud Science Data System Framework
Stars: ✭ 15 (-70%)
Mutual labels:  google-cloud-platform, google-compute-engine
deploy-appengine
A GitHub Action that deploys source code to Google App Engine.
Stars: ✭ 184 (+268%)
Mutual labels:  google-appengine, google-cloud-platform
zorya
Google Cloud Instance Scheduler helping to reduce costs by 60% on average for non-production environments.
Stars: ✭ 127 (+154%)
Mutual labels:  google-appengine, google-cloud-platform
Php-Google-Vision-Api
Google Vision Api for PHP (https://cloud.google.com/vision/)
Stars: ✭ 61 (+22%)
Mutual labels:  google-cloud-platform
gke-istio-gce-demo
In this project, you will leverage Kubernetes Engine and Google Compute Engine to explore how Istio can manage services that reside outside of the Kubernetes Engine environment. You will deploy a typical Istio service mesh in Kubernetes Engine, then configure an externally deployed microservice to join the mesh.
Stars: ✭ 53 (+6%)
Mutual labels:  google-cloud-platform
Cloud-Service-Providers-Free-Tier-Overview
Comparing the free tier offers of the major cloud providers like AWS, Azure, GCP, Oracle etc.
Stars: ✭ 226 (+352%)
Mutual labels:  google-cloud-platform
polynimbus
Multi-cloud infrastructure inventory and management tool, supporting AWS, Google Cloud, Azure, Oracle Cloud, Rackspace Cloud, Hetzner Cloud, Alibaba Cloud, e24cloud.com, Linode, Cloudflare, GoDaddy and Backblaze B2.
Stars: ✭ 70 (+40%)
Mutual labels:  google-cloud-platform
infra
Infrastructure management for Google Cloud Platform
Stars: ✭ 14 (-72%)
Mutual labels:  google-cloud-platform
terraform-gcp-labs
Terraform templates for GCP provider ☁️
Stars: ✭ 27 (-46%)
Mutual labels:  google-cloud-platform
iris3
An upgraded and improved version of the Iris automatic GCP-labeling project
Stars: ✭ 38 (-24%)
Mutual labels:  google-cloud-platform
rdm-app
Code for the rdm.openlighting.org site
Stars: ✭ 17 (-66%)
Mutual labels:  google-appengine
google-cloud-cpp-spanner
C++ client library for Google Cloud Spanner
Stars: ✭ 26 (-48%)
Mutual labels:  google-cloud-platform
laravel-google-cloud-storage
Google Cloud Storage filesystem driver for Laravel
Stars: ✭ 67 (+34%)
Mutual labels:  google-cloud-platform
gke-rbac-demo
This project covers two use cases for RBAC within a Kubernetes Engine cluster. First, assigning different permissions to user personas. Second, granting limited API access to an application running within your cluster. Since RBAC's flexibility can occasionally result in complex rules, you will also perform common steps for troubleshooting RBAC a…
Stars: ✭ 138 (+176%)
Mutual labels:  google-cloud-platform
argon
Campaign Manager 360 and Display & Video 360 Reports to BigQuery connector
Stars: ✭ 31 (-38%)
Mutual labels:  google-cloud-platform
gcegrpc
gRPC client/server running loadbalanced/failover on Google Compute Engine and Google App Engine
Stars: ✭ 75 (+50%)
Mutual labels:  google-cloud-platform
appengine-hosting
Host static websites with Google Cloud Storage and App Engine
Stars: ✭ 17 (-66%)
Mutual labels:  google-appengine
emulator-tools
Google Cloud BigTable and PubSub emulator tools to make development a breeze
Stars: ✭ 16 (-68%)
Mutual labels:  google-cloud-platform
kane
Google Pub/Sub client for Elixir
Stars: ✭ 92 (+84%)
Mutual labels:  google-cloud-platform
terraform-splunk-log-export
Deploy Google Cloud log export to Splunk using Terraform
Stars: ✭ 26 (-48%)
Mutual labels:  google-cloud-platform

Iris

Version Note, 2021-1-27

If you're ready to move off of the long-since obsolete Python 2 App Engine, Iris3 is now available. Iris3 not only modernizes your infrastructure, but adds many features and fixes many bugs. See the README for details.

Blog Post

In Greek mythology, Iris (/ˈaɪrɪs/; Greek: Ἶρις) is the personification of the rainbow and messenger of the gods. Iris was mostly the handmaiden to Hera.

Iris helps to automatically assign labels to Google Cloud resources for better manageability and billing reporting. Each resource in Google Cloud will get an automatically generated label in a form of [iris_name:name], [iris_region:region] and finally [iris_zone:zone]. For example if you have a Google Compute Engine instance named nginx, Iris will automatically label this instance with [iris_name:nginx], [iris_region:us-central1] and [iris_zone:us-central1-a].

Iris will also label short lived Google Compute Engine instances such as preemtible instances or instances managed by Instance Group Manager by listening to Stackdriver Logs and putting required labels on-demand.

NOTE: Iris will try tagging resources in all project across your GCP organization. Not just the project it will be deployed into.

Supported Google Cloud Products

Iris is extensible through plugins and new Google Cloud products may be supported via simply adding a plugin. Right now, there are plugins for the following products:

  • Google Compute Engine (including disks and snapshots)
  • Google Cloud Storage
  • Google BigQuery
  • Google Bigtable

Installation

We recommend to deploy Iris in a separate project within your Google Cloud organization. To deploy, you will need to have Owner role on Iris project and the following roles in your GCP Organization:

  • Organization Role Administrator - to create a custom IAM role for Iris that allows setting labels on the services (note this is different from Organization Administrator, which is in turn not related to Organization-level Owner)
  • Security Admin OR Organization Administrator - to allow Iris app engine service account to use the above role
  • Logs Configuration Writer OR Logs Configuration Writer - to configure log events stream on Organization level to watch for new instances, databases, etc.

Install dependencies

pip2.7 install -r requirements.txt -t lib

Yes, we still use Python2.7. Yes, we know.

Deploy

./deploy.sh <project-id>

Configuration

Configuration is stored in the config.json file. The file contains two arrays.

  1. tags - A list of tags that will be applied to the resources (if the corresponding plugin implemented a function _get_<TAGNAME>())
  2. on_demand - A List of plugins that will tag whenever a new object of their type is created
{
  "tags": [
    "name",
    "zone",
    "region",
    "location",
    "instance_type"
  ],
  "on_demand": [
    "Gce",
    "BigQuery",
    "Gcs",
    "BigTable",
    "GceDisks",
    "GceSnapshots"
  ]
}

Local Development

For local development run:

dev_appserver.py --log_level=debug app.yaml

Iris is easily extendable to support tagging of other GCP services. You will need to create a Python file in the /plugin directory with register_signals, def api_name and methodsNames functions as following:

     def register_signals(self):

        """
          Register with the plugin manager.
        """

        logging.debug("BigQuery class created and registering signals")
 def api_name(self):
        return "compute.googleapis.com"
	// a list of log methods to listen on
    def methodsNames(self):
        return ["storage.buckets.create"]

All plugins are derived form Plugin class and needs to implement the following functions:

  1. do_tag(self, project_id)
  2. get_gcp_object(self, data)
  3. tag_one(self, gcp_object, project_id)
  4. api_name(self)
  5. methodsNames(self)

Each plugin will execute gen_labels() which will loop over all the tags that are defined in the config file and will execute _get_<TAGNAME>() function

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].