回滚 Apigee Edge 4.50.00

如果您在更新到 Edge 4.50.00 期间遇到错误,可以回滚 组件,然后再次尝试更新。

您可以将 Edge 4.50.00 回滚到以下功能发布版本:

  • 版本 4.19.06
  • 版本 4.19.01
  • 版本 4.18.05

在以下两种情况下,您可能需要执行回滚:

  1. 回滚到之前的功能版本。例如, 4.50.00 至 4.18.05。
  2. 在 Google Cloud 控制台中回滚到之前的版本 发布版本。例如,从 4.19.01.02 到 4.19.01.01。

如需了解详情,请参阅 Apigee Edge 版本 过程

谁可以执行回滚

执行回滚的用户应与最初更新 Edge 的用户相同,或者 以 root 身份运行的用户。

默认情况下,Edge 组件以用户“apigee”的身份运行。在某些情况下,您可能使用的是 不同的用户例如,如果路由器必须访问 则您必须以 root 或具有访问权限的用户身份运行路由器 端口。或者,您可以以一个用户身份运行一个组件,以另一个用户身份运行另一个组件。

具有通用代码的组件

以下 Edge 组件具有相同的代码。因此,如果要回滚 因此您必须回滚该节点上的所有这些组件。

  • edge-management-server(管理服务器)
  • edge-message-processor(消息处理器)
  • edge-router(路由器)
  • edge-postgres-server(Postgres 服务器)
  • edge-qpid-server(Qpid 服务器)

例如,如果您在 Google Cloud 上安装了管理服务器、路由器和消息处理器, 因此,如果要回滚其中任何一个,则必须同时回滚所有三个。

回滚到上一个功能版本

要回滚到之前的功能版本,请在托管 组件:

  1. 下载您要回滚到的版本对应的 bootstrap.sh 文件 返回:

    • 如需回滚到 4.19.06,请下载 bootstrap_4.19.06.sh
      curl https://software.apigee.com/bootstrap_4.19.06.sh -o /tmp/bootstrap_4.19.06.sh 
    • 如需回滚到 4.19.01,请下载 bootstrap_4.19.01.sh
      curl https://software.apigee.com/bootstrap_4.19.01.sh -o /tmp/bootstrap_4.19.01.sh 
    • 如需回滚到 4.18.05,请下载 bootstrap_4.18.05.sh
      curl https://software.apigee.com/bootstrap_4.18.05.sh -o /tmp/bootstrap_4.18.05.sh 
  2. 停止要回滚的组件: <ph type="x-smartling-placeholder">
      </ph>
    1. 要回滚设备上任何具有通用代码的组件,请执行以下操作: 则必须停止所有节点,如以下示例所示:
      /opt/apigee/apigee-service/bin/apigee-service edge-management-server stop
      /opt/apigee/apigee-service/bin/apigee-service edge-router stop
      /opt/apigee/apigee-service/bin/apigee-service edge-message-processor stop
      /opt/apigee/apigee-service/bin/apigee-service edge-qpid-server stop
      /opt/apigee/apigee-service/bin/apigee-service edge-postgres-server stop
    2. 要回滚节点上的任何其他组件,只需停止该组件即可: <ph type="x-smartling-placeholder">
        </ph>
      • /opt/apigee/apigee-service/bin/apigee-service component stop
  3. 如果您要回滚创收功能,请将其从所有管理服务器和邮件中卸载 处理器节点:
    /opt/apigee/apigee-service/bin/apigee-service edge-mint-gateway uninstall
  4. 卸载该组件以在节点上进行回滚: <ph type="x-smartling-placeholder">
      </ph>
    1. 要回滚设备上任何具有通用代码的组件,请执行以下操作: 节点,则必须通过卸载 edge-gateway 组件来将其全部卸载 组,如以下示例所示:
      /opt/apigee/apigee-service/bin/apigee-service edge-gateway uninstall
    2. 要回滚节点上的其他任何组件,只需卸载该组件,因为 如下例所示:
      /opt/apigee/apigee-service/bin/apigee-service component uninstall

      其中 component 是组件名称。

    3. 要回滚边缘路由器,您必须删除 /opt/nginx/conf.d 文件。 edge-gateway 组件组:
      cd /opt/nginx/conf.d
      rm -rf *
  5. 卸载 4.50.00 版本的 apigee-setup
    /opt/apigee/apigee-service/bin/apigee-service apigee-setup uninstall
  6. 安装 4.19.01 或 4.18.05 版本的 apigee-service 实用程序及其依赖项。以下示例将安装 4.18.05 版 apigee-service:
    sudo bash /tmp/bootstrap_4.18.05.sh apigeeuser=uName apigeepassword=pWord

    其中,uNamepWord 是您收到的用户名和密码 如果您省略 pWord,系统会提示您输入。

    如果您收到错误消息,请确保已在第 4 步中下载了 bootstrap.sh 文件 1.

  7. 安装 apigee-setup
    /opt/apigee/apigee-service/bin/apigee-service apigee-setup install
  8. 安装旧版组件:
    /opt/apigee/apigee-setup/bin/setup.sh -p component -f configFile

    其中,component 是要安装的组件,configFile 是指要安装的组件 旧版本的配置文件。

  9. 如果要回滚 Qpid,请清空 iptables:
    sudo iptables -F
  10. 对托管要回滚的组件的每个节点重复此过程。

回滚到先前的更新版本

如需将组件回滚到特定版本,请在每个节点上执行以下操作 托管组件的容器:

  1. 下载特定的组件版本:
    /opt/apigee/apigee-service/bin/apigee-service component_version install

    其中,component_version 是要安装的组件和更新版本。例如:

    /opt/apigee/apigee-service/bin/apigee-service edge-ui-4.18.05-0.0.3749 install

    如果您使用的是 Apigee 在线代码库,则可以确定可用的组件 可以使用以下命令:

    yum --showduplicates list comp

    例如:

    yum --showduplicates list edge-ui
  2. 使用 apigee-setup 安装组件:
    /opt/apigee/apigee-setup/bin/setup.sh -p comp -f configFile

    例如:

    /opt/apigee/apigee-setup/bin/setup.sh -p ui -f configFile

    请注意,您在安装组件时仅指定组件名称,而不指定版本。

  3. 对托管要回滚的组件的每个节点重复此过程。