Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.

Commit

Permalink
cortex: call /api/maintenance/migrate to create index
Browse files Browse the repository at this point in the history
Makes no sense but okay...

Signed-off-by: Jakub Sokołowski <[email protected]>
  • Loading branch information
jakubgs committed Nov 13, 2020
1 parent 5cabc22 commit 6d25ba9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ansible/roles/cortex/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@
- name: Create Systemd service
import_tasks: service.yml

- name: Run database migrations
import_tasks: migrate.yml

- name: Create Consul definition
import_tasks: consul.yml
11 changes: 11 additions & 0 deletions ansible/roles/cortex/tasks/migrate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
# This is necessary because this software for no reason whatsoever
# does not run its migrations at startup if ES index doesn't exist.
# There is no harm in calling this route multiple times.
#
# For more details you can read this issue:
# https://github.com/TheHive-Project/Cortex/issues/305
- name: Trigger ES index migrations
uri:
url: 'http://localhost:{{ cortex_port }}/api/maintenance/migrate'
method: POST

0 comments on commit 6d25ba9

Please sign in to comment.