cpi images: enable ssh --director#2761
Conversation
Add ENV vars necessary to enable `bosh ssh --director` to work from CPI container images (docker, warden).
WalkthroughBoth ci/dockerfiles/docker-cpi/start-bosh.sh and ci/dockerfiles/warden-cpi/start-bosh.sh were modified to fetch additional director credentials from creds.yml: an Mbus bootstrap TLS certificate and password. These scripts now export two additional environment variables, BOSH_AGENT_CERTIFICATE and BOSH_AGENT_ENDPOINT, into their respective generated environment files (bosh-env and local_bosh_dir/env). BOSH_AGENT_ENDPOINT is constructed as an HTTPS Mbus URL incorporating the fetched bootstrap password and director IP/port. No exported or public entity declarations were changed. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@ci/dockerfiles/docker-cpi/start-bosh.sh`:
- Line 274: The BOSH_AGENT_ENDPOINT export in the startup script writes
mbus_bootstrap_pass directly into a sourced env file, so special characters can
break the shell assignment or URL userinfo parsing. Update the logic around the
BOSH_AGENT_ENDPOINT echo to escape/encode mbus_bootstrap_pass before writing it,
and make the same change in the matching start-bosh.sh used by the warden CPI.
Use the existing variable flow from mbus_bootstrap_pass to the export line so
the fix applies consistently wherever the sourced env file is generated.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: fdc920ef-8330-4275-8d84-914725973c36
📒 Files selected for processing (2)
ci/dockerfiles/docker-cpi/start-bosh.shci/dockerfiles/warden-cpi/start-bosh.sh
Add ENV vars necessary to enable
bosh ssh --directorto work from CPI container images (docker, warden).