Skip to content

Commit 996b914

Browse files
author
root
committed
Fix Option A deployment to seed host directories before container start
- Add seed_testpoint_host_dirs.sh call to step_deploy_option_a() function - Update documentation to include seeding step for Option A (matching Option B) - Document that Option A now seeds /opt/perfsonar-tp/psconfig, /var/www/html, and /etc/apache2 - Bump perfSONAR-orchestrator.sh version to 1.0.2 - Update SHA256 checksum for perfSONAR-orchestrator.sh This fixes an issue where Option A containers would fail or run unhealthy because Apache configuration files were missing from /etc/apache2. The docker-compose.testpoint.yml already had bind mounts for these directories, but the orchestrator wasn't seeding them before the first container start.
1 parent 3231c52 commit 996b914

File tree

3 files changed

+49
-7
lines changed

3 files changed

+49
-7
lines changed

docs/perfsonar/tools_scripts/perfSONAR-orchestrator.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22
set -euo pipefail
3-
# Version: 1.0.1
3+
# Version: 1.0.2
44
# Author: Shawn McKee, University of Michigan
55
# Acknowledgements: Supported by IRIS-HEP and OSG-LHC
66

@@ -255,7 +255,7 @@ EOF"
255255
}
256256

257257
step_deploy_option_a() {
258-
run mkdir -p /opt/perfsonar-tp/psconfig
258+
run /opt/perfsonar-tp/tools_scripts/seed_testpoint_host_dirs.sh
259259
run bash -c "curl -fsSL https://raw.githubusercontent.com/osg-htc/networking/master/docs/perfsonar/tools_scripts/docker-compose.testpoint.yml -o /opt/perfsonar-tp/docker-compose.yml"
260260
run bash -c "cd /opt/perfsonar-tp && podman-compose up -d"
261261
run podman ps

docs/perfsonar/tools_scripts/scripts.sha256

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ dfbdd6abe4f99a9196376de16d92648a0327d1667ddbb1d5d4a354f04e33ce8f fasterdata-tun
1010
d4db26fadfa22c2ad5788b70f361740d4e224e949ceb9873121b40f10d370ac1 perfSONAR-auto-enroll-psconfig.sh
1111
c591cb47a478706921ffcd6317baa7ce33ad2ec5e9f61fefde67b029cf6fa312 perfSONAR-extract-lsregistration.sh
1212
51db72f7a2398f1836ee0faba4bc8c0cd745473fa3518933abe0dc16a533f047 perfSONAR-install-nftables.sh
13-
ffe155b820782155312a813c42dcadd45e41a883b91d1c58cd0233d5c5274b67 perfSONAR-orchestrator.sh
13+
6359eb68bfcfa5849b0b26308fa91f4ffb7269a295762ddaf1d63cb110b0cc08 perfSONAR-orchestrator.sh
1414
cbf8aed3b49d46cb007ee692051008c76113e1c22fc269f53849ba7ed646cb47 perfSONAR-pbr-nm.sh
1515
80086418ced033d28bd5976795ff4a90ab644b8fc38a8a048c99673422d812bb perfSONAR-update-lsregistration.sh
1616
bedd3dc88debd85605613922d3b35d4b25f5655edfb824e71aacb3d6a9924dc0 repair-state-json.sh

docs/personas/quick-deploy/install-perfsonar-testpoint.md

Lines changed: 46 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -500,20 +500,62 @@ You may want to document any site-specific exceptions (e.g., additional allowed
500500
501501
Run the official testpoint image using Podman (or Docker). Choose one of the two deployment modes:
502502
503-
- **Option A:** Testpoint only (simplest) — only bind-mount `/opt/perfsonar-tp/psconfig` for pSConfig.
503+
- **Option A:** Testpoint only (simplest) — bind-mounts `/opt/perfsonar-tp/psconfig`, `/var/www/html`, and `/etc/apache2` for Apache and pSConfig.
504504
505505
- **Option B:** Testpoint + Let’s Encrypt — two containers that share Apache files and certs via host bind mounts.
506506
507507
Use `podman-compose` (or `docker-compose`) in the examples below.
508508
509509
### Option A — Testpoint only (simplest)
510510
511-
Prepare the pSConfig directory and a minimal compose file. No other host bind-mounts are required.
511+
#### 1) Seed required host directories (REQUIRED before first compose up)
512+
513+
**Why seed?** The perfsonar-testpoint container requires baseline configuration files from the image to be present on
514+
the host filesystem. Without seeding, the bind-mounted directories would be empty, causing Apache and perfSONAR services
515+
to fail.
516+
517+
**What's seeded:**
518+
519+
- `/opt/perfsonar-tp/psconfig` — perfSONAR pSConfig files (baseline remotes and archives)
520+
521+
- `/var/www/html` — Apache webroot with index.html (required for healthcheck)
522+
523+
- `/etc/apache2` — Apache config including `sites-available/default-ssl.conf`
524+
525+
Run the bundled seeding helper script (automatically installed in Step 2):
526+
527+
```bash
528+
/opt/perfsonar-tp/tools_scripts/seed_testpoint_host_dirs.sh
529+
```
530+
531+
??? info "Seed script details"
532+
533+
- Pulls the latest perfSONAR testpoint image
534+
- Creates temporary containers to extract baseline files
535+
- Copies content to host directories
536+
- Verifies seeding was successful
537+
- Skips seeding if directories already have content (idempotent)
538+
539+
Verify seeding succeeded:
512540
513541
```bash
514-
mkdir -p /opt/perfsonar-tp/psconfig
542+
# Should show config files
543+
ls -la /opt/perfsonar-tp/psconfig
544+
545+
# Should show index.html and perfsonar/ directory
546+
ls -la /var/www/html
547+
548+
# Should show sites-available/, sites-enabled/, etc.
549+
ls -la /etc/apache2
515550
```
516551
552+
??? tip "SELinux labeling handled automatically"
553+
554+
If SELinux is enforcing, the `:Z` and `:z` options in the compose files will cause Podman to relabel the host paths when
555+
containers start. No manual `chcon` commands are required.
556+
557+
#### 2) Deploy the container
558+
517559
Download a ready-made compose file (or copy it manually): Browse: [repo
518560
view](https://github.com/osghtc/networking/blob/master/docs/perfsonar/tools_scripts/docker-compose.testpoint.yml)
519561
@@ -541,7 +583,7 @@ The container should show `healthy` status. The healthcheck monitors Apache HTTP
541583
542584
Manage pSConfig files under `/opt/perfsonar-tp/psconfig` on the host; they are consumed by the container at `/etc/perfsonar/psconfig`.
543585
544-
#### Ensure containers restart automatically on reboot (systemd unit for testpoint - REQUIRED)
586+
#### 3) Ensure containers restart automatically on reboot (systemd unit for testpoint - REQUIRED)
545587
546588
!!! warning "podman-compose limitation with systemd containers"
547589

0 commit comments

Comments
 (0)