To match your corporate branding standards and to create a fully custom cloud experience, you can set the logo and the theme for your VMware Cloud Director Service Provider Admin Portal and for the VMware Cloud Director Tenant Portal of each organization. In addition, you can modify and add custom links to the two upper right menus in the VMware Cloud Director portals.
As part of the installation, VMware Cloud Director contains two themes – default and dark. You can create, manage, and apply custom themes. In addition, you can change the portal name, the logo, and the browser icon. In addition, the browser title adopts the portal name that you set.
You set the branding attributes at a system level, so that you customize the VMware Cloud Director Service Provider Admin Portal. The VMware Cloud Director Tenant Portal for each organization adopts the system branding attributes unless you configured branding attributes for the tenant.
For a particular tenant, you can selectively override any combination of the portal name, background color, logo, icon, theme, and custom links. Any value that you do not set uses the corresponding system default value
By default, the individual tenant branding is not shown outside of a logged in session. The individual tenant branding does not appear on login and logout pages, so that tenants cannot discover the existence of other tenants. You can enable branding outside of logged in sessions by using the cell management tool:
manage-config -n backend.branding.requireAuthForBranding -v false
Compared to the vCloud Director earlier version the HTML5 has more customization options like Logo, Icon and Theme. In this blog I am explaining how to customize the Logo, Icon and themes using API calls.
Access Token Authentication
GET API Version
Run the below API GET call using any API tool to get the supported API versions.
identify the latest supported versions from the output. I am using vCloud cell with API version 34.0
POST API Sessions
Create a POST request with below URL and add below API version value in Header section
Also mention vCD admin login credentials in Authorization with Basic Auth type
https://vcd-host/api/sessions Accept header: application/*;version=34.0
Note: – Make sure you are getting 200 OK Status in each API call, else please correct those.
Note down the below values from previous POST call and using this token we can execute the future API calls.
Portal Name Branding
Run the below GET call to get the current portal branding configuration with the above saved Bearer Token values.
Copy output Body values and initiate a new PUT call to change the Name and update/create new custom links. Also please make sure you have same header values and bearer token in new API call as well. The Body values will be in raw – JSON format.
I have updated the body values for Portal Name, help & about custom link parameters. After successfully executing this call you can see your vCD provider and tenant login Portal Name and the updated custom links are changed.
Portal Logo Branding
Run the below PUT call to update current portal system level logo with new one. Please provide the new logo file in Body by selecting binary option.
Portal Icon Branding
Run the below PUT call to update current portal system level browser icon with new one. Please provide the new icon file in Body by selecting binary option.
Portal Branding Themes
By default, vCloud Director has below two themes available inbuilt. To know the current themes available, you can run below GET call.
We can also enable the Dark theme as default by mentioning the theme name in Portal Name Branding Body which we executed before.
Also you can create new themes which respect your customization values. I will be explaining how to create a new theme and upload the contents by creating a CSS file.
Create New Theme
Run below POST call with the theme type and name parameters to create new theme.
After creating the theme, you can run a GET call with below to list the current themes details
Now you have to create the contents for the theme that is basically the CSS file. I am not a guy from development background so what I did, o downloaded the existing theme-default.css or clarity-theme.css file from vCloud cell. My requirement was only to change the image hence it was easy for me to update the CSS file.
Open the CSS file and search for the login-wrapper section background URL field as below.
Now you have to convert your new image base64 format and replace the above URL contents and Save it. Also I have commented the background-position parameter to fix my image. This is something simple what I can do but if you want you can have lot more customization on your themes. Now your theme is ready with new image and ready to upload.
To initiate the content upload run the below API POST call with file name and actual size as body parameters.
Once you execute above command you will get a link in the output to upload the CSS file.
Initiate a PUT call with the above provided link and CSS file in Binary field. If you receive a 200 OK Status your CSS file is successfully uploaded.
Activate New Theme
To activate the uploaded theme run the below PUT call with newly created theme type and name
Once activated you can see the image in the provider and tenant login page.
Also please refer the below links for more documentation on vCloud Director branding
With this blog I am concluding this vCloud Director series and hope this is helpful to you to understand, deploy and configure this solution.
If you have any comments, please drop me a line