Alan King
Senior Software Developer
iRODS Consortium

iRODS Development and Testing Environments (v8)
iRODS Development and Testing Environments (v8)
November 13-18, 2022
Supercomputing 2022
Dallas, Texas USA
Overview

- Motivation
- History
- Limitations of the past
- Development Environment
- Testing Environment
- Future Work
Motivation

Passing tests build confidence in the changes developers make to software, asserting the correctness of the changes and of the entire system.
Therefore, building and testing iRODS should be easy and consistent for everybody.
History of Build-and-Test Systems at iRODS

- v1 - July 2011: Python → Node.js → RabbitMQ → Celery → Eucalyptus
- v2 - October 2012: Python → Node.js → ssh → OpenStack
- v3 - January 2013: Hudson → Python → OpenStack
- v4 - October 2013: Hudson → Python → vSphere long-running VMs
- v5 - Spring 2015: Jenkins → Python → Ansible → zone_bundles → vSphere dynamic VMs
- v6 - Spring 2017: Jenkins → Python → vSphere dynamic VMs → build/test hooks
- v7 - Summer 2019: Docker → Jenkins → Python → Docker → build/test hooks
Limitations of the past

- Tied to Jenkins
- Everybody is required to be an administrator
- Relatively inflexible
- Difficult to maintain
- Difficult to manage test results and built package output
- Docker image explosion (one tag per test run(!))
Bottom line: Our needs as developers and project maintainers were not being met satisfactorily.
Basic Build-and-Test Workflow

source code
↓
↓
packages
↓
↓
test results
run tests
build packages
v8 - 2021/2022

source code
↓
↓
packages
↓
↓
test results
irods_testing_environment
irods_development_environment
iRODS Development Environment

https://github.com/irods/irods_development_environment
Containerized package builders for iRODS, plugins, and externals for all supported OS's, plus debugging tools.
- Builds local code and produces local packages
- Runs the standard build process(es) in containers
Advantages:
- No repeated cloning or copying repositories required
- Developer makes edits with preferred local tools
- Build cache allows for faster iteration
- Consistent process for development and release
iRODS Development Environment: Example Usage

$ docker run --rm \
-v ${irods_sourcedir}:/irods_source:ro \
-v ${irods_builddir}:/irods_build \
-v ${icommands_sourcedir}:/icommands_source:ro \
-v ${icommands_builddir}:/icommands_build \
-v ${irods_packagedir}:/irods_packages \
-v ${externals_packagedir}:/irods_externals_packages \
irods-core-builder-m:${PLATFORM}-${VERSION}
Run a Docker container that builds packages
- Volume mounts for source code (input)
- Volume mount for build cache and built packages (output)
- Use separate Docker image tags for each OS/version
- Optionally use custom iRODS externals packages
v8 - 2021/2022

source code
↓
↓
packages
↓
↓
test results
irods_testing_environment
irods_development_environment
iRODS Testing Environment

https://github.com/irods/irods_testing_environment
Scripts built on python library which uses Docker Compose to stand up iRODS zones in various configurations and run tests.
- Local scripts execute commands in long-running containers
- Uses local or released packages and create local test results
- Scripts can run tests or just stand up iRODS zone(s)
Advantages:
- Precision controls for running tests in parallel
- Convenient way to reproduce issues
- Consistent process for bench and automated testing
iRODS Testing Environment: Capabilities

- Stand up long-running, topological iRODS zone(s)
- stand_it_up.py - stand up a zone
- federate.py - stand up and federate multiple zones
- Run iRODS tests in various configurations
- run_core_tests.py - run iRODS server tests
- run_unit_tests.py - run unit tests for iRODS libraries
- run_topology_tests.py - run tests on multi-server zone
- run_federation_tests.py - run tests in federated zones
- run_plugin_tests.py - run tests for iRODS plugins
iRODS Testing Environment: Running Tests

$ python run_core_tests.py \ --project-directory projects/ubuntu-20.04/ubuntu-20.04-postgres-10.12 \ --irods-package-directory ~/hdd/builds/irods_packages/4-3-stable/ubuntu-20.04 \ --concurrent-test-executor-count 4
- Stand up 4 iRODS zones using locally built packages
- Distribute the test suite between the zones and run each set in parallel
- Copy test results and log files to host machine
- Tear down the 4 zones and remove containers
Basic Build-and-Test Workflow

source code
↓
↓
packages
↓
↓
test results
irods_testing_environment
irods_development_environment
Future Work and Dreams

- Web application
- Automation/CI
- Client build/test
- Environment reproduction (zone report)
- Execution environment agnosticism (Docker, podman, VMs)
- Orchestration
Bonus: irods_demo

https://github.com/irods/irods_demo
Docker Compose project which runs the following services:
- iRODS catalog provider (plus database)
- iRODS C++ REST Client (plus nginx reverse-proxy)
- iRODS Zone Management Tool
- Metalnx
- NFSRODS
While less flexible than the testing environment, irods_demo has proven useful in several POCs (and, obviously, demonstrations).

We are seeking community participation!
Please give it a whirl and let us know how it goes.

Thanks for listening
SC22 - iRODS Development and Testing Environments (v8)
By Alan King
SC22 - iRODS Development and Testing Environments (v8)
- 1,195