How to customize the network solution for rancher?

215 views
Skip to first unread message

Jason Huang

unread,
Jun 11, 2015, 10:52:21 AM6/11/15
to ranc...@googlegroups.com
We had our own solution for containers, so we need customize the rancher's create container process.  We need insert the create bridge and IP allocation steps and assign the IP to container.

How we can achieve this, should we modify the rancher server's code, or we can insert the steps by modifying some configuration?


Will Chan

unread,
Jun 11, 2015, 1:15:46 PM6/11/15
to ranc...@googlegroups.com
We plan on supporting customer docker bridges fairly soon within the next couple of weeks hopefully.  Unfortunately, it will not work today if the interface is anything but docker0 due to a bug.

https://github.com/rancherio/rancher/issues/941

If you do plan are planning to customizing your own IP space for your containers, you can already do that today by configuring each docker daemon to allocate your custom CIDR space.  However, if you use Rancher's managed networking, it won't leverage the IPs assigned by docker.  We are planning feature enhancements around this area though.  Please see:

Jason Huang

unread,
Jun 18, 2015, 3:36:21 AM6/18/15
to ranc...@googlegroups.com
Our use case is that : 

1. Our production require the VM and container on the same net. 
2. We have a service to assign the IP for container dynamically or  statically. and add the container's hostname and the container's ip on local DNS server.
3. We need add a bridge on each host running the container and when an container started, we will create veth pair, one attached the bridge, the other attached the container in it's namespace.
4. So our requirement's is that 
    a. add a new choice on network choice.
    b. customize the container create steps : 
         i. create container.
         ii. call the IP assignment service to allocate IP
         iii. call connect the bridge to container.
         iv. do the rest container starting step.

在 2015年6月12日星期五 UTC+8上午1:15:46,Will Chan写道:

Will Chan

unread,
Jun 18, 2015, 12:38:22 PM6/18/15
to ranc...@googlegroups.com
Just FYI, Docker 1.8 will be releasing a network plugin module where you can potentially assign your IP to the container.  We plan to integrate with that as well.

In the meantime, if you re-use docker0 as your bridge, you can still select the bridge network from Rancher today.  If that is not possible, it will require some modification to our UI to achieve what you want.  In that case, I'll defer to Vince to give you a few pointers although given our rate of changes, you will end up having to support a forked branch.

Will

Jason Huang

unread,
Jun 23, 2015, 9:34:46 PM6/23/15
to ranc...@googlegroups.com
Thanks for your feedback. :)

You mean now we can noly fork branch to modify the UI and container's create and tear down process? That's ok. Can you give us some clue about where to modify and the building process?  :) I still had a little warry about customized branch things (can not commit), because rancher is now envolving very fast. :)

By the way, our scenaio (as follow)  is a very common scenario in enterprise IT application development and depolyment, hope you can had plan to support, maybe we can work together to support it. :)

1. We want to treat the containers as a lightweight VM.
2. We run the enterprise application on the containers, this application based on VAS and must use the WS-AT protocol to support transactions acroos hosts.
3. So we must let the container had it's own IP and hostname(because of the damn WS-AT), and container can talk to other containers and VMs(legacy applications still runs on VMs).
4. And we need to assign the IP from IP pool(both for VM and Container) to the pod.
5. container can access other containers and VMs by hostname (WS-AT protocol).


在 2015年6月19日星期五 UTC+8上午12:38:22,Will Chan写道:

Will Chan

unread,
Jun 24, 2015, 3:05:51 PM6/24/15
to ranc...@googlegroups.com
Why is there an absolute need to assign an IP from this pool for your container?  I don't understand VAS or WS-AT protocol or is this just a restriction on routing? Our managed networking will take care of routing between containers even though we assign it an IP from our CIDR space (that can be changed).  
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages