{"id":20111407,"url":"https://github.com/openstack/charm-cloudkitty","last_synced_at":"2025-10-26T00:07:26.360Z","repository":{"id":66174597,"uuid":"76441733","full_name":"openstack/charm-cloudkitty","owner":"openstack","description":"Juju Charm - Cloudkitty. Mirror of code maintained at opendev.org.","archived":false,"fork":false,"pushed_at":"2024-08-23T08:08:27.000Z","size":31,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-06T10:45:35.775Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://opendev.org/openstack/charm-cloudkitty","language":"Python","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openstack.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-12-14T08:52:44.000Z","updated_at":"2024-08-23T08:08:30.000Z","dependencies_parsed_at":"2023-02-21T06:01:16.991Z","dependency_job_id":null,"html_url":"https://github.com/openstack/charm-cloudkitty","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/openstack/charm-cloudkitty","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openstack%2Fcharm-cloudkitty","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openstack%2Fcharm-cloudkitty/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openstack%2Fcharm-cloudkitty/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openstack%2Fcharm-cloudkitty/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openstack","download_url":"https://codeload.github.com/openstack/charm-cloudkitty/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openstack%2Fcharm-cloudkitty/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279189609,"owners_count":26122783,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-16T02:00:06.019Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T18:15:58.555Z","updated_at":"2025-10-16T12:14:24.318Z","avatar_url":"https://github.com/openstack.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cloudkitty\n\nCloudkitty charm - Openstack Rating as a Service\n\n## Overview\n\nThis charm provides a way to deploy Cloudkitty - Openstack Rating as a Service module - in Openstack\n\n**What is CloudKitty ?**\n\nCloudKitty is a generic solution for the chargeback and rating of a cloud. Provides a metric-based rating for cloud administrators allowing them to create rating rules to the collected data.\n\n\n**CloudKitty usage**\n\nWith Cloudkitty, it is possible to:\n\n* Collect metrics from OpenStack (through Gnocchi).\n* Apply rating rules to the previous metrics.\n* Retrieve the rated information, grouped by scope and/or by metric type.\n\nHowever, it is not possible to:\n\n* Limit resources in other OpenStack services.\n* Add taxes, convert between currencies, etc...\n\nCloudKitty associates a price to a metric for a given period, the price is mapped according to end-user needs.\n\n\n## Configuration\n\nCloudkitty charm configuration options\n\n* `debug`\\\nto run service in debug mode change debug config value\n    ```\n    juju config cloudkitty debug=true\n    ```\n* `region`\\\nset the openstack cloud region, if value required to be changed preferably to specify in a bundle\n    ```\n    cloudkitty:\n        charm: ch:cloudkity\n        options:\n            region: MyRegion\n    ```\n\nTo display all configuration option information run `juju config\ncloudkitty`. If the application is not deployed then see the charm's\n[configuration file](config.yaml).\n\n## Deployment\n\nDeploy cloudkitty charm\n\n```\njuju deploy cloudkitty --channel edge\n```\n\nOr in a bundle\n```\napplications:\n  cloudkitty:\n    charm: ch:cloudkitty\n    channel: edge\n    num_units: 1\n    series: jammy\n```\n\n## Relations\n\nCloudkitty charm supports the following relations.\n\nMySQL relation - relation to [mysql-operator](https://github.com/canonical/mysql-operator) charm - provides database storage for the cloudkitty service.\n\n**NOTE:** This charm is not backward compatible with legacy `mysql-innodb-cluster` charm\n\n```\njuju deploy mysql --channel edge\njuju relate cloudkitty mysql\n```\n\nKeystone relation - provides identity management.\n\n```\njuju deploy keystone\njuju relate cloudkitty keystone\n```\n\nGnocchi relation - provides metrics collector service.\n```\njuju deploy gnocchi\njuju relate cloudkitty gnocchi\n```\n\nRabbitMQ relation - provides messages queue service.\n```\njuju deploy rabbitmq-server\njuju relate cloudkitty rabbitmq-server\n```\n\n## Actions\nThis section lists Juju [actions](https://jaas.ai/docs/actions) supported by the charm. Actions allow specific operations to be performed on a per-unit basis.\n\n* `restart-services`\\\nrestarts `cloudkitty-{api,processor}` services in the unit.\n\n    ```\n    juju run-action --wait cloudkitty/leader restart-services\n    ```\n\n## Usage\n\nTo interact with the service we should use the built-in openstack cloudkitty client in the [openstackclients package](https://snapcraft.io/openstackclients)\n\nCheck clients usage like this\n\n```\nopenstack rating --help\n```\n\nFirst enable `hashmap` module\n```\n$ openstack rating module enable hashmap\n```\n\nThen start by creating a service called image for example\n```\n$ openstack rating hashmap service create image\n```\n\nCreate a field called `flavor_id` as an example, and associate it with the service using the service ID\n```\n$ openstack rating hashmap field create \u003cSERVICE_ID\u003e flavor_id\n```\n\nMap the field with a value of the specific field, a flavor id\n```\n$ openstack flavor list\n+---------+-----------+-------+------+-----------+-------+-----------+\n| ID      | Name      |   RAM | Disk | Ephemeral | VCPUs | Is Public |\n+---------+-----------+-------+------+-----------+-------+-----------+\n| 123abc  | m1.tiny   |   512 |    8 |        40 |     1 | True      |\n+---------+-----------+-------+------+-----------+-------+-----------+\n```\n\nCreate the mapping of type `flat` and let's assign a cost of `1.2`\n```\n$ openstack rating hashmap mapping create --type flat --field-id \u003cFIELD_ID\u003e --value 123abc 1.2\n```\n\nFinally check the summary report\n```\n$ openstack rating summary get\n```\n\n## TO-DO\n\nThis charm is under development not yet stable, the following list provides pending features\n\n* Enable TLS support using [[TLS interface]](https://opendev.org/openstack/charm-ops-interface-tls-certificates/src/branch/master/interface_tls_certificates/ca_client.py)\n\n* InfluxDB relation required for [storage v2](https://docs.openstack.org/cloudkitty/latest/admin/configuration/storage.html#influxdb-v2)\n\n* Cloudkitty dashboard charm relation\n\n* High availability\n\n\n## Contributing\n\nPlease see the [Juju SDK docs](https://juju.is/docs/sdk) for guidelines\non enhancements to this charm following best practice guidelines, and\n`CONTRIBUTING.md` for developer guidance.\n\nFollow Openstack best practices for [Software contributions](https://docs.openstack.org/charm-guide/latest/community/software-contrib/index.html) in charm development.\n\n\n# Bugs\n\nPlease report bugs on [Launchpad][lp-bugs-charm-cloudkitty].\n\nFor general charm questions refer to the [OpenStack Charm Guide][cg].\n\n\u003c!-- LINKS --\u003e\n[cg]: https://docs.openstack.org/charm-guide\n[lp-bugs-charm-cloudkitty]: https://bugs.launchpad.net/charm-cloudkitty/+filebug\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenstack%2Fcharm-cloudkitty","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenstack%2Fcharm-cloudkitty","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenstack%2Fcharm-cloudkitty/lists"}