docs: Updated "VPP with Containers" use-case section 09/39809/5
authorhsandid <halsandi@cisco.com>
Mon, 30 Oct 2023 17:47:36 +0000 (18:47 +0100)
committerDave Wallace <dwallacelf@gmail.com>
Tue, 31 Oct 2023 23:54:28 +0000 (23:54 +0000)
Type: improvement

Modified "VPP with Containers" doc section to run on Ubuntu 22.04 LTS.

Change-Id: Ic09b88cf0e3b492711222a1bb24552de964a7d03
Signed-off-by: hsandid <halsandi@cisco.com>
docs/usecases/containers/Routing.rst
docs/usecases/containers/containerCreation.rst
docs/usecases/containers/containerSetup.rst
docs/usecases/containers/index.rst

index b9d3bc9..a468d23 100644 (file)
@@ -63,11 +63,9 @@ Run some commands to verify the changes:
     32: veth_link1    inet 172.16.1.2/24 scope global veth_link1\       valid_lft forever preferred_lft forever
     32: veth_link1    inet6 fe80::2c9d:83ff:fe33:37e/64 scope link \       valid_lft forever preferred_lft forever
 
     32: veth_link1    inet 172.16.1.2/24 scope global veth_link1\       valid_lft forever preferred_lft forever
     32: veth_link1    inet6 fe80::2c9d:83ff:fe33:37e/64 scope link \       valid_lft forever preferred_lft forever
 
-    root@cone:/# route
-    Kernel IP routing table
-    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
-    default         172.16.1.1      0.0.0.0         UG    0      0        0 veth_link1
-    172.16.1.0      *               255.255.255.0   U     0      0        0 veth_link1
+    root@cone:/# ip route
+    default via 172.16.1.1 dev veth_link1
+    172.16.1.0/24 dev veth_link1 proto kernel scope link src 172.16.1.2
 
 
 We see that the IP has been assigned, as well as our default gateway.
 
 
 We see that the IP has been assigned, as well as our default gateway.
index bb11688..dbd18ea 100644 (file)
@@ -19,7 +19,7 @@ Then install packages for containers such as lxc:
 
   # apt-get install bridge-utils lxc
 
 
   # apt-get install bridge-utils lxc
 
-As quoted from the `lxc.conf manpage <https://linuxcontainers.org/it/lxc/manpages/man5/lxc.conf.5.html>`_,  "container configuration is held in the config stored in the container's directory.
+As quoted from the `lxc.conf manpage <https://linuxcontainers.org/lxc/manpages/man5/lxc.conf.5.html>`_,  "container configuration is held in the config stored in the container's directory.
 A basic configuration is generated at container creation time with the default's recommended for the chosen template as well as extra default keys coming from the default.conf file."
 
 "That *default.conf* file is either located at /etc/lxc/default.conf or for unprivileged containers at ~/.config/lxc/default.conf."
 A basic configuration is generated at container creation time with the default's recommended for the chosen template as well as extra default keys coming from the default.conf file."
 
 "That *default.conf* file is either located at /etc/lxc/default.conf or for unprivileged containers at ~/.config/lxc/default.conf."
@@ -31,10 +31,10 @@ Look at the contents of *default.conf*, which should initially look like this:
 .. code-block:: console
 
     # cat /etc/lxc/default.conf
 .. code-block:: console
 
     # cat /etc/lxc/default.conf
-    lxc.network.type = veth
-    lxc.network.link = lxcbr0
-    lxc.network.flags = up
-    lxc.network.hwaddr = 00:16:3e:xx:xx:xx
+    lxc.net.0.type = veth
+    lxc.net.0.link = lxcbr0
+    lxc.net.0.flags = up
+    lxc.net.0.hwaddr = 00:16:3e:xx:xx:xx
 
 As you can see, by default there is one veth interface.
 
 
 As you can see, by default there is one veth interface.
 
@@ -44,36 +44,36 @@ You can do this by piping *echo* output into *tee*, where each line is separated
 
 .. code-block:: console
 
 
 .. code-block:: console
 
-    # echo -e "lxc.network.name = veth0\nlxc.network.type = veth\nlxc.network.name = veth_link1"  | sudo tee -a /etc/lxc/default.conf
+    # echo -e "lxc.net.0.name = veth0\nlxc.net.1.type = veth\nlxc.net.1.name = veth_link1"  | sudo tee -a /etc/lxc/default.conf
 
 Inspect the contents again to verify the file was indeed modified:
 
 .. code-block:: console
 
     # cat /etc/lxc/default.conf
 
 Inspect the contents again to verify the file was indeed modified:
 
 .. code-block:: console
 
     # cat /etc/lxc/default.conf
