New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CNI compatible libnetwork drivers #1978

Open
wants to merge 8 commits into
base: master
from

Conversation

Projects
None yet
5 participants
@abhi
Member

abhi commented Oct 12, 2017

This is an initial PR to make Libnetwork drivers such as bridge and overlay work as CNI plugins. A full detailed design doc will be submitted soon.

abhi and others added some commits Sep 5, 2017

Initial CNI integration commit
This commit contains the initial set of changes to add
CNI sevice to libnetwork drivers. This is done using
a cniserver which acts as a side car for libnetwork daemon
to process CNI requests.

Signed-off-by: Abhinandan Prativadi <abhi@docker.com>
Overlay Driver fixes required for CNI providers
* Support HostAccess overlay option
* Make HostMode configurable via overlay driver label
* Disble SD and start in host-mode by default for CNI dnet
* Moving the default dnet port from 2385 to 2389
* Fix hostAccess iptables rules
* Implement JoinInfo and LeaveInfo interfaces on all builtin drivers
* Enhance JoinInfo and LeaveInfo to allow ip allocation for gateway-ip
* Make use of the RequestAddress feature for hostAccess overlay network
* HostAccess network must also handle traffic from bridge to ! bridge. This is required for the ingress cases

Signed-off-by: Madhu Venugopal <madhu@docker.com>
Environment variable for libnetwork address
Signed-off-by: Abhinandan Prativadi <abhi@docker.com>
Signed-off-by: Madhu Venugopal <madhu@docker.com>
Auto create cni default network
This commit contains changes related to dynamically
create networks depending on the CNI config and
the current network state in libnetwork instance

Signed-off-by: Abhinandan Prativadi <abhi@docker.com>

CNI libnetwork files

Signed-off-by: Abhinandan Prativadi <abhi@docker.com>
Updating config.toml with more configurable parameters
* Make VXLAN and Gossip port configurable
* Configurable Default gateway network name
* Add DataDir configuration params

Signed-off-by: Madhu Venugopal <madhu@docker.com>
IPAM config through cni network config
This commit introduces configurable IPAM setting
for cni configs. This would allow used to configure the
network level ipam configs in the cni config

Signed-off-by: Abhinandan Prativadi <abhi@docker.com>
@mavenugo

Can you slso pls remove the binary files that is inadvertently checked in ?

iptables \
&& rm -rf /var/lib/apt/lists/*
COPY bin/cniserver /var/libnetwork/bin/

This comment has been minimized.

@mavenugo

mavenugo Oct 12, 2017

Contributor

Shouldnt this be ../bin/ (this Dockerfile is in install directory

@mavenugo

mavenugo Oct 12, 2017

Contributor

Shouldnt this be ../bin/ (this Dockerfile is in install directory

This comment has been minimized.

@abhi

abhi Oct 13, 2017

Member

Since its out of build context I have script to copy to the install. will rectify this later.

@abhi

abhi Oct 13, 2017

Member

Since its out of build context I have script to copy to the install. will rectify this later.

COPY bin/cniserver /var/libnetwork/bin/
COPY cniserver.sh /var/libnetwork/
COPY bin/cnictl /var/libnetwork/bin/

This comment has been minimized.

@mavenugo

mavenugo Oct 12, 2017

Contributor

Same here.

@mavenugo

mavenugo Oct 12, 2017

Contributor

Same here.

iptables \
&& rm -rf /var/lib/apt/lists/*
COPY bin/dnet /var/libnetwork/bin/

This comment has been minimized.

@mavenugo

mavenugo Oct 12, 2017

Contributor

same here

@mavenugo

mavenugo Oct 12, 2017

Contributor

same here

Show outdated Hide outdated sandbox.go

abhi added some commits Oct 12, 2017

Refactor and Restore changes
Signed-off-by: Abhinandan Prativadi <abhi@docker.com>
Fixing test cases
Signed-off-by: Abhinandan Prativadi <abhi@docker.com>
@@ -36,7 +36,8 @@ build-local:
@mkdir -p "bin"
go build -tags experimental -o "bin/dnet" ./cmd/dnet
go build -o "bin/docker-proxy" ./cmd/proxy
go build -o "bin/cniserver" ./cmd/cni_server
go build -o "bin/cnictl" ./cmd/dnet_cni/

This comment has been minimized.

@ijc

ijc Nov 1, 2017

I think this needs to be statically built since you don't control the environment it will end up running in -- it is run in the context of the runtime (so maybe cri or docker, perhaps in a container) and not in a container/env supplied by libnetwork.

@ijc

ijc Nov 1, 2017

I think this needs to be statically built since you don't control the environment it will end up running in -- it is run in the context of the runtime (so maybe cri or docker, perhaps in a container) and not in a container/env supplied by libnetwork.

@AkihiroSuda

This comment has been minimized.

Show comment
Hide comment
@AkihiroSuda

AkihiroSuda Feb 2, 2018

Member

What's current status?

Member

AkihiroSuda commented Feb 2, 2018

What's current status?

@olljanat

This comment has been minimized.

Show comment
Hide comment
@olljanat

olljanat May 15, 2018

@abhi is your plan still to get this one merged?
If that helps I fixed merge issues on my fork. You can see them example on here: olljanat/libnetwork#1

olljanat commented May 15, 2018

@abhi is your plan still to get this one merged?
If that helps I fixed merge issues on my fork. You can see them example on here: olljanat/libnetwork#1

@abhi

This comment has been minimized.

Show comment
Hide comment
@abhi

abhi Jun 8, 2018

Member

@olljanat @AkihiroSuda at this point this is put on hold.

Member

abhi commented Jun 8, 2018

@olljanat @AkihiroSuda at this point this is put on hold.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment