GitHub Enterprise 2.11 includes an upgrade to Elasticsearch 2.4. To prepare the appliance for upgrade to 2.11 or later, you'll need to use the migration script.

If you upgrade to GitHub Enterprise 2.11 or later without running the migration script, mappings in Elasticsearch indexes may become invalid. To run the migration script, your GitHub Enterprise appliance must be running GitHub Enterprise 2.9 or later.

You can run the migration script during normal operations without enabling maintenance mode.

Warning: If GitHub Enterprise is configured for High Availability, the migration script must run while replication is still running. The changes must be allowed to fully replicate to the other appliance before starting the upgrade. If replication is not running while the migration script runs, your Elasticsearch indexes may become invalid.

Preparing a GitHub Enterprise 2.9 or 2.10 appliance

  1. Download the migration script to the appliance:

    curl -s -o "es-transition-tools.tar.gz" \
    https://github-enterprise.s3.amazonaws.com/util/es-transition-tools.tar.gz
    

    Optionally, you can verify your download by confirming the SHA256 checksum. The checksum is available at:

    https://github-enterprise.s3.amazonaws.com/util/SHA256SUM

  2. Extract the archive:

    sudo tar xfz es-transition-tools.tar.gz -C /
    

    Tip: After extracting the archive, you can safely ignore this warning: "tar:Removing leading '/' from member names."

  3. Run the migration script:

    /usr/local/share/enterprise/run-audit-log-transitions.sh
    
  4. If you have a High Availability configuration, wait for replication to catch up before starting the upgrade to 2.11 or later. To confirm that replication has caught up with the primary, use the ghe-repl-status command.