ghe upgrade - aetas-github-training/Support GitHub Wiki

Upgrading GitHub Enterprise

:information_source: These instructions assume that you've already configured a High Availability replica instance and the GitHub Enteprise backup utilities

  1. Connect to the GitHub Enterprise administrative shell of the primary instance over SSH as the "admin" user on port 122
  2. Use the ghe-announce command to set a scheduled maintenance banner that will be displayed to users on the GitHub Enterprise web interface, e.g.:
ghe-announce -s "GitHub Enterprise will be down for a scheduled upgrade on 2015-11-14 23:00 Eastern Time. We expect the upgrade to take no longer than 30 minutes."
  1. Visit the GitHub Enterprise Download Page, select the version you want to ugprade to, and copy the URL for the appropriate upgrade package (.pkg file) to the clipboard.
  2. Download the upgrade package to the primary instance using curl, e.g.:
curl -L -O https://github-enterprise.s3.amazonaws.com/ova/updates/github-enterprise-esx-2.4.0.pkg
  1. Enable maintenance mode on the primary instance from the management console.
  2. Wait for all active processes to complete on the GitHub Enterprise instance.
  3. Take a backup-utils snapshot of the primary instance. Note the timestamp of the backup directory.
  4. Take a VM snapshot of the primary instance. This VM-layer backup at this point provides an extra level of fallback should it be necessary. By taking a snapshot at this point, the restored VM would still be in maintenance mode after restoration.
  5. Connect to the replica instance over SSH as the "admin" user on port 122:
  6. On the replica instance, run ghe-repl-stop to stop replication.
  7. On the primary instance, run the ghe-upgrade command providing the package file name downloaded in the previous step, e.g.:
ghe-upgrade github-enterprise-esx-2.4.0.pkg

Follow the on-screen instructions to complete the upgrade. 12. Once the primary instance has rebooted, browse to https://[hostname]/setup/settings and click Save settings. 13. Remove the downtime announcement banner by SSHing into the primary instance and running:

ghe-announce -u
  1. Disable maintenance mode on the primary instance.
  2. Download the upgrade package to the replica instance using curl
  3. On the replica instance, run the ghe-upgrade command providing the package file name downloaded in the previous step.
  4. After the replica instance reboots, connect to it over SSH on port 122 as the "admin" user.
  5. Verify the upgrade by running:
cat /etc/github/enterprise-release
  1. On the replica instance, replication will automatically start. To ensure all replication services are running appropriately, run ghe-repl-status. This command will return OK for all services when a successful replication is in progress.

If the command returns Replication is not running, the replication may still be starting. Wait about one minute before running ghe-repl-status again.

If replication started correctly, the replica is successfully upgraded and you're finished. Otherwise, continue with the next steps to manually start the replication.