[Container-tools] outside access to Docker daemon in CDK

Keith Babo kbabo at redhat.com
Thu Dec 10 16:35:41 UTC 2015


> On Dec 10, 2015, at 10:44 AM, Max Rydahl Andersen <manderse at redhat.com> wrote:
> 
> On 10 Dec 2015, at 15:08, Keith Babo wrote:
> 
>> Howdy,
>> 
>> I’ve been playing around with the CDK a bit in preparation for the xPaaS release of Fuse for OpenShift 3.1.  Things are going quite well, but I’ve hit one small snag.  It appears as though the Docker daemon is meant to be exposed outside the vagrant image based on ‘vagrant adbinfo’:
>> 
>> export DOCKER_HOST=tcp://10.1.2.2:2376
>> export DOCKER_CERT_PATH=/Users/kbabo/Downloads/cdk/components/rhel/rhel-ose/.vagrant/machines/default/virtualbox/.docker
>> export DOCKER_TLS_VERIFY=1
>> export DOCKER_MACHINE_NAME=52c3900
>> 
>> Unfortunately, I can’t connect with a docker client to 10.1.2.2:2376 outside the image.  Nothing at that port and looking at /etc/sysconfig/docker and the docker process itself, there does not appear to be a -H host directive for a TCP binding.  I can fix this by updating the OPTIONS var in /etc/sysconfig/docker to include -H unix:///var/run/docker.sock -H tcp://0.0.0.0:2375 , but I’m guessing this is not the intended path.
>> 
>> Aside from the above, the CDK fits our initial use case like a glove.  I want to make sure we document this for our users, so any insight you can share on what I might be messing up and/or the appropriateness of my workaround above would be appreciated.
>> 
>> BTW, I’m using the Beta 3 build available from the CSP.
> 
> Don't do that :)
> 
> Use https://github.com/redhat-developer/openshift-vagrant <https://github.com/redhat-developer/openshift-vagrant> (needs Red Hat vpn for now)
> 
> That is our attempt on making the things inside the CDK consumable for dev scenarios.

Does it fix the issue I outlined above?  What else is in there beyond the core CDK?

> 
> What are the usecases you are looking to do ?

Fabric8 Maven workflow for Fuse Integration Services, essentially:
- Build Docker image outside OpenShift using Docker Maven Plugin
- Generate OpenShift/Kubernetes configuration for application
- Push image to Docker registry
- Apply OpenShift/Kubernetes config to OpenShift

All of this works with the CDK with the exception of the Docker daemon access I mentioned.

FWIW, the Maven workflow complements the existing s2i support in OpenShift - we support both with Fuse.

regards,
keith

> 
> /max
> http://about.me/maxandersen <http://about.me/maxandersen>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/container-tools/attachments/20151210/3bd918b7/attachment.htm>


More information about the Container-tools mailing list