IssueRaiser

Static/Reserved IP addresses for swarm services

There are some things that I want to run on docker, but are not fully engineered for dynamic infrastructure. Ceph is an example. Unfortunately, its monitor nodes require a static ip address, otherwise, it will break if restarted. See here for background: https://github.com/ceph/ceph-docker/issues/190 `docker run` has an `--ip` and `--ip6` flag to set a static IP for the container. It would be nice if this is something we can do when creating a swarm service to take advantage of rolling updates and restart on failures. For example, when we create a service, we could pass in a `--static-ip` and `--static-ip6` option. Docker would assign a static ip for each task for the life of the service. That is, as long as the service exists, those ip addresses would be reserved and mapped to each task. If the task scales up and down, then more ip addresses are reserved or relinquished. The ip address is then passed into each task as an environment variable such as `DOCKER_SWARM_TASK_IP` and `DOCKER_SWARM_TASK_IP6`

Posted by F21 on Jun 30, 2016, 10:36 AM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.5,000 issues0 comments

reliability (Software)

Static/Reserved IP addresses for swarm services

F21Jun 30, 2016, 10:36 AM

There are some things that I want to run on docker, but are not fully engineered for dynamic infrastructure. Ceph is an example. Unfortunately, its monitor nodes require a static ip address, otherwise, it will break if restarted. See here for background: https://github.com/ceph/ceph-docker/issues/190 `docker run` has an `--ip` and `--ip6` flag to set a static IP for the container. It would be nice if this is something we can do when creating a swarm service to take advantage of rolling updates and restart on failures. For example, when we create a service, we could pass in a `--static-ip` and `--static-ip6` option. Docker would assign a static ip for each task for the life of the service. That is, as long as the service exists, those ip addresses would be reserved and mapped to each task. If the task scales up and down, then more ip addresses are reserved or relinquished. The ip address is then passed into each task as an environment variable such as `DOCKER_SWARM_TASK_IP` and `DOCKER_SWARM_TASK_IP6`

Comments (0)

No comments yet. Start the discussion.

Comment on this issue