@@ -46,79 +46,35 @@ Further reading:
4646* https://docs.openstack.org/horizon/latest/configuration/themes.html
4747* https://docs.openstack.org/horizon/latest/configuration/branding.html
4848
49- Building a Horizon container image with custom theme
50- ----------------------------------------------------
49+ Adding the custom theme
50+ -----------------------
5151
52- Building a custom container image for Horizon can be done by modifying
53- ``kolla.yml `` to fetch the custom theme and include it in the image:
52+ Create a directory and transfer custom theme files to it ``$KAYOBE_CONFIG_PATH/kolla/config/horizon/themes/<custom theme name> ``.
5453
55- .. code-block :: yaml
56-
57- kolla_sources :
58- horizon-additions-theme-<custom theme name> :
59- type : " git"
60- location : <custom theme repository url>
61- reference : master
62-
63- kolla_build_blocks :
64- horizon_footer : |
65- # Binary images cannot use the additions mechanism.
66- {% raw %}
67- {% if install_type == 'source' %}
68- ADD additions-archive /
69- RUN mkdir -p /etc/openstack-dashboard/themes/<custom theme name> \
70- && cp -R /additions/horizon-additions-theme-<custom theme name>-archive-master/* /etc/openstack-dashboard/themes/<custom theme name>/ \
71- && chown -R horizon: /etc/openstack-dashboard/themes
72- {% endif %}
73- {% endraw %}
74-
75- If using a specific container image tag, don't forget to set:
54+ Define the custom theme in ``etc/kayobe/kolla/globals.yml ``
7655
7756.. code-block :: yaml
78-
79- kolla_tag : mytag
80-
81- Build the image with:
82-
83- .. code-block :: console
84-
85- kayobe overcloud container image build horizon -e kolla_install_type=source --push
86-
87- Pull the new Horizon container to the controller:
88-
89- .. code-block :: console
90-
91- kayobe overcloud container image pull --kolla-tags horizon
57+ horizon_custom_themes :
58+ - name : <custom theme name>
59+ label : <custom theme label> # This will be the visible name to users
9260
9361 Deploy and use the custom theme
9462-------------------------------
9563
96- Switch to source image type in ``${KAYOBE_CONFIG_PATH}/kolla/globals.yml ``:
97-
98- .. code-block :: yaml
99-
100- horizon_install_type : source
101-
102- You may also need to update the container image tag:
103-
104- .. code-block :: yaml
105-
106- horizon_tag : mytag
107-
10864Configure Horizon to include the custom theme and use it by default:
10965
11066.. code-block :: console
11167
112- mkdir -p ${ KAYOBE_CONFIG_PATH} /kolla/config/horizon/
68+ mkdir -p $KAYOBE_CONFIG_PATH/kolla/config/horizon/
11369
114- Add to ``${ KAYOBE_CONFIG_PATH} /kolla/config/horizon/custom_local_settings ``:
70+ Create file ``$KAYOBE_CONFIG_PATH/kolla/config/horizon/custom_local_settings `` and add followings
11571
11672.. code-block :: console
11773
11874 AVAILABLE_THEMES = [
11975 ('default', 'Default', 'themes/default'),
12076 ('material', 'Material', 'themes/material'),
121- ('<custom theme name>', '<custom theme visible name >', '/etc/openstack-dashboard/ themes/<custom theme name>'),
77+ ('<custom theme name>', '<custom theme label >', 'themes/<custom theme name>'),
12278 ]
12379 DEFAULT_THEME = '<custom theme name>'
12480
@@ -137,9 +93,6 @@ Deploy with:
13793 Troubleshooting
13894---------------
13995
140- Make sure you build source images, as binary images cannot use the addition
141- mechanism used here.
142-
14396If the theme is selected but the logo doesn’t load, try running these commands
14497inside the ``horizon `` container:
14598
0 commit comments