您可以指定一个自定义图形作为 VMware Integrated OpenStack 仪表板登录页面的背景。
过程
- 将您的自定义图形文件加载到 VMware Integrated OpenStack 部署中的 /home/viouser/custom/horizon/ 目录中。
此目录是 VMware Integrated OpenStack 仪表板中图形文件的默认目录。
- 在文本编辑器中打开 /home/viouser/custom/horizon/_styles.scss 文件。
- 取消对 .login-bg 参数的注释。
.login-bg { height: 100%; body { background: #1D2226 url("/static/themes/vmware/CUSTOM-BACKGROUND-IMAGE.jpg") repeat-x 45% 0 !important; background-size: 100% auto !important; color: black; }
- 修改 .login-bg 参数,以引用您的自定义背景图形文件。
- 保存 _styles.scss 文件。
- 取消对 .login-bg 参数的注释。
- 执行 custom.yml 文件。
sudo mkdir -p /opt/vmware/vio/custom sudo cp /var/lib/vio/ansible/custom/custom.yml.sample /opt/vmware/vio/custom/custom.yml
- 在文本编辑器中打开 /opt/vmware/vio/custom/custom.yml 文件。
- 取消对启用 custom.yml 设置的参数的注释,以替代默认样式表设置。
# overwrite the _styles.scss file in the VMware theme horizon_custom_stylesheet: "/home/viouser/custom/horizon/_styles.scss"
- 取消对指定自定义目录的参数的注释,以包含自定义图形文件。
# copy all custom images (or other files) to be accessible in horizon # IMPORTANT: this line must end with a "/" in order to place the files # in the right location for horizon horizon_custom_directory: "/home/viouser/custom/horizon/"
- 保存 custom.yml 文件。
- 取消对启用 custom.yml 设置的参数的注释,以替代默认样式表设置。
结果
下次开始会话时,您的自定义背景图像将显示在仪表板登录页面上。