-    lxc.network.type = veth
-    lxc.network.link = lxcbr0
-    lxc.network.flags = up
-    lxc.network.hwaddr = 00:16:3e:xx:xx:xx
-    lxc.network.name = veth0
-    lxc.network.type = veth
-    lxc.network.name = veth_link1
+    lxc.net.0.type = veth
+    lxc.net.0.link = lxcbr0
+    lxc.net.0.flags = up
+    lxc.net.0.hwaddr = 00:16:3e:xx:xx:xx
+    lxc.net.0.name = veth0
+    lxc.net.1.type = veth
+    lxc.net.1.name = veth_link
 
 
 After this, we're ready to create the containers.
 
 
 
 After this, we're ready to create the containers.
 
-Creates an Ubuntu Xenial container named "cone".
+Creates an Ubuntu Focal container named "cone".
 
 .. code-block:: console
 
 
 .. code-block:: console
 
-      # lxc-create -t download -n cone -- --dist ubuntu --release xenial --arch amd64 --keyserver hkp://p80.pool.sks-keyservers.net:80
+      # lxc-create -t download -n cone -- --dist ubuntu --release focal --arch amd64
 
 
 If successful, you'll get an output similar to this:
 
 .. code-block:: console
 
 
 
 If successful, you'll get an output similar to this:
 
 .. code-block:: console
 
-    You just created an Ubuntu xenial amd64 (20180625_07:42) container.
+    You just created an Ubuntu focal amd64 (20231027_07:42) container.
 
     To enable SSH, run: apt install openssh-server
     No default root or user password are set by LXC.
 
     To enable SSH, run: apt install openssh-server
     No default root or user password are set by LXC.
@@ -83,8 +83,7 @@ Make another container "ctwo".
 
 .. code-block:: console
 
 
 .. code-block:: console
 
-     # lxc-create -t download -n ctwo -- --dist ubuntu --release xenial --arch amd64 --keyserver hkp://p80.pool.sks-keyservers.net:80
-
+     # lxc-create -t download -n ctwo -- --dist ubuntu --release focal --arch amd64
 
 List your containers to verify they exist:
 
 
 List your containers to verify they exist:
 
@@ -106,9 +105,9 @@ And verify its running:
 .. code-block:: console
 
     # lxc-ls --fancy
 .. code-block:: console
 
     # lxc-ls --fancy
-    NAME STATE   AUTOSTART GROUPS IPV4 IPV6
-    cone RUNNING 0         -      -    -
-    ctwo STOPPED 0         -      -    -
+    NAME STATE   AUTOSTART GROUPS IPV4 IPV6 UNPRIVILEGED
+    cone RUNNING 0         -      -    -    false
+    ctwo STOPPED 0         -      -    -    false
 
 
 .. note::
 
 
 .. note::
index 8c458f7..31b8171 100644 (file)
@@ -18,10 +18,9 @@ Run the linux DHCP setup and install VPP:
 
 .. code-block:: console
 
 
 .. code-block:: console
 
-    root@cone:/# resolvconf -d eth0
     root@cone:/# dhclient
     root@cone:/# dhclient
-    root@cone:/# apt-get install -y wget
-    root@cone:/# echo "deb [trusted=yes] https://nexus.fd.io/content/repositories/fd.io.ubuntu.xenial.main/ ./" | sudo tee -a /etc/apt/sources.list.d/99fd.io.list
+    root@cone:/# apt-get install -y curl
+    root@cone:/# curl -s https://packagecloud.io/install/repositories/fdio/release/script.deb.sh | sudo bash
     root@cone:/# apt-get update
     root@cone:/# apt-get install -y --force-yes vpp
     root@cone:/# sh -c 'echo  \"\\ndpdk {\\n   no-pci\\n}\" >> /etc/vpp/startup.conf'
     root@cone:/# apt-get update
     root@cone:/# apt-get install -y --force-yes vpp
     root@cone:/# sh -c 'echo  \"\\ndpdk {\\n   no-pci\\n}\" >> /etc/vpp/startup.conf'
index 65bf2ae..f8e0722 100644 (file)
@@ -5,6 +5,7 @@ VPP with Containers
 
 This section will cover connecting two Linux containers with VPP. A container is essentially a more efficient and faster VM, due to the fact that a container does not simulate a separate kernel and hardware. You can read more about `Linux containers here <https://linuxcontainers.org/>`_.
 
 
 This section will cover connecting two Linux containers with VPP. A container is essentially a more efficient and faster VM, due to the fact that a container does not simulate a separate kernel and hardware. You can read more about `Linux containers here <https://linuxcontainers.org/>`_.
 
+This section has been tested with Ubuntu 22.04 LTS.
 
 .. toctree::
 
 
 .. toctree::