Update FMN roles for 2.0.0
This commit is contained in:
parent
f939d582dd
commit
f56b1ecd83
3 changed files with 4 additions and 66 deletions
|
@ -12,15 +12,10 @@
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: clean all metadata {%if testing%}(with infrastructure-testing on){%endif%}
|
- name: clean all metadata {%if testing%}(with infrastructure-testing on){%endif%}
|
||||||
command: yum clean all {%if testing%} --enablerepo=infrastructure-tags-stg {%endif%}
|
command: dnf clean all
|
||||||
check_mode: no
|
check_mode: no
|
||||||
when: env != "staging"
|
|
||||||
- name: yum update FMN packages from main repo
|
- name: yum update FMN packages from main repo
|
||||||
yum: name="python-fmn" state=latest
|
package: name="python-fmn" state=latest
|
||||||
when: env != "staging"
|
|
||||||
- name: Update FMN packages
|
|
||||||
package: name=python-fmn state=latest
|
|
||||||
when: env == "staging"
|
|
||||||
|
|
||||||
- name: verify the frontend and stop it
|
- name: verify the frontend and stop it
|
||||||
hosts: notifs-web:notifs-web-stg
|
hosts: notifs-web:notifs-web-stg
|
||||||
|
@ -75,10 +70,7 @@
|
||||||
- fmn-worker@2
|
- fmn-worker@2
|
||||||
- fmn-worker@3
|
- fmn-worker@3
|
||||||
- fmn-worker@4
|
- fmn-worker@4
|
||||||
|
- fmn-celerybeat
|
||||||
- name: Stop the celerybeat service
|
|
||||||
service: name=fmn-celerybeat state=stopped
|
|
||||||
when: env == "staging"
|
|
||||||
|
|
||||||
- name: Upgrade the database
|
- name: Upgrade the database
|
||||||
command: /usr/bin/alembic -c /usr/share/fmn/alembic.ini upgrade head
|
command: /usr/bin/alembic -c /usr/share/fmn/alembic.ini upgrade head
|
||||||
|
@ -93,10 +85,7 @@
|
||||||
- fmn-worker@2
|
- fmn-worker@2
|
||||||
- fmn-worker@3
|
- fmn-worker@3
|
||||||
- fmn-worker@4
|
- fmn-worker@4
|
||||||
|
- fmn-celerybeat
|
||||||
- name: Re-start the celerybeat service
|
|
||||||
service: name=fmn-celerybeat state=started
|
|
||||||
when: env == "staging"
|
|
||||||
|
|
||||||
- name: And... start the backend again
|
- name: And... start the backend again
|
||||||
service: name="fedmsg-hub" state=started
|
service: name="fedmsg-hub" state=started
|
||||||
|
|
|
@ -68,15 +68,7 @@
|
||||||
- fmn-worker@2
|
- fmn-worker@2
|
||||||
- fmn-worker@3
|
- fmn-worker@3
|
||||||
- fmn-worker@4
|
- fmn-worker@4
|
||||||
tags:
|
|
||||||
- notifs
|
|
||||||
- notifs/backend
|
|
||||||
|
|
||||||
- name: start the FMN celerybeat service
|
|
||||||
service: name={{item}} enabled=yes state=started
|
|
||||||
with_items:
|
|
||||||
- fmn-celerybeat
|
- fmn-celerybeat
|
||||||
tags:
|
tags:
|
||||||
- notifs
|
- notifs
|
||||||
- notifs/backend
|
- notifs/backend
|
||||||
when: env == "staging"
|
|
||||||
|
|
|
@ -8,37 +8,6 @@ ircnick = "fedora-notif"
|
||||||
|
|
||||||
base = "https://apps.%s/notifications/" % domain
|
base = "https://apps.%s/notifications/" % domain
|
||||||
|
|
||||||
{% if env != 'staging' %}
|
|
||||||
|
|
||||||
from dogpile.core.readwrite_lock import ReadWriteMutex
|
|
||||||
from dogpile.cache.backends.file import AbstractFileLock
|
|
||||||
|
|
||||||
class MutexLock(AbstractFileLock):
|
|
||||||
""" Use an in-memory lock for our dogpile cache
|
|
||||||
in an attempt to reduce thread competition.
|
|
||||||
"""
|
|
||||||
def __init__(self, filename):
|
|
||||||
self.mutex = ReadWriteMutex()
|
|
||||||
|
|
||||||
def acquire_read_lock(self, wait):
|
|
||||||
ret = self.mutex.acquire_read_lock(wait)
|
|
||||||
return wait or ret
|
|
||||||
|
|
||||||
def acquire_write_lock(self, wait):
|
|
||||||
ret = self.mutex.acquire_write_lock(wait)
|
|
||||||
return wait or ret
|
|
||||||
|
|
||||||
def release_read_lock(self):
|
|
||||||
return self.mutex.release_read_lock()
|
|
||||||
|
|
||||||
def release_write_lock(self):
|
|
||||||
return self.mutex.release_write_lock()
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def __json__(cls):
|
|
||||||
return repr(cls)
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
{% if env == 'staging' %}
|
{% if env == 'staging' %}
|
||||||
|
@ -181,7 +150,6 @@ config = {
|
||||||
"fmn.support_email": "notifications@" + domain,
|
"fmn.support_email": "notifications@" + domain,
|
||||||
|
|
||||||
# Generic stuff
|
# Generic stuff
|
||||||
{% if env == 'staging' %}
|
|
||||||
"logging": dict(
|
"logging": dict(
|
||||||
loggers=dict(
|
loggers=dict(
|
||||||
fmn={
|
fmn={
|
||||||
|
@ -195,15 +163,4 @@ config = {
|
||||||
'handlers': ['console', 'mailer'],
|
'handlers': ['console', 'mailer'],
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
{% else %}
|
|
||||||
"logging": dict(
|
|
||||||
loggers=dict(
|
|
||||||
fmn={
|
|
||||||
"level": "DEBUG",
|
|
||||||
"propagate": False,
|
|
||||||
"handlers": ["console", "mailer"],
|
|
||||||
},
|
|
||||||
),
|
|
||||||
),
|
|
||||||
{% endif %}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue