X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=docs%2Fuserguide%2Farchitecture.rst;h=3abb67b7d510b12b803aa56adb00cb99b7ebf843;hb=3cf1c2162d800e4f5a5596bdf54732ba906c95f6;hp=c34a3c857e868ccdfb82eb4d938a3b71fd7735f4;hpb=e2876079f91b617bbcfc63b1e75e808319b8cd75;p=yardstick.git diff --git a/docs/userguide/architecture.rst b/docs/userguide/architecture.rst old mode 100644 new mode 100755 index c34a3c857..3abb67b7d --- a/docs/userguide/architecture.rst +++ b/docs/userguide/architecture.rst @@ -156,26 +156,80 @@ on OPNFV testing dashboard which use MongoDB as backend. Logical View ============ -TBD(Qiliang) - -Process View (Test execution flow) -================================== -TBD(Limingjiang) - -Deployment View -=============== -TBD(Patrick) +Yardstick Logical View describes the most important classes, their +organization, and the most important use-case realizations. +Main classes: +**TaskCommands** - "yardstick task" subcommand handler. +**HeatContext** - Do test yaml file context section model convert to HOT, +deploy and undeploy Openstack heat stack. +**Runner** - Logic that determines how a test scenario is run and reported. +**TestScenario** - Type/class of measurement for example Ping, Pktgen, (Iperf, +LmBench, ...) +**Dispatcher** - Choose user defined way to store test results. +TaskCommands is the "yardstick task" subcommand's main entry. It takes yaml +file (e.g. test.yaml) as input, and uses HeatContext to convert the yaml +file's context section to HOT. After Openstacik heat stack is deployed by +HeatContext with the converted HOT, TaskCommands use Runner to run specified +TestScenario. During first runner initialization, it will create output +process. The output process use Dispatcher to push test results. The Runner +will also create a process to execute TestScenario. And there is a +multiprocessing queue between each runner process and output process, so the +runner process can push the real-time test results to the storage media. +TestScenario is commonly connected with VMs by using ssh. It sets up VMs and +run test measurement scripts through the ssh tunnel. After all TestScenaio +is finished, TaskCommands will undeploy the heat stack. Then the whole test is +finished. +.. image:: images/Logical_view.png + :width: 800px + :alt: Yardstick Logical View +Process View (Test execution flow) +================================== +Yardstick process view shows how yardstick runs a test case. Below is the +sequence graph about the test execution flow using heat context, and each +object represents one module in yardstick: +.. image:: images/test_execution_flow.png + :width: 800px + :alt: Yardstick Process View + +A user wants to do a test with yardstick. He can use the CLI to input the +command to start a task. "TaskCommands" will receive the command and ask +"HeatContext" to parse the context. "HeatContext" will then ask "Model" to +convert the model. After the model is generated, "HeatContext" will inform +"Openstack" to deploy the heat stack by heat template. After "Openstack" +deploys the stack, "HeatContext" will inform "Runner" to run the specific test +case. + +Firstly, "Runner" would ask "TestScenario" to process the specific scenario. +Then "TestScenario" will start to log on the openstack by ssh protocal and +execute the test case on the specified VMs. After the script execution +finishes, "TestScenario" will send a message to inform "Runner". When the +testing job is done, "Runner" will inform "Dispatcher" to output the test +result via file, influxdb or http. After the result is output, "HeatContext" +will call "Openstack" to undeploy the heat stack. Once the stack is +undepoyed, the whole test ends. +Deployment View +=============== +Yardstick deployment view shows how the yardstick tool can be deployed into the +underlying platform. Generally, yardstick tool is installed on JumpServer(see +`03-installation` for detail installation steps), and JumpServer is +connected with other control/compute servers by networking. Based on this +deployment, yardstick can run the test cases on these hosts, and get the test +result for better showing. + +.. image:: images/Deployment.png + :width: 800px + :alt: Yardstick Deployment View Yardstick Directory structure =============================