diff --git a/docs/Examples.md b/docs/Examples.md index f9ec0231b..58788b2c3 100644 --- a/docs/Examples.md +++ b/docs/Examples.md @@ -12,7 +12,7 @@ command line. The general structure for launching an NF from a config file is Any args specified in `` or `` will replace the corresponding args in the config file. **An important note:** If no DPDK or ONVM args are passed, **but** NF args are required, the `-- --` is -still required. Additionally, launching circular or linear chains with different example NFs from a JSON config file, is supported. +still required. Additionally, launching multiple network functions at once, including circular or linear chains, from a JSON config file is supported. For documentation on developing with config files, see [NF_Dev](NF_Dev.md) diff --git a/docs/NF_Dev.md b/docs/NF_Dev.md index 456a998c1..e3f03e782 100644 --- a/docs/NF_Dev.md +++ b/docs/NF_Dev.md @@ -103,8 +103,8 @@ values. } ``` -Additionally, a developer can run the [config python script](../examples/config.py) to launch linear or circular chains of multiple example NFs from a JSON config file. An example config file can be found [here](../examples/example_chain.json). In the config file, a user can specify a number of seconds for the chain to run before shutdown with the global "TTL". If no timeout is specified, the chain will run until a raised error or a manual shutdown (Ctrl + C). -When the NF Chain is launched, if the user specifies a directory name with the global "directory", a directory will be created (if it does not already exist) with the user-specified name. If a global "directory-prefix" is specified, a directory will be created with the specified prefix + timestamp. If no directory name or prefix is specified, the default name of the created directory will the be the timestamp. Output from each NF will be continuously written to the corresponding log text file within the created or pre-existing directory. Format of the log file name is as follows: "log-NF name-instance ID". To track the output of a NF: +Additionally, a developer can run the [config python script](../examples/config.py) to deploy multiple network functions, including linear or circular chains of multiple NFs, from a JSON config file. An example config file can be found [here](../examples/example_nf_deploy.json). In the config file, a user can specify a number of seconds for the NFs to run before shutdown with the global "TTL". If no timeout is specified, the NFs will run until a raised error or a manual shutdown (Ctrl + C). +When the NFs are launched, if the user specifies a directory name with the global "directory", a directory will be created (if it does not already exist) with the user-specified name. If a global "directory-prefix" is specified, a directory will be created with the specified prefix + timestamp. If no directory name or prefix is specified, the default name of the created directory will the be the timestamp. Output from each NF will be continuously written to the corresponding log text file within the created or pre-existing directory. Format of the log file name is as follows: "log-NF name-instance ID". To track the output of a NF: ``` tail -f @@ -116,7 +116,7 @@ This script must be run within the /examples folder: python3 config.py ``` -### JSON Config File For Launching Chain of Multiple NFs +### JSON Config File For Deploying Multiple NFs ``` { diff --git a/examples/example_chain.json b/examples/example_chain.json deleted file mode 100644 index 1a28ddd66..000000000 --- a/examples/example_chain.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "globals": [ - { - "TTL": 10 - }, - { - "directory": "output_files" - } - ], - "simple_forward": [ - { - "parameters": "2 -d 1" - } - ], - "speed_tester": [ - { - "parameters": "1 -d 2 -c 16000" - }, - { - "parameters": "3 -d 3 -c 16000" - } - ] -} diff --git a/examples/example_nf_deploy.json b/examples/example_nf_deploy.json new file mode 100644 index 000000000..3c41145cf --- /dev/null +++ b/examples/example_nf_deploy.json @@ -0,0 +1,23 @@ +{ + "globals": [ + { + "TTL": 10 + }, + { + "directory": "output_files" + } + ], + "simple_forward": [ + { + "parameters": "2 -d 1" + } + ], + "speed_tester": [ + { + "parameters": "1 -d 2 -c 16000" + }, + { + "parameters": "3 -d 3 -c 16000" + } + ] +} \ No newline at end of file