Public Repository

Last pushed: 2 months ago
Short Description
libnetwork driver that provides IPAM integration between Docker and Infoblox
Full Description

Infoblox Docker IPAM Driver

The ipam-driver is a Docker libnetwork IPAM driver that interfaces with Infoblox to provide centralized IP Address Management services. libnetwork is the library provided by Docker that allows third-party plugins for container networking

NOTE: Docker 1.12 introduced Swarm Mode but with a limitation where legacy IPAM plugins were not supported.
As a result this ipam-driver cannot be used in that configuration, although the driver still works in
a traditional Docker Swarm. Infoblox is working to enable it’s ipam plugin to support Swarm Mode.

For detailed installation and configuration instructions, see https://github.com/infobloxopen/docker-infoblox

Run Container

After successfully pulling the image, you use the docker run command to run the driver. For exampe:

docker run -e DOCKER_API_VERSION=1.22 -v /var/run:/var/run -v /run/docker:/run/docker infoblox/ipam-driver --grid-host=192.168.124.200 --wapi-username=cloudadmin --wapi-password=cloudadmin --local-view=local_view --local-network-container="192.168.0.0/20,192.169.0.0/22" --local-prefix-length=25 --global-view=global_view --global-network-container="172.18.0.0/16" --global-prefix-length=24

Note that the -v options are necessary to provide the container access to the specified directories on the
host file system.

Usage

To start using the dirver, a docker network needs to be created specifying the driver using the --ipam-driver option:

sudo docker network create --ipam-driver=infoblox priv-net

This creates a docker network called "priv-net" which uses "infoblox" as the IPAM driver and the default "bridge" driver as the network driver. A network will be automatically allocated from the list of network containers specified during driver start up.

By default, the network will be created using the default prefix length specified during driver start up. You can override this using the --ipam-opt option. For example:

sudo docker network create --ipam-driver=infoblox --ipam-opt="prefix-length=24" priv-net-2

Additionally, if you are deploying containers in a cluster, you can specify "network-name" using the --ipam-opt option. This will be used as an identifier so that docker networks created on different docker hosts can share the same IP address space. For example:

sudo docker network create --ipam-driver=infoblox --ipam-opt="network-name=blue" blue-net

This will allocate a network, say, 192.168.10.0/24, from the default address pool. Additionally, the network will be tagged in Infoblox with the network name "blue". Should the same command be issued on a different host, the driver will look for a network on Infoblox tagged with the same name, "blue", and will share the same network, 192.168.10.0/24, instead of allocating a new one.

After the network is created, Docker containers can be started attaching to the "priv-net" network created above. For example, the following command run the "ubuntu" image:

sudo docker run -i -t --net=priv-net --name=ubuntu1 ubuntu

When the container comes up, verify using the "ifconfig" command that IP has been successfully provisioned from Infoblox.

Docker Pull Command
Owner
infoblox

Comments (4)
ishant8
23 days ago

Hi rvsingh,

Can you please provide more information about the issue you are facing?

Also please provide the configuration which you are passing to the driver and the logs.

What version of Docker and NIOS are you running?

Its best to raise a issue at https://github.com/infobloxopen/docker-infoblox for quick response.

rvsingh
25 days ago

and finally when i provide the socket name in the config file the following error is given. so please respond as soon aspossible
Post http://%2Frun%2Fdocker%2Fplugins%2Finfoblox.sock/IpamDriver.RequestPool: dial unix /run/docker/plugins/infoblox.sock: connect: connection refused"

rvsingh
25 days ago

I have built the plugin in the dir /run/docker/plugin/infoblox.sock but still getting this error ----"Unable to connect to plugin: /run/docker/plugins/infoblox.sock/IpamDriver.RequestPool

rvsingh
25 days ago

after running the driver in container when creating the network using it. its giving me the following error.

Error response from daemon: remote: Cannot allocate network in Address Space

what could be the possible cause can u help me with this ?