-
Notifications
You must be signed in to change notification settings - Fork 295
use-cases: add VPP directions #25
Conversation
use-cases/using-vpp-and-kata.md
Outdated
| # Setup to run VPP | ||
|
|
||
| The Data Plane Development Kit (DPDK) is a set of libraries and drivers for | ||
| fast packet processing. The Vector Packet Processing (VPP) is a platform |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/The Vector Packet Processing/Vector Packet Processing/ ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ack
use-cases/using-vpp-and-kata.md
Outdated
| extensible framework which provides out-of-the-box production quality | ||
| switch and router functionality. VPP is a high performance packet-processing | ||
| stack which can run on commodity CPUs. Enabling VPP with DPDK support can | ||
| yield significant performance improvements over a Linux\*-bridge providing a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/Linux*-bridge/Linux* bridge/ ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ack
use-cases/using-vpp-and-kata.md
Outdated
| enable memory preallocation and huge page support: | ||
|
|
||
| ``` | ||
| sudo sed -i -e 's/^# *\(enable_hugepages\).*=.*$/\1 = true/g' /usr/share/defaults/kata-containers/configuration.toml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a $ prefix here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mentioned memory prealloc earlier, but havent enabled it in the config here. Is memory prealloc really required?
use-cases/using-vpp-and-kata.md
Outdated
| Follow the [Kata Containers' setup instructions](https://github.com/kata-containers/documentation/wiki/Developer-Guide). | ||
|
|
||
| In order to make use of vhost-user based interfaces, the container needs to be backed | ||
| by huge pages. After enabling huge-pages support on the host system, update the Kata configuration to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be clearer to state somewhere in this paragraph that "huge pages" are a kernel feature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it will be useful to specify the kernel configuration that needs to be checked for huge pages as well. Along with the kernel configuration, it is also necessary to enable huge pages on the kernel command line as well iirc.
Will be useful to mention a check for that.
use-cases/using-vpp-and-kata.md
Outdated
|
|
||
| In order to make use of vhost-user based interfaces, the container needs to be backed | ||
| by huge pages. After enabling huge-pages support on the host system, update the Kata configuration to | ||
| enable memory preallocation and huge page support: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about changing this to:
and huge page support in the guest kernel:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ack
| @@ -0,0 +1,76 @@ | |||
| # Setup to run VPP | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pet peeve - could you consider adding a table of contents here? That would make it much clearer which level each section is part of.
use-cases/using-vpp-and-kata.md
Outdated
| To create a network and connect Kata Containers easily to that network via | ||
| Docker, install a VPP Docker plugin. | ||
|
|
||
| To install the plugin, you can follow the [plugin installation instructions](https://github.com/clearcontainers/vpp). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we be linking to a Clear Containers repo here? Maybe we should consider creating a new repo under Kata for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine either way - it isn't clear or kata specific really, though.
use-cases/using-vpp-and-kata.md
Outdated
| $ sudo docker rm $(sudo docker ps --no-trunc -aq) | ||
| $ sudo docker network rm vpp_net | ||
| $ sudo service vpp stop | ||
| $ sudo service vpp start |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Why is the service being restarted?
- But if it needs to be, why not
sudo systemctl restart vpp?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you're right - not necessary.
use-cases/using-vpp-and-kata.md
Outdated
| use this branch's runtime: | ||
|
|
||
| ``` | ||
| $ sudo docker run --net=vpp_net --ip=192.168.1.2 --mac-address=CA:FE:CA:FE:01:02 -it debian bash -c "ip a; ip route; sleep 300" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Our informal "standard image" is busybox (as it's one of the smallest), and docker pull time will be minimised if you specify that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ack
use-cases/using-vpp-and-kata.md
Outdated
| Follow the [Kata Containers' setup instructions](https://github.com/kata-containers/documentation/wiki/Developer-Guide). | ||
|
|
||
| In order to make use of vhost-user based interfaces, the container needs to be backed | ||
| by huge pages. After enabling huge-pages support on the host system, update the Kata configuration to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it will be useful to specify the kernel configuration that needs to be checked for huge pages as well. Along with the kernel configuration, it is also necessary to enable huge pages on the kernel command line as well iirc.
Will be useful to mention a check for that.
use-cases/using-vpp-and-kata.md
Outdated
| enable memory preallocation and huge page support: | ||
|
|
||
| ``` | ||
| sudo sed -i -e 's/^# *\(enable_hugepages\).*=.*$/\1 = true/g' /usr/share/defaults/kata-containers/configuration.toml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mentioned memory prealloc earlier, but havent enabled it in the config here. Is memory prealloc really required?
|
|
||
| Follow the [VPP installation instructions](https://wiki.fd.io/view/VPP/Installing_VPP_binaries_from_packages). | ||
|
|
||
| After a successful installation, your host system is ready to start |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/is ready/should be ready/ ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated.
use-cases/using-vpp-and-kata.md
Outdated
|
|
||
| ### Install the VPP Docker\* plugin | ||
|
|
||
| To create a network and connect Kata Containers easily to that network via |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/network/Docker network/?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ack
use-cases/using-vpp-and-kata.md
Outdated
| ``` | ||
|
|
||
| Test connectivity by launching two containers, assuming Docker is setup to | ||
| use this branch's runtime: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldnt you be getting rid of "assuming Docker is setup to use this branch's runtime"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes.
|
@egernst Any update on this? |
|
Shame on me. I'll work through these before tomorrow. |
|
Hi @egernst - any chance you'll be able to update this PR this week? |
klynnrif
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Scrubbed for grammar, structure, and flow. A few suggestions. Thanks!
use-cases/using-vpp-and-kata.md
Outdated
|
|
||
| The Data Plane Development Kit (DPDK) is a set of libraries and drivers for | ||
| fast packet processing. The Vector Packet Processing (VPP) is a platform | ||
| extensible framework which provides out-of-the-box production quality |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sub out "which" for "that": extensible framework that provides out-of-the-box production quality
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ack
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@egernst This needs to be addressed.
use-cases/using-vpp-and-kata.md
Outdated
| fast packet processing. The Vector Packet Processing (VPP) is a platform | ||
| extensible framework which provides out-of-the-box production quality | ||
| switch and router functionality. VPP is a high performance packet-processing | ||
| stack which can run on commodity CPUs. Enabling VPP with DPDK support can |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sub out "which" for "that": stack that can run on commodity CPUs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ack
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This as well.
use-cases/using-vpp-and-kata.md
Outdated
| To create a network and connect Kata Containers easily to that network via | ||
| Docker, install a VPP Docker plugin. | ||
|
|
||
| To install the plugin, you can follow the [plugin installation instructions](https://github.com/clearcontainers/vpp). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing "you can":
To install the plugin, follow the plugin installation instructions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ack
use-cases/using-vpp-and-kata.md
Outdated
| To install the plugin, you can follow the [plugin installation instructions](https://github.com/clearcontainers/vpp). | ||
|
|
||
| This VPP plugin allows the creation of a VPP network. Every container added | ||
| to this network will be connected via an L2 bridge-domain provided by VPP. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested rewrite to stay active:
to this network is connected through an L2 bridge-domain provided by VPP.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ack
use-cases/using-vpp-and-kata.md
Outdated
|
|
||
| ## Example: Launch two Kata Containers using VPP | ||
|
|
||
| To use VPP, use Docker to create a network which will make use of VPP. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sub out "which" for "that" and rewrite to stay active:
To use VPP, use Docker to create a network that makes use of VPP.
6b63590 to
89a1d23
Compare
egernst
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
believe it or not, tomorrow finally came; I made updates. take a look...
use-cases/using-vpp-and-kata.md
Outdated
| # Setup to run VPP | ||
|
|
||
| The Data Plane Development Kit (DPDK) is a set of libraries and drivers for | ||
| fast packet processing. The Vector Packet Processing (VPP) is a platform |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ack
use-cases/using-vpp-and-kata.md
Outdated
|
|
||
| The Data Plane Development Kit (DPDK) is a set of libraries and drivers for | ||
| fast packet processing. The Vector Packet Processing (VPP) is a platform | ||
| extensible framework which provides out-of-the-box production quality |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ack
use-cases/using-vpp-and-kata.md
Outdated
| fast packet processing. The Vector Packet Processing (VPP) is a platform | ||
| extensible framework which provides out-of-the-box production quality | ||
| switch and router functionality. VPP is a high performance packet-processing | ||
| stack which can run on commodity CPUs. Enabling VPP with DPDK support can |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ack
use-cases/using-vpp-and-kata.md
Outdated
| extensible framework which provides out-of-the-box production quality | ||
| switch and router functionality. VPP is a high performance packet-processing | ||
| stack which can run on commodity CPUs. Enabling VPP with DPDK support can | ||
| yield significant performance improvements over a Linux\*-bridge providing a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ack
use-cases/using-vpp-and-kata.md
Outdated
|
|
||
| In order to make use of vhost-user based interfaces, the container needs to be backed | ||
| by huge pages. After enabling huge-pages support on the host system, update the Kata configuration to | ||
| enable memory preallocation and huge page support: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ack
use-cases/using-vpp-and-kata.md
Outdated
| To install the plugin, you can follow the [plugin installation instructions](https://github.com/clearcontainers/vpp). | ||
|
|
||
| This VPP plugin allows the creation of a VPP network. Every container added | ||
| to this network will be connected via an L2 bridge-domain provided by VPP. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ack
use-cases/using-vpp-and-kata.md
Outdated
| use this branch's runtime: | ||
|
|
||
| ``` | ||
| $ sudo docker run --net=vpp_net --ip=192.168.1.2 --mac-address=CA:FE:CA:FE:01:02 -it debian bash -c "ip a; ip route; sleep 300" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ack
use-cases/using-vpp-and-kata.md
Outdated
| ``` | ||
|
|
||
| Test connectivity by launching two containers, assuming Docker is setup to | ||
| use this branch's runtime: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes.
use-cases/using-vpp-and-kata.md
Outdated
| $ sudo docker rm $(sudo docker ps --no-trunc -aq) | ||
| $ sudo docker network rm vpp_net | ||
| $ sudo service vpp stop | ||
| $ sudo service vpp start |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you're right - not necessary.
use-cases/using-vpp-and-kata.md
Outdated
| To create a network and connect Kata Containers easily to that network via | ||
| Docker, install a VPP Docker plugin. | ||
|
|
||
| To install the plugin, you can follow the [plugin installation instructions](https://github.com/clearcontainers/vpp). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine either way - it isn't clear or kata specific really, though.
|
@egernst Have you pushed your changes? I dont see the previous review comments addressed. |
|
@egernst I don't see any changes from my first review comments - are they pushed? Thanks! |
89a1d23 to
dbd9677
Compare
|
smh. git commit -a --amend! Pushed. |
devimc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
klynnrif
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm - thanks!
use-cases/using-vpp-and-kata.md
Outdated
| ``` | ||
|
|
||
| These commands setup two Kata Containers connected via a VPP L2 bridge | ||
| domain. The first of the the VMs displays the networking details and then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/the the/the two/?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ack
create a use-cases subdirectory and add an initial use case, booting a kata container which makes use of vpp vhost-user interface. Fixes: kata-containers#209 Signed-off-by: Eric Ernst <eric.ernst@intel.com>
dbd9677 to
1f80ea8
Compare
Changed image-builder/image_builder.sh to automatically calculate the size of the root disk Fixes kata-containers#25. Signed-off-by: Harshal Patil <harshal.patil@in.ibm.com>
this PR creates a use-cases subdirectory and adds an initial use case,
booting a kata container which makes use of vpp vhost-user interface.
Going forward, will add similar documents for SRIOV support, vhost-user-scsi / SPDK, RDMA, QAT, etc.
This starts to address #22
Signed-off-by: Eric Ernst eric.ernst@intel.com