Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,21 @@ For each combination of supported OS platform/version and database type/version,
- ubuntu:20.04
- ubuntu:22.04
- ubuntu:24.04
- ubuntu:26.04

The following database Docker image tags are currently supported (although not for all platforms):
- postgres:14
- postgres:16
- postgres:17
- postgres:18
- mariadb:10.6
- mariadb:10.11
- mariadb:11.4
- mariadb:11.8
- mariadb:12.3
- mysql:8.0
- mysql:8.4
- mysql:9.7

## Requirements

Expand Down
2 changes: 1 addition & 1 deletion install.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
logging.debug('provided project name [{0}], docker-compose project name [{1}]'
.format(args.project_name, ctx.compose_project.name))

if len(ctx.compose_project.containers()) is 0:
if len(ctx.compose_project.containers()) == 0:
logging.critical(
'no containers found for project [directory=[{0}], name=[{1}]]'.format(
os.path.abspath(project_directory), ctx.compose_project.name))
Expand Down
2 changes: 1 addition & 1 deletion irods_testing_environment/install/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def get_list_of_package_paths(self, package_directory, package_name_list=None):

glob_list = glob.glob(glob_str)

if len(glob_list) is 0:
if len(glob_list) == 0:
raise RuntimeError('no packages found [{}]'.format(glob_str))

# TODO: allow specifying a suffix or something instead of taking everything
Expand Down
2 changes: 1 addition & 1 deletion irods_testing_environment/irods_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -1179,7 +1179,7 @@ def setup_irods_catalog_consumers(ctx,
service_names=[context.irods_catalog_consumer_service()])

if consumer_service_instances:
if len(consumer_service_instances) is 0:
if len(consumer_service_instances) == 0:
logging.warning('empty list of iRODS catalog service consumers to set up')
return

Expand Down
127 changes: 116 additions & 11 deletions irods_testing_environment/odbc_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,33 @@ def configure_odbc_driver_ubuntu_2404_postgres_17(csp_container, odbc_driver):
"""
configure_postgres_odbc_driver(csp_container, odbc_driver)

def configure_odbc_driver_ubuntu_2604_postgres_16(csp_container, odbc_driver):
"""Configure ODBC driver for postgres 16 on ubuntu 26.04.

Argument:
csp_container -- docker container on which the iRODS catalog service provider is running
odbc_driver -- path to local archive file containing the ODBC driver package
"""
configure_postgres_odbc_driver(csp_container, odbc_driver)

def configure_odbc_driver_ubuntu_2604_postgres_17(csp_container, odbc_driver):
"""Configure ODBC driver for postgres 17 on ubuntu 26.04.

Argument:
csp_container -- docker container on which the iRODS catalog service provider is running
odbc_driver -- path to local archive file containing the ODBC driver package
"""
configure_postgres_odbc_driver(csp_container, odbc_driver)

def configure_odbc_driver_ubuntu_2604_postgres_18(csp_container, odbc_driver):
"""Configure ODBC driver for postgres 18 on ubuntu 26.04.

Argument:
csp_container -- docker container on which the iRODS catalog service provider is running
odbc_driver -- path to local archive file containing the ODBC driver package
"""
configure_postgres_odbc_driver(csp_container, odbc_driver)

def configure_odbc_driver_debian_11_postgres_14(csp_container, odbc_driver):
"""Configure ODBC driver for postgres 14 on debian 11.

Expand Down Expand Up @@ -416,6 +443,19 @@ def configure_odbc_driver_mysql_84(csp_container, odbc_driver):

configure_mysql_odbc_driver(csp_container, os.path.abspath(odbc_driver))

