Patches:
- [x] [wbstack/mediawiki/pull/437 | Specify a cluster when creating CirrusSearch indices](https://github.com/wbstack/mediawiki/pull/437)
- [x] [wbstack/charts/pull/141 | feat(api): add support for elasticSearchSharedIndex](https://github.com/wbstack/charts/pull/141)
- [x] [wbaas-deploy/pull/1547 | chore(api): set Elasticsearch config prior to update](https://github.com/wmde/wbaas-deploy/pull/1547)
- [x] [wbstack/api/pull/773 | feat(jobs): add an Elasticsearch aliasing job](https://github.com/wbstack/api/pull/773)
- [x] [wbaas-deploy/pull/1509 | feat(jobs): configurable index name in elasticSearchInitJob](https://github.com/wmde/wbaas-deploy/pull/1509)
- [] [wbaas-deploy/pull/1553 | feat(elasticsearch): switch to shared Elasticsearch on staging] [https://github.com/wmde/wbaas-deploy/pull/1553]
Example which uses all patches from above:
- [] [wbaas-deploy/pull/1515 | Local example for sharing Elasticsearch indices](https://github.com/wmde/wbaas-deploy/pull/1515)
Steps:
1. Create a new wiki if you don't have any existing ones
2. 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
```
3. 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}"
```