Any recent guides on how to edit logos/images in AWX?

563 views
Skip to first unread message

GoMatrix Hosting

unread,
Apr 6, 2021, 2:50:36 AM4/6/21
to AWX Project
Hello,

Was wondering if there are any recent guides on how to swap these images out of AWX:

favicon.ico
logo-header.svg
logo-login.svg

Since the UI upgrade basically every guide on how to do this is now out of date.

I attempted to swap those images into the git repo and setup AWX in docker normally, but it doesn't display any of the images.

I attempted to compile it from scratch, but then ran into 100 different errors that hardly seem worth it just to swap out logos.

Any advice?

Brandon Ellis

unread,
Apr 6, 2021, 10:47:43 AM4/6/21
to AWX Project
I agree. I can't find any guidelines on how to do this either. I've tried everything. Even when I built the image myself somehow the old logo headers still showed up (?!)

IIRC, in 17.1 the edit form for the logos was even swapped out with this tantalizing image:
smile.png
Starting to wonder if this some sort of sick ongoing joke...

Brandon Ellis

unread,
Apr 6, 2021, 10:50:50 AM4/6/21
to AWX Project
This issue was opened up yesterday. Perhaps if it's resolved we might be able to swap out the images using configmaps
Provide way for additional configmaps to be mounted on the control plane · Issue #175 · ansible/awx-operator (github.com)

Brandon Ellis

unread,
Apr 15, 2021, 10:20:38 PM4/15/21
to AWX Project
OK, I have a solution for 18.0+, but it's not elegant at all

Have a configmap that has your logo-header.svg and logo-login-svg files. Since it's an SVG file, you can copy and paste it right in. Here's an example of what I did:

---
apiVersion: v1
kind: ConfigMap
metadata:
  name: awx-extra-files
data:
  logo-header.svg: |
    <CONTENT OF YOUR SVG FILE>
  logo-login.svg: |
    <CONTENT OF YOUR SVG FILE> 

Mount the config maps in your config spec like how the documentation mentions it here
Here's what mine looks like:
---
kind: AWX
metadata:
  name: awx
spec:
  tower_web_extra_volume_mounts: |
    - name: logo-header
      mountPath: /var/lib/awx/venv/awx/lib/python3.6/site-packages/awx/ui_next/build/static/media/logo-header.svg
      subPath: logo-header.svg
    - name: logo-login
      mountPath: /var/lib/awx/venv/awx/lib/python3.6/site-packages/awx/ui_next/build/static/media/logo-login.svg
      subPath: logo-login.svg
    - name: logo-header
      mountPath: /var/lib/awx/venv/awx/lib/python3.8/site-packages/awx/ui_next/build/static/media/logo-header.svg
      subPath: logo-header.svg
    - name: logo-login
      mountPath: /var/lib/awx/venv/awx/lib/python3.8/site-packages/awx/ui_next/build/static/media/logo-login.svg
      subPath: logo-login.svg
  tower_extra_volumes: |
    - name: logo-header
      configMap:
        defaultMode: 420
        items:
          - key: logo-header.svg
            path: logo-header.svg
        name: awx-extra-files
    - name: logo-login
      configMap:
        defaultMode: 420
        items:
          - key: logo-login.svg
            path: logo-login.svg
        name: awx-extra-files


Martin Gabriel

unread,
Apr 8, 2022, 8:27:07 AM4/8/22
to AWX Project
Nearly one year later your answer helped me with this, thank you. Only one thing changed and its path for logo location. In AWX 20.1.0 its placed in `/var/lib/awx/public/static/media/logo-*.svg`

Dne pátek 16. dubna 2021 v 4:20:38 UTC+2 uživatel bel...@umbc.edu napsal:
Reply all
Reply to author
Forward
0 new messages