Patches:
- wbstack/mediawiki/pull/437 | Specify a cluster when creating CirrusSearch indices
- wbstack/charts/pull/141 | feat(api): add support for elasticSearchSharedIndex
- wbaas-deploy/pull/1547 | chore(api): set Elasticsearch config prior to update
- wbstack/api/pull/773 | feat(jobs): add an Elasticsearch aliasing job
- wbaas-deploy/pull/1509 | feat(jobs): configurable index name in elasticSearchInitJob
- wbaas-deploy/pull/1553 | feat(elasticsearch): switch to shared Elasticsearch on staging
Example which uses all patches from above:
Steps:
- Create a new wiki if you don't have any existing ones
- Run the following only once (not per wiki) to initialize the shared indices:
export WBS_DOMAIN={ANY_EXISTING_WIKI_DOMAIN} export CLUSTER_NAME=default export MW_CIRRUSSEARCH_INDEX_BASE_NAME=wiki_1 wbaas-deploy/k8s/jobs/elasticSearchInitJob.sh
- Run the following for each existing wiki (and any new wikis created prior to step 2) to create their aliases:
kubectl exec -it deployments/api-scheduler -- bash -c "php artisan job:dispatchNow ElasticSearchAliasInit {WIKI_ID}"