Skip to content

Commit

Permalink
Various os_capacity fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
assumptionsandg committed Oct 18, 2023
1 parent 15fbd12 commit f8477f9
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 11 deletions.
1 change: 1 addition & 0 deletions .yamllint
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ ignore: |
.github/
.gitlab/
.gitlab-ci.yml
*etc/kayobe/kolla/config/prometheus/prometheus.yml.d/70-oscapacity.yml
18 changes: 13 additions & 5 deletions doc/source/configuration/monitoring.rst
Original file line number Diff line number Diff line change
Expand Up @@ -141,17 +141,25 @@ OpenStack Capacity
==================

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

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

.. code-block:: yaml
secrets_os_exporter_auth_url: <some_auth_url>
secrets_os_exporter_credential_id: <some_credential_id>
secrets_os_exporter_credential_secret: <some_credential_secret>
secrets_os_capacity_auth_url: <some_auth_url>
secrets_os_capacity_credential_id: <some_credential_id>
secrets_os_capacity_credential_secret: <some_credential_secret>
Additionally, you are required to enable a conditional flag to allow
HAProxy configuration to be templated to controllers during deployment.

.. code-block:: yaml
stackhpc_enable_os_capacity: true
After defining your credentials, You may deploy OpenStack Capacity
using the ``ansible/deploy-os-capacity-exporter.yml`` Ansible playbook
Expand Down
9 changes: 6 additions & 3 deletions etc/kayobe/ansible/templates/os_capacity-clouds.yml.j2
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
clouds:
openstack:
auth:
auth_url: "{{ secrets_os_exporter_auth_url }}"
application_credential_id: "{{ secrets_os_exporter_credential_id }}"
application_credential_secret: "{{ secrets_os_exporter_credential_secret }}"
auth_url: "{{ secrets_os_capacity_auth_url }}"
application_credential_id: "{{ secrets_os_capacity_credential_id }}"
application_credential_secret: "{{ secrets_os_capacity_credential_secret }}"
region_name: "RegionOne"
interface: "internal"
identity_api_version: 3
auth_type: "v3applicationcredential"
{% if kolla_enable_tls_internal | bool %}
verify: False
{% endif %}
2 changes: 2 additions & 0 deletions etc/kayobe/kolla/config/haproxy/services.d/os_exporter.cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{% if stackhpc_enable_os_capacity | bool %}
{% raw %}
frontend os_capacity_frontend
mode http
Expand All @@ -17,3 +18,4 @@ backend os_capacity_backend
server {{ host_name }} {{ host_ip }}:9000 check inter 2000 rise 2 fall 5
{% endfor %}
{% endraw %}
{% endif %}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{% if stackhpc_enable_os_capacity | bool %}
{% raw %}
scrape_configs:
- job_name: os-capacity
Expand All @@ -7,3 +8,4 @@ scrape_configs:
scrape_interval: 15m
scrape_timeout: 10m
{% endraw %}
{% endif %}
10 changes: 10 additions & 0 deletions etc/kayobe/stackhpc-monitoring.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,13 @@
alertmanager_low_memory_threshold_gib: 5

###############################################################################

###############################################################################
# Exporter configuration

# Whether the OpenStack Capacity exporter is enabled.
# Enabling this flag will result in HAProxy configuration and Prometheus scrape
# targets being templated during deployment.
stackhpc_enable_os_capacity: false

###############################################################################
10 changes: 7 additions & 3 deletions releasenotes/notes/os-capacity-94006f03f16583e4.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ upgrade:
- |
To deploy the OpenStack Capacity Grafana dashboard, you must
define OpenStack application credential variables:
``secrets_os_exporter_auth_url``,
``secrets_os_exporter_credential_id`` and
``secrets_os_exporter_credential_secret`` as laid out in the
``secrets_os_capacity_auth_url``,
``secrets_os_capacity_credential_id`` and
``secrets_os_capacity_credential_secret`` as laid out in the
'Monitoring' documentation.
You must also enable the ``stackhpc_enable_os_capacity``
flag for OpenStack Capacity HAProxy configuration to be
templated.

0 comments on commit f8477f9

Please sign in to comment.