-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile.autoreducer
43 lines (34 loc) · 1.52 KB
/
Dockerfile.autoreducer
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
FROM registry.access.redhat.com/ubi9/ubi
# install various dependencies
RUN dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
RUN dnf updateinfo
RUN dnf install -y procps-ng python3-numpy # pgrep is used for health check, numpy for high memory test
# Inspection tools
RUN dnf install -y vim
# rpm needs to special groups first
RUN groupadd snswheel
RUN useradd snsdata -G snswheel
# put the developer configuration file in place
RUN mkdir -p /etc/autoreduce/
RUN mkdir -p /opt/postprocessing/log/
ARG CONFIG_FILE=tests/configuration/post_process_consumer.conf
COPY ${CONFIG_FILE} /etc/autoreduce/post_processing.conf
# install postprocessing
RUN dnf install -y https://github.com/neutrons/post_processing_agent/releases/download/v3.3.2/postprocessing-3.3.2-1.el9.noarch.rpm
# install the fake test data
ARG DATA_TARBALL=/tmp/SNSdata.tar.gz
COPY SNSdata.tar.gz ${DATA_TARBALL}
RUN ls ${DATA_TARBALL}
RUN mkdir /SNS
RUN cd /SNS && tar xzf ${DATA_TARBALL}
# add fake ONCat ingest scripts
RUN touch /opt/postprocessing/scripts/oncat_ingest.py && \
touch /opt/postprocessing/scripts/oncat_reduced_ingest.py
# create startup script
RUN echo "#!/bin/bash" > /usr/bin/run_postprocessing && \
echo "/opt/postprocessing/queueProcessor.py &" >> /usr/bin/run_postprocessing && \
echo "sleep 1" >> /usr/bin/run_postprocessing && \
echo "tail -F /opt/postprocessing/log/postprocessing.log" >> /usr/bin/run_postprocessing && \
chmod +x /usr/bin/run_postprocessing
# start the service
CMD run_postprocessing