Skip to content

Ship staging from the on-prem runner too - #83

Merged
aterga merged 0 commit into
claude/mcp-production-deployment-d74205from
claude/staging-onprem-runner-d74205
Jul 27, 2026
Merged

aterga merged 0 commit into
claude/mcp-production-deployment-d74205from
claude/staging-onprem-runner-d74205

Conversation

@aterga

@aterga aterga commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

Stacked on #81 — base retargets to main automatically once that merges. The diff here is one workflow input plus a comment.

Summary

Staging is the only reason any host in this VPC needs SSH open to the public internet. Its deploy runs on GitHub-hosted runners, which can reach it no other way, so imcp2-web carries 22/tcp from 0.0.0.0/0 and ::/0 — and because that security group is shared, production would inherit the same exposure.

Restricting port 22 to GitHub's ranges isn't a viable alternative: sg-0f05ee152afcc8d9d holds GitHub's web/API prefixes, but Actions runners egress from Azure ranges numbering in the thousands and rotating, well past the 60-rule-per-group limit.

Staging sits in the same VPN-propagated subnet as production, so the on-prem runner reaches it on its private address exactly as it reaches production. Moving it there means both environments ship the same way and both hosts can drop inbound 22 entirely, leaving 80 and 443 as the only publicly reachable ports anywhere.

Splitting this out of #81 deliberately: merging #81 exercises the reusable-workflow refactor while still on hosted runners, and merging this is the first real test of the on-prem ship path — one variable per merge.

Related issues

None.

Changes

  • deploy.yml: ship_runs_on → the self-hosted runner labels, matching deploy-release.yml.
  • Note in the header that DEPLOY_HOST must now be the host's private address.

Testing

  • deploy.yml parses as YAML.
  • The merge is the test. Nothing here can be verified ahead of time — it changes only which runner executes the ship job, and no runner other than the real on-prem one can exercise that.
  • Not run: cargo build / cargo test / clippy — no Rust source changed.
  • Not run: npm test --prefix monitoring/mcp-status — no dashboard code changed; the workflow runs it anyway.

Checklist

  • I have read the Contributing guidelines.
  • Docs (README / comments) updated for any user-visible change.
  • No secrets, credentials, or internal-only information are included.

Required before merge

Update DEPLOY_HOST to staging's private address first. The ship job will run inside the VPN, so the current public value is unreachable from there and the first run after merge fails at the SSH step.

Merge order: #81, confirm staging deploys green on hosted runners, update the secret, then merge this and confirm staging deploys green from on-prem. Once that passes, 22/tcp can be revoked from 0.0.0.0/0 and ::/0 on imcp2-web and replaced with an SSH group scoped to the runner's range.


Generated by Claude Code

@aterga
aterga marked this pull request as ready for review July 27, 2026 16:40
@aterga
aterga requested review from a team and Copilot July 27, 2026 16:40

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Updates the staging deployment workflow to ship from the same on-prem, self-hosted runner path used for production, enabling staging to be reached over the VPN and removing the need for public SSH exposure on the staging host.

Changes:

  • Switch deploy.yml’s ship_runs_on to ["self-hosted","linux"] (matching deploy-release.yml) so staging shipping runs on the on-prem runner.
  • Clarify in the workflow header comment that DEPLOY_HOST must be the target host’s private address.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@aterga
aterga force-pushed the claude/staging-onprem-runner-d74205 branch from 84724ae to 2dd2e28 Compare July 27, 2026 16:47
@aterga
aterga merged commit 2dd2e28 into claude/mcp-production-deployment-d74205 Jul 27, 2026
@aterga
aterga force-pushed the claude/mcp-production-deployment-d74205 branch from 285cd16 to b2c87f9 Compare July 27, 2026 16:48
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.

2 participants