-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add os_ratings role for registering resources in Cloudkitty #30
Conversation
Currently untested. |
I've tested using this at UZH, alongside a WIP version of Max's openstack-config branch https://github.com/stackhpc/openstack-config/tree/cloudkitty-role-config |
Example Playbook | ||
---------------- | ||
|
||
The following playbook registers a Cloudkitty flavor field with two mappings | ||
for different Nova flavors. It also registers a service mapping based on the | ||
size of images stored in Glance. | ||
|
||
``` | ||
--- | ||
- name: Ensure Cloudkitty ratings are registered | ||
hosts: os-client | ||
tasks: | ||
- import_role: | ||
name: stackhpc.openstack.os_ratings | ||
vars: | ||
os_ratings_venv: "~/os-ratings-venv" | ||
os_ratings_environment: | ||
OS_AUTH_URL: "{{ lookup('env', 'OS_AUTH_URL') }}" | ||
... | ||
os_ratings_hashmap_field_mappings: | ||
- service: instance | ||
name: flavor_id | ||
mappings: | ||
- value: small | ||
cost: 1.0 | ||
group: instance_uptime_flavor_id | ||
type: flat | ||
- value: large | ||
cost: 2.0 | ||
group: instance_uptime_flavor_id | ||
type: flat | ||
os_ratings_hashmap_service_mappings: | ||
- service: image.size | ||
cost: 0.1 | ||
group: volume_ceph | ||
type: flat | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this going to be redundant once this gets pushed as the way to configure and run the CloudKitty playbook is with the role via openstack-config
& openstack-config.yml
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally I like roles to provide an example in their readme. openstack-config is a separate project and you don't need to use it to use this collection or role. I don't think we even link to it from this collection.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apart from potential changes to the README.md
this role seemingly works as intended with it working both in a private AiO and @MoteHue's production environment.
No description provided.