解除安裝邊緣

您可以解除安裝系統中的個別元件或所有元件,也可以完全移除 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-provisionapigee-validate 元件。

舉例來說,如要解除安裝 Edge UI:

/opt/apigee/apigee-service/bin/apigee-service edge-ui uninstall

這個指令不會刪除任何資料或記錄檔。而只會刪除元件。

解除安裝營利功能

解除安裝營利功能之前,建議您先備份 Postgres。

如要解除安裝營利功能,包括所有營利資料,請按照下列步驟操作:

  1. 確認貴機構是否已啟用營利功能:
    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"
    }
  2. 請使用下列屬性為機構停用營利設定,並啟用刪除功能:
    <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>'
  3. 如要刪除機構的營利資料,請使用以下指令:
    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"
    }
  4. 使用以下指令找出為營利建立的 Analytics (分析) 群組:
    curl -H "Content-Type:application/json" \
        -u sysAdminEmail:adminPasswd -X GET \
        http://management_server_IP:8080/v1/analytics/groups/ax/
  5. 將機構組織和環境範圍從 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 是環境,
  6. 從 Analtyics (分析) 群組中移除 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 是通用唯一識別碼。
    • TYPEOFSERVER 是伺服器類型。
  7. 刪除 MX 群組 (用於 Apache Qpid 和評分伺服器的群組):
    curl -H "Content-Type:application/json" \
        -u sysAdminEmail:adminPasswd -X DELETE \
        http://management_server_IP:8080/v1/analytics/groups/ax/group
  8. 移除營利元件 (管理和訊息處理器):
    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,請按照下列步驟操作:

  1. 停止在機器上執行的所有 Edge 服務:
    /opt/apigee/apigee-service/bin/apigee-all stop
  2. 清除 yum 快取:
    sudo yum clean all
  3. 移除所有 Apigee RPM:
    sudo rpm -e $(rpm -qa | egrep "(apigee-|edge-)")
  4. 移除安裝根目錄:
    sudo rm -rf /opt/apigee
  5. 移除 Nginx 目錄:
    sudo rm -rf /opt/nginx