c2corg / v6_api

REST API for https://www.camptocamp.org
GNU Affero General Public License v3.0
22 stars 25 forks source link

Elasticsearch migration from 7.17 to 8.14 #1826

Open jphilou opened 2 months ago

jphilou commented 2 months ago

ElasticSearch Upgrade from v7.22 to V8.14 for docker env. like dev one.

The docker-compose file has been updated in order to facilitate and automotive plugins installation and prepare the environment for migration. The ElasticSearch 7.22 is still build and run but would not be the main ES for the service. It could be decommissioned after migration. docker-compose file contains as well :

migration steps

  1. build the environment : docker-compose build
  2. Launch the environment : docker-compose up -d
  3. Create the index and its mapping : ./scripts/esUpdateMappings78.sh
  4. Data Migration : docker-compose start logstash8 It will stop by itself when migration would be achieved
  5. postgresql shema up to date: docker-compose exec api .build/venv/bin/alembic upgrade head

post migration

if all the process has been passed without issues. you can comment or remove in the docker-compose.yml services :

special note

ElasticSearch 8 integrate new security settings and configuration by design like:

in the docker for dev, I let a basic authentification working and keep http.

Base upon the way you make the configuration some adjustments have to be realized.

codacy-production[bot] commented 2 months ago

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
:white_check_mark: +0.04% :white_check_mark: 99.11%
Coverage variation details | | Coverable lines | Covered lines | Coverage | | ------------- | ------------- | ------------- | ------------- | | Common ancestor commit (24e010e996d803ee11afc6937955a1e56339ac5d) | 19853 | 18407 | 92.72% | | | Head commit (efb3ddaeb795dd1c8bf86cc4fd54010ebb7d3b7e) | 19960 (+107) | 18515 (+108) | 92.76% (**+0.04%**) | **Coverage variation** is the difference between the coverage for the head and common ancestor commits of the pull request branch: ` - `
Diff coverage details | | Coverable lines | Covered lines | Diff coverage | | ------------- | ------------- | ------------- | ------------- | | Pull request (#1826) | 225 | 223 | **99.11%** | **Diff coverage** is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: `/ * 100%`

See your quality gate settings    Change summary preferences


:rocket: Don’t miss a bit, follow what’s new on Codacy.

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more