Skip to content

itlinux/OpenStack_theme

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

OpenStack Theme Creation for RDO (PackStack and OOO )

This process has been tested on Ocata, Pike (OOO) and Rocky (PackStack)

Manual Steps

Backup your data

Make sure you backup your data before you make any changes

Directory

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

Save the login logo as

logo-splash.svg

Save the top logo as

logo.svg

Update the local_settings

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'

Restart httpd

systemctl restart httpd

Using Ansible Playbook

Playbook to add theme, remove volume creation by default and add Site title
- 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

Ansible Use

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

Playbook usage
ansible-playbook -i hosts remo-theme-os-local.yaml -C --diff

About

This theme works on Ocata.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages