Switch over to the mongodb DB
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Luke Murphy 2020-04-09 21:25:55 +02:00
parent ab74d696cc
commit f946d5e9c6
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
4 changed files with 19 additions and 16 deletions

View File

@ -15,23 +15,23 @@
- "{{ domain }}"
state: present
- name: Create postgres database
- name: Create mongodb database
no_log: true
shell: "
dokku
postgres:create
mongodb:create
alerta
--password {{ db_passwd }}
--root-password {{ root_db_passwd }}
"
args:
creates: /var/lib/dokku/services/postgres/alerta
creates: /var/lib/dokku/services/mongodb/alerta
- name: Link postgres database to application
- name: Link mongodb database to application
dokku_service_link:
app: alerta
name: alerta
service: postgres
service: mongodb
- name: Create application directories
become: true

View File

@ -1,14 +1,13 @@
[DEFAULT]
endpoint = http://127.0.0.1:8080/api
endpoint = http://localhost:8080/api
key = {{ alerta_cli_api_key }}
output = psql
sslverify = False
timezone = Europe/London
[alerta-mailer]
amqp_url = mongodb://127.0.0.1:27017/
amqp_queue_name = kombu
dashboard_url = http://127.0.0.1:8080
amqp_url = {{ db_type }}://{{ db_loc }}/
dashboard_url = http://localhost:8080
debug = True
email_type = text
endpoint = http://127.0.0.1:8080/api

View File

@ -52,12 +52,15 @@ SEVERITY_MAP = {
DEFAULT_NORMAL_SEVERITY = "normal"
DEFAULT_PREVIOUS_SEVERITY = "indeterminate"
PLUGINS = ["reject", "blackout", "normalise", "amqp", "mailer"]
PLUGINS = [
"alerta-mailer",
"amqp",
"blackout",
"normalise",
"reject",
]
AMQP_URL = "mongodb://localhost:27017/kombu"
AMQP_TOPIC = "notify"
DATABASE_URL = "postgres://{{ db_user }}:{{ db_passwd }}@{{ db_loc }}/{{ db_name }}"
DATABASE_URL = "{{ db_type }}://{{ db_user }}:{{ db_passwd }}@{{ db_loc }}/{{ db_name }}"
DATABASE_NAME = "{{ db_name }}"
EMAIL_VERIFICATION = False

View File

@ -1,7 +1,8 @@
---
db_loc: "dokku-postgres-alerta:5432"
db_loc: "dokku-mongodb-alerta:27017"
db_name: "alerta"
db_user: "postgres"
db_type: "mongodb"
db_user: "alerta"
domain: "alerta.autonomic.zone"
http_port: "8080"
keycloak_realm: "autonomic"