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
67 changes: 62 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ on:

env:
WILDFLY_VERSION: 39.0.1.Final
TEST_CLASS: StickySessionTest,SslFailoverTest
TEST_CLASS: StickySessionTest,SslFailoverTest,SslCrlTest
MOD_PROXY_CLUSTER_REPO: https://github.com/modcluster/mod_proxy_cluster.git

jobs:
test:
Expand All @@ -27,10 +28,10 @@ jobs:
name: "${{ matrix.balancer }} / ${{ matrix.os }} / JDK ${{ matrix.java }}"

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
java-version: ${{ matrix.java }}
distribution: temurin
Expand All @@ -51,14 +52,70 @@ jobs:
run: mvn -B test -Pnative -Dtest=${{ env.TEST_CLASS }} -DexcludedGroups=none -Dbalancer.type=${{ matrix.balancer }} -Dwildfly.version=${{ env.WILDFLY_VERSION }}

- name: Publish test results
uses: mikepenz/action-junit-report@v5
uses: mikepenz/action-junit-report@v6
if: always()
with:
report_paths: '**/target/surefire-reports/*.xml'

- name: Upload surefire reports
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
if: failure()
with:
name: surefire-reports-${{ matrix.os }}-${{ matrix.balancer }}-jdk${{ matrix.java }}
path: target/surefire-reports/

native-httpd:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
java: ['17', '21']

name: "native httpd / ubuntu / JDK ${{ matrix.java }}"

steps:
- uses: actions/checkout@v6

- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v5
with:
java-version: ${{ matrix.java }}
distribution: temurin
cache: 'maven'

- name: Install httpd and build dependencies
run: |
sudo apt-get update
sudo apt-get install -y apache2-dev libapr1-dev libaprutil1-dev cmake gcc

- name: Build mod_proxy_cluster modules
run: |
git clone --depth 1 ${{ env.MOD_PROXY_CLUSTER_REPO }} target/mod_proxy_cluster
cmake -S target/mod_proxy_cluster/native -B target/mod_proxy_cluster/native/build -DCMAKE_BUILD_TYPE=Debug
make -C target/mod_proxy_cluster/native/build -j$(nproc)

- name: Download WildFly via Maven
run: mvn -B generate-test-resources -Pdownload-wildfly -Dwildfly.version=${{ env.WILDFLY_VERSION }} -DskipTests

- name: Run tests
run: |
mvn -B test -Pnative \
-Dtest=${{ env.TEST_CLASS }} \
-DexcludedGroups=none \
-Dbalancer.type=httpd \
-Dhttpd.home=/usr \
-Dhttpd.modules.path=${{ github.workspace }}/target/mod_proxy_cluster/native/build/modules \
-Dwildfly.version=${{ env.WILDFLY_VERSION }}

- name: Publish test results
uses: mikepenz/action-junit-report@v6
if: always()
with:
report_paths: '**/target/surefire-reports/*.xml'

- name: Upload surefire reports
uses: actions/upload-artifact@v7
if: failure()
with:
name: surefire-reports-native-httpd-jdk${{ matrix.java }}
path: target/surefire-reports/
58 changes: 54 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,41 @@ Run tests without Docker/Podman by starting WildFly and httpd as local OS proces
# Undertow balancer (default)
mvn test -Pnative -Dwildfly.zip.path=distributions/wildfly-39.0.1.Final.zip

# httpd balancer
# httpd balancer (JBCS ZIP)
mvn test -Pnative -Dbalancer.type=httpd \
-Dwildfly.zip.path=distributions/wildfly-39.0.1.Final.zip \
-Dhttpd.zip.path=distributions/jbcs-httpd24-2.4.62-win-x86_64.zip
```

#### System httpd (no ZIP required)

You can use a system-installed httpd instead of a JBCS ZIP. This requires building
mod_proxy_cluster modules from source.

**Prerequisites** (Fedora/RHEL):
```bash
sudo dnf install httpd httpd-devel apr-devel apr-util-devel mod_ssl cmake gcc
```

**Prerequisites** (Debian/Ubuntu):
```bash
sudo apt-get install apache2-dev libapr1-dev libaprutil1-dev cmake gcc
```

**Build mod_proxy_cluster modules:**
```bash
git clone --depth 1 https://github.com/modcluster/mod_proxy_cluster.git target/mod_proxy_cluster
cmake -S target/mod_proxy_cluster/native -B target/mod_proxy_cluster/native/build -DCMAKE_BUILD_TYPE=Debug
make -C target/mod_proxy_cluster/native/build -j$(nproc)
```

**Run tests:**
```bash
mvn test -Pnative -Dbalancer.type=httpd \
-Dhttpd.home=/usr \
-Dhttpd.modules.path=$PWD/target/mod_proxy_cluster/native/build/modules
```

The `-Pnative` profile sets `-Dtest.mode=native` and excludes `@Tag("docker")` and `@Tag("soak")` tests. See [TESTING.md](TESTING.md) for details on port allocation and server lifecycle.

### Run specific test class
Expand Down Expand Up @@ -354,9 +383,13 @@ This is transparent to the tests — JGroups handles internal session replicatio
- **Without ZIP**: Falls back to a pre-built image (placeholder: `quay.io/modcluster/mod_cluster-undertow:latest` — does not exist yet, provide your own via `-Dbalancer.undertow.image=`)
- Customizable via `-Dbalancer.undertow.image=`
- **httpd balancer**:
- **With httpd ZIP** (`-Dhttpd.zip.path=`): Builds from a pre-built httpd ZIP (e.g. JBCS). Auto-detects RHEL version from ZIP filename for the base image.
- **Without ZIP**: Builds httpd from source and compiles mod_proxy_cluster modules (uses `fedora:42` as base)
- **Pre-built image**: Override with `-Dbalancer.httpd.image=` to skip building entirely
- **Docker mode** (default):
- **With httpd ZIP** (`-Dhttpd.zip.path=`): Builds from a pre-built httpd ZIP (e.g. JBCS). Auto-detects RHEL version from ZIP filename for the base image.
- **Without ZIP**: Builds httpd from source and compiles mod_proxy_cluster modules (uses `fedora:42` as base)
- **Pre-built image**: Override with `-Dbalancer.httpd.image=` to skip building entirely
- **Native mode**:
- **System httpd** (`-Dhttpd.home=/usr`): Uses system-installed httpd with externally-built mod_proxy_cluster modules (`-Dhttpd.modules.path=`)
- **JBCS ZIP** (`-Dhttpd.zip.path=`): Extracts and runs directly as a local process

### ZIP Distribution Priority
1. System property: `-Dwildfly.zip.path=/path/to/wildfly.zip`
Expand All @@ -376,6 +409,23 @@ Default fallback images (when no ZIP provided). The `quay.io/modcluster/` images

In practice, always provide a WildFly/EAP ZIP — the fallback images are not published.

## Configuration Properties

| Property | Mode | Default | Description |
|---|---|---|---|
| `test.mode` | All | `docker` | `docker` or `native` |
| `balancer.type` | All | `undertow` | `undertow` or `httpd` |
| `wildfly.zip.path` | All | auto-detect in `distributions/` | Path to WildFly/EAP ZIP |
| `wildfly.version` | Docker | — | WildFly version to download from Maven Central |
| `httpd.home` | Native | derived from ZIP extraction | Path to httpd installation root (e.g. `/usr`) |
| `httpd.zip.path` | Both | auto-detect in `distributions/` | Path to JBCS httpd ZIP |
| `httpd.connectors.zip.path` | Native | auto-detect alongside httpd ZIP | Path to JBCS connectors ZIP |
| `httpd.modules.path` | Native | `httpdHome/modules` | Directory containing mod_proxy_cluster `.so` files |
| `httpd.version` | Docker | `2.4.66` | httpd version for Docker source build |
| `balancer.httpd.image` | Docker | built automatically | Custom Docker image for httpd balancer |
| `balancer.undertow.image` | Docker | built from WildFly ZIP | Custom Docker image for Undertow balancer |
| `mod.proxy.cluster.repo.url` | Docker | `https://github.com/modcluster/mod_proxy_cluster.git` | mod_proxy_cluster source repo |

## Contributing

When adding new tests:
Expand Down
20 changes: 20 additions & 0 deletions distributions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,26 @@ To test with specific versions, either:
- Keep only one ZIP in this directory
- Use `-Dwildfly.zip.path=` to specify explicitly

## httpd Distributions (Native Mode)

For native httpd testing, you can either use a JBCS ZIP or the system httpd.

### JBCS ZIP
Place the httpd ZIP and optionally the connectors ZIP here:
- `jbcs-httpd24-httpd-*.zip` — JBCS httpd distribution
- `jbcs-httpd24-webserver-connectors-*.zip` — mod_proxy_cluster modules (auto-detected alongside httpd ZIP)

```bash
mvn test -Pnative -Dbalancer.type=httpd \
-Dhttpd.zip.path=distributions/jbcs-httpd24-httpd-2.4.62-RHEL8-x86_64.zip
```

Or set explicitly: `-Dhttpd.connectors.zip.path=distributions/jbcs-httpd24-webserver-connectors-*.zip`

### System httpd
No ZIP needed — use `-Dhttpd.home=/usr` with mod_proxy_cluster modules built from source.
See the main [README.md](../README.md#system-httpd-no-zip-required) for build instructions.

## .gitignore

ZIP files in this directory are ignored by git (they're typically large).
Expand Down
Loading
Loading