diff --git a/ansible/roles/skyline/defaults/main.yml b/ansible/roles/skyline/defaults/main.yml index bcf1b5b3a1..eb64fb37df 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 6d311778b9..5af5b7b8b7 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.