def configure_odbc_driver_mysql_97(csp_container, odbc_driver):
"""Configure ODBC driver for mysql 9.7.

Argument:
csp_container -- docker container on which the iRODS catalog service provider is running
odbc_driver -- path to local archive file containing the ODBC driver package
"""
if not odbc_driver:
odbc_driver = download_mysql_odbc_driver(
'https://dev.mysql.com/get/Downloads/Connector-ODBC/9.7/mysql-connector-odbc-9.7.0-linux-glibc2.28-x86-64bit.tar.gz')

configure_mysql_odbc_driver(csp_container, os.path.abspath(odbc_driver))

def configure_odbc_driver_ubuntu_2004_mysql_80(csp_container, odbc_driver):
"""Configure ODBC driver for mysql 8.0 on ubuntu 20.04.

Expand Down Expand Up @@ -461,6 +501,24 @@ def configure_odbc_driver_ubuntu_2404_mysql_84(csp_container, odbc_driver):
"""
configure_odbc_driver_mysql_84(csp_container, odbc_driver)

def configure_odbc_driver_ubuntu_2604_mysql_84(csp_container, odbc_driver):
"""Configure ODBC driver for mysql 8.4 on ubuntu 26.04.

Argument:
csp_container -- docker container on which the iRODS catalog service provider is running
odbc_driver -- path to local archive file containing the ODBC driver package
"""
configure_odbc_driver_mysql_84(csp_container, odbc_driver)

def configure_odbc_driver_ubuntu_2604_mysql_97(csp_container, odbc_driver):
"""Configure ODBC driver for mysql 9.7 on ubuntu 26.04.

Argument:
csp_container -- docker container on which the iRODS catalog service provider is running
odbc_driver -- path to local archive file containing the ODBC driver package
"""
configure_odbc_driver_mysql_97(csp_container, odbc_driver)

def configure_odbc_driver_debian_11_mysql_80(csp_container, odbc_driver):
"""Configure ODBC driver for mysql 8.0 on debian 11.

Expand Down Expand Up @@ -695,7 +753,7 @@ def configure_odbc_driver_ubuntu_2004_mariadb(csp_container, odbc_driver):
configure_mariadb_odbc_driver_apt(
csp_container,
odbc_driver,
'https://downloads.mariadb.com/Connectors/odbc/connector-odbc-3.2.2/mariadb-connector-odbc-3.2.2-ubu2004-amd64.deb')
'https://dlm.mariadb.com/4275270/Connectors/odbc/connector-odbc-3.2.6/mariadb-connector-odbc_3.2.6-1+maria~focal_amd64.deb')

def configure_odbc_driver_ubuntu_2004_mariadb_106(csp_container, odbc_driver):
"""Configure ODBC driver for mariadb 10.6 on ubuntu 20.04.
Expand Down Expand Up @@ -725,7 +783,7 @@ def configure_odbc_driver_ubuntu_2204_mariadb(csp_container, odbc_driver):
configure_mariadb_odbc_driver_apt(
csp_container,
odbc_driver,
'https://downloads.mariadb.com/Connectors/odbc/connector-odbc-3.2.2/mariadb-connector-odbc-3.2.2-ubu2204-amd64.deb')
'https://dlm.mariadb.com/4785854/Connectors/odbc/connector-odbc-3.2.9/codbc-amd64-ubuntu-22.04/mariadb-connector-odbc_3.2.9-1+maria~jammy_amd64.deb')

