Overview
Elasticsearch (ES) powers the search functionality on your GitHub Enterprise Server instance. To bring the benefits of better performance and security posture, when you upgrade your instance to version 3.13 or later, the Elasticsearch version in the appliance will be upgraded from 5.6.16 to 8.7.0.
The following sections help administrators prepare for and monitor the Elasticsearch upgrade. The key points are:
- The upgrade will temporarily degrade the experience of the search and audit log features.
- If you're upgrading an instance in a cluster configuration, you must run a script to prepare your cluster for the ES upgrade. See "Atualizar o cluster."
- For backups, all customers should take a snapshot of their instance when the upgrade is complete.
Impact on search and audit logs
All search indexes will be rebuilt after the upgrade to ES8. Users will experience degraded search experience during the rebuild, but the instance is otherwise expected to be functional and available. The index rebuild process depends on the size of the data set and may take a few hours to days.
Audit logs will not be available immediately after upgrade, and it may take several hours to migrate all audit logs.
We strongly recommend you take a backup (using backup-utils) immediately following completion of the index rebuild and use that snapshot for all future restores. See "Como configurar backups em sua instância." If you restore a backup from an instance running GitHub Enterprise Server 3.11 or 3.12, then any content that relies on ES will only be available after the ES indexes have been migrated and rebuilt on the 3.13 instance.
Monitoring the Elasticsearch upgrade
You can monitor the progress of the ES upgrade in the site admin dashboard.
- In the upper-right corner of any page, click .
- In the left sidebar, click Search indexes.
When the index rebuild is complete, all the search indexes should show green and "100%."
Changing the number of repair workers
By default, the number of index repair workers is set to the number of CPU cores divided by 8 (with an upper bound of 8). To speed up the index rebuild, you can adjust the worker count. However, before doing so, you should consider the potential impact to the load.
-
Conecte-se via SSH ao sua instância do GitHub Enterprise Server. Se sua instância for composta por vários nós, por exemplo, se a alta disponibilidade ou a replicação geográfica estiver configurada, efetue SSH no nó primário. Se você usar um cluster, poderá efetuar SSH em qualquer nó. Substitua HOSTNAME pelo nome do host da instância ou pelo nome do host ou endereço IP de um nó. Para obter mais informações, confira "Acesar o shell administrativo (SSH)".
Shell ssh -p 122 admin@HOSTNAME
ssh -p 122 admin@HOSTNAME
-
To change the number of workers, enter the following command.
Shell ghe-config app.github.es-workers NUMBER-OF-WORKERS
ghe-config app.github.es-workers NUMBER-OF-WORKERS
-
Run
ghe-config-apply
.
You can also adjust the worker count for individual index rebuilds in the "Search Indexes" section of the site admin dashboard. See the "Monitoring the Elasticsearch upgrade" section.