Allow overriding of Skyline logos

Change-Id: I3975b5266c8700c81439b4d891d446eba2a52e54
This commit is contained in:
Uwe Jäger 2024-02-19 17:13:47 +01:00
parent 5a663aec1d
commit 634d54b4b1
5 changed files with 92 additions and 1 deletions

View File

@ -191,3 +191,8 @@ skyline_enable_sso: "no"
# TLS
####################
skyline_enable_tls_backend: "{{ kolla_enable_tls_backend }}"
####################
# Custom logos: files and folders will be copied to static folder
####################
skyline_custom_logos: []

View File

@ -77,3 +77,19 @@
with_dict: "{{ skyline_services }}"
notify:
- "Restart {{ item.key }} container"
- name: Copying over custom logos
become: true
vars:
skyline_console: "{{ skyline_services['skyline-console'] }}"
copy:
src: "{{ node_custom_config }}/skyline/logos/{{ item }}"
dest: "{{ node_config_directory }}/skyline-console/logos/"
mode: 0660
when:
- skyline_console.enabled | bool
- inventory_hostname in groups[skyline_console.group]
- skyline_custom_logos | length > 0
with_items: "{{ skyline_custom_logos }}"
notify:
- Restart skyline-console container

View File

@ -12,7 +12,14 @@
"dest": "/etc/nginx/nginx.conf",
"owner": "skyline",
"perm": "0600"
}{% if skyline_enable_tls_backend | bool %},
}{% if skyline_custom_logos | length > 0 %},
{
"source": "{{ container_config_directory}}/logos",
"dest": "/var/lib/kolla/venv/lib/python{{ distro_python_version }}/site-packages/skyline_console/static",
"owner": "root",
"perm": "0644",
"merge": true
}{% endif %}{% if skyline_enable_tls_backend | bool %},
{
"source": "{{ container_config_directory }}/skyline-cert.pem",
"dest": "/etc/skyline/certs/skyline-cert.pem",

View File

@ -24,3 +24,60 @@ enable it with:
.. code-block:: yaml
skyline_enable_sso: "yes"
Customize logos
~~~~~~~~~~~~~~~
To change some of the logos used by Skyline you can overwrite the default
logos. Not all images can be replaced, you can change the browser icon, the
two logos on the login screen and the logo in the header once you are logged
in.
To overwrite the files create the directory
``{{ node_custom_config }}/skyline/logos`` and place the files you want to use
there.
Make sure you have the correct filenames and directory structure as described
below.
Additionally add the files or directories you created to
``skyline_custom_logos``, a list of files or directories that will be copied
inside the container.
.. list-table:: Logos/images that can be overwritten
:widths: 30 70
:header-rows: 1
* - Logo/image
- Path in ``{{ node_custom_config }}/skyline/logos``
* - Browser Icon
- ./favicon.ico
* - Login page left logo
- ./asset/image/logo.png
* - Login page right logo
- ./asset/image/loginRightLogo.png
* - Logo header logged in
- ./asset/image/cloud-logo.svg
To replace only the browser icon set
.. code-block:: yaml
skyline_custom_logos: ["favicon.ico"]
To replace files in ``asset`` set
.. code-block:: yaml
skyline_custom_logos: ["asset"]
To replace all use
.. code-block:: yaml
skyline_custom_logos: ["asset", "favicon.ico"]
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.

View File

@ -0,0 +1,6 @@
---
features:
- |
Allow to overwrite Skyline Console logos. Some of the Skyline logos can be
replaced. You can now do this. See the reference documentation for details
`documentation <https://docs.openstack.org/kolla-ansible/latest/reference/shared-services/skyline-guide.html#customize-logos>`__.