您可以解除安裝個別元件、所有元件,或從系統中完全移除 Edge。此外,如果您已升級,可以復原 Edge。
解除安裝個別元件
如要解除安裝元件,請使用 apigee-service 公用程式,格式如下:
/opt/apigee/apigee-service/bin/apigee-service component_name uninstall
其中 component_name 是要解除安裝的元件。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)
除了這些元件外,您也可以解除安裝 apigee-provision 和 apigee-validate 元件。
例如,如要解除安裝 Edge UI:
/opt/apigee/apigee-service/bin/apigee-service edge-ui uninstall
這個指令不會刪除任何資料或記錄檔。只會刪除元件。
解除安裝營利功能
解除安裝營利功能前,建議您先備份 Postgres。
如要解除安裝營利功能,包括所有營利資料:
- 確認貴組織是否已啟用營利功能:
curl -u sysAdminEmail:adminPasswd -X GET http://management_server_IP:8080/v1/organizations/ORG
其中 ORG 是您的組織名稱。以下是回應範例:
{ "createdBy" : "admin@apigee.com", "displayName" : "edge", "environments" : [ "prod", "test" ], "lastModifiedBy" : "admin@apigee.com", "name" : "edge-platform", "properties" : { "property" : [ { "name" : "features.isMonetizationEnabled", "value" : "true" } ] }, "type" : "paid" } - 使用下列屬性,停用營利功能並啟用機構刪除功能:
<Property name="features.isMintOrgDataDeletionAllowed">true</Property>: <Property name="features.isMonetizationEnabled">false</Property>
以下是更新要求範例:
curl -H "Content-Type:application/xml" -u sysAdminEmail:adminPasswd \ -X POST http://management_server_IP:8080/v1/organizations \ --header 'Content-Type: application/xml' \ --data '<Organization type="paid" name="edge-platform"> <DisplayName>edge-platform</DisplayName> <Properties> <Property name="features.isMintOrgDataDeletionAllowed">true</Property> <Property name="features.isMonetizationEnabled">false</Property> # List all other properties that are present in the organization. </Properties> </Organization>' - 如要刪除組織的營利資料,請使用類似下列的指令:
curl -H "Content-Type:application/json" \ -u sysAdminEmail:adminPasswd -X POST \ http://management_server_IP:8080/v1/organizations/org_name/delete-org-data以下是回應範例:
{ "id" : "ccfb2d26-a2a2-4ebc-aef7-5f7083c6fd84", "log" : "", "orgId" : "edge-platform", "status" : "RUNNING", "type" : "DELETE_ORG" }這個指令會啟動非同步工作,刪除營利機構資料。如要查看這項工作的狀態,請使用下列指令:
curl -H "Content-Type:application/json" \ -u sysAdminEmail:adminPasswd -X GET \ http://management_server_IP:8080/v1/mint/asyncjobs/JOBID
其中 JOBID 是工作 ID。以下是回應範例:
{ "id" : "ccfb2d26-a2a2-4ebc-aef7-5f7083c6fd84", "log" : "", "orgId" : "edge-platform", "status" : "COMPLETED", "type" : "DELETE_ORG" } - 使用類似下列的指令,找出為營利功能建立的 Analytics 群組:
curl -H "Content-Type:application/json" \ -u sysAdminEmail:adminPasswd -X GET \ http://management_server_IP:8080/v1/analytics/groups/ax/ - 從 Analytics 群組中移除組織和環境範圍:
curl -H "Content-Type:application/json" \ -u sysAdminEmail:adminPasswd -X DELETE \ http://management_server_IP:8080/v1/analytics/groups/ax/GROUP/scopes?org=ORG<\var>&env=ENV媒介
- GROUP 是 Analytics 群組。
- ORG 是組織。
- ENV 是環境。
- 從 Analytics 群組中移除 Qpid、Postgres 和消費者伺服器:
curl -H "Content-Type:application/json" "http://localhost:8080/v1/analytics/groups/ax/mxgroup001/servers/?uuid=UUID&type=TYPEOFSERVER" -X DELETE -u$SUP
媒介
- UUID 是通用專屬 ID。
- TYPEOFSERVER 是伺服器類型。
- 刪除 MX 群組 (用於 Apache Qpid 和評分伺服器的群組):
curl -H "Content-Type:application/json" \ -u sysAdminEmail:adminPasswd -X DELETE \ http://management_server_IP:8080/v1/analytics/groups/ax/group - 移除營利元件 (管理和訊息處理器):
apigee-service edge-mint-gateway uninstall
解除安裝營利功能後,請重新啟動管理和訊息處理器:
apigee-service edge-management-server restart
apigee-service edge-message-processor restart
解除安裝所有元件
如要解除安裝節點上的所有 Apigee 元件,請解除安裝 apigee-service 公用程式:
/opt/apigee/apigee-service/bin/apigee-service apigee-service uninstall
這個指令不會刪除任何資料或記錄檔。只會刪除元件。
移除 Edge
如要從系統中完全移除 Edge,請按照下列步驟操作:
- 停止機器上執行的所有 Edge 服務:
/opt/apigee/apigee-service/bin/apigee-all stop
- 清除 yum 快取:
sudo yum clean all
- 移除所有 Apigee RPM:
sudo rpm -e $(rpm -qa | egrep "(apigee-|edge-)")
- 移除安裝根目錄:
sudo rm -rf /opt/apigee
- 移除 Nginx 目錄:
sudo rm -rf /opt/nginx