def configure_odbc_driver_ubuntu_2204_mariadb_106(csp_container, odbc_driver):
"""Configure ODBC driver for mariadb 10.6 on ubuntu 22.04.
Expand Down Expand Up @@ -764,7 +822,7 @@ def configure_odbc_driver_ubuntu_2404_mariadb(csp_container, odbc_driver):
configure_mariadb_odbc_driver_apt(
csp_container,
odbc_driver,
'https://downloads.mariadb.com/Connectors/odbc/connector-odbc-3.2.6/mariadb-connector-odbc_3.2.6-1+maria~noble_amd64.deb')
'https://dlm.mariadb.com/4785795/Connectors/odbc/connector-odbc-3.2.9/codbc-amd64-ubuntu-24.04/mariadb-connector-odbc_3.2.9-1+maria~noble_amd64.deb')

def configure_odbc_driver_ubuntu_2404_mariadb_1011(csp_container, odbc_driver):
"""Configure ODBC driver for mariadb 10.11 on ubuntu 24.04.
Expand Down Expand Up @@ -793,6 +851,55 @@ def configure_odbc_driver_ubuntu_2404_mariadb_118(csp_container, odbc_driver):
"""
configure_odbc_driver_ubuntu_2404_mariadb(csp_container, odbc_driver)

def configure_odbc_driver_ubuntu_2604_mariadb(csp_container, odbc_driver):
"""Configure ODBC driver for mariadb on ubuntu 26.04.

Argument:
csp_container -- docker container on which the iRODS catalog service provider is running
odbc_driver -- path to local archive file containing the ODBC driver package
"""
configure_mariadb_odbc_driver_apt(
csp_container,
odbc_driver,
# TODO(#303): Update to a package for 26.04 when one is available
'https://dlm.mariadb.com/4785795/Connectors/odbc/connector-odbc-3.2.9/codbc-amd64-ubuntu-24.04/mariadb-connector-odbc_3.2.9-1+maria~noble_amd64.deb')

def configure_odbc_driver_ubuntu_2604_mariadb_1011(csp_container, odbc_driver):
"""Configure ODBC driver for mariadb 10.11 on ubuntu 26.04.

Argument:
csp_container -- docker container on which the iRODS catalog service provider is running
odbc_driver -- path to local archive file containing the ODBC driver package
"""
configure_odbc_driver_ubuntu_2604_mariadb(csp_container, odbc_driver)

def configure_odbc_driver_ubuntu_2604_mariadb_114(csp_container, odbc_driver):
"""Configure ODBC driver for mariadb 11.4 on ubuntu 26.04.

Argument:
csp_container -- docker container on which the iRODS catalog service provider is running
odbc_driver -- path to local archive file containing the ODBC driver package
"""
configure_odbc_driver_ubuntu_2604_mariadb(csp_container, odbc_driver)

def configure_odbc_driver_ubuntu_2604_mariadb_118(csp_container, odbc_driver):
"""Configure ODBC driver for mariadb 11.8 on ubuntu 26.04.

Argument:
csp_container -- docker container on which the iRODS catalog service provider is running
odbc_driver -- path to local archive file containing the ODBC driver package
"""
configure_odbc_driver_ubuntu_2604_mariadb(csp_container, odbc_driver)

def configure_odbc_driver_ubuntu_2604_mariadb_123(csp_container, odbc_driver):
"""Configure ODBC driver for mariadb 12.3 on ubuntu 26.04.

Argument:
csp_container -- docker container on which the iRODS catalog service provider is running
odbc_driver -- path to local archive file containing the ODBC driver package
"""
configure_odbc_driver_ubuntu_2604_mariadb(csp_container, odbc_driver)

def configure_odbc_driver_debian_11_mariadb(csp_container, odbc_driver):
"""Configure ODBC driver for mariadb on debian 11.

Expand All @@ -803,7 +910,7 @@ def configure_odbc_driver_debian_11_mariadb(csp_container, odbc_driver):
configure_mariadb_odbc_driver_apt(
csp_container,
odbc_driver,
'https://downloads.mariadb.com/Connectors/odbc/connector-odbc-3.2.2/mariadb-connector-odbc-3.2.2-deb11-amd64.deb')
'https://dlm.mariadb.com/4785819/Connectors/odbc/connector-odbc-3.2.9/codbc-amd64-debian-11/mariadb-connector-odbc_3.2.9-1+maria~bullseye_amd64.deb')

