Skip to content

Commit

Permalink
[#473] Update docker test framework for iRODS 4.3.3.
Browse files Browse the repository at this point in the history
- Bumps default installation of iRODS to 4.3.3
- Bumps base OS used in Dockerfiles to Ubuntu 22.04
- Modernizes Dockerfiles
  • Loading branch information
korydraughn committed Aug 27, 2024
1 parent 597d2e5 commit 02ce465
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 31 deletions.
45 changes: 35 additions & 10 deletions docker-test-framework/4-3/Dockerfile.consumer
Original file line number Diff line number Diff line change
@@ -1,30 +1,55 @@
#
# iRODS Consumer Image.
#
FROM ubuntu:20.04
ARG DEBIAN_FRONTEND=noninteractive
FROM ubuntu:22.04

# TODO: Remove this line when apt gets its stuff together
RUN sed --in-place --regexp-extended "s/(\/\/)(archive\.ubuntu)/\1nl.\2/" /etc/apt/sources.list
SHELL ["/bin/bash", "-c"]
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update && \
apt-get install -y sudo wget less lsb-release apt-transport-https netcat gnupg2
# Re-enable apt caching for RUN --mount
RUN rm -f /etc/apt/apt.conf.d/docker-clean && \
echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache

ARG irods_package_version=4.3.1-0~focal
# Make sure we're starting with an up-to-date image
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt-get update && \
apt-get upgrade -y && \
apt-get autoremove -y --purge && \
rm -rf /tmp/*
# To mark all installed packages as manually installed:
# #apt-mark showauto | xargs -r apt-mark manual

RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt-get update && \
apt-get install -y \
sudo \
wget \
less \
lsb-release \
apt-transport-https \
netcat \
gnupg2 \
&& \
rm -rf /tmp/*

ARG irods_package_version=4.3.3-0~jammy
RUN wget -qO - https://packages.irods.org/irods-signing-key.asc | apt-key add -; \
echo "deb [arch=amd64] https://packages.irods.org/apt/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/renci-irods.list; \
apt-get update && \
apt-get install -y \
irods-runtime=${irods_package_version} \
irods-icommands=${irods_package_version} \
irods-server=${irods_package_version}
irods-server=${irods_package_version} \
&& \
rm -rf /tmp/*

EXPOSE 1247 1248

# Configure rsyslog for iRODS.
COPY irods.rsyslog /etc/rsyslog.d/00-irods.conf

# Set command to execute when launching the container.
ADD start_consumer.sh irods_consumer.input /
RUN chmod u+x /start_consumer.sh
COPY --chmod=755 start_consumer.sh irods_consumer.input /
ENTRYPOINT ["./start_consumer.sh"]
57 changes: 43 additions & 14 deletions docker-test-framework/4-3/Dockerfile.provider
Original file line number Diff line number Diff line change
@@ -1,39 +1,68 @@
#
# iRODS Provider Image.
#
FROM ubuntu:20.04
ARG DEBIAN_FRONTEND=noninteractive
FROM ubuntu:22.04

# TODO: Remove this line when apt gets its stuff together
RUN sed --in-place --regexp-extended "s/(\/\/)(archive\.ubuntu)/\1nl.\2/" /etc/apt/sources.list
SHELL ["/bin/bash", "-c"]
ENV DEBIAN_FRONTEND=noninteractive

# Re-enable apt caching for RUN --mount
RUN rm -f /etc/apt/apt.conf.d/docker-clean && \
echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache

# Make sure we're starting with an up-to-date image
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt-get update && \
apt-get upgrade -y && \
apt-get autoremove -y --purge && \
rm -rf /tmp/*
# To mark all installed packages as manually installed:
# #apt-mark showauto | xargs -r apt-mark manual

# Install pre-requisites
RUN apt-get update && \
apt-get install -y sudo wget lsb-release apt-transport-https postgresql vim python3-pip libfuse2 unixodbc rsyslog less gnupg2 && \
pip3 install xmlrunner
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt-get update && \
apt-get install -y \
sudo \
wget \
lsb-release \
apt-transport-https \
postgresql \
vim \
python3-pip \
libfuse2 \
unixodbc \
rsyslog \
less \
gnupg2 \
&& \
pip3 install xmlrunner && \
rm -rf /tmp/*

# Setup catalog database
ADD db_commands.txt /
COPY db_commands.txt /
RUN service postgresql start && su - postgres -c 'psql -f /db_commands.txt'

ARG irods_package_version=4.3.1-0~focal
ARG irods_package_version=4.3.3-0~jammy
RUN wget -qO - https://packages.irods.org/irods-signing-key.asc | apt-key add -; \
echo "deb [arch=amd64] https://packages.irods.org/apt/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/renci-irods.list; \
apt-get update && \
apt-get install -y \
irods-runtime=${irods_package_version} \
irods-icommands=${irods_package_version} \
irods-server=${irods_package_version} \
irods-database-plugin-postgres=${irods_package_version}
irods-database-plugin-postgres=${irods_package_version} \
&& \
rm -rf /tmp/*

EXPOSE 1247 1248

# Configure rsyslog for iRODS.
COPY irods.rsyslog /etc/rsyslog.d/00-irods.conf

# Set command to execute when launching the container.
ADD start_provider.sh /
ADD testsetup-consortium.sh /
RUN chmod +x /testsetup-consortium.sh
RUN chmod u+x /start_provider.sh
COPY --chmod=755 start_provider.sh /
COPY --chmod=755 testsetup-consortium.sh /
ENTRYPOINT ["./start_provider.sh"]
11 changes: 8 additions & 3 deletions docker-test-framework/4-3/Dockerfile.testbuild
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,13 @@
FROM maven:3.6.3-jdk-11

RUN apt-get update && \
apt-get install -y sudo wget nano
apt-get install -y \
sudo \
wget \
nano \
vim \
&& \
rm -rf /tmp/*

CMD sleep 2147483647d


CMD tail -f /dev/null
6 changes: 2 additions & 4 deletions docker-test-framework/4-3/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
version: '3'

services:
irods-catalog-provider:
container_name: irods-catalog-provider
build:
context: .
dockerfile: Dockerfile.provider
args:
irods_package_version: 4.3.2-0~focal
irods_package_version: 4.3.3-0~jammy
hostname: icat.example.org
healthcheck:
test: ["CMD", "su", "-", "irods", "-c", "ils"]
Expand All @@ -31,7 +29,7 @@ services:
context: .
dockerfile: Dockerfile.consumer
args:
irods_package_version: 4.3.2-0~focal
irods_package_version: 4.3.3-0~jammy
hostname: resource1.example.org
networks:
irodsnet:
Expand Down

0 comments on commit 02ce465

Please sign in to comment.