Skip to content
Andrew Donald Kennedy edited this page Mar 28, 2015 · 1 revision

Software-Defined Networking Provider Entity

The SdnProvider interface defines the configuration, attributes and effectors for the entity controlling an SDN provider. The provider is the mechanism that handles the connections and communication between each Docker host, and attaches containers to networks on the SDN that it has created. This can be simply a connection to an existing SDN infrastructure, such as with the IBM SDN VE provider, where a resilient cluster of controllers and other services export a REST API to be used by clients. Alternatively, it can be used to provision a controller service directly, such as with Project Calico, where a cluster of etcd nodes is created to manage the network information.

Configuration

  • sdn.network.cidr - A CIDR for the pool of addresses that can be used to create subnets for applications. This defaults to the link-local network, 169.254.0.0/16.
  • sdn.network.size - The size in bits of the subnets to be created, using CIDR slash notation. This defaults to 24 which gives networks containing 256 addresses.
  • sdn.agent.cidr - If required, a separate CIDR to use for allocating addresses for the SDN agents. This will be created from the application pool if not configured.
  • sdn.agent.spec - An EntitySpec for the SDN host agent. This will be set by the provider normally, but can be configured explicitly if particular agent configuration is required.
  • docker.infrastructure - The DockerInfrastructure entity managing the Docker hosts.

Methods and Effectors

  • Collection<IpPermission> getIpPermissions()
  • DynamicCluster getDockerHostCluster()
  • Group getAgents()
  • InetAddress getNextContainerAddress(String networkId)
  • InetAddress getNextAgentAddress(String agentId)
  • Cidr getNextSubnetCidr(String networkId)
  • Cidr getNextSubnetCidr()
  • void recordSubnetCidr(String networkId, Cidr subnetCidr)
  • void recordSubnetCidr(String networkId, Cidr subnetCidr, int allocated)
  • Cidr getSubnetCidr(String networkId)
  • void addHost(DockerHost host)
  • void removeHost(DockerHost host)
  • Object getNetworkMutex()