Use $QUAYPATH and $QUAYDIR in conf and init files

This commit is contained in:
Antoine Legrand 2017-02-02 00:17:25 +01:00 committed by Antoine Legrand
parent 334a08d90b
commit cdb3722c17
59 changed files with 341 additions and 225 deletions

View file

@ -2,7 +2,9 @@
echo 'Starting Blob upload cleanup worker'
cd /
venv/bin/python -m workers.blobuploadcleanupworker 2>&1
QUAYPATH=${QUAYPATH:-"."}
cd ${QUAYDIR:-"/"}
PYTHONPATH=$QUAYPATH venv/bin/python -m workers.blobuploadcleanupworker 2>&1
echo 'Blob upload cleanup exited'

View file

@ -2,7 +2,8 @@
echo 'Starting build logs archiver worker'
cd /
venv/bin/python -m workers.buildlogsarchiver 2>&1
QUAYPATH=${QUAYPATH:-"."}
cd ${QUAYDIR:-"/"}
PYTHONPATH=$QUAYPATH venv/bin/python -m workers.buildlogsarchiver 2>&1
echo 'Diffs worker exited'

View file

@ -6,7 +6,9 @@ echo 'Starting internal build manager'
monit
# Run the build manager.
cd /
QUAYPATH=${QUAYPATH:-"."}
cd ${QUAYDIR:-"/"}
export PYTHONPATH=$QUAYPATH
exec venv/bin/python -m buildman.builder 2>&1
echo 'Internal build manager exited'

View file

@ -2,7 +2,8 @@
echo 'Starting chunk cleanup worker'
cd /
venv/bin/python -m workers.chunkcleanupworker 2>&1
QUAYPATH=${QUAYPATH:-"."}
cd ${QUAYDIR:-"/"}
PYTHONPATH=$QUAYPATH venv/bin/python -m workers.chunkcleanupworker 2>&1
echo 'Chunk cleanup worker exited'

View file

@ -2,7 +2,8 @@
echo 'Starting GC worker'
cd /
venv/bin/python -m workers.gc.gcworker 2>&1
QUAYPATH=${QUAYPATH:-"."}
cd ${QUAYDIR:-"/"}
PYTHONPATH=$QUAYPATH venv/bin/python -m workers.gc.gcworker 2>&1
echo 'Repository GC exited'
echo 'Repository GC exited'

View file

@ -2,7 +2,8 @@
echo 'Starting global prometheus stats worker'
cd /
venv/bin/python -m workers.globalpromstats
QUAYPATH=${QUAYPATH:-"."}
cd ${QUAYDIR:-"/"}
PYTHONPATH=$QUAYPATH venv/bin/python -m workers.globalpromstats
echo 'Global prometheus stats exited'

View file

@ -2,7 +2,10 @@
echo 'Starting gunicon'
cd /
nice -n 10 venv/bin/gunicorn -c conf/gunicorn_registry.py registry:application
QUAYPATH=${QUAYPATH:-"."}
QUAYCONF=${QUAYCONF:-"$QUAYPATH/conf"}
cd ${QUAYDIR:-"/"}
PYTHONPATH=$QUAYPATH nice -n 10 venv/bin/gunicorn -c $QUAYCONF/gunicorn_registry.py registry:application
echo 'Gunicorn exited'

View file

@ -2,7 +2,10 @@
echo 'Starting gunicon'
cd /
venv/bin/gunicorn -c conf/gunicorn_secscan.py secscan:application
QUAYPATH=${QUAYPATH:-"."}
QUAYCONF=${QUAYCONF:-"$QUAYPATH/conf"}
cd ${QUAYDIR:-"/"}
PYTHONPATH=$QUAYPATH venv/bin/gunicorn -c $QUAYCONF/gunicorn_secscan.py secscan:application
echo 'Gunicorn exited'

View file

@ -2,7 +2,10 @@
echo 'Starting gunicon'
cd /
nice -n 10 venv/bin/gunicorn -c conf/gunicorn_verbs.py verbs:application
QUAYPATH=${QUAYPATH:-"."}
QUAYCONF=${QUAYCONF:-"$QUAYPATH/conf"}
cd ${QUAYDIR:-"/"}
PYTHONPATH=$QUAYPATH nice -n 10 venv/bin/gunicorn -c $QUAYCONF/gunicorn_verbs.py verbs:application
echo 'Gunicorn exited'

View file

@ -2,7 +2,10 @@
echo 'Starting gunicon'
cd /
venv/bin/gunicorn -c conf/gunicorn_web.py web:application
QUAYPATH=${QUAYPATH:-"."}
QUAYCONF=${QUAYCONF:-"$QUAYPATH/conf"}
cd ${QUAYDIR:-"/"}
PYTHONPATH=$QUAYPATH venv/bin/gunicorn -c $QUAYCONF/gunicorn_web.py web:application
echo 'Gunicorn exited'

View file

@ -1,12 +1,16 @@
#! /bin/bash
cd /
if [ -f conf/jwtproxy_conf.yaml ];
QUAYPATH=${QUAYPATH:-"."}
cd ${QUAYDIR:-"/"}
PYTHONPATH=$QUAYPATH
QUAYCONF=${QUAYCONF:-"$QUAYPATH/conf"}
if [ -f $QUAYCONF/jwtproxy_conf.yaml ];
then
echo 'Starting jwtproxy'
/usr/local/bin/jwtproxy --config conf/jwtproxy_conf.yaml
/usr/local/bin/jwtproxy --config $QUAYCONF/jwtproxy_conf.yaml
rm /tmp/jwtproxy_secscan.sock
echo 'Jwtproxy exited'
else
sleep 1
sleep 1
fi

View file

@ -2,7 +2,8 @@
echo 'Starting log rotation worker'
cd /
venv/bin/python -m workers.logrotateworker
QUAYPATH=${QUAYPATH:-"."}
cd ${QUAYDIR:-"/"}
PYTHONPATH=$QUAYPATH venv/bin/python -m workers.logrotateworker
echo 'Log rotation worker exited'

View file

@ -2,6 +2,11 @@
echo 'Starting nginx'
/usr/sbin/nginx -c /conf/nginx/nginx.conf
QUAYPATH=${QUAYPATH:-"."}
cd ${QUAYDIR:-"/"}
PYTHONPATH=$QUAYPATH
QUAYCONF=${QUAYCONF:-"$QUAYPATH/conf"}
/usr/sbin/nginx -c $QUAYCONF/nginx/nginx.conf
echo 'Nginx exited'

View file

@ -2,7 +2,9 @@
echo 'Starting notification worker'
cd /
venv/bin/python -m workers.notificationworker
QUAYPATH=${QUAYPATH:-"."}
cd ${QUAYDIR:-"/"}
PYTHONPATH=$QUAYPATH venv/bin/python -m workers.notificationworker
echo 'Notification worker exited'

View file

@ -2,7 +2,8 @@
echo 'Starting Queue cleanup worker'
cd /
venv/bin/python -m workers.queuecleanupworker 2>&1
QUAYPATH=${QUAYPATH:-"."}
cd ${QUAYDIR:-"/"}
PYTHONPATH=$QUAYPATH venv/bin/python -m workers.queuecleanupworker 2>&1
echo 'Repository Queue cleanup exited'

View file

@ -2,7 +2,8 @@
echo 'Starting repository action count worker'
cd /
venv/bin/python -m workers.repositoryactioncounter 2>&1
QUAYPATH=${QUAYPATH:-"."}
cd ${QUAYDIR:-"/"}
PYTHONPATH=$QUAYPATH venv/bin/python -m workers.repositoryactioncounter 2>&1
echo 'Repository action worker exited'

View file

@ -2,7 +2,8 @@
echo 'Starting security scanner notification worker'
cd /
venv/bin/python -m workers.security_notification_worker 2>&1
QUAYPATH=${QUAYPATH:-"."}
cd ${QUAYDIR:-"/"}
PYTHONPATH=$QUAYPATH venv/bin/python -m workers.security_notification_worker 2>&1
echo 'Security scanner notification worker exited'

View file

@ -2,7 +2,8 @@
echo 'Starting security scanner worker'
cd /
venv/bin/python -m workers.securityworker.securityworker 2>&1
QUAYPATH=${QUAYPATH:-"."}
cd ${QUAYDIR:-"/"}
PYTHONPATH=$QUAYPATH venv/bin/python -m workers.securityworker.securityworker 2>&1
echo 'Security scanner worker exited'

View file

@ -2,7 +2,8 @@
echo 'Starting service key worker'
cd /
venv/bin/python -m workers.service_key_worker 2>&1
QUAYPATH=${QUAYPATH:-"."}
cd ${QUAYDIR:-"/"}
PYTHONPATH=$QUAYPATH venv/bin/python -m workers.service_key_worker 2>&1
echo 'Service key worker exited'

View file

@ -2,7 +2,8 @@
echo 'Starting storage replication worker'
cd /
venv/bin/python -m workers.storagereplication 2>&1
QUAYPATH=${QUAYPATH:-"."}
cd ${QUAYDIR:-"/"}
PYTHONPATH=$QUAYPATH venv/bin/python -m workers.storagereplication 2>&1
echo 'Repository storage replication exited'

View file

@ -2,7 +2,8 @@
echo 'Starting team synchronization worker'
cd /
venv/bin/python -m workers.teamsyncworker 2>&1
QUAYPATH=${QUAYPATH:-"."}
cd ${QUAYDIR:-"/"}
PYTHONPATH=$QUAYPATH venv/bin/python -m workers.teamsyncworker 2>&1
echo 'Team synchronization worker exited'