Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
ippidb-web
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
iPPIDB
ippidb-web
Commits
4b3c5074
Commit
4b3c5074
authored
5 years ago
by
Hervé MENAGER
Browse files
Options
Downloads
Patches
Plain Diff
deploy celery with ansible, WIP
WIP on #174 and #175
parent
dbebbef7
Branches
celery
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#21908
passed
5 years ago
Stage: test
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
ansible/celery.service
+21
-0
21 additions, 0 deletions
ansible/celery.service
ansible/celeryd
+11
-0
11 additions, 0 deletions
ansible/celeryd
ansible/deploy.yaml
+25
-2
25 additions, 2 deletions
ansible/deploy.yaml
with
57 additions
and
2 deletions
ansible/celery.service
0 → 100644
+
21
−
0
View file @
4b3c5074
[Unit]
Description
=
Celery Service
After
=
network.target
[Service]
Type
=
forking
User
=
jass
Group
=
nginx
EnvironmentFile
=
-/etc/default/ippidb-{{ http_port }}-celeryd
WorkingDirectory
=
/var/ippidb-{{ http_port }}
ExecStart
=
/bin/sh -c '${CELERY_BIN} multi start ${CELERYD_NODES}
\
-A ${CELERY_APP} --pidfile=${CELERYD_PID_FILE}
\
--logfile=${CELERYD_LOG_FILE} --loglevel=${CELERYD_LOG_LEVEL} ${CELERYD_OPTS}'
ExecStop
=
/bin/sh -c '${CELERY_BIN} multi stopwait ${CELERYD_NODES}
\
--pidfile=${CELERYD_PID_FILE}'
ExecReload
=
/bin/sh -c '${CELERY_BIN} multi restart ${CELERYD_NODES}
\
-A ${CELERY_APP} --pidfile=${CELERYD_PID_FILE}
\
--logfile=${CELERYD_LOG_FILE} --loglevel=${CELERYD_LOG_LEVEL} ${CELERYD_OPTS}'
[Install]
WantedBy
=
multi-user.target
This diff is collapsed.
Click to expand it.
ansible/celeryd
0 → 100644
+
11
−
0
View file @
4b3c5074
CELERYD_NODES="worker"
CELERY_BIN="celery"
CELERY_APP="ippisite"
CELERYD_CHDIR="/var/ippidb-{{ http_port }}-celery"
CELERYD_OPTS="--time-limit=3000 --concurrency=1 --max-tasks-per-child=1"
CELERYD_LOG_FILE="/var/ippidb-{{ http_port }}-celery/celery%N.log"
CELERYD_PID_FILE="/var/ippidb-{{ http_port }}-celery/celery%N.pid"
CELERYD_LOG_LEVEL="DEBUG"
CELERYD_USER=""
CELERYD_GROUP="nginx"
CELERY_CREATE_DIRS=1
This diff is collapsed.
Click to expand it.
ansible/deploy.yaml
+
25
−
2
View file @
4b3c5074
...
@@ -121,6 +121,24 @@
...
@@ -121,6 +121,24 @@
systemd
:
state=stopped name=ippidb-web
systemd
:
state=stopped name=ippidb-web
#ignore fail (i.e. when service does not exist yet)
#ignore fail (i.e. when service does not exist yet)
ignore_errors
:
yes
ignore_errors
:
yes
-
name
:
stop celery service
systemd
:
state=stopped name=celery enabled=true
ignore_errors
:
yes
#
# Set up celery service
#
-
name
:
copy celeryd configuration file
copy
:
src
:
celeryd
dest
:
/etc/default
owner
:
root
group
:
root
-
name
:
copy celery systemd service
copy
:
src
:
celery.service
dest
:
/lib/systemd/system/celery.service
owner
:
root
group
:
root
#
#
# Fetch/Update code and prep django app for publication
# Fetch/Update code and prep django app for publication
#
#
...
@@ -186,7 +204,7 @@
...
@@ -186,7 +204,7 @@
('EMAIL_ADMIN', 'hmenager@pasteur.fr'),
('EMAIL_ADMIN', 'hmenager@pasteur.fr'),
]
]
MANAGERS = [
MANAGERS = [
('EMAIL_MANAGER', '
hmenager
@pasteur.fr'),
('EMAIL_MANAGER', '
ippidb
@pasteur.fr'),
]
]
LOGGING = {
LOGGING = {
'version': 1,
'version': 1,
...
@@ -290,4 +308,9 @@
...
@@ -290,4 +308,9 @@
# Start web server
# Start web server
#
#
-
name
:
start iPPIDB service if relevant
-
name
:
start iPPIDB service if relevant
systemd
:
state=started name=ippidb{{ http_port }}-web enabled=true
systemd
:
state=started name=ippidb{{ http_port }}-web enabled=true
\ No newline at end of file
#
# Start celery service
#
-
name
:
start celery service if relevant
systemd
:
state=started name=celery enabled=true daemon_reload=true
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment