Skip to content

Commit 5c95e93

Browse files
committed
Configure some cloudkitty settings.
1 parent 375183b commit 5c95e93

File tree

3 files changed

+62
-17
lines changed

3 files changed

+62
-17
lines changed

ansible/group_vars/all/openstack

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,46 @@ openstack_image_elements: []
4848

4949
# List of diskimage-builder element git repos to pull
5050
openstack_image_git_elements: []
51+
###############################################################################
52+
# Configuration variables for a Cloudkitty ratings service deployment.
53+
54+
# Path to where a virtual environment directory will be created.
55+
#
56+
ratings_venv: "~/os-ratings-venv"
57+
58+
# File path or URL containing Python upper constraints.
59+
#
60+
ratings_upper_constraints_file: []
61+
62+
# Environment variables for the OpenStack CLI. By default this is left empty.
63+
#
64+
#ratings_environment:
65+
# - name: ENV_VAR_NAME
66+
# value: ENV_VAR_VALUE
67+
68+
# A list where each item is a dictionary mapping the associated fields,
69+
# with the 'mappings' field also being a list of dictionaries.
70+
# Example of the mappings and their fields can be found below,
71+
# however for more information please refer to the README.md file.
72+
#
73+
#ratings_hashmap_field_mappings:
74+
# - service: SERVICE_NAME
75+
# name: FIELD_NAME
76+
# mappings:
77+
# - value: MAPPING_VALUE
78+
# cost: MAPPING_COST
79+
# group: MAPPING_GROUP
80+
# type: MAPPING_TYPE
81+
82+
# Much like the field mappings above, the service mappings are a list of
83+
# dictionaries, however these are not associated with a field.
84+
#
85+
#ratings_hashmap_service_mappings:
86+
# - service: SERVICE_NAME
87+
# cost: MAPPING_COST
88+
# group: MAPPING_GROUP
89+
# type: MAPPING_TYPE
90+
5191

5292
###############################################################################
5393
# Configuration of nova host aggregates for OpenStack.

ansible/openstack-ratings.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
- name: Generate OpenStack software ratings
3-
hosts: controllers[0]
3+
hosts: localhost
44
tags:
55
- ratings
66
roles:

etc/openstack-config/openstack-config.yml

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -101,15 +101,15 @@
101101

102102
# Path to where a virtual environment directory will be created.
103103
#
104-
#ratings_venv: /path/to/venv/directory
104+
ratings_venv: "~/os-ratings-venv"
105105

106106
# File path or URL containing Python upper constraints.
107107
#
108-
#ratings_upper_constraints_file: /path/to/upper_constraints_file
108+
# ratings_upper_constraints_file: /path/to/upper_constraints_file
109109

110110
# Environment variables for the OpenStack CLI. By default this is left empty.
111111
#
112-
#ratings_environment:
112+
# ratings_environment:
113113
# - name: ENV_VAR_NAME
114114
# value: ENV_VAR_VALUE
115115

@@ -118,23 +118,28 @@
118118
# Example of the mappings and their fields can be found below,
119119
# however for more information please refer to the README.md file.
120120
#
121-
#ratings_hashmap_field_mappings:
122-
# - service: SERVICE_NAME
123-
# name: FIELD_NAME
124-
# mappings:
125-
# - value: MAPPING_VALUE
126-
# cost: MAPPING_COST
127-
# group: MAPPING_GROUP
128-
# type: MAPPING_TYPE
121+
ratings_hashmap_field_mappings:
122+
- service: instance
123+
name: flavor_id
124+
mappings:
125+
- value: small
126+
cost: 1.0
127+
group: instance_uptime_flavor_id
128+
type: flat
129+
- value: large
130+
cost: 2.0
131+
group: instance_uptime_flavor_id
132+
type: flat
133+
129134

130135
# Much like the field mappings above, the service mappings are a list of
131136
# dictionaries, however these are not associated with a field.
132137
#
133-
#ratings_hashmap_service_mappings:
134-
# - service: SERVICE_NAME
135-
# cost: MAPPING_COST
136-
# group: MAPPING_GROUP
137-
# type: MAPPING_TYPE
138+
ratings_hashmap_service_mappings:
139+
- service: image.size
140+
cost: 0.1
141+
group: volume_ceph
142+
type: flat
138143

139144
###############################################################################
140145
# Dummy variable to allow Ansible to accept this file.

0 commit comments

Comments
 (0)