--
You received this message because you are subscribed to the Google Groups "Cloud Foundry Developers" group.
To view this discussion on the web visit https://groups.google.com/a/cloudfoundry.org/d/msgid/vcap-dev/CAMaH4TZ45yekSdLta_JRneBciMMfas4H8izEbsRdz4yK3pVPPw%40mail.gmail.com.
To unsubscribe from this group and stop receiving emails from it, send an email to vcap-dev+u...@cloudfoundry.org.
it looks like it is be possible to use this tmate buildpack in a layered manner with heroku-buildpack-multi [1] and something my gist [2] or forego [3] to start multiple processes in the container and troubleshoot cloud foundry apps over tmux.
see attached where i did a simple proof of concept with ruby. i haven't tried a java app yet with port forwarding for jmx, but that should be straight-forward to try.
using an approach like dan mikusa wrote about in feb [4], you can probably get this down to a simple CLI / manifest command substitution instead of using layered buildpacks.
if you don't trust tmate.io (why would you want a man in the middle that you don't know!) it looks like it's pretty straight forward to run a tmate-slave server [5]
$ cat .buildpacks
https://github.com/cloudfoundry/cf-buildpack-ruby.git
https://github.com/danhigham/cloudfoundry-tmate-buildpack.git
$ cat manifest.yml
---
applications:
- name: james-mobile
memory: 512M
instances: 1
host: hr-mobile
path: .
buildpack: https://github.com/ddollar/heroku-buildpack-multi.git
command: /home/vcap/app/startAndExitOnAnyChildExit.sh /home/vcap/app/startHello.sh /home/vcap/app/bin/launch
[1] https://github.com/ddollar/heroku-buildpack-multi
[2] https://gist.github.com/jbayer/8368233
[3] https://github.com/ddollar/forego
To view this discussion on the web visit https://groups.google.com/a/cloudfoundry.org/d/msgid/vcap-dev/CAMaH4TY2D1hgTJjk9qOOad8AbqDntCGzK04kV%3DZ9Lt2OMWCN1A%40mail.gmail.com.
To unsubscribe from this group and stop receiving emails from it, send an email to vcap-dev+u...@cloudfoundry.org.
dan higham has set up an awesome simplification of this process where you only need to change one thing now to get an ssh session to your container, which is the command used to start your app, which pulls down tmate dependencies as your container starts and starts a user-specified process, which could be your actual app or a dummy process which just lets you type commands within your container/droplet.
cf push james-java -c "curl http://tmate-bootstrap.cfapps.io?cmd=ls | sh" --no-route
or using a manifest like
---
applications:
- name: james-java
memory: 512M
instances: 1
path: JavaTinyApp-1.1.war
command: curl http://tmate-bootstrap.cfapps.io?cmd=ls | sh
if you know the actual command of the app you want to use, then you can supply it as an HTTP encoded value to the cmd param or just use a simple one like "ls". i think there are limits on the length of the command. tmate will reverse proxy to port 8080 in your container, so make sure to use that as your app port instead of $PORT. also, don't map a route or CF will try to make sure that the $PORT that is assigned is listening. check the output of the app using 'cf logs APPNAME --recent' and then ssh to that identifier in the logs as shown here [1]. really cool dan!
[1] https://gist.github.com/jbayer/efbd5232e5c911ddfc36
To view this discussion on the web visit https://groups.google.com/a/cloudfoundry.org/d/msgid/vcap-dev/CAM4UFtCTDdcnvz9SCMkqk9a0Hb%3DRzb%3D2Fs4OFSXtV_CCqs%3D%2B6Q%40mail.gmail.com.
To unsubscribe from this group and stop receiving emails from it, send an email to vcap-dev+u...@cloudfoundry.org.
To view this discussion on the web visit https://groups.google.com/a/cloudfoundry.org/d/msgid/vcap-dev/CANnX6AwgGdO8EuGsw1q%3DPw1qnnqiH7MP6_gV9m2RMjqasnD%2BYA%40mail.gmail.com.
To unsubscribe from this group and stop receiving emails from it, send an email to vcap-dev+u...@cloudfoundry.org.
Rohits-MacBook-Pro:FizzBuzz rkelapure$ cf console fizzbuzz
> Finding app guid for fizzbuzz ... e201337d-58d1-4d96-afbf-bb8a6570c6e1
> Updating app to connect to tmate.
> Updating app start command to 'curl -s https://raw.githubusercontent.com/danhigham/cf-console/master/install.sh > /tmp/install.sh && bash /tmp/install.sh && sleep 3600'.
> Changing instance count to 2.
> Checking app log datestamps.
> Waiting for SSH endpoint.
> SSHing to SAtogb7WI65y...@ny.tmate.io
> Changing instance count to 1.
> Updating app start command to ''.
Rohits-MacBook-Pro:FizzBuzz rkelapure$