Configure alembic.ini for BDR on staging.
Signed-off-by: Randy Barlow <randy@electronsweatshop.com>
This commit is contained in:
parent
8e6d0acaeb
commit
7c2bbb13d9
2 changed files with 69 additions and 0 deletions
|
@ -33,6 +33,16 @@
|
||||||
- config
|
- config
|
||||||
- bodhi
|
- bodhi
|
||||||
|
|
||||||
|
- name: Configure alembic
|
||||||
|
template:
|
||||||
|
src: alembic.ini
|
||||||
|
dest: /etc/bodhi/alembic.ini
|
||||||
|
owner: bodhi
|
||||||
|
group: root
|
||||||
|
tags:
|
||||||
|
- config
|
||||||
|
- bodhi
|
||||||
|
|
||||||
- name: setup basic /etc/bodhi/ contents (production)
|
- name: setup basic /etc/bodhi/ contents (production)
|
||||||
template: >
|
template: >
|
||||||
src="production.ini.j2"
|
src="production.ini.j2"
|
||||||
|
|
59
roles/bodhi2/base/templates/alembic.ini
Normal file
59
roles/bodhi2/base/templates/alembic.ini
Normal file
|
@ -0,0 +1,59 @@
|
||||||
|
# A generic, single database configuration.
|
||||||
|
|
||||||
|
[alembic]
|
||||||
|
# path to migration scripts
|
||||||
|
script_location = /usr/share/bodhi/alembic
|
||||||
|
|
||||||
|
# template used to generate migration files
|
||||||
|
# file_template = %%(rev)s_%%(slug)s
|
||||||
|
|
||||||
|
# set to 'true' to run the environment during
|
||||||
|
# the 'revision' command, regardless of autogenerate
|
||||||
|
# revision_environment = false
|
||||||
|
|
||||||
|
# Don't bother, this is obtained from the Bodhi config file
|
||||||
|
sqlalchemy.url = sqlite://bodhi.db
|
||||||
|
|
||||||
|
# Set to true to aquire the global DDL lock for BDR
|
||||||
|
# See http://bdr-project.org/docs/stable/ddl-replication-advice.html
|
||||||
|
{% if env == 'staging' %}
|
||||||
|
bdr = true
|
||||||
|
{% else %}
|
||||||
|
bdr = false
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
# Logging configuration
|
||||||
|
[loggers]
|
||||||
|
keys = root,sqlalchemy,alembic
|
||||||
|
|
||||||
|
[handlers]
|
||||||
|
keys = console
|
||||||
|
|
||||||
|
[formatters]
|
||||||
|
keys = generic
|
||||||
|
|
||||||
|
[logger_root]
|
||||||
|
level = WARN
|
||||||
|
handlers = console
|
||||||
|
qualname =
|
||||||
|
|
||||||
|
[logger_sqlalchemy]
|
||||||
|
level = WARN
|
||||||
|
handlers =
|
||||||
|
qualname = sqlalchemy.engine
|
||||||
|
|
||||||
|
[logger_alembic]
|
||||||
|
level = INFO
|
||||||
|
handlers =
|
||||||
|
qualname = alembic
|
||||||
|
|
||||||
|
[handler_console]
|
||||||
|
class = StreamHandler
|
||||||
|
args = (sys.stderr,)
|
||||||
|
level = NOTSET
|
||||||
|
formatter = generic
|
||||||
|
|
||||||
|
[formatter_generic]
|
||||||
|
format = %(levelname)-5.5s [%(name)s] %(message)s
|
||||||
|
datefmt = %H:%M:%S
|
Loading…
Add table
Add a link
Reference in a new issue