1311 - remove buildmanager monit
This commit is contained in:
parent
40c0352dd1
commit
1ee2f0e3b2
5 changed files with 4 additions and 35 deletions
|
@ -52,7 +52,6 @@ RUN apt-get update && apt-get upgrade -y \
|
||||||
libsasl2-dev \
|
libsasl2-dev \
|
||||||
libsasl2-modules \
|
libsasl2-modules \
|
||||||
memcached \
|
memcached \
|
||||||
monit \
|
|
||||||
nginx \
|
nginx \
|
||||||
nodejs \
|
nodejs \
|
||||||
optipng \
|
optipng \
|
||||||
|
@ -93,7 +92,7 @@ COPY static/ package.json tsconfig.json webpack.config.js tslint.json yarn.lock
|
||||||
RUN yarn install --ignore-engines
|
RUN yarn install --ignore-engines
|
||||||
|
|
||||||
|
|
||||||
RUN mkdir -p /etc/my_init.d /etc/systlog-ng /usr/local/bin /etc/monit $QUAYDIR/static/fonts $QUAYDIR/static/ldn /usr/local/nginx/logs/
|
RUN mkdir -p /etc/my_init.d /etc/systlog-ng /usr/local/bin $QUAYDIR/static/fonts $QUAYDIR/static/ldn /usr/local/nginx/logs/
|
||||||
|
|
||||||
RUN rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /root/.cache
|
RUN rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /root/.cache
|
||||||
VOLUME ["/var/log", "/datastorage", "/tmp"]
|
VOLUME ["/var/log", "/datastorage", "/tmp"]
|
||||||
|
@ -130,11 +129,8 @@ RUN PYTHONPATH=$QUAYPATH venv/bin/python -m external_libraries
|
||||||
RUN curl -fsSL https://ip-ranges.amazonaws.com/ip-ranges.json -o util/ipresolver/aws-ip-ranges.json
|
RUN curl -fsSL https://ip-ranges.amazonaws.com/ip-ranges.json -o util/ipresolver/aws-ip-ranges.json
|
||||||
|
|
||||||
# Set up the init system
|
# Set up the init system
|
||||||
RUN mkdir -p /etc/my_init.d /etc/systlog-ng /usr/local/bin /etc/monit static/fonts static/ldn /usr/local/nginx/logs/ \
|
RUN mkdir -p /etc/my_init.d /etc/systlog-ng /usr/local/bin static/fonts static/ldn /usr/local/nginx/logs/ \
|
||||||
&& cp $QUAYCONF/init/syslog-ng.conf /etc/syslog-ng/ \
|
&& cp $QUAYCONF/init/syslog-ng.conf /etc/syslog-ng/ \
|
||||||
&& cp $QUAYCONF/kill-buildmanager.sh /usr/local/bin/kill-buildmanager.sh \
|
|
||||||
&& cp $QUAYCONF/monitrc /etc/monit/monitrc \
|
|
||||||
&& chmod 0600 /etc/monit/monitrc \
|
|
||||||
&& cp $QUAYCONF/init/logrotate.conf /etc/logrotate.conf \
|
&& cp $QUAYCONF/init/logrotate.conf /etc/logrotate.conf \
|
||||||
&& cp .git/HEAD GIT_HEAD \
|
&& cp .git/HEAD GIT_HEAD \
|
||||||
&& rm -rf /etc/service/syslog-forwarder
|
&& rm -rf /etc/service/syslog-forwarder
|
||||||
|
|
|
@ -2,13 +2,10 @@
|
||||||
|
|
||||||
echo 'Starting internal build manager'
|
echo 'Starting internal build manager'
|
||||||
|
|
||||||
# Run monit to ensure the build manager is restarted if/when it locks up.
|
|
||||||
monit
|
|
||||||
|
|
||||||
# Run the build manager.
|
# Run the build manager.
|
||||||
QUAYPATH=${QUAYPATH:-"."}
|
QUAYPATH=${QUAYPATH:-"."}
|
||||||
cd ${QUAYDIR:-"/"}
|
cd ${QUAYDIR:-"/"}
|
||||||
export PYTHONPATH=$QUAYPATH
|
export PYTHONPATH=$QUAYPATH
|
||||||
exec venv/bin/python -m buildman.builder 2>&1
|
exec venv/bin/python -m buildman.builder 2>&1
|
||||||
|
|
||||||
echo 'Internal build manager exited'
|
echo 'Internal build manager exited'
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
PID=$(cat /etc/service/buildmanager/supervise/pid)
|
|
||||||
gcore -o /tmp/buildman.core $PID
|
|
||||||
|
|
||||||
/usr/bin/sv kill /etc/service/buildmanager
|
|
17
conf/monitrc
17
conf/monitrc
|
@ -1,17 +0,0 @@
|
||||||
set daemon 10 with start delay 30
|
|
||||||
|
|
||||||
set httpd port 2812 and
|
|
||||||
use address localhost # only accept connection from localhost
|
|
||||||
allow localhost # allow localhost to connect to the server and
|
|
||||||
allow admin:monit # require user 'admin' with password 'monit'
|
|
||||||
|
|
||||||
check host buildmanager with address localhost
|
|
||||||
start program = "/usr/bin/sv start /etc/service/buildmanager" with timeout 10 seconds
|
|
||||||
stop program = "/usr/bin/sv kill /etc/service/buildmanager"
|
|
||||||
if failed port 8787 protocol http
|
|
||||||
request "/"
|
|
||||||
status = 405
|
|
||||||
with timeout 3 seconds
|
|
||||||
for 3 cycles
|
|
||||||
then restart
|
|
||||||
if 10 restarts within 10 cycles then timeout
|
|
|
@ -45,7 +45,6 @@ RUN apt-get update && apt-get upgrade -y \
|
||||||
libsasl2-dev \
|
libsasl2-dev \
|
||||||
libsasl2-modules \
|
libsasl2-modules \
|
||||||
memcached \
|
memcached \
|
||||||
monit \
|
|
||||||
nginx \
|
nginx \
|
||||||
nodejs \
|
nodejs \
|
||||||
optipng \
|
optipng \
|
||||||
|
@ -90,7 +89,7 @@ COPY static/ package.json tsconfig.json webpack.config.js tslint.json yarn.lock
|
||||||
RUN yarn install --ignore-engines
|
RUN yarn install --ignore-engines
|
||||||
|
|
||||||
|
|
||||||
RUN mkdir -p /etc/my_init.d /etc/systlog-ng /usr/local/bin /etc/monit $QUAYDIR/static/fonts $QUAYDIR/static/ldn /usr/local/nginx/logs/
|
RUN mkdir -p /etc/my_init.d /etc/systlog-ng /usr/local/bin $QUAYDIR/static/fonts $QUAYDIR/static/ldn /usr/local/nginx/logs/
|
||||||
|
|
||||||
COPY external_libraries.py _init.py ./
|
COPY external_libraries.py _init.py ./
|
||||||
|
|
||||||
|
|
Reference in a new issue