Skip to content
Snippets Groups Projects
Commit fb2329e0 authored by Cristiano Urban's avatar Cristiano Urban
Browse files

First tests with to Rocky Linux 8 and Python 3.11.

parent eadb656d
Branches
Tags
No related merge requests found
......@@ -4,32 +4,11 @@
# SPDX-License-Identifier: GPL-3.0-or-later
#
# Use CentOS 7 as base image
FROM centos:7
# Use Rocky Linux 8.9 minimal as base image
FROM rockylinux:8.9-minimal
# Copy the repository file to the container
COPY vault.repo /root/vault.repo
# Update the system and install basic utilities
RUN yum-config-manager --disable base && \
yum-config-manager --disable updates && \
yum-config-manager --disable extras && \
cat /root/vault.repo >> /etc/yum.repos.d/Centos-Vault.repo && \
yum clean all && yum makecache
# Install epel repo
RUN yum update -y && yum -y install epel-release
# Install make, nano, openssh, wget, rsync, and cronie
RUN yum -y install make nano openssh-clients wget rsync cronie
# Install python 3.9.9
RUN yum -y install gcc openssl-devel bzip2-devel libffi-devel zlib-devel && \
wget https://www.python.org/ftp/python/3.9.9/Python-3.9.9.tgz && \
tar xzf Python-3.9.9.tgz && \
cd Python-3.9.9 && \
./configure --enable-optimizations && \
make altinstall && cd .. && rm Python-3.9.9.tgz
# Install epel repo, make, nano, openssh, wget, rsync, cronie, pip
RUN microdnf -y install epel-release make nano openssh-clients wget rsync cronie python3.11-pip
# Install redis, psycopg2, paramiko, scp, tabulate Python packages
RUN pip3.9 install --no-cache-dir redis hiredis psycopg2-binary paramiko scp tabulate
RUN pip3.11 install --no-cache-dir redis hiredis psycopg2-binary paramiko scp tabulate
[Vault-base]
name=Vault - CentOS-$releasever Base
baseurl=http://vault.centos.org/centos/$releasever/os/$basearch/
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-$releasever
[Vault-updates]
name=Vault - CentOS-$releasever Updates
baseurl=http://vault.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-$releasever
[Vault-extras]
name=Vault - CentOS-$releasever Extras
baseurl=http://vault.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-$releasever
......@@ -4,8 +4,8 @@
# SPDX-License-Identifier: GPL-3.0-or-later
#
# Use python 3.9.9-slim as base image
FROM python:3.9.9-slim
# Use python 3.11.7-slim as base image
FROM python:3.11.7-slim
# Install psql client to be able to connect manually to the file_catalog container
# Install also redis-tools to be able to access the redis container via redis-cli
......@@ -34,7 +34,7 @@ COPY config/vos_cli.conf.sample /etc/vos_cli/
RUN chmod -R 755 /etc/vos_cli
# Set the PAH environment variable
ENV PATH "$PATH:/usr/bin/vos_cli"
ENV PATH="$PATH:/usr/bin/vos_cli"
# Run commands as 'client' user
USER client
......@@ -50,4 +50,4 @@ RUN echo ". /usr/share/bash-completion/completions/vos_data" >> .bashrc && \
echo ". /usr/share/bash-completion/completions/vos_storage" >> .bashrc
# Install python dependencies
RUN pip3.9 install --no-cache-dir redis hiredis tabulate
RUN pip3.11 install --no-cache-dir redis hiredis tabulate
......@@ -7,7 +7,8 @@
version: '3.0'
services:
base:
image: git.ia2.inaf.it:5050/vospace/vospace-transfer-service/base
#image: git.ia2.inaf.it:5050/vospace/vospace-transfer-service/base
build: ./base
container_name: base
redis:
image: git.ia2.inaf.it:5050/vospace/vospace-transfer-service/cache
......@@ -20,7 +21,7 @@ services:
ports:
- "6379:6379"
postgres:
image: git.ia2.inaf.it:5050/vospace/vospace-file-catalog
#image: git.ia2.inaf.it:5050/vospace/vospace-file-catalog
#image: git.ia2.inaf.it:5050/vospace/vospace-staging/file-catalog
build: ../vospace-file-catalog
container_name: file_catalog
......@@ -31,16 +32,17 @@ services:
ports:
- "5432:5432"
transfer_service:
image: git.ia2.inaf.it:5050/vospace/vospace-transfer-service/transfer_service
#image: git.ia2.inaf.it:5050/vospace/vospace-transfer-service/transfer_service
build: ./transfer_service
volumes:
- ./conf/vos_ts.conf:/etc/vos_ts/vos_ts.conf
- local:/home
- hot_storage:/mnt/hot_storage/users
- redis_data:/redis_data
- "/home/${USER}/.ssh:/root/.ssh"
build: ./transfer_service
container_name: transfer_service
depends_on:
- base
- postgres
networks:
- backend_net
......@@ -48,7 +50,7 @@ services:
tty: true
command: ["./wait-for-it.sh", "postgres:5432", "--timeout=30", "--", "bash", "start.sh"]
client:
image: git.ia2.inaf.it:5050/vospace/vospace-transfer-service/client
#image: git.ia2.inaf.it:5050/vospace/vospace-transfer-service/client
volumes:
- ./conf/vos_cli.conf:/etc/vos_cli/vos_cli.conf
build: ./client
......
......@@ -5,7 +5,8 @@
#
# Use 'base' as base image
FROM git.ia2.inaf.it:5050/vospace/vospace-transfer-service/base
#FROM git.ia2.inaf.it:5050/vospace/vospace-transfer-service/base
FROM base
# Add 'server' user and set home folder and shell
RUN useradd -m -s /bin/bash server
......
......@@ -5,7 +5,8 @@
#
# Use 'base' as base image
FROM git.ia2.inaf.it:5050/vospace/vospace-transfer-service/base
#FROM git.ia2.inaf.it:5050/vospace/vospace-transfer-service/base
FROM base
# Create a new user called transfer_service, create the home directory and set the default shell
RUN useradd -m -s /bin/bash transfer_service
......
......@@ -15,4 +15,4 @@ do
chmod -R 755 /mnt/hot_storage/users/${user}
done
crond && /usr/local/bin/python3.9 transfer_service.py 2>&1 >> /var/log/vos_ts/error.log
crond && /usr/bin/python3.11 transfer_service.py 2>&1 >> /var/log/vos_ts/error.log
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment