Chapter 8. Rebranding the Fuse Online user interface
You can rebrand Fuse Online by replacing the Fuse Online application name, logo, icons, and other user interface details. You do this by mounting customized resources as ConfigMap objects in the syndesis-ui deployment file.
Prerequisites
- Fuse Online is installed and running on OpenShift Container Platform on-site in a customer-managed environment.
-
The
occlient tool is connected to the OCP cluster in which Fuse Online is installed. - You have permission to install Fuse Online.
Procedure
Obtain the name of the
syndesis-uipod in which Fuse Online is installed by invoking the following command:oc get podsFetch customizable logos, icons, fonts, and backgrounds by invoking the following command and replacing SYNDESIS_UI_POD_NAME with the actual name of the pod that is running
syndesis-ui:oc rsync SYNDESIS_UI_POD_NAME:/opt/app-root/src/static/media ~/This puts user interface resources in the the
~/media/folder.-
Edit and save the file that contains the header logo, which is
~/media/syndesis_logo_full_darkbkg.9c467d96.svg. Upload the modified file to the cluster by creating a
ConfigMapobject that contains the updated logo file:cd ~/ oc create configmap syndesis-ui-custom-logo --from-file=media/syndesis_logo_full_darkbkg.9c467d96.svgModify the
syndesis-uideployment file to mount thesyndesis-ui-custom-logoConfigMapobject. Do this by invokingoc edit dc/syndesis-uior by using the OpenShift web console, selecting Applications > Deployments > syndesis-ui > Actions > Edit YAML.Under
spec.template.containers.volumeMounts, add the following:-name: syndesis-ui-custom-logo-volume mountPath: /opt/app-root/src/static/media/syndesis_logo_full_darkbkg.9c467d96.svg subPath: syndesis_logo_full_darkbkg.9c467d96.svgUnder
spec.template.volumes, add the following:-name: syndesis-ui-custom-logo-volume configMap: name: syndesis-ui-custom-logo-
Save the
syndesis-uideployment file.
-
Repeat steps 3 through 5 for each file that is in the
`~/mediafolder and that you want to customize. Edit and save the file that contains the application title:
Create a directory in which to update the file:
mkdir ~/syndesis-custom/srcFetch the application title file by invoking the following command and replacing SYNDESIS_UI_POD_NAME with the actual name of the pod that is running
syndesis-ui:oc rsync SYNDESIS_UI_POD_NAME:/opt/app-root/src/index.html ~/syndesis-custom/srcReplace the application title. For example:
sed -i 's/<title>.*<\/title>/<title>NEW_TITLE<\/title>/g' ~/syndesis-custom/src/index.html
Upload the modified application title file to the cluster by creating a
ConfigMapobject that contains the updated file:cd ~/syndesis-custom/src oc create configmap syndesis-ui-custom-index --from-file=index.htmlModify the
syndesis-uideployment by mounting thesyndesis-ui-custom-indexConfigMapobject:Under
spec.template.containers.volumeMounts, add the following:-name: syndesis-ui-custom-vindex-olume mountPath: /opt/app-root/src/index.html subPath: index.htmlUnder
spec.template.volumes, add the following:-name: syndesis-ui-custom-index-volume configMap: name: syndesis-ui-custom-index-
Save the
syndesis-uideployment file.
Results
Saving the syndesis-ui deployment file automatically redeploys Fuse Online with a user interface that reflects your changes. Subsequent re-deployments of Fuse Online also reflect your changes.