-
Notifications
You must be signed in to change notification settings - Fork 685
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4855 from rmol/4783-supervisor-to-systemd
Manage rq services with systemd instead of supervisor
- Loading branch information
Showing
40 changed files
with
594 additions
and
301 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
graft debian | ||
graft etc | ||
graft lib | ||
graft var | ||
prune var/www/securedrop/tests | ||
include requirements.txt | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 0 additions & 10 deletions
10
.../ansible-base/roles/build-securedrop-app-code-deb-pkg/templates/securedrop_rqrequeue.conf
This file was deleted.
Oops, something went wrong.
21 changes: 21 additions & 0 deletions
21
...sible-base/roles/build-securedrop-app-code-deb-pkg/templates/securedrop_rqrequeue.service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
[Unit] | ||
Description=SecureDrop rqrequeue process | ||
After=redis-server.service | ||
Wants=redis-server.service | ||
|
||
[Service] | ||
Environment=PYTHONPATH="{{ securedrop_code }}:{{ securedrop_venv_site_packages }}" | ||
ExecStart={{ securedrop_venv_bin }}/python {{ securedrop_code }}/scripts/rqrequeue --interval 60 | ||
PrivateDevices=yes | ||
PrivateTmp=yes | ||
ProtectSystem=full | ||
ReadOnlyDirectories=/ | ||
ReadWriteDirectories={{ securedrop_data }} | ||
Restart=always | ||
RestartSec=10s | ||
UMask=077 | ||
User=www-data | ||
WorkingDirectory={{ securedrop_code }} | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
21 changes: 21 additions & 0 deletions
21
...nsible-base/roles/build-securedrop-app-code-deb-pkg/templates/securedrop_rqworker.service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
[Unit] | ||
Description=SecureDrop rq worker | ||
After=redis-server.service | ||
Wants=redis-server.service | ||
|
||
[Service] | ||
Environment=PYTHONPATH="{{ securedrop_code }}:{{ securedrop_venv_site_packages }}" | ||
ExecStart={{ securedrop_venv_bin }}/rqworker | ||
PrivateDevices=yes | ||
PrivateTmp=yes | ||
ProtectSystem=full | ||
ReadOnlyDirectories=/ | ||
ReadWriteDirectories={{ securedrop_data }} | ||
Restart=always | ||
RestartSec=10s | ||
UMask=077 | ||
User=www-data | ||
WorkingDirectory={{ securedrop_code }} | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
19 changes: 19 additions & 0 deletions
19
...nsible-base/roles/build-securedrop-app-code-deb-pkg/templates/securedrop_shredder.service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
[Unit] | ||
Description=SecureDrop shredder | ||
|
||
[Service] | ||
Environment=PYTHONPATH="{{ securedrop_code }}:{{ securedrop_venv_site_packages }}" | ||
ExecStart={{ securedrop_venv_bin }}/python {{ securedrop_code }}/scripts/shredder --interval 60 | ||
PrivateDevices=yes | ||
PrivateTmp=yes | ||
ProtectSystem=full | ||
ReadOnlyDirectories=/ | ||
ReadWriteDirectories={{ securedrop_data }} | ||
Restart=always | ||
RestartSec=10s | ||
UMask=077 | ||
User=www-data | ||
WorkingDirectory={{ securedrop_code }} | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
10 changes: 0 additions & 10 deletions
10
...les/ansible-base/roles/build-securedrop-app-code-deb-pkg/templates/securedrop_worker.conf
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,13 +3,13 @@ Section: web | |
Priority: optional | ||
Maintainer: SecureDrop Team <[email protected]> | ||
Homepage: https://securedrop.org | ||
Build-Depends: debhelper (>= 9), dh-python, python3-all, python3-setuptools, dh-virtualenv | ||
Build-Depends: debhelper (>= 9), dh-python, python3-all, python3-setuptools, dh-systemd, dh-virtualenv | ||
Standards-Version: 3.9.8 | ||
X-Python3-Version: >= 3.5 | ||
|
||
Package: securedrop-app-code | ||
Architecture: amd64 | ||
Conflicts: libapache2-mod-wsgi | ||
Replaces: libapache2-mod-wsgi | ||
Depends: ${dist:Depends}, ${misc:Depends}, ${python3:Depends}, apache2, apparmor-utils, coreutils, gnupg2, haveged, libapache2-mod-xsendfile, libpython3.5, paxctld, python3 (>= 3.5), python3 (<< 3.6), redis-server, securedrop-config, securedrop-keyring, sqlite3, supervisor | ||
Description: Packages the SecureDrop application code pip dependencies and apparmor profiles. This package will put the apparmor profiles in enforce mode. This package does use pip to install the pip wheelhouse | ||
Conflicts: libapache2-mod-wsgi,supervisor | ||
Replaces: libapache2-mod-wsgi,supervisor | ||
Depends: ${dist:Depends}, ${misc:Depends}, ${python3:Depends}, apache2, apparmor-utils, coreutils, gnupg2, haveged, libapache2-mod-xsendfile, libpython3.5, paxctld, python3 (>= 3.5), python3 (<< 3.6), redis-server, securedrop-config, securedrop-keyring, sqlite3 | ||
Description: SecureDrop application code, dependencies, Apache configuration, systemd services, and AppArmor profiles. This package will put the AppArmor profiles in enforce mode. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 3 additions & 2 deletions
5
install_files/securedrop-app-code/debian/securedrop-app-code.install
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
var/www /var/ | ||
etc/apparmor.d/usr.sbin.apache2 /etc/apparmor.d | ||
etc/apparmor.d/usr.sbin.tor /etc/apparmor.d | ||
etc/supervisor/conf.d/securedrop_rqrequeue.conf /etc/supervisor/conf.d | ||
etc/supervisor/conf.d/securedrop_worker.conf /etc/supervisor/conf.d | ||
lib/systemd/system/securedrop_rqrequeue.service /lib/systemd/system | ||
lib/systemd/system/securedrop_rqworker.service /lib/systemd/system | ||
lib/systemd/system/securedrop_shredder.service /lib/systemd/system |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
# sha256 digest quay.io/freedomofpress/sd-docker-builder-xenial:2019_10_21 | ||
0288d35d316047302e6e15887eb34fb5440415054835cf0c0f25f5cc8ab80279 | ||
# sha256 digest quay.io/freedomofpress/sd-docker-builder-xenial:2019_10_24 | ||
981d2190f643964aee7d1ea8e4fe6a99fd3ab8ebab7179886cd8d558b20d044d |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.