This process has been tested on Ocata, Pike (OOO) and Rocky (PackStack)
cd to /usr/share/openstack-dashboard/openstack_dashboard/themes and create a new folder for your new theme.
mkdir remo cd remo echo ""@import "/themes/default/variables";" > _variables.scss echo ""@import "/themes/default/styles";" > _styles.scss mkdir img
Create a new login logo and a top logo in the format of .svg Use the following URL if you have a PNG to convert it to svg
I use the link above and works very well
Edit the /etc/openstack-dashboard/local_settings
Add the followings:
DEFAULT_THEME = 'Juve' AVAILABLE_THEMES = [ ('default', 'Default', 'themes/default'), ('material', 'Material', 'themes/material'), ('Juve', 'Juventus', 'themes/juventus'), ] SITE_BRANDING = 'Juventus, Inc. Cloud'
- hosts: packstack become: yes remote_user: remo tasks: - name: editing openstack local config blockinfile: path: /etc/openstack-dashboard/local_settings marker: "#<!-- {mark} ANSIBLE MANAGED BLOCK -->" insertafter: '#CUSTOM_THEME_PATH' content: | DEFAULT_THEME = 'Juve' AVAILABLE_THEMES = [ ('default', 'Default', 'themes/default'), ('material', 'Material', 'themes/material'), ('Juve', 'Juventus', 'themes/juventus'), ] LAUNCH_INSTANCE_DEFAULTS = { 'create_volume': False, } SITE_BRANDING = 'Juventus FC' tags: edit_local_settings - name: create_volume changes replace: path: /etc/openstack-dashboard/local_settings regexp: "'create_volume': True," replace: "'create_volume': False," changed_when: True tags: create - name: copy theme copy: src: avi dest: /usr/share/openstack-dashboard/openstack_dashboard/themes/ owner: root group: root directory_mode: yes tags: theme - name: restart httpd command: systemctl restart httpd
If you want to use the ansible script you need to change the imags from the img folder and make sure you have the info into the _variables.scss. There are a few tags if you want to check it before you push them up you can alawys do that with
ansible-playbook -i hosts remo-theme-os-local.yaml -C --diff