Skip to content

Build cluster & configure cluster updates#51

Open
cnealen wants to merge 10 commits intodevelopmentfrom
fix/configure-cluster-updates
Open

Build cluster & configure cluster updates#51
cnealen wants to merge 10 commits intodevelopmentfrom
fix/configure-cluster-updates

Conversation

@cnealen
Copy link
Copy Markdown
Contributor

@cnealen cnealen commented Feb 10, 2026

Summary

  • build_cluster.sh: Per-repo image source/branch selection, commit hash support for feature builds, forcing type selection (--forcing-types=bmi,sfincs), improved error handling and dependency tag prompting
  • configure_cluster.sh: Refactored to focus on initial cluster setup/configuration (AWS creds, static files, env config), separated from image build operations
  • full_cleanup_cluster.sh: New cleanup script to reset cluster state (remove repos, containers, Docker images, cron jobs)
  • showLatestReleaseTags.sh: Updated to show latest tag across scanned repos

Changes

build_cluster.sh

  • Added --branch=REPO:REF for per-repo branch/commit hash specification
  • Added --branch-default=REF for global default ref
  • Added --forcing-types=bmi,sfincs for selecting which forcing images to build
  • Added is_commit_hash() to detect commit hashes and skip git pull for them
  • Added --ngen-forcing-tag and --ngen-tag CLI flags for dependency tag specification
  • Fixed set_image_source_defaults() overwriting explicit --source flags
  • Fixed bash associative array key interpretation (ngen-forcing arithmetic issue)
  • Fixed set -e interaction with [[ ! -v ]] conditionals
  • Moved dependency tag prompting before release tag validation
  • Added dockerfile_for_forcing_type() and image_name_for_forcing_type() helpers

configure_cluster.sh

  • Refactored to focus on initial setup: repo cloning, AWS credentials, static files, env config
  • Added non-interactive mode with upfront AWS credential prompts
  • Added automatic secret key generation
  • Accepts pasted AWS export blocks
  • Added nginx SIF download

Other

  • Added full_cleanup_cluster.sh for full cluster reset
  • Updated showLatestReleaseTags.sh to show latest tag across repos

Test plan

  • bash -n build_cluster.sh — syntax check passes
  • ./build_cluster.sh --build-type=development ngen — development build works
  • ./build_cluster.sh --build-type=feature --branch=ngen:a1b2c3d ngen — commit hash support
  • ./build_cluster.sh --build-type=development --forcing-types=bmi,sfincs ngen-forcing — forcing type selection
  • ./build_cluster.sh --build-type=development --source=ngen:pull ngen — per-repo source selection
  • ./configure_cluster.sh — cluster setup workflow

Major changes:
- Clone nwm-automation-scripts repo (was missing)
- Explicitly pull all 8 required Docker images from ghcr.io/ngwpc
- Create individual Singularity containers for all 8 images with timestamped builds
- Update static files setup to include module parameter files from nwm-msw-mgr, BMI forcing templates from ngen-forcing, and verification data from nwm-verf
- Fix ngencerf-server configuration to use correct path (cerfServer/.env-override)
- Add logrotate cron job setup for ngencerf-server logs
- Replace build_cluster.sh call with explicit container build steps
Added -y/--non-interactive flag to skip file editing prompts. AWS credentials are prompted at the start of script execution and stored in variables.
Automatically appends MSWM_TAG, NGEN_FORCING_TAG, and DATA_ASSIMILATION_TAG to .env-override with default value 'development'. Works in both interactive and non-interactive modes.
Displays a 5-second warning message at the end of script execution to remind users that TAG variables are set to 'development' and should only be changed for release candidates or official releases.
In non-interactive mode, users can now paste the entire AWS credentials block
(all three export statements) at once, then press Ctrl+D to submit.

The script will parse the credentials from the export statements automatically.
- Displays warning at start of script before AWS credentials
- Changed from 5-second sleep to Y/n confirmation prompt
- User can cancel configuration if they don't want to proceed
- Removed duplicate warning from end of script
…f the cluster, while build_cluster.sh handles all Docker/Singluarity image operations.
2. Updated static files path
3. cleaned up static file steps
@cnealen cnealen self-assigned this Feb 10, 2026
@cnealen cnealen requested a review from miguelp1986 February 10, 2026 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant