Migrate an existing client controller to High Availability (active/active)

1 minute read

A client controller not running in HA mode can be migrated to HA mode. Migrated client controllers must meet the storage requirements described in Review storage requirements.

For CloudBees CI on traditional platforms, no migration is required if the client controller is already using a shared file system for JENKINS_HOME. If the client controller is not using a shared file system, and assuming that the destination volume is already mounted and is a shared file system, the following steps provide a general overview of the migration process:

  1. Set the $JENKINS_HOME environment variable to the destination volume, the NFS-compatible shared file system used by the controller replicas when running in HA mode.

  2. Perform an initial sync between the current $JENKINS_HOME volume and the destination volume. Use, for example, rsync as described below:

    rsync -avvu --delete <old-JENKINS_HOME> <new-JENKINS_HOME> (1)
    ▼
    1 Replace <old-JENKINS_HOME> with the path for the previous $JENKINS_HOME, and <new-JENKINS_HOME> with the destination path used as the new $JENKINS_HOME.
  3. Stop the non-HA controller.

  4. Perform a new sync between the current $JENKINS_HOME volume and the destination volume.

    rsync -avvu --delete <old-JENKINS_HOME> <new-JENKINS_HOME> (1)
    ▼
    1 Replace <old-JENKINS_HOME> with the path for the previous $JENKINS_HOME, and <new-JENKINS_HOME> with the destination path used as the new $JENKINS_HOME.
  5. Apply the configuration change that HA requires. For more information about these configuration changes, refer to Install High Availability (active/active) on CloudBees CI on traditional platforms.

  6. Restart the controller, now running in HA mode.