summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorAlec Hothan <ahothan@cisco.com>2017-09-27 18:01:25 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-09-27 18:01:25 +0000
commita4f1f6a51ba9a9cd8c09c49cddc577ed418ca73d (patch)
tree5b7397957dc7d57f13165e54a9e0a4d9efa5bbb8 /docs
parente88c91badeaea2f1b0dbea57ead41823027441f3 (diff)
parentc5c27a690fe8ce01f047330327e5bff3afb048bd (diff)
Merge "NFVBENCH-34 Pass configuration file to entrypoint script"
Diffstat (limited to 'docs')
-rw-r--r--docs/testing/user/userguide/quickstart_docker.rst47
-rw-r--r--docs/testing/user/userguide/server.rst2
2 files changed, 42 insertions, 7 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:
diff --git a/docs/testing/user/userguide/server.rst b/docs/testing/user/userguide/server.rst
index e08f663..1c1e052 100644
--- a/docs/testing/user/userguide/server.rst
+++ b/docs/testing/user/userguide/server.rst
@@ -84,7 +84,7 @@ Example of return when the run completes:
<http-url>/start_run (POST)
^^^^^^^^^^^^^^^^^^^^^
-This request starts an NFVBench run with passed configurations.
+This request starts an NFVBench run with passed configurations. If no configuration is passed, a run with default configurations will be executed.
Example request: curl -XPOST 'localhost:7556/start_run' -H "Content-Type: application/json" -d @nfvbenchconfig.json