Skip to content

Agent Release Pipeline Design

Agent Release Pipeline

Configuration Center

Configuration center will hold all the agent configs, it will be a separate project, with its own UI.

Each env should have its own configuration center (qa, bts, prod, china, aws....);

💡 Zookeeper will be our configuration center

Configuration categories including:

  1. Agent profile data: application-{xxx}.yml

  2. Agent dynamic data: config.properties, mainly the machine account.

  3. Agent node data: agentId

Profile

All profiles should be held under configuration center project. Each release, all configurations should be overridden by GitHub version.

💡 We must keep configurations on GitHub consistent with configuration center

Machine Account

All agents under one group share the same machine account configuration.

Handle machine account password refresh:

  1. Register password to agent's namespace on configuration center, so config hot swap is done automatically by spring framework.
  2. Add dispatch task to refresh password.

Agent Leader Election

All agents under one group register to same namespace, e.g. /agent/WBXSJC01/active-agents/lin/{node-id}, so that all agents can use same the configuration center.

The following steps are the same as current workflow.

Agent Node Specific

Currently, we only need to consider about agentId and pluginVersion, solution is to create a node in configuration center to hold the value, example step as below:

  1. Agent node get agentId from configuration center under /agent/WBXSJC01/all-agents/{ip}
  2. If agentId != null, then use it; else go to step 3
  3. Agent node randomly generates a UUID, and push it to /agent/WBXSJC01/all-agents/{ip}.

💡 The node in configuration center should be Persistent.

Pipeline

  1. [GitHub] PR Merge
  2. [Jenkins] UT, Lint Check
  3. [Jenkins] Build image (configuration, agent, akka...) and upload to rmc
  4. [CMC] Modern deploy
    1. Refresh configuration center: upload configurations in the image to memory (override)
    2. Refresh agent: since all configurations are held on configuration center, agent should decide to use which profile based on parameters defined in cmc - pool, dc...
    3. Refresh other micro-services.
  5. [CMC] Verify

Outside Webex Cloud

Plugin Release

  1. Plugin rpm Package task + Gray Release task + Plugin Auto Manager

  2. Plugin Auto Manager target should be configurable, expose certain rmc and mct api to public (cmse4ext.webex.com)

Agent Release

  1. Keep Agent Upgrader.

  2. Unify two types of polling, so that agent do not need to manage plugin and polling anymore.

  3. No need to leverage centralized configuration center plan

TBD

Can have a standalone agent version.