Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue/2066 Elasticsearch / Elastis4s Upgrade #2080

Merged
merged 33 commits into from Mar 8, 2019
Merged

Conversation

t83714
Copy link
Contributor

@t83714 t83714 commented Feb 28, 2019

What this PR does

Fixes #2066

Upgrade Elasticsearch to v6.5.x.

Todos:

  • Upgrade Elasticsearch to v6.5.1 v6.5.4
  • Upgrade Elastic4s to v6.5.1
  • Make code changes to suit new version
    • We should try use main release Elastic4s rather than our forked version --- unless there are any blocking bugs
  • Make sure all test cases are running ok
    • If really hard to get embeded node to work with new version, look at possible Docker based test solution (seems used by Elastic4s)

Changes Summary:

  • Upgrade Elasticsearch to v6.5.4
    • Removed x-pack
    • Set auto_create_index to false (no exception)
  • Upgrade Elastic4s to v6.5.1
    • Dumped my forked version & now use main release Elastic4s
  • Re-wrote indexer code to work with new versions
    • It seems es v6.5 will sometimes set index to closed after recovery. It won't happen very often but you will see if keep restarting the pod. Because of this, indexer now will try to re-open index if it's closed on startup.
    • Fixes issues with snapshots: indexer will checking whether an index is ready after restore. It prevent indexer from exiting on checking index data immediately after snapshot restore
  • Re-wrote search API code to work with new versions
  • Removed local node for testing --- now use Docker container
  • Helm Chart & Docker images adjustment for using offical elasticsearch docker image

Regarding getting rid of magda-elastic-search image:

  • Possible --- Offical image is used in CI for testing as tests happens before the build
    • We could probably insert files (e.g. synonym files) to pod via configMap. However, k8s has a 1 mb size limitation of object storage (Size limit for ConfigMap kubernetes/kubernetes#19781). We probably could load files remotely --- but it might not be the desired solution.

Test

Run sbt tests locally

  • cd magda-int-test
  • docker-compose up -d
  • yarn test

Finally Test Site is Ready:

https://issue-2066.dev.magda.io

Checklist

  • There are unit tests to verify my changes are correct
  • I've updated CHANGES.md with what I changed.
  • I've linked this PR to an issue in ZenHub (core dev team only)

t83714 and others added 30 commits February 22, 2019 17:46
- removed x-pack
- set auto_create_index to false
- changed `minimum_master_nodes` in elasticsearch.yml to 1 (this should be overwrite via env `discovery.zen.minimum_master_nodes`)
- will test whether index is open when indexer is starting up
- gitlab should connect to `docker` service
@t83714 t83714 marked this pull request as ready for review March 1, 2019 10:05
@t83714 t83714 changed the title Issue/2066 Elasticsearch / Elastis4s Upgrade (Draft Only for CI testing) Issue/2066 Elasticsearch / Elastis4s Upgrade Mar 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade Elasticsearch to v6.5.x Re-add ability for elastic search to pull backups
2 participants