可指定 VMware Integrated OpenStack 儀表板登入頁面上顯示的自訂標誌。

程序

  1. 將自訂圖形檔案載入 VMware Integrated OpenStack 部署的 /home/viouser/custom/horizon/ 目錄中。
    此目錄是 VMware Integrated OpenStack 儀表板中圖形檔案的預設目錄。
  2. 在文字編輯器中修改 /home/viouser/custom/horizon/_styles.scss 檔案。
    1. 取消 .login 參數的註解。
      .login {
          background-image: url(/static/themes/vmware/CUSTOM_LOGIN_PAGE_LOGO.png);
          color: white;
          background-color: black;
      }
    2. .login 參數修改為參考該自訂圖形檔案。
    3. 儲存 _styles.scss 檔案。
  3. 實作 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
  4. 在文字編輯器中開啟 /opt/vmware/vio/custom/custom.yml 檔案。
    1. 將啟用 custom.yml 設定的參數取消註解,以覆寫預設的樣式表設定。
      # overwrite the _styles.scss file in the VMware theme
      horizon_custom_stylesheet: "/home/viouser/custom/horizon/_styles.scss"
    2. 將指定 custom 目錄的參數取消註解,以取得該自訂圖形檔案。
      # 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/" 
    3. 儲存 custom.yml 檔案。

結果

下次啟動工作階段時,您的自訂標誌會顯示在儀表板登入頁面上。