Skip to content
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

Merged
merged 1 commit into from
Apr 10, 2024

Conversation

markgoddard
Copy link

No description provided.

@markgoddard markgoddard self-assigned this Mar 19, 2024
@markgoddard markgoddard requested a review from priteau March 19, 2024 11:38
@markgoddard
Copy link
Author

Currently untested.

@MoteHue
Copy link
Contributor

MoteHue commented Apr 10, 2024

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
Service and field mappings were applied without issue :)

@markgoddard markgoddard marked this pull request as ready for review April 10, 2024 10:45
@markgoddard markgoddard requested a review from a team as a code owner April 10, 2024 10:45
@markgoddard markgoddard requested a review from MaxBed4d April 10, 2024 10:45
Comment on lines +47 to +83
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
```

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.

Copy link
Author

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.

Copy link

@MaxBed4d MaxBed4d left a 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.

@markgoddard
Copy link
Author

Thanks @MoteHue and @MaxBed4d for testing

@markgoddard markgoddard merged commit 3525c04 into main Apr 10, 2024
4 checks passed
@markgoddard markgoddard deleted the cloudkitty branch April 10, 2024 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants