From 6051edba4d7e30e56bc6b319dc87a48d061894be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uwe=20J=C3=A4ger?= Date: Wed, 24 Apr 2024 16:22:58 +0200 Subject: [PATCH] Skyline: use an external object store (Swift) in the dashboard Change-Id: I0247877c245f12994ffab983a624844e1238de9b --- ansible/roles/skyline/defaults/main.yml | 6 ++++++ ansible/roles/skyline/templates/nginx.conf.j2 | 10 ++++++++++ ansible/roles/skyline/templates/skyline.yaml.j2 | 2 +- .../reference/shared-services/skyline-guide.rst | 15 +++++++++++++++ .../skyline-external-swift-d9e38f696a22c117.yaml | 9 +++++++++ 5 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/skyline-external-swift-d9e38f696a22c117.yaml diff --git a/ansible/roles/skyline/defaults/main.yml b/ansible/roles/skyline/defaults/main.yml index c329ce80d8..37c9bd8b76 100644 --- a/ansible/roles/skyline/defaults/main.yml +++ b/ansible/roles/skyline/defaults/main.yml @@ -196,3 +196,9 @@ skyline_enable_tls_backend: "{{ kolla_enable_tls_backend }}" # Custom logos: files and folders will be copied to static folder #################### skyline_custom_logos: [] + +#################### +# External Swift: url of external Swift service, e.g. when running standalone Ceph +#################### +skyline_external_swift: "no" +skyline_external_swift_url: "" diff --git a/ansible/roles/skyline/templates/nginx.conf.j2 b/ansible/roles/skyline/templates/nginx.conf.j2 index 0ecf3f903c..b7841542ab 100644 --- a/ansible/roles/skyline/templates/nginx.conf.j2 +++ b/ansible/roles/skyline/templates/nginx.conf.j2 @@ -308,6 +308,16 @@ http { proxy_set_header X-Forwarded-Host $host; proxy_set_header Host $http_host; } + {% elif skyline_external_swift | bool %}# Region: {{ openstack_region_name }}, Service: external swift + location {{ skyline_nginx_prefix }}/{{ openstack_region_name | lower }}/swift { + proxy_pass {{ skyline_external_swift_url }}; + proxy_redirect {{ skyline_external_swift_url }} {{ skyline_nginx_prefix }}/{{ openstack_region_name | lower }}/swift/; + proxy_buffering off; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-Forwarded-Host $host; + proxy_set_header Host $http_host; + } {% endif %} } } diff --git a/ansible/roles/skyline/templates/skyline.yaml.j2 b/ansible/roles/skyline/templates/skyline.yaml.j2 index ea671adecd..d529506450 100644 --- a/ansible/roles/skyline/templates/skyline.yaml.j2 +++ b/ansible/roles/skyline/templates/skyline.yaml.j2 @@ -74,7 +74,7 @@ openstack: {% if enable_neutron | bool %} network: neutron {% endif %} -{% if enable_swift | bool or enable_ceph_rgw | bool %} +{% if enable_swift | bool or enable_ceph_rgw | bool or skyline_external_swift | bool %} object-store: swift {% endif %} {% if enable_heat | bool %} diff --git a/doc/source/reference/shared-services/skyline-guide.rst b/doc/source/reference/shared-services/skyline-guide.rst index c7d8fabc02..fb735c997c 100644 --- a/doc/source/reference/shared-services/skyline-guide.rst +++ b/doc/source/reference/shared-services/skyline-guide.rst @@ -81,3 +81,18 @@ To replace all use Since the files are overwritten inside the container, you have to remove the container and recreate it if you want to revert to the default logos. Just removing the configuration will not remove the files. + +External Swift +~~~~~~~~~~~~~~ + +If you are running an external Swift compatible object store you can add +it to the skyline dashboard. Since Skyline can not use Keystone's +endpoint api, you have to tell it the url of your external service. + +You have to set ``skyline_external_swift`` and +``skyline_external_swift_url`` in your configuration: + +.. code-block:: yaml + + skyline_external_swift: "yes" + skyline_external_swift_url: "https:///swift" diff --git a/releasenotes/notes/skyline-external-swift-d9e38f696a22c117.yaml b/releasenotes/notes/skyline-external-swift-d9e38f696a22c117.yaml new file mode 100644 index 0000000000..8ee9c2fe02 --- /dev/null +++ b/releasenotes/notes/skyline-external-swift-d9e38f696a22c117.yaml @@ -0,0 +1,9 @@ +--- +features: + - | + Setup Skyline to show resources from an external object store in the + dashboard. If you run an external Swift compatible object store you + have to tell Skyline about it as it can not use Keystone's endpoint + api to determine that at runtime. See the reference + `documentation `__ + for details.