Back to home page

EIC code displayed by LXR

 
 

    


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 
0015 WORKDIR /
0016 RUN rm -rf /tmp/src
0017 
0018 RUN mkdir -p /etc/panda
0019 RUN mkdir -p /etc/idds
0020 RUN mv /opt/panda/etc/panda/panda_common.cfg.rpmnew /etc/panda/panda_common.cfg
0021 RUN mv /opt/panda/etc/panda/panda_server.cfg.rpmnew /etc/panda/panda_server.cfg
0022 RUN mv /opt/panda/etc/panda/sysconfig/panda_server.sysconfig.rpmnew /etc/sysconfig/panda_server
0023 RUN mv /opt/panda/etc/panda/panda_server-httpd.conf.rpmnew /opt/panda/etc/panda/panda_server-httpd.conf
0024 RUN mv /opt/panda/etc/panda/panda_jedi.cfg.rpmnew /etc/panda/panda_jedi.cfg
0025 RUN mv /opt/panda/etc/panda/sysconfig/panda_jedi /etc/sysconfig/panda_jedi
0026 
0027 RUN mkdir -p /etc/rc.d/init.d
0028 RUN ln -s /opt/panda/etc/rc.d/init.d/panda_jedi /etc/rc.d/init.d/panda-jedi
0029 RUN ln -s /opt/panda/etc/rc.d/init.d/panda_server /etc/rc.d/init.d/httpd-pandasrv
0030 RUN ln -s /opt/panda/etc/rc.d/init.d/panda_mcp /etc/rc.d/init.d/panda-mcp
0031 
0032 RUN mkdir -p /data/atlpan
0033 RUN mkdir -p /data/panda
0034 RUN mkdir -p /var/log/panda/wsgisocks
0035 RUN mkdir -p /var/log/panda/pandacache
0036 RUN mkdir -p /var/log/panda/pandacache/jedilog
0037 RUN mkdir -p /var/cache/pandaserver/schedconfig
0038 RUN mkdir -p /var/run/panda
0039 RUN mkdir -p /var/cric
0040 RUN mkdir -p /run/httpd/wsgisocks
0041 RUN chown -R atlpan:zp /var/log/panda
0042 
0043 RUN ln -fs /opt/panda/etc/cert/hostkey.pem /etc/grid-security/hostkey.pem
0044 RUN ln -fs /opt/panda/etc/cert/hostcert.pem /etc/grid-security/hostcert.pem
0045 RUN ln -fs /opt/panda/etc/cert/chain.pem /etc/grid-security/chain.pem
0046 
0047 RUN ln -fs /data/panda/idds.cfg /opt/panda/etc/idds/idds.cfg
0048 RUN ln -fs /data/panda/rucio.cfg /opt/panda/etc/rucio.cfg
0049 RUN ln -fs /data/panda/panda_mbproxy_config.json /opt/panda/etc/panda/panda_mbproxy_config.json
0050 RUN ln -s /etc/sysconfig/panda_server /opt/panda/etc/panda/panda_server.sysconfig
0051 RUN ln -fs /data/panda/jedi_mq_config.json /opt/panda/etc/panda/jedi_mq_config.json
0052 RUN ln -fs /data/panda/jedi_msg_proc_config.json /opt/panda/etc/panda/jedi_msg_proc_config.json
0053 RUN ln -fs /data/panda/panda_mbproxy_config.json /opt/panda/etc/panda/panda_mbproxy_config.json
0054 
0055 # to run with non-root PID
0056 RUN mkdir -p /etc/grid-security/certificates
0057 RUN chmod -R 777 /etc/grid-security/certificates
0058 
0059 RUN chmod -R 777 /data/panda
0060 RUN chmod -R 777 /data/atlpan
0061 RUN chmod -R 777 /home/atlpan
0062 RUN chmod -R 777 /run/httpd
0063 RUN chmod -R 777 /var/log/panda
0064 RUN chmod -R 777 /var/lock
0065 RUN chmod -R 777 /var/log/panda/pandacache
0066 RUN chmod -R 777 /var/run/panda
0067 RUN chmod -R 777 /var/lib/logrotate
0068 RUN chmod -R 777 /var/cric
0069 RUN chmod -R 777 /var/cache/pandaserver
0070 
0071 # to have trf files under /var/trf/user
0072 RUN mkdir -p /var/trf/user
0073 
0074 RUN mkdir /tmp/panda-wnscript && cd /tmp/panda-wnscript && \
0075     git clone https://github.com/PanDAWMS/panda-wnscript.git && \
0076     cp -R panda-wnscript/dist/* /var/trf/user/ && \
0077     cd / && rm -rf /tmp/panda-wnscript
0078 
0079 ENV PANDA_LOCK_DIR=/var/run/panda
0080 RUN mkdir -p ${PANDA_LOCK_DIR} && chmod 777 ${PANDA_LOCK_DIR}
0081 
0082 # make a wrapper script to launch services and periodic jobs in non-root container
0083 RUN echo $'#!/bin/bash \n\
0084 set -m \n\
0085 /data/panda/init-panda \n\
0086 /data/panda/run-panda-crons & \n\
0087 /etc/rc.d/init.d/httpd-pandasrv start \n ' > /etc/rc.d/init.d/run-panda-services
0088 
0089 RUN chmod +x /etc/rc.d/init.d/run-panda-services
0090 
0091 # make a wrapper script to launch services and periodic jobs in non-root container
0092 RUN echo $'#!/bin/bash \n\
0093 set -m \n\
0094 /data/panda/init-jedi \n\
0095 /data/panda/run-jedi-crons & \n\
0096 /etc/rc.d/init.d/panda-jedi start \n ' > /etc/rc.d/init.d/run-jedi-services
0097 
0098 RUN chmod +x /etc/rc.d/init.d/run-jedi-services
0099 
0100 CMD ["sleep", "infinity"]
0101 
0102 EXPOSE 25080 25443 25888