Skip to content
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

Add cookbook on how to use Antrea with Multus #1223

Merged

Conversation

antoninbas
Copy link
Contributor

We add documentation to show how Antrea can be used with Multus: Antrea
is used as the default CNI plugin and an "arbitrary" plugin (in our
case, macvlan) can be used to attach additional interfaces to designated
Pods. Nothing is required on the Antrea side to make it work, so this is
just to show how it can be used in practice.

Fixes #368

@antrea-bot
Copy link
Collaborator

Thanks for your PR.
Unit tests and code linters are run automatically every time the PR is updated.
E2e, conformance and network policy tests can only be triggered by a member of the vmware-tanzu organization. Regular contributors to the project should join the org.

The following commands are available:

  • /test-e2e: to trigger e2e tests.
  • /skip-e2e: to skip e2e tests.
  • /test-conformance: to trigger conformance tests.
  • /skip-conformance: to skip conformance tests.
  • /test-whole-conformance: to trigger all conformance tests on linux.
  • /skip-whole-conformance: to skip all conformance tests on linux.
  • /test-networkpolicy: to trigger networkpolicy tests.
  • /skip-networkpolicy: to skip networkpolicy tests.
  • /test-windows-conformance: to trigger windows conformance tests.
  • /skip-windows-conformance: to skip windows conformance tests.
  • /test-windows-networkpolicy: to trigger windows networkpolicy tests.
  • /skip-windows-networkpolicy: to skip windows networkpolicy tests.
  • /test-hw-offload: to trigger ovs hardware offload test.
  • /skip-hw-offload: to skip ovs hardware offload test.
  • /test-all: to trigger all tests (except whole conformance).
  • /skip-all: to skip all tests (except whole conformance).

@codecov-commenter
Copy link

codecov-commenter commented Sep 9, 2020

Codecov Report

Merging #1223 into master will decrease coverage by 0.03%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1223      +/-   ##
==========================================
- Coverage   54.99%   54.96%   -0.04%     
==========================================
  Files         110      110              
  Lines       10573    10573              
==========================================
- Hits         5815     5811       -4     
- Misses       4185     4187       +2     
- Partials      573      575       +2     
Flag Coverage Δ
#integration-tests 44.96% <ø> (ø)
#unit-tests 41.76% <ø> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/apiserver/handlers/endpoint/handler.go 58.82% <0.00%> (-11.77%) ⬇️
pkg/apiserver/storage/ram/store.go 77.44% <0.00%> (-1.51%) ⬇️

@antoninbas antoninbas added the kind/documentation Categorizes issue or PR as related to a documentation. label Sep 10, 2020
@antoninbas antoninbas force-pushed the add-cookbook-for-antrea-with-multus branch 4 times, most recently from 500ed5c to fa00318 Compare September 14, 2020 21:25
Copy link
Contributor

@jianjuns jianjuns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Took a quick review. Overall looks good to me. Feel a little uncertain regarding to the DHCP daemon Docker image.

All the required software will be deployed using YAML manifests, and the
corresponding container images will be downloaded from public registries.

macvlan requires the network to be able to handle "promiscuous mode", as the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel this description is not accurate, for promisc mode is configured on the NIC device, but not on the network, and if the underlay network supports MAC learning promisc mode NICs should work fine.
But I know some hypervisor networking requires promisc mode settings on the vSwitch port, and other documentation describes it the same way, so probably not a big deal.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And this requirement should be for macvlan bridge mode only?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I clarified by mentioning that this is for macvlan "bridge" mode.

Regarding your first comment, I don't think the following is too misleading:

macvlan requires the network to be able to handle "promiscuous mode"

A lot of pieces can be involved:

  • hypervisor
  • physical NIC
  • underlying network: won't work on public cloud (as you said it needs to support MAC learning)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not disagree what you said.

### Step 1: Deploying Antrea

```bash
kubectl apply -f https://github.com/vmware-tanzu/antrea/releases/download/v0.9.2/antrea.yml
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you consider ToT of the master?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

docs/cookbooks/multus/README.md Outdated Show resolved Hide resolved

```bash
docker build -t antrea/cni-dhcp-daemon:latest .
docker push antrea/cni-dhcp-daemon:latest
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if it is too much for us to maintain a DHCP daemon image to demonstrate Multus.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't believe this will be a maintenance burden. I can always move the image to my personal Github / Dockerhub accounts, but I don't think this is a better solution. I couldn't find a good existing image anywhere either.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. No strong opinion on this.

Copy link
Contributor

@jianjuns jianjuns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few extra comments.

* when using VMware Fusion, enable "promiscuous mode" in the guest (Node) for
the appropriate interface (e.g. using `ifconfig`); this may prompt for your
password on the host unless you uncheck `Require authentication to enter
promiscuous mode` in the Network Preferences
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Network Preferences -> Network Preferences?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replaced with the actual menu names: Preferences ... > Network

This manifest will create a DaemonSet that will run a bash script once on every
Node. It will:
* Enable promiscuous mode on the parent interface using `ifconfig`; if using a
virtual network for the Nodes, this does not replace enabling promiscuous
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure I understood this sentence. Would you consider rephrasing?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hopefully it's clearer now, especially with the pointer to the Prerequisites section

docs/cookbooks/multus/test/Vagrantfile Outdated Show resolved Hide resolved
@@ -0,0 +1,1931 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think better to add "br-int" to the OVS bridge box?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, thanks for pointing this out, I don't know how I missed adding this the first time

We add documentation to show how Antrea can be used with Multus: Antrea
is used as the default CNI plugin and an "arbitrary" plugin (in our
case, macvlan) can be used to attach additional interfaces to designated
Pods. Nothing is required on the Antrea side to make it work, so this is
just to show how it can be used in practice.

Fixes antrea-io#368
@antoninbas antoninbas force-pushed the add-cookbook-for-antrea-with-multus branch from 3fa7a6f to e5d58ff Compare September 21, 2020 18:08
@antoninbas antoninbas force-pushed the add-cookbook-for-antrea-with-multus branch from e5d58ff to 299985a Compare September 21, 2020 18:10
@antoninbas
Copy link
Contributor Author

/skip-all

@antoninbas antoninbas merged commit 0fc008f into antrea-io:master Sep 21, 2020
@antoninbas antoninbas deleted the add-cookbook-for-antrea-with-multus branch September 21, 2020 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/documentation Categorizes issue or PR as related to a documentation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Need to support integration with Multus
5 participants