def configure_odbc_driver_debian_11_mariadb_106(csp_container, odbc_driver):
"""Configure ODBC driver for mariadb 10.6 debian 11.
Expand Down Expand Up @@ -833,7 +940,7 @@ def configure_odbc_driver_debian_12_mariadb(csp_container, odbc_driver):
configure_mariadb_odbc_driver_apt(
csp_container,
odbc_driver,
'https://downloads.mariadb.com/Connectors/odbc/connector-odbc-3.2.6/mariadb-connector-odbc_3.2.6-1+maria~bookworm_amd64.deb')
'https://dlm.mariadb.com/4785802/Connectors/odbc/connector-odbc-3.2.9/codbc-amd64-debian-12/mariadb-connector-odbc_3.2.9-1+maria~bookworm_amd64.deb')

def configure_odbc_driver_debian_12_mariadb_1011(csp_container, odbc_driver):
"""Configure ODBC driver for mariadb 10.11 debian 12.
Expand Down Expand Up @@ -872,8 +979,7 @@ def configure_odbc_driver_debian_13_mariadb(csp_container, odbc_driver):
configure_mariadb_odbc_driver_apt(
csp_container,
odbc_driver,
# Package is for Debian 12
'https://downloads.mariadb.com/Connectors/odbc/connector-odbc-3.2.6/mariadb-connector-odbc_3.2.6-1+maria~bookworm_amd64.deb')
'https://dlm.mariadb.com/4785812/Connectors/odbc/connector-odbc-3.2.9/codbc-amd64-debian-13/mariadb-connector-odbc_3.2.9-1+maria~trixie_amd64.deb')

def configure_odbc_driver_debian_13_mariadb_114(csp_container, odbc_driver):
"""Configure ODBC driver for mariadb 11.4 debian 13.
Expand Down Expand Up @@ -903,7 +1009,7 @@ def configure_odbc_driver_el_8_mariadb(csp_container, odbc_driver):
configure_mariadb_odbc_driver_dnf(
csp_container,
odbc_driver,
'https://downloads.mariadb.com/Connectors/odbc/connector-odbc-3.2.2/mariadb-connector-odbc-3.2.2-rhel8-amd64.rpm')
'https://dlm.mariadb.com/4785777/Connectors/odbc/connector-odbc-3.2.9/codbc-amd64-rhel-8/mariadb-connector-odbc-3.2.9-1.el8.x86_64.rpm')

def configure_odbc_driver_almalinux_8_mariadb_106(csp_container, odbc_driver):
"""Configure ODBC driver for mariadb 10.6 almalinux 8.
Expand Down Expand Up @@ -969,7 +1075,7 @@ def configure_odbc_driver_el_9_mariadb(csp_container, odbc_driver):
configure_mariadb_odbc_driver_dnf(
csp_container,
odbc_driver,
'https://downloads.mariadb.com/Connectors/odbc/connector-odbc-3.2.6/mariadb-connector-odbc-3.2.6-1.el9.x86_64.rpm')
'https://dlm.mariadb.com/4785763/Connectors/odbc/connector-odbc-3.2.9/codbc-amd64-rhel-9/mariadb-connector-odbc-3.2.9-1.el9.x86_64.rpm')

def configure_odbc_driver_almalinux_9_mariadb_1011(csp_container, odbc_driver):
"""Configure ODBC driver for mariadb 10.11 almalinux 9.
Expand Down Expand Up @@ -1035,8 +1141,7 @@ def configure_odbc_driver_el_10_mariadb(csp_container, odbc_driver):
configure_mariadb_odbc_driver_dnf(
csp_container,
odbc_driver,
# package is for EL9
'https://downloads.mariadb.com/Connectors/odbc/connector-odbc-3.2.6/mariadb-connector-odbc-3.2.6-1.el9.x86_64.rpm')
'https://dlm.mariadb.com/4785863/Connectors/odbc/connector-odbc-3.2.9/codbc-amd64-rhel-10/mariadb-connector-odbc-3.2.9-1.el10.x86_64.rpm')

def configure_odbc_driver_almalinux_10_mariadb_114(csp_container, odbc_driver):
"""Configure ODBC driver for mariadb 11.4 almalinux 10.
Expand Down
2 changes: 1 addition & 1 deletion irods_testing_environment/test_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def run(self, fail_fast=True, options=None, **kwargs):
try:
f.result()

if tr.rc is 0 and len(tr.failed_tests()) is 0:
if tr.rc == 0 and len(tr.failed_tests()) == 0:
logging.error(f'[{tr.name()}]: tests completed successfully')
else:
logging.error(f'[{tr.name()}]: some tests failed')
Expand Down
2 changes: 1 addition & 1 deletion irods_testing_environment/test_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def run(self, test_queue, fail_fast=True, **kwargs):

logging.info(f'[{self.name()}]: cmd [{ec}] [{cmd}]')

if ec is 0:
if ec == 0:
self.passed_tests().append((t, duration))
logging.error(f'[{self.name()}]: test passed [[{duration:>9.4f}]s] [{t or "all tests"}]')

Expand Down
81 changes: 81 additions & 0 deletions projects/ubuntu-26.04/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
FROM ubuntu:26.04

# BASE_IMAGE_TAG must always match the image name for this build stage (the argument to the FROM instruction above).
ENV BASE_IMAGE_TAG=ubuntu:26.04

SHELL [ "/bin/bash", "-c" ]
ENV DEBIAN_FRONTEND=noninteractive

# Make sure we're starting with an up-to-date image
RUN apt-get update && \
apt-get upgrade -y && \
apt-get autoremove -y --purge && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/*

RUN apt-get update && \
apt-get install -y \
apt-transport-https \
ca-certificates \
gnupg \
wget \
lsb-release \
&& \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/*

RUN wget -qO - https://packages.irods.org/irods-signing-key.asc | \
gpg \
--no-options \
--no-default-keyring \
--no-auto-check-trustdb \
--homedir /dev/null \
--no-keyring \
--import-options import-export \
--output /etc/apt/keyrings/renci-irods-archive-keyring.pgp \
--import \
&& \
echo "deb [signed-by=/etc/apt/keyrings/renci-irods-archive-keyring.pgp arch=amd64] https://packages.irods.org/apt/ resolute main" | \
tee /etc/apt/sources.list.d/renci-irods.list && \
wget -qO - https://core-dev.irods.org/irods-core-dev-signing-key.asc | \
gpg \
--no-options \
--no-default-keyring \
--no-auto-check-trustdb \
--homedir /dev/null \
--no-keyring \
--import-options import-export \
--output /etc/apt/keyrings/renci-irods-core-dev-archive-keyring.pgp \
--import \
&& \
echo "deb [signed-by=/etc/apt/keyrings/renci-irods-core-dev-archive-keyring.pgp arch=amd64] https://core-dev.irods.org/apt/ resolute main" | \
tee /etc/apt/sources.list.d/renci-irods-core-dev.list

RUN apt-get update && \
apt-get install -y \
libcurl4-gnutls-dev \
procps \
python3 \
python3-distro \
python3-jsonschema \
python3-lxml \
python3-pip \
python3-psutil \
python3-requests \
python3-setuptools \
rsyslog \
systemd \
unixodbc \
&& \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/*

# Installing packages via pip in Ubuntu 24.04 is more strict than before. Given
# this is for testing purposes, we remove the file which blocks pip from touching
# system packages. See https://peps.python.org/pep-0668/ for details.
RUN rm /usr/lib/python3.*/EXTERNALLY-MANAGED && \
python3 -m pip --no-cache-dir install 'unittest-xml-reporting'

RUN mkdir -p /irods_testing_environment_mount_dir && chmod 777 /irods_testing_environment_mount_dir

ENTRYPOINT ["bash", "-c", "until false; do sleep 2147483647d; done"]
Loading
Loading