Skip to content

Commit

Permalink
Merge pull request rucio#126 from tbeerman/master
Browse files Browse the repository at this point in the history
remove py2 dev Dockerfile + fix proxy for new docker-compose
  • Loading branch information
tbeerman authored Mar 19, 2021
2 parents e86f6db + cbad203 commit 0bf2c25
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 185 deletions.
123 changes: 44 additions & 79 deletions dev/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,122 +13,87 @@
# limitations under the License.
#
# Authors:
# - Thomas Beermann <thomas.beermann@cern.ch>, 2017-2019
# - Thomas Beermann <thomas.beermann@cern.ch>, 2017-2021
# - Vincent Garonne <vgaronne@gmail.com>, 2017-2019
# - Cedric Serfon <cedric.serfon@cern.ch>, 2017
# - Frank Berghaus <frank.berghaus@cern.ch>, 2017-2018
# - Mario Lassnig <mario.lassnig@cern.ch>, 2019

FROM centos:7

RUN yum -y update
RUN yum install -y epel-release
RUN yum install -y \
gcc \
httpd \
mod_ssl \
mod_auth_kerb \
mod_wsgi \
python \
python-pip \
python-devel \
gmp-devel \
krb5-devel \
git \
openssl-devel \
gridsite \
which \
libaio \
memcached \
nmap-ncat \
gfal2-all \
gfal2-util \
fts-rest-cli \
xrootd-client \
multitail \
vim
RUN yum clean all
RUN yum -y install epel-release && \
yum -y install https://repo.ius.io/ius-release-el7.rpm && \
yum -y install gcc httpd mod_ssl mod_auth_kerb python36u-pip python36-devel python36-mod_wsgi python36-m2crypto gmp-devel krb5-devel git openssl-devel gridsite which libaio memcached nmap-ncat gfal2-all gfal2-util gfal2-python3 fts-rest-cli xrootd-client multitail vim && \
yum clean all && \
rm -rf /var/cache/yum

RUN git clone https://github.com/rucio/rucio.git /tmp/rucio

ENV RUCIOHOME=/opt/rucio
RUN mkdir -p $RUCIOHOME
RUN mkdir -p $RUCIOHOME/etc/multi_vo/tst/etc
RUN mkdir -p $RUCIOHOME/etc/multi_vo/ts2/etc
RUN mkdir -p $RUCIOHOME && \
mkdir -p $RUCIOHOME/etc/multi_vo/tst/etc && \
mkdir -p $RUCIOHOME/etc/multi_vo/ts2/etc
WORKDIR $RUCIOHOME
RUN mkdir -p \
bin \
etc \
lib/rucio \
tools

RUN pip install --upgrade pip
RUN pip install --upgrade setuptools
RUN rm -rf /usr/lib/python2.7/site-packages/ipaddress*
RUN pip install -r /tmp/rucio/etc/pip-requires-client
RUN pip install -r /tmp/rucio/etc/pip-requires
RUN pip install -r /tmp/rucio/etc/pip-requires-test
RUN pip install psycopg2-binary
RUN ln -s $RUCIOHOME/lib/rucio /usr/lib/python2.7/site-packages/rucio
RUN python3 -m pip install --upgrade pip && \
python3 -m pip install --upgrade setuptools && \
rm -rf /usr/lib/python3.6/site-packages/ipaddress* && \
python3 -m pip install -r /tmp/rucio/etc/pip-requires-client && \
python3 -m pip install -r /tmp/rucio/etc/pip-requires && \
python3 -m pip install -r /tmp/rucio/etc/pip-requires-test && \
python3 -m pip install psycopg2-binary && \
ln -s $RUCIOHOME/lib/rucio /usr/local/lib/python3.6/site-packages/rucio

COPY .pep8 .pep8
COPY .flake8 .flake8
COPY pylintrc etc/pylintrc
RUN cp -r /tmp/rucio/etc .
RUN cp -r /tmp/rucio/tools .
RUN cp -r /tmp/rucio/etc . && \
cp -r /tmp/rucio/tools . && \
mkdir /var/log/rucio /var/log/rucio/trace && \
chmod -R 777 /var/log/rucio

RUN mkdir /var/log/rucio /var/log/rucio/trace
RUN chmod -R 777 /var/log/rucio

COPY rucio.cfg $RUCIOHOME/etc/rucio.cfg
COPY rucio.cfg alembic.ini google-cloud-storage-test.json $RUCIOHOME/etc/
COPY rucio_multi_vo_tst.cfg $RUCIOHOME/etc/multi_vo/tst/etc/rucio.cfg
COPY rucio_multi_vo_ts2.cfg $RUCIOHOME/etc/multi_vo/ts2/etc/rucio.cfg
COPY alembic.ini $RUCIOHOME/etc/alembic.ini
COPY aliases-py27.conf $RUCIOHOME/etc/web/aliases-py27.conf
COPY ui-aliases-py27.conf $RUCIOHOME/etc/web/ui-aliases-py27.conf
COPY google-cloud-storage-test.json $RUCIOHOME/etc/google-cloud-storage-test.json
COPY aliases-py27.conf ui-aliases-py27.conf $RUCIOHOME/etc/web/
COPY certs/rucio_ca.pem /etc/grid-security/certificates/5fca1cb1.0

COPY 00-mpm.conf /etc/httpd/conf.modules.d/00-mpm.conf
COPY httpd.conf /etc/httpd/conf/httpd.conf
COPY rucio.conf /etc/httpd/conf.d/rucio.conf
COPY certs/ruciouser.pem $RUCIOHOME/etc/usercert.pem
COPY certs/ruciouser.key.pem $RUCIOHOME/etc/userkey.pem
COPY certs/ruciouser.certkey.pem $RUCIOHOME/etc/usercertkey.pem
COPY certs/usercert.pem certs/userkey.pem certs/usercertkey.pem $RUCIOHOME/etc/
RUN chmod 0400 $RUCIOHOME/etc/userkey.pem

COPY certs/hostcert_rucio.pem /etc/grid-security/hostcert.pem
COPY certs/hostcert_rucio.key.pem /etc/grid-security/hostkey.pem
RUN chmod 0400 /etc/grid-security/hostkey.pem

RUN chmod 777 /var/log/rucio/trace
RUN rm -rf $RUCIOHOME/tools
RUN mkdir -p $RUCIOHOME/tools
RUN mkdir -p /etc/httpd
RUN echo "" > /etc/httpd/conf.d/ssl.conf &&\
echo "" > /etc/httpd/conf.d/autoindex.conf &&\
echo "" > /etc/httpd/conf.d/userdir.conf &&\
echo "" > /etc/httpd/conf.d/welcome.conf &&\
RUN chmod 0400 /etc/grid-security/hostkey.pem && \
chmod 777 /var/log/rucio/trace && \
rm -rf $RUCIOHOME/tools && \
mkdir -p $RUCIOHOME/tools && \
mkdir -p /etc/httpd && \
echo "" > /etc/httpd/conf.d/ssl.conf && \
echo "" > /etc/httpd/conf.d/autoindex.conf && \
echo "" > /etc/httpd/conf.d/userdir.conf && \
echo "" > /etc/httpd/conf.d/welcome.conf && \
echo "" > /etc/httpd/conf.d/zgridsite.conf

RUN rm -r /tmp/rucio

COPY logshow /usr/local/bin/logshow
RUN chmod +x /usr/local/bin/logshow

COPY restartweb /usr/local/bin/restartweb
RUN chmod +x /usr/local/bin/restartweb

COPY run_daemons /usr/local/bin/run_daemons
RUN chmod +x /usr/local/bin/run_daemons
COPY create_monit_data /usr/local/bin/create_monit_data
RUN chmod +x /usr/local/bin/create_monit_data

RUN mkdir $RUCIOHOME/etc/dashboards
COPY dashboards/* $RUCIOHOME/etc/dashboards/
RUN chmod +x $RUCIOHOME/etc/dashboards/import_dashboards.sh
COPY logshow restartweb run_daemons create_monit_data /usr/local/bin/
COPY monit-entrypoint.sh /monit-entrypoint.sh
RUN chmod +x /monit-entrypoint.sh
COPY dashboards/* $RUCIOHOME/etc/dashboards/

RUN rm -r /tmp/rucio && \
chmod +x /usr/local/bin/logshow && \
chmod +x /usr/local/bin/restartweb && \
chmod +x /usr/local/bin/run_daemons && \
chmod +x /usr/local/bin/create_monit_data && \
chmod +x $RUCIOHOME/etc/dashboards/import_dashboards.sh && \
chmod +x /monit-entrypoint.sh && \
ln -fs /usr/bin/python3 /usr/bin/python

EXPOSE 443

Expand Down
102 changes: 0 additions & 102 deletions dev/Dockerfile_py3

This file was deleted.

8 changes: 4 additions & 4 deletions dev/rucio.conf
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ WSGIApplicationGroup rucio

SSLProxyEngine On
SSLProxyCheckPeerCN Off
ProxyPass /proxy https://rucio
ProxyPassReverse /proxy https://rucio
ProxyPass /authproxy https://rucio
ProxyPassReverse /authproxy https://rucio
ProxyPass /proxy https://localhost
ProxyPassReverse /proxy https://localhost
ProxyPass /authproxy https://localhost
ProxyPassReverse /authproxy https://localhost

</VirtualHost>

0 comments on commit 0bf2c25

Please sign in to comment.