diff options
Diffstat (limited to 'docs/testing/user/userguide/quickstart_docker.rst')
-rw-r--r-- | docs/testing/user/userguide/quickstart_docker.rst | 47 |
1 files changed, 41 insertions, 6 deletions
diff --git a/docs/testing/user/userguide/quickstart_docker.rst b/docs/testing/user/userguide/quickstart_docker.rst index ccb629b..0ab657c 100644 --- a/docs/testing/user/userguide/quickstart_docker.rst +++ b/docs/testing/user/userguide/quickstart_docker.rst @@ -38,19 +38,54 @@ The NFVbench container requires the following Docker options to operate properly | | /tmp/nfvbench director in the container but any | | | other similar mapping can work as well | +------------------------------------------------------+------------------------------------------------------+ -| --net=host | (optional) needed if you run the NFVbench ok | +| --net=host | (optional) needed if you run the NFVbench ok | | | server in the container (or use any appropriate | | | docker network mode other than "host") | +------------------------------------------------------+------------------------------------------------------+ | --privileged | (optional) required if SELinux is enabled on the host| +------------------------------------------------------+------------------------------------------------------+ -| --e HOST="127.0.0.1" | (optional) required if REST server is enabled | +| -e HOST="127.0.0.1" | (optional) required if REST server is enabled | +------------------------------------------------------+------------------------------------------------------+ -| --e PORT=7556 | (optional) required if REST server is enabled | +| -e PORT=7556 | (optional) required if REST server is enabled | ++------------------------------------------------------+------------------------------------------------------+ +| -e CONFIG_FILE="/root/nfvbenchconfig.json | (optional) required if REST server is enabled | +------------------------------------------------------+------------------------------------------------------+ - It can be convenient to write a shell script (or an alias) to automatically insert the necessary options. +The minimal configuration file required must specify the openrc file to use (using in-container path), the PCI addresses of the 2 NIC ports to use +for generating traffic and the line rate (in each direction) of each of these 2 interfaces. + +Here is an example of mimimal configuration where: +the openrc file is located on the host current directory which is mapped under /tmp/nfvbench in the container (this is achieved using -v $PWD:/tmp/nfvbench) +the 2 NIC ports to use for generating traffic have the PCI addresses "04:00.0" and "04:00.1" + +.. code-block:: bash + { + "openrc_file": "/tmp/nfvbench/openrc", + "traffic_generator": { + "generator_profile": [ + { + "interfaces": [ + { + "pci": "04:00.0", + "port": 0, + }, + { + "pci": "04:00.1", + "port": 1, + } + ], + "intf_speed": "10Gbps", + "ip": "127.0.0.1", + "name": "trex-local", + "tool": "TRex" + } + ] + } + } + +The other options in the minimal configuration must be present and must have the same values as above. + 3. Start the Docker container ----------------------------- As for any Docker container, you can execute NFVbench measurement sessions using a temporary container ("docker run" - which exits after each NFVbench run) @@ -67,11 +102,11 @@ To run NFVBench without server mode docker run --detach --net=host --privileged -v $PWD:/tmp/nfvbench -v /dev:/dev -v /lib/modules/$(uname -r):/lib/modules/$(uname -r) --name nfvbench opnfv/nfvbench -To run NFVBench enabling REST server +To run NFVBench enabling REST server (mount the configuration json and the path for openrc) .. code-block:: bash - docker run --detach --net=host --privileged -e HOST="127.0.0.1" -e PORT=7556 -v $PWD:/tmp/nfvbench -v /dev:/dev -v /lib/modules/$(uname -r):/lib/modules/$(uname -r) --name nfvbench opnfv/nfvbench start_rest_server + docker run --detach --net=host --privileged -e HOST="127.0.0.1" -e PORT=7556 --e CONFIG_FILE="/tmp/nfvbench/nfvbenchconfig.json -v $PWD:/tmp/nfvbench -v /dev:/dev -v /lib/modules/$(uname -r):/lib/modules/$(uname -r) --name nfvbench opnfv/nfvbench start_rest_server The create an alias to make it easy to execute nfvbench commands directly from the host shell prompt: |