Warning, /panda-server/Dockerfile is written in an unsupported language. File is not indexed.
0001 # To build the unified JEDI and PanDA server image, run the following command from the root of the repository:
0002 # docker build .
0003
0004 FROM ghcr.io/pandawms/panda-base-platform:latest
0005
0006 RUN mkdir /tmp/src
0007 WORKDIR /tmp/src
0008 COPY . .
0009
0010 RUN /opt/panda/bin/pip install --no-cache-dir .[postgres,oracle,mcp]
0011 RUN /opt/panda/bin/pip install --no-cache-dir rucio-clients
0012 RUN /opt/panda/bin/pip install --no-cache-dir "git+https://github.com/PanDAWMS/panda-cacheschedconfig.git"
0013 RUN ln -s /opt/panda/lib/python*/site-packages/mod_wsgi/server/mod_wsgi*.so /etc/httpd/modules/mod_wsgi.so
0014 # Remove the default OS ssl.conf which references a non-existent localhost.crt and conflicts with panda's SSL config
0015 RUN rm -f /etc/httpd/conf.d/ssl.conf
0016
0017 WORKDIR /
0018 RUN rm -rf /tmp/src
0019
0020 RUN mkdir -p /etc/panda
0021 RUN mkdir -p /etc/idds
0022 RUN mv /opt/panda/etc/panda/panda_common.cfg.rpmnew /etc/panda/panda_common.cfg
0023 RUN mv /opt/panda/etc/panda/panda_server.cfg.rpmnew /etc/panda/panda_server.cfg
0024 RUN mv /opt/panda/etc/panda/sysconfig/panda_server.sysconfig.rpmnew /etc/sysconfig/panda_server
0025 RUN mv /opt/panda/etc/panda/panda_server-httpd.conf.rpmnew /opt/panda/etc/panda/panda_server-httpd.conf
0026 RUN mv /opt/panda/etc/panda/panda_jedi.cfg.rpmnew /etc/panda/panda_jedi.cfg
0027 RUN mv /opt/panda/etc/panda/sysconfig/panda_jedi /etc/sysconfig/panda_jedi
0028
0029 RUN mkdir -p /etc/rc.d/init.d
0030 RUN ln -s /opt/panda/etc/rc.d/init.d/panda_jedi /etc/rc.d/init.d/panda-jedi
0031 RUN ln -s /opt/panda/etc/rc.d/init.d/panda_server /etc/rc.d/init.d/httpd-pandasrv
0032 RUN ln -s /opt/panda/etc/rc.d/init.d/panda_mcp /etc/rc.d/init.d/panda-mcp
0033
0034 RUN mkdir -p /data/atlpan
0035 RUN mkdir -p /data/panda
0036 RUN mkdir -p /var/log/panda/wsgisocks
0037 RUN mkdir -p /var/log/panda/pandacache
0038 RUN mkdir -p /var/log/panda/pandacache/jedilog
0039 RUN mkdir -p /var/cache/pandaserver/schedconfig
0040 RUN mkdir -p /var/run/panda
0041 RUN mkdir -p /var/cric
0042 RUN mkdir -p /run/httpd/wsgisocks
0043 RUN chown -R atlpan:zp /var/log/panda
0044
0045 RUN ln -fs /opt/panda/etc/cert/hostkey.pem /etc/grid-security/hostkey.pem
0046 RUN ln -fs /opt/panda/etc/cert/hostcert.pem /etc/grid-security/hostcert.pem
0047 RUN ln -fs /opt/panda/etc/cert/chain.pem /etc/grid-security/chain.pem
0048
0049 RUN ln -fs /data/panda/idds.cfg /opt/panda/etc/idds/idds.cfg
0050 RUN ln -fs /data/panda/rucio.cfg /opt/panda/etc/rucio.cfg
0051 RUN ln -fs /data/panda/panda_mbproxy_config.json /opt/panda/etc/panda/panda_mbproxy_config.json
0052 RUN ln -s /etc/sysconfig/panda_server /opt/panda/etc/panda/panda_server.sysconfig
0053 RUN ln -fs /data/panda/jedi_mq_config.json /opt/panda/etc/panda/jedi_mq_config.json
0054 RUN ln -fs /data/panda/jedi_msg_proc_config.json /opt/panda/etc/panda/jedi_msg_proc_config.json
0055 RUN ln -fs /data/panda/panda_mbproxy_config.json /opt/panda/etc/panda/panda_mbproxy_config.json
0056
0057 # to run with non-root PID
0058 RUN mkdir -p /etc/grid-security/certificates
0059 RUN chmod -R 777 /etc/grid-security/certificates
0060
0061 RUN chmod -R 777 /data/panda
0062 RUN chmod -R 777 /data/atlpan
0063 RUN chmod -R 777 /home/atlpan
0064 RUN chmod -R 777 /run/httpd
0065 RUN chmod -R 777 /var/log/panda
0066 RUN chmod -R 777 /var/lock
0067 RUN chmod -R 777 /var/log/panda/pandacache
0068 RUN chmod -R 777 /var/run/panda
0069 RUN chmod -R 777 /var/lib/logrotate
0070 RUN chmod -R 777 /var/cric
0071 RUN chmod -R 777 /var/cache/pandaserver
0072
0073 # to have trf files under /var/trf/user
0074 RUN mkdir -p /var/trf/user
0075
0076 RUN mkdir /tmp/panda-wnscript && cd /tmp/panda-wnscript && \
0077 git clone https://github.com/PanDAWMS/panda-wnscript.git && \
0078 cp -R panda-wnscript/dist/* /var/trf/user/ && \
0079 cd / && rm -rf /tmp/panda-wnscript
0080
0081 ENV PANDA_LOCK_DIR=/var/run/panda
0082 RUN mkdir -p ${PANDA_LOCK_DIR} && chmod 777 ${PANDA_LOCK_DIR}
0083
0084 # make a wrapper script to launch services and periodic jobs in non-root container
0085 RUN echo $'#!/bin/bash \n\
0086 set -m \n\
0087 /data/panda/init-panda \n\
0088 /data/panda/run-panda-crons & \n\
0089 /etc/rc.d/init.d/httpd-pandasrv start \n ' > /etc/rc.d/init.d/run-panda-services
0090
0091 RUN chmod +x /etc/rc.d/init.d/run-panda-services
0092
0093 # make a wrapper script to launch services and periodic jobs in non-root container
0094 RUN echo $'#!/bin/bash \n\
0095 set -m \n\
0096 /data/panda/init-jedi \n\
0097 /data/panda/run-jedi-crons & \n\
0098 /etc/rc.d/init.d/panda-jedi start \n ' > /etc/rc.d/init.d/run-jedi-services
0099
0100 RUN chmod +x /etc/rc.d/init.d/run-jedi-services
0101
0102 CMD ["sleep", "infinity"]
0103
0104 EXPOSE 25080 25443 25888