Source for tmate-bootstrap.cfapps.io
scripts/cf-ssh to your local
$PATH. Make it executable.
cf-ssh script is a helpful tool to create a dedicated Cloud Foundry container, with the target application's services and environment variables and SSH into it.
It creates a new Cloud Foundry application (appname-ssh), rather than trying to modify/reuse an existing production Cloud Foundry application.
From within your Cloud Foundry application project folder:
$ cf-ssh appname Using manifest file ./cf-ssh.yml Creating app appname-ssh Uploading appname-ssh... Binding service service1 to app appname-ssh Binding service service2 to app appname-ssh Starting app appname-ssh Running: ssh [email protected]
After you exit the SSH session, the
appname-ssh application is deleted. This ensures that future SSH sessions will include up-to-date source code, buildpack, services and environment variables.
You can keep the container (albeit in "stopped" status) by setting the environment variable:
Note: currently it does not know how to specify a buildpack or discover the buildpack used by the target application.
go get github.com/jteeuwen/go-bindata/...
bindata.go to include the
tmate-bootstrap executable in current folder:
Move the executable into the
mv tmate-bootstrap http_server/payload/
There is a publicly available tmate-bootstrap server at https://tmate-bootstrap.cfapps.io
If you want to host it, and its
tmate-bootstrap CLI payload, on your own Cloud Foundry:
cd http_server bundle cf push