Not sure whether I'm wrong about the way this should work, I've missed something, or the following is broken. I have an app with a bound service:
$ cf services
Getting services in org david_currie@uk.ibm.com / space dev as david_currie@uk.ibm.com...
OK
name service plan bound apps last operation
Monitoring and Analytics-y3 MonitoringAndAnalytics Free bridgeapp create succeeded
But when I try to bind this to a container I don't get any VCAP_SERVICES:
$ cf ic run -e "CCS_BIND_APP=bridgeapp" registry.ng.bluemix.net/davec/ubuntu sh -c "export"
a32c23ae-ffcc-45eb-b05d-b082e80ae89a
$ cf ic logs a32c23ae-ffcc-45eb-b05d-b082e80ae89a
export CCS_BIND_APP='bridgeapp'
export HOME='/root'
export HOSTNAME='instance-0002e531'
export PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
export PWD='/'
export TERM='xterm'
export group_id='0000'
export logging_password=''
export logstash_target='logmet.opvis.bluemix.net:9091'
export metrics_target='logmet.opvis.bluemix.net:9095'
export space_id='0c9250a4-8a97-4fef-b547-82b99a5166db'
export tagformat='space_id group_id uuid'
export tagseparator='_'
export uuid='a32c23ae-ffcc-45eb-b05d-b082e80ae89a'
Answer by Lee James Reamsnyder (421) | Sep 30, 2015 at 11:57 AM
Right now, the cf ic
plugin appears to not support binding the bridge application with the CCS_BIND_APP
environmental variable.
You can install the ICE plugin and try ice run --bind bridgeapp davec/ubuntu sh -c "export"
and it should work as expected. ice run -e "CCS_BIND_APP=bridgeapp" davec/ubuntu sh -c "export"
will do the same thing.
We are working to both update the documentation around this and get the cf ic
plugin to match the functionality of the ice
command.