Update the FMN role and playbook for 1.2.0
Packages have been combined, some new configuration files are required, and database migrations have been relocated. Signed-off-by: Jeremy Cline <jeremy@jcline.org>
This commit is contained in:
parent
4c6c10a1fd
commit
b1d69ac2bc
4 changed files with 76 additions and 1 deletions
|
@ -18,7 +18,11 @@
|
||||||
yum: name="python-fmn*" state=latest
|
yum: name="python-fmn*" state=latest
|
||||||
when: not testing
|
when: not testing
|
||||||
- name: yum update FMN packages from testing repo
|
- name: yum update FMN packages from testing repo
|
||||||
yum: name="python-fmn*" state=latest enablerepo=infrastructure-testing
|
yum: pkg={{ item }} state=latest enablerepo=infrastructure-testing
|
||||||
|
with_items:
|
||||||
|
- python-fmn
|
||||||
|
- python-fmn-sse
|
||||||
|
- python-fmn-web
|
||||||
when: testing
|
when: testing
|
||||||
|
|
||||||
- name: verify the frontend and stop it
|
- name: verify the frontend and stop it
|
||||||
|
@ -77,6 +81,7 @@
|
||||||
|
|
||||||
- name: Upgrade the database
|
- name: Upgrade the database
|
||||||
command: /usr/bin/alembic -c /usr/share/fmn.lib/alembic.ini upgrade head
|
command: /usr/bin/alembic -c /usr/share/fmn.lib/alembic.ini upgrade head
|
||||||
|
when: env != "staging"
|
||||||
args:
|
args:
|
||||||
chdir: /usr/share/fmn.lib/
|
chdir: /usr/share/fmn.lib/
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,16 @@
|
||||||
- notifs
|
- notifs
|
||||||
- notifs/backend
|
- notifs/backend
|
||||||
|
|
||||||
|
- name: install backend and sse packages
|
||||||
|
yum: pkg={{ item }} state=present
|
||||||
|
with_items:
|
||||||
|
- python-fmn
|
||||||
|
- python-fmn-sse
|
||||||
|
when: env == "staging"
|
||||||
|
tags:
|
||||||
|
- notifs
|
||||||
|
- notifs/backend
|
||||||
|
|
||||||
- name: copy database configuration
|
- name: copy database configuration
|
||||||
template: >
|
template: >
|
||||||
src={{ item }} dest=/etc/fedmsg.d/{{ item }}
|
src={{ item }} dest=/etc/fedmsg.d/{{ item }}
|
||||||
|
@ -25,10 +35,35 @@
|
||||||
- notifs
|
- notifs
|
||||||
- notifs/backend
|
- notifs/backend
|
||||||
|
|
||||||
|
- name: Install fmn SSE configuration
|
||||||
|
template: >
|
||||||
|
src={{ item }} dest=/etc/fedmsg.d/{{ item }}
|
||||||
|
owner=fedmsg group=fedmsg mode=0600
|
||||||
|
with_items:
|
||||||
|
- fmn.sse.py
|
||||||
|
when: env == "staging"
|
||||||
|
notify:
|
||||||
|
- restart fedmsg-hub
|
||||||
|
tags:
|
||||||
|
- notifs
|
||||||
|
- notifs/backend
|
||||||
|
|
||||||
- name: copy the alembic configuration for DBAs
|
- name: copy the alembic configuration for DBAs
|
||||||
template: >
|
template: >
|
||||||
src=alembic.ini dest=/usr/share/fmn.lib/alembic.ini
|
src=alembic.ini dest=/usr/share/fmn.lib/alembic.ini
|
||||||
owner=root group=sysadmin-dba mode=0660
|
owner=root group=sysadmin-dba mode=0660
|
||||||
|
when: env != "staging"
|
||||||
|
notify:
|
||||||
|
- restart fedmsg-hub
|
||||||
|
tags:
|
||||||
|
- notifs
|
||||||
|
- notifs/backend
|
||||||
|
|
||||||
|
- name: copy the alembic configuration for DBAs
|
||||||
|
template: >
|
||||||
|
src=alembic.ini dest=/usr/share/fmn/alembic.ini
|
||||||
|
owner=root group=sysadmin-dba mode=0660
|
||||||
|
when: env == "staging"
|
||||||
notify:
|
notify:
|
||||||
- restart fedmsg-hub
|
- restart fedmsg-hub
|
||||||
tags:
|
tags:
|
||||||
|
|
|
@ -2,7 +2,11 @@
|
||||||
|
|
||||||
[alembic]
|
[alembic]
|
||||||
# path to migration scripts
|
# path to migration scripts
|
||||||
|
{% if env == 'staging' %}
|
||||||
|
script_location = /usr/share/fmn/alembic/
|
||||||
|
{% else %}
|
||||||
script_location = /usr/share/fmn.lib/alembic/
|
script_location = /usr/share/fmn.lib/alembic/
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
# template used to generate migration files
|
# template used to generate migration files
|
||||||
# file_template = %%(rev)s_%%(slug)s
|
# file_template = %%(rev)s_%%(slug)s
|
||||||
|
|
31
roles/notifs/backend/templates/fmn.sse.py
Normal file
31
roles/notifs/backend/templates/fmn.sse.py
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
config = {
|
||||||
|
|
||||||
|
# SSE
|
||||||
|
"fmn.sse.pika.host": "localhost",
|
||||||
|
"fmn.sse.pika.port": 5672,
|
||||||
|
"fmn.sse.pika.msg_expiration": 3600000, # 1 hour in ms
|
||||||
|
|
||||||
|
# SSE Web server configuration
|
||||||
|
"fmn.sse.webserver.tcp_port": 8080,
|
||||||
|
# A list of interfaces to listen to ('127.0.0.1', for example); if none
|
||||||
|
# are specified the server listens on all available interfaces.
|
||||||
|
'fmn.sse.webserver.interfaces': [],
|
||||||
|
|
||||||
|
# A regular expression using the standard Python re syntax that defines a
|
||||||
|
# whitelist of queues exposed by the SSE server.
|
||||||
|
'fmn.sse.webserver.queue_whitelist': '.+\.id\.fedoraproject\.org$',
|
||||||
|
|
||||||
|
# A regular expression using the standard Python re syntax that defines a
|
||||||
|
# blacklist for queues exposed by the SSE server. Any queue name that is
|
||||||
|
# matched by the regular expression will return a HTTP 403 to the client.
|
||||||
|
#
|
||||||
|
# Note: This is applied _after_ the whitelist so if the queue is matched
|
||||||
|
# by both regular expressions, the queue _will not_ be served.
|
||||||
|
'fmn.sse.webserver.queue_blacklist': None,
|
||||||
|
|
||||||
|
# The value to use with the 'Access-Control-Allow-Origin' HTTP header
|
||||||
|
'fmn.sse.webserver.allow_origin': '*',
|
||||||
|
|
||||||
|
# Define how many messages to prefetch from the AMQP server
|
||||||
|
'fmn.sse.pika.prefetch_count': 5,
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue