Skip to content

Adding ol-web3 to web head cluster#12433

Merged
mekarpeles merged 5 commits into
internetarchive:masterfrom
cdrini:perf/ol-web3
Apr 24, 2026
Merged

Adding ol-web3 to web head cluster#12433
mekarpeles merged 5 commits into
internetarchive:masterfrom
cdrini:perf/ol-web3

Conversation

@cdrini
Copy link
Copy Markdown
Collaborator

@cdrini cdrini commented Apr 22, 2026

Adding a new web head to deal with increased traffic and near-constant webpy worker saturation.

Technical

  • Add ol-web3 to wherever the web heads were listed
  • Update/move provisioning script to work with debian. See the actual diff here: 0742a7b
  • Extend deploy.sh to:
    • support /opt/olsystem and /opt/openlibrary not existing, to allow usage during provisioning
    • Support a new GIT_BRANCH environment variable to deploy a specific tag, branch, or sha
    • Only call tag_deploy when running full deploy, to allow small partial deploys to a specific server

Testing

Screenshot

Stakeholders

@cdrini cdrini marked this pull request as ready for review April 22, 2026 20:28
Copilot AI review requested due to automatic review settings April 22, 2026 20:28
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds ol-web3 as an additional production web head and updates deployment/provisioning tooling to support bringing up a fresh Debian-based node and optionally deploying a specific git ref.

Changes:

  • Extend host lists (deploy/restart/sync/test scripts) and docker compose profiles to include ol-web3.
  • Add a new Debian-oriented provisioning script under scripts/deployment/ and remove the older scripts/setup_olserver.sh.
  • Update deploy.sh to tolerate missing /opt/* repos during provisioning and add GIT_BRANCH support + move deploy tagging into the deploy wizard.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
scripts/solr_builder/utils.sh Include ol-web3 in search/solr-switch helper loops.
scripts/setup_olserver.sh Remove legacy Ubuntu-oriented provisioning script.
scripts/deployment/restart_servers.sh Add ol-web3 to default restart set.
scripts/deployment/provision_olserver.sh New Debian provisioning checklist/script for new nodes.
scripts/deployment/pre_deploy.sh Add ol-web3 to pre-deploy status checks.
scripts/deployment/patchdeploy.sh Update usage/defaults to include ol-web3.
scripts/deployment/patch_test_new_memcache_server.sh Add warning that the script is outdated.
scripts/deployment/deploy.sh Add ol-web3, handle missing repo dirs, add GIT_BRANCH, adjust tagging behavior.
scripts/deployment/are_servers_in_sync.sh Add ol-web3 to sync checks.
compose.production.yaml Enable web, fast_web, and monitoring profiles on ol-web3.

Comment on lines +670 to +672
echo "Creating git tag for deploy... "
tag_deploy

Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

deploy_wizard calls tag_deploy unconditionally, but tag_deploy assumes $DEPLOY_DIR/openlibrary exists. If the user answers "n" to running deploy_openlibrary, the tag step will fail (and with set -e will abort the wizard). Gate tagging on whether the openlibrary deploy actually ran / the repo directory exists, or move tagging into the branch that runs deploy_openlibrary.

Copilot uses AI. Check for mistakes.
Comment on lines +378 to +383
echo -ne "Cloning openlibrary repo (branch: $git_branch) ... "
git clone --depth=1 "https://github.com/internetarchive/openlibrary.git" openlibrary 2> /dev/null
if [ -n "$git_branch" ]; then
git -C openlibrary fetch --depth=1 origin $git_branch
git -C openlibrary checkout FETCH_HEAD
fi
Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new GIT_BRANCH support claims to allow deploying a SHA, but git fetch origin $git_branch treats the value as a remote ref. For a raw commit SHA this will typically fail with "couldn't find remote ref". Consider handling SHAs explicitly (e.g., full clone or a fallback fetch strategy) and validating the ref before checkout so GIT_BRANCH reliably supports tag/branch/SHA as intended.

Copilot uses AI. Check for mistakes.
Comment thread scripts/deployment/provision_olserver.sh
Comment thread scripts/deployment/provision_olserver.sh Outdated
Comment thread scripts/deployment/provision_olserver.sh Outdated
@mekarpeles mekarpeles self-assigned this Apr 24, 2026
cdrini and others added 2 commits April 24, 2026 10:57
@mekarpeles mekarpeles merged commit d57a2ca into internetarchive:master Apr 24, 2026
3 checks passed
IvanPisquiy06 pushed a commit to IvanPisquiy06/openlibrary that referenced this pull request Apr 27, 2026
* Adding ol-web3 to web head cluster
* Rename server setup script + move to deployment directory
* Update provision script + tweak some deploy.sh configs
IvanPisquiy06 pushed a commit to IvanPisquiy06/openlibrary that referenced this pull request Apr 27, 2026
* Adding ol-web3 to web head cluster
* Rename server setup script + move to deployment directory
* Update provision script + tweak some deploy.sh configs
Sadashii pushed a commit to Sadashii/openlibrary that referenced this pull request May 11, 2026
* Adding ol-web3 to web head cluster
* Rename server setup script + move to deployment directory
* Update provision script + tweak some deploy.sh configs
pull Bot pushed a commit to ppker/openlibrary that referenced this pull request May 12, 2026
- tag_deploy/tag_release: fall back to the script's own repo when
  $DEPLOY_DIR/openlibrary doesn't exist, so './deploy.sh tag' works
  standalone after cleanup and the wizard no longer aborts if the
  openlibrary deploy step is skipped (fixes regression from internetarchive#12433)
- deploy_openlibrary: move tag_deploy call inside the function (after
  the transfer block) so it runs for standalone deploys, not just the
  wizard
- Add SKIP_TRANSFER env var: set SKIP_TRANSFER=1 to skip file copy,
  git-init-on-servers, prune, and image pulls -- useful when rerunning
  after a partial failure where servers already have current files
- Fix wizard regex typo ^[Yy$] -> ^[Yy]$ (would have matched literal $)
- Remove dead commented-out tag_deploy in wizard and redundant
  git describe call (tag_release already sets $LATEST_TAG_NAME)
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.

3 participants