In Greek mythology, Iris(Ἶρις) is the personification of the rainbow and messenger of the gods. She was the handmaiden to Hera.
See the post that presents Iris.
Iris automatically assigns labels to Google Cloud Platform resources for easier analysis, particularly of cost.
Resources of all supported types in all or some of the projects in the GCP organization will get automatically-generated labels with keys like iris_zone
(the prefix is configurable), and a value copied from the resource. For example, a Google Compute Engine instance would get labels like
[iris_name:nginx]
, [iris_region:us-central1]
and [iris_zone:us-central1-a]
. This behavior can be configured in various ways; see below.
Note that Iris is designed to serve the organization.
Iris does not add information, only copy values that already exist. For example, it can label a VM instance with its zone; but it cannot add a "business unit" label because it does not know a resource's business unit.
For that, you should label all resources when creating them, e.g., in your Terraform scripts. In fact, I recommend doing that (and making Iris extraneous.)
If you want to label the resources -- virtual machines, PubSub topics etc. -- that already exist when you deploy Iris, see section "Labeling existing resources" below.
Iris is open-source; it is not an official DoiT product. Feel free to send Pull Requests with new functionality and add new types of labels. See the TODO.md
file and Github issues for features and fixes you might do.
Iris labels most types of newly-created resources by listening to Google Cloud Operations Logs. You can disable this: See INSTALL or run deploy.sh -h
.
Iris labels a few types of resources periodically on a Cloud Scheduler "cron" job. By default, Iris does not label all types of resources on these cron runs, to save the costs of relabeling -- with the same label -- every day.
You can have Iris relabel everything on every cron run, See label_all_on_cron
to True
in the configuration file.
You can also disable the scheduled labeling entirely. See Deployment below or run ./deploy.sh -h
iris_label_all_types_topic
, and a full labeling will be triggered. For example, run with gcloud pubsub topics publish iris_label_all_types_topic --message=does_not_matter --project $PROJECT_ID
where $PROJECT_ID
is where Iris is deployed.Right now, there are plugins for the following types of resources.
To learn from the code what resources and keys are added, search for functions whose
names start _gcp_
. The part of the function name after _gcp_
is used for the label key.
Please see INSTALL.
Please see ARCHITECTURE.
Please see HACKING.