設定伺服器自動啟動功能

重新啟動期間,地端部署安裝的 Edge Private Cloud 不會自動重新啟動。您可以使用下列指令,啟用/停用任何節點上的自動啟動功能。

如何「啟用」enable節點上的所有元件:

/opt/apigee/apigee-service/bin/apigee-all enable_autostart

如要「停用」節點上的所有元件:

/opt/apigee/apigee-service/bin/apigee-all disable_autostart

如何為節點上的特定元件啟用或停用自動開始功能:

/opt/apigee/apigee-service/bin/apigee-service component_name enable_autostart
/opt/apigee/apigee-service/bin/apigee-service component_name disable_autostart

其中 component_name 代表元件。可用的值包括:

  • apigee-cassandra (Cassandra)
  • apigee-openldap (OpenLDAP)
  • apigee-postgresql (PostgreSQL 資料庫)
  • apigee-qpidd (魁北克)
  • apigee-sso (邊緣單一登入)
  • apigee-zookeeper (ZooKeeper)
  • edge-management-server (管理伺服器)
  • edge-management-ui (新版 Edge UI)
  • edge-message-processor (訊息處理器)
  • edge-postgres-server (Postgres 伺服器)
  • edge-qpid-server (快速伺服器)
  • edge-router (邊緣路由器)
  • edge-ui (傳統版 UI)

指令碼只會影響執行指令碼的節點。如要將所有節點設為自動啟動,請在所有節點上執行指令碼。

請注意,元件的啟動順序非常重要:

  1. 首先啟動 ZooKeeper、Cassandra、LDAP (OpenLDAP)

    如果將 ZooKeeper 和 Cassandra 安裝為叢集,則必須先啟動並執行完整的叢集,才能啟動其他 Apigee 元件。

  2. 以及任何 Apigee 元件 (管理伺服器、路由器、UI 等)。如果是 Postgres 伺服器,請先啟動 postgresql,如為 Qpid 伺服器,則請先啟動 qpidd。

影響:

  • 如要完全重新啟動 Apigee Edge 環境,具備 ZooKeeper 和 Cassandra 的節點需要在任何其他節點之前完全啟動。
  • 如果任何其他 Apigee 元件在一或多個 ZooKeeper 和 Cassandra 節點上執行,則不建議使用自動啟動功能。請改為按照啟動、停止、重新啟動及檢查 Apigee Edge 狀態一文所述的順序啟動元件。

自動啟動疑難排解

如果您設定自動啟動,且 Edge 在啟動 OpenLDAP 伺服器時遇到問題,可以嘗試停用 SELinux,或將其設為所有節點的寬鬆模式。設定 SELinux:

  1. 編輯 /etc/sysconfig/selinux 檔案:
    sudo vi /etc/sysconfig/selinux
  2. 設定 SELINUX=disabledSELINUX=permissive
  3. 儲存修改過的內容。
  4. 重新啟動機器,然後重新啟動 Edge:
    /opt/apigee/apigee-service/bin/apigee-all restart