Skip to content

Commit 27cc49c

Browse files
Various os_capacity fixes
1 parent 15fbd12 commit 27cc49c

File tree

10 files changed

+374
-62
lines changed

10 files changed

+374
-62
lines changed

.yamllint

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@ ignore: |
2020
.github/
2121
.gitlab/
2222
.gitlab-ci.yml
23+
*etc/kayobe/kolla/config/prometheus/prometheus.yml.d/70-oscapacity.yml

doc/source/configuration/monitoring.rst

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -141,17 +141,25 @@ OpenStack Capacity
141141
==================
142142

143143
OpenStack Capacity allows you to see how much space you have avaliable
144-
in your cloud. StackHPC Kayobe Config includes this exporter by default
145-
and it's necessary that some variables are set to allow deployment.
144+
in your cloud. StackHPC Kayobe Config includes a playbook for manual
145+
deployment, and it's necessary that some variables are set before
146+
running this playbook.
146147

147148
To successfully deploy OpenStack Capacity, you are required to specify
148149
the OpenStack application credentials in ``kayobe/secrets.yml`` as:
149150

150151
.. code-block:: yaml
151152
152-
secrets_os_exporter_auth_url: <some_auth_url>
153-
secrets_os_exporter_credential_id: <some_credential_id>
154-
secrets_os_exporter_credential_secret: <some_credential_secret>
153+
secrets_os_capacity_auth_url: <some_auth_url>
154+
secrets_os_capacity_credential_id: <some_credential_id>
155+
secrets_os_capacity_credential_secret: <some_credential_secret>
156+
157+
Additionally, you are required to enable a conditional flag to allow
158+
HAProxy configuration to be templated to controllers during deployment.
159+
160+
.. code-block:: yaml
161+
162+
stackhpc_enable_os_capacity: true
155163
156164
After defining your credentials, You may deploy OpenStack Capacity
157165
using the ``ansible/deploy-os-capacity-exporter.yml`` Ansible playbook

etc/kayobe/ansible/deploy-os-capacity-exporter.yml

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,36 @@
44

55
tasks:
66
- name: Create os-capacity directory
7-
ansible.builtin.file:
7+
file:
88
path: /opt/kayobe/os-capacity/
99
state: directory
1010

11-
- name: Template clouds.yml
12-
ansible.builtin.template:
13-
src: templates/os_capacity-clouds.yml.j2
14-
dest: /opt/kayobe/os-capacity/clouds.yaml
11+
- name: Create env-file
12+
file:
13+
path: /opt/kayobe/os-capacity/env-file
14+
state: touch
15+
16+
- name: Read admin-openrc file
17+
shell:
18+
cmd: "cat $KOLLA_CONFIG_PATH/admin-openrc.sh | awk '{print $2}' | tail -n +5"
19+
register: credentials
20+
21+
- name: Write environment variables to env-file
22+
copy:
23+
content: "{{ credentials.stdout_lines }}"
24+
dest: /opt/kayobe/os-capacity/env-file
25+
26+
- name: Set TLS verification to false.
27+
lineinfile:
28+
path: /opt/kayobe/os-capacity/env-file
29+
line: "OS_INSECURE=1"
30+
when: kolla_enable_tls_internal | bool
1531

1632
- name: Ensure os_capacity container is running
1733
docker_container:
1834
name: os_capacity
1935
image: ghcr.io/stackhpc/os-capacity:master
20-
env:
21-
OS_CLOUD: openstack
22-
OS_CLIENT_CONFIG_FILE: /etc/openstack/clouds.yaml
36+
env-file: /opt/kayobe/os-capacity/env-file
2337
mounts:
2438
- type: bind
2539
source: /opt/kayobe/os-capacity/
Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
clouds:
22
openstack:
33
auth:
4-
auth_url: "{{ secrets_os_exporter_auth_url }}"
5-
application_credential_id: "{{ secrets_os_exporter_credential_id }}"
6-
application_credential_secret: "{{ secrets_os_exporter_credential_secret }}"
4+
auth_url: "{{ secrets_os_capacity_auth_url }}"
5+
application_credential_id: "{{ secrets_os_capacity_credential_id }}"
6+
application_credential_secret: "{{ secrets_os_capacity_credential_secret }}"
77
region_name: "RegionOne"
88
interface: "internal"
99
identity_api_version: 3
1010
auth_type: "v3applicationcredential"
11+
{% if kolla_enable_tls_internal | bool %}
12+
verify: False
13+
{% endif %}

etc/kayobe/kolla/config/grafana/dashboards/openstack/grafana_cloud_dashboard.json

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
"editable": true,
2626
"fiscalYearStartMonth": 0,
2727
"graphTooltip": 0,
28-
"id": 2084495,
2928
"links": [],
3029
"liveNow": false,
3130
"panels": [
@@ -86,7 +85,7 @@
8685
},
8786
"textMode": "auto"
8887
},
89-
"pluginVersion": "9.4.7",
88+
"pluginVersion": "10.1.2",
9089
"repeat": "flavors",
9190
"repeatDirection": "h",
9291
"targets": [
@@ -424,6 +423,7 @@
424423
"tooltip": false,
425424
"viz": false
426425
},
426+
"insertNulls": false,
427427
"lineInterpolation": "linear",
428428
"lineWidth": 1,
429429
"pointSize": 5,
@@ -465,6 +465,7 @@
465465
"y": 17
466466
},
467467
"id": 5,
468+
"interval": "30m",
468469
"options": {
469470
"legend": {
470471
"calcs": [
@@ -522,6 +523,7 @@
522523
"tooltip": false,
523524
"viz": false
524525
},
526+
"insertNulls": false,
525527
"lineInterpolation": "linear",
526528
"lineWidth": 1,
527529
"pointSize": 5,
@@ -563,6 +565,7 @@
563565
"y": 17
564566
},
565567
"id": 16,
568+
"interval": "30m",
566569
"options": {
567570
"legend": {
568571
"calcs": [
@@ -646,6 +649,7 @@
646649
"tooltip": false,
647650
"viz": false
648651
},
652+
"insertNulls": false,
649653
"lineInterpolation": "smooth",
650654
"lineStyle": {
651655
"fill": "solid"
@@ -689,6 +693,7 @@
689693
"y": 26
690694
},
691695
"id": 6,
696+
"interval": "30m",
692697
"options": {
693698
"legend": {
694699
"calcs": [
@@ -750,6 +755,7 @@
750755
"tooltip": false,
751756
"viz": false
752757
},
758+
"insertNulls": false,
753759
"lineInterpolation": "linear",
754760
"lineWidth": 1,
755761
"pointSize": 5,
@@ -791,6 +797,7 @@
791797
"y": 26
792798
},
793799
"id": 4,
800+
"interval": "30m",
794801
"options": {
795802
"legend": {
796803
"calcs": [
@@ -836,7 +843,7 @@
836843
"current": {
837844
"selected": false,
838845
"text": "Prometheus",
839-
"value": "Prometheus"
846+
"value": "PBFA97CFB590B2093"
840847
},
841848
"description": "The prometheus datasource used for queries.",
842849
"hide": 0,
@@ -885,7 +892,7 @@
885892
]
886893
},
887894
"time": {
888-
"from": "now-24h",
895+
"from": "now-2d",
889896
"to": "now"
890897
},
891898
"timepicker": {},
@@ -895,4 +902,4 @@
895902
"version": 1,
896903
"weekStart": ""
897904
}
898-
{% endraw %}
905+
{% endraw %}

0 commit comments

Comments
 (0)