summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorhongbo tian <hongbo.tianhongbo@huawei.com>2016-10-28 05:54:43 +0000
committerGerrit Code Review <gerrit@opnfv.org>2016-10-28 05:54:43 +0000
commitd8c7fcfd3dd2bf331ca65ca41b593d65e4c0d97a (patch)
treecf35385f9f8ff8fb14e595cda7b46789703d6d76 /docs
parentbb5d6a119196dcfeabf141cca23b6495fc5e386e (diff)
parent3203d94f6fafd051eb648c618502aeecdd723224 (diff)
Merge "dovetail tool: developer userguide document"
Diffstat (limited to 'docs')
-rw-r--r--docs/dovetailtool/dovetail.tool.configtemplate.rst (renamed from docs/userguide/04-dovetail_config_template.rst)61
-rw-r--r--docs/dovetailtool/dovetail.tool.configuration.rst35
-rw-r--r--docs/dovetailtool/dovetail.tool.installation.rst154
-rw-r--r--docs/dovetailtool/dovetail.tool.overview.rst27
-rw-r--r--docs/dovetailtool/index.rst (renamed from docs/installationprocedure/index.rst)6
-rw-r--r--docs/installationprocedure/feature.configuation.rst45
-rw-r--r--docs/installationprocedure/installation.instruction.rst142
-rw-r--r--docs/userguide/index.rst1
8 files changed, 246 insertions, 225 deletions
diff --git a/docs/userguide/04-dovetail_config_template.rst b/docs/dovetailtool/dovetail.tool.configtemplate.rst
index fce99d21..9c0748a9 100644
--- a/docs/userguide/04-dovetail_config_template.rst
+++ b/docs/dovetailtool/dovetail.tool.configtemplate.rst
@@ -3,18 +3,19 @@
.. http://creativecommons.org/licenses/by/4.0
.. (c) OPNFV, Huawei Technologies Co.,Ltd and others.
+======================
Config Template Syntax
======================
-Dovetail uses Functest/Yardstick Docker container to run its testcases. So you need to give
-configurations for building the container and the commands it needs to do. In dovetail,
-all of these are defined in config yaml files ``dovetail/dovetail/conf/functest_config.yml``
-and ``dovetail/dovetail/conf/yardstick_config.yml``.
+For Dovetail tool, the config files are located in ``dovetail/dovetail/conf``, which are written
+in yaml format. As both functest and yardstick are utilized by Dovetail, their configuration files
+should be configured as follows, within the ``functest_config.yml`` and ``yardstick_config.yml`` files,
+respectively.
-Functest template syntax
-------------------------
+Functest config template syntax
+-------------------------------
-For example, you can define your ``functest_config.yml`` as:
+An example functest configuration is shown as follows:
::
@@ -41,29 +42,19 @@ For example, you can define your ``functest_config.yml`` as:
file_path: 'tempest/tempest.log'
db_url: 'http://testresults.opnfv.org/test/api/v1/results?case=%s&last=1'
-First, you need to give the image that you want to use for building functest/yardstick container.
-Besides, there also need some envirnment parameters such as ``INSTALLER_TYPE`` and ``INSTALLER_IP``
-and the options for you container. Then the functest/yardstick container can be build with your
-settings.
-
-Second, there need three kinds of commands, ``pre_condition``, ``testcase`` and ``post_condition``.
-If you want to do some cleanups or preparations, the commands can be put into ``pre_condition``
-section orderly. All commands in this section will just be executed once in the begining.
-The ``testcase`` section does the main jobs of the testing. All functest testcases will use the
-container to execute these commands one by one. After finishing that, the test is accomplished
-and the results are stored in files or uploaded to database. The ``post_condition`` section
-does some work such as clean Docker images or something else after all testcases finished.
-All commands in this section will just execute once.
-
-Besides, there need a ``result`` section and it gives the directory of the functest/yardstick
-results. The ``store_type`` should be the same with the cmds in ``testcase``. That means if the
-test results are stored in files, then store_type need to be file and the file_path is also
-needed. If the test results are uploaded to database, then a db_url is needed for acquiring the results.
+- ``image_name`` and ``docker_tag`` sections define the docker image pulled from the public dockerhub.
+- ``envs`` should be correctly configed according to the SUT(System Under Test).
+- ``pre_condition`` represents some cleanups or preparations.
+ ``testcase`` represents the testcases running cmds.
+ ``post_condition`` represents some cleanups needed after all testcases finished.
+- ``result`` section gives the directory of the dovetail tool test result.
+ ``db_url`` gives the database URL of the dovetail results to be stored.
-Yardstick template syntax
--------------------------
+Yardstick config template syntax
+---------------------------------
-The framework of ``yardstick_config.yml`` is almost the same as ``functest_config.yml``.
+The configuration in ``yardstick_config.yml`` is similiar to ``functest_config.yml``,
+and an example is shown as follows:
::
@@ -97,12 +88,13 @@ The framework of ``yardstick_config.yml`` is almost the same as ``functest_confi
file_path: 'yardstick.log'
db_url: 'http://testresults.opnfv.org/test/api/v1/results?case=%s&last=1'
-The main differences between ``yardstick_config.yml`` and ``functest_config.yml`` are the commands.
+The main differences between ``yardstick_config.yml`` and ``functest_config.yml``
+are the ``cmds`` subsection.
Jinja2 template syntax
----------------------
-Note that you can use jinja2 template for your parameters such as ``{{script_testcase}}``. The
+Jinja2 module can be used to config the ``{{script_testcase}}``. The
parameters are defined in ``dovetail/dovetail/conf/dovetail_config.yml``:
::
@@ -113,8 +105,8 @@ parameters are defined in ``dovetail/dovetail/conf/dovetail_config.yml``:
- name: script_testcase
path: '("scripts", "testcase")'
-Here ``path`` is the path in testcase config files that you can find the value of parameters. Take
-``script_testcase`` as the example. For testcase dovetail.ipv6.tc001:
+Here ``path`` is the path defined in the testcase configuration files.
+Take ``script_testcase`` as an example. For testcase ``dovetail.ipv6.tc001``:
::
@@ -129,6 +121,5 @@ Here ``path`` is the path in testcase config files that you can find the value o
- tempest.api.network.test_networks.BulkNetworkOpsIpV6Test.test_bulk_create_delete_port
- tempest.api.network.test_networks.BulkNetworkOpsIpV6Test.test_bulk_create_delete_subnet
-The path ("scripts", "testcase") means 'testcase' subsection of 'scripts' section. So follow
-the path ("scripts", "testcase") we can get the value of ``{{script_testcase}}`` that is
-'tempest_smoke_serial'.
+The path ("scripts", "testcase") means 'testcase' is the subsection of 'scripts' section. From above,
+by following the path ("scripts", "testcase") we can get the value of ``{{script_testcase}}`` is 'tempest_smoke_serial'.
diff --git a/docs/dovetailtool/dovetail.tool.configuration.rst b/docs/dovetailtool/dovetail.tool.configuration.rst
new file mode 100644
index 00000000..8e97e73c
--- /dev/null
+++ b/docs/dovetailtool/dovetail.tool.configuration.rst
@@ -0,0 +1,35 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International
+.. License.
+.. http://creativecommons.org/licenses/by/4.0
+.. (c) OPNFV, Huawei Technologies Co.,Ltd and others.
+
+=========================
+Testcase Template Syntax
+=========================
+
+The testcases used for compliance and certification are defined in the ``dovetail/testcase`` directory,
+which are defined in yaml format. Take the testcase ``ipv6.tc001.yml`` as an example, it is shown as:
+
+::
+
+ dovetail.ipv6.tc001:
+ name: dovetail.ipv6.tc001
+ objective: VIM ipv6 operations, to create/delete network, port and subnet in bulk operation
+ scripts:
+ type: functest
+ testcase: tempest_smoke_serial
+ sub_testcase_list:
+ - tempest.api.network.test_networks.BulkNetworkOpsIpV6Test.test_bulk_create_delete_network
+ - tempest.api.network.test_networks.BulkNetworkOpsIpV6Test.test_bulk_create_delete_port
+ - tempest.api.network.test_networks.BulkNetworkOpsIpV6Test.test_bulk_create_delete_subnet
+
+- At least three sections named 'name', 'objective', 'scripts' must be included
+- Section 'name' distinguishes different test cases used for compliance and certification,
+ and should start with ``dovetail.``
+- Section 'objective' describes what this testcase does
+- Section 'scripts' has subsections such as 'type', 'testcase' and 'sub_testcase_list'
+- Two kinds of 'type' is supported by now, functest and yardstick
+- For functest, the 'testcase' represents the testcases in slicing/tier,
+ 'sub_testcase_list' represents the testcases in this slicing compliance and certification will use.
+ For yardstick, since it is not sliced by now, 'sub_testcase_list' is not needed, only to edit the 'testcase' part
+ such as ``yardstick_tc027``
diff --git a/docs/dovetailtool/dovetail.tool.installation.rst b/docs/dovetailtool/dovetail.tool.installation.rst
new file mode 100644
index 00000000..dcd856bc
--- /dev/null
+++ b/docs/dovetailtool/dovetail.tool.installation.rst
@@ -0,0 +1,154 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International
+.. License.
+.. http://creativecommons.org/licenses/by/4.0
+.. (c) OPNFV, Huawei Technologies Co.,Ltd and others.
+
+===========================
+Dovetail Tool Installation
+===========================
+
+Abstract
+########
+
+The Dovetail tool supports installation either directly on the Linux host, or within a Docker container.
+The detailed installation procedure on the Linux host or via the Docker container are shown
+in the following sections.
+
+There is a need to config the following parameters before Dovetail tool
+running on the SUT (System Under Test):
+
+::
+
+ SUT_TYPE, SUT type, e.g., apex, compass, fuel, joid, etc
+ SUT_IP, SUT external network IP, e.g., 192.168.200.2
+ NODE_NAME, this can be shown in the test result for users to see which pod the dovetail tool runs
+ DEPLOY_SCENARIO, deployment scenario, e.g., os-nosdn-nofeature-ha
+ BUILD_TAG, this can be shown in the test result for users to identify logs
+ CI_DEBUG, true for debug information printed and false for not printed
+ DEPLOY_TYPE, baremetal or virtual
+
+Dovetail tool installation on local Linux host environment
+##########################################################
+
+In order to install Dovetail into a local Linux host environment, the following steps should
+be performed:
+
+Downloading Dovetail tool
+--------------------------
+
+Source code downloading:
+
+::
+
+ git clone https://gerrit.opnfv.org/gerrit/dovetail
+
+Environment preparation
+-----------------------
+
+Dovetail configuration:
+
+::
+
+ cd {dovetail_path}/dovetail/conf
+ vim functest_config.yml
+ vim yardstick_config.yml
+
+To modify the ``envs`` parameters, e.g., SUT_TYPE, SUT_IP, NODE_NAME,
+DEPLOY_SCENARIO, BUILD_TAG, CI_DEBUG, DEPLOY_TYPE, in the yml files.
+
+System dependencies are installed via the ``prepare_env.py`` file, and you will need ``sudo``
+access to complete the installation.
+
+::
+
+ cd {dovetail_path}/dovetail/dovetail
+ python prepare_env.py
+
+At this point the environment is now ready for Dovetail execution.
+
+Compliance and certification test cases
+----------------------------------------
+
+The compliance and certification test cases can be defined under the ``/dovetail/cert``
+directory, which is defined in yaml format.
+A sample file named ``basic.yml`` is provided as follows:
+
+::
+
+ certification_basic:
+ name: certification_basic
+ testcase_list:
+ - dovetail.ipv6.tc001
+
+The testcase listed here is dovetail.ipv6.tc001, defined within ``dovetail/testcase``.
+
+Note: if a new test case yaml file is created, its name should start with ``certification_``,
+in similiar fashion as the sample file ``certification_basic``.
+
+Running Dovetail tool
+---------------------
+
+After environment preparation is complete and test cases added, the Dovetail tool can be run with
+
+::
+
+ python run.py --scenario basic
+
+The value ``basic`` passed to the ``scenario`` flag can be replaced with the test cases yaml file.
+If not argument is given, the basic scenario will be run as the default.
+
+Running Dovetail in a Docker container
+########################################
+
+The Dovetail tool can be run in a Docker container by utilizing the following steps:
+
+Pull Dovetail Docker image from public Dockerhub
+------------------------------------------------
+
+::
+
+ sudo docker pull opnfv/dovetail:<Tag>
+
+<Tag> here is the version, 'latest' is used for the master branch.
+
+Dovetail Docker container creation
+----------------------------------
+
+Next, create the ``dovetail-docker-env`` file to define the environment parameters ::
+
+ INSTALLER_TYPE=compass
+ INSTALLER_IP=192.168.200.2
+ DEPLOY_TYPE=baremetal
+ DEPLOY_SCENARIO=ha-nosdn
+ CI_DEBUG=true
+
+Then to instantiate the Dovetail Docker container, execute::
+
+ sudo docker run --privileged=true --rm -t \
+ --env-file dovetail-docker-env \
+ -v /home/opnfv/dovetail/results:/home/opnfv/dovetail/results \
+ -v /var/run/docker.sock:/var/run/docker.sock \
+ --name <Dovetail_Container_Name> \
+ opnfv/dovetail:<Tag> /bin/bash
+
+To attach dovetail container and Running test cases
+----------------------------------------------------
+
+Before connecting to the container, you can check the container status by running ::
+
+ docker ps -a
+
+Attach to the container by starting it and obtaining a bash prompt with ::
+
+ docker exec -it <Dovetail_Container_Name> bash
+
+Inside the container the following commands can be executed to trigger the testcases ::
+
+ cd /home/opnfv/dovetail/dovetail
+ python run.py --scenario basic
+
+Results Output
+###############
+
+The running log is stored in ``/home/opnfv/dovetail/results/dovetail.log``.
+The certification report is stored in ``/home/opnfv/dovetail/results/dovetail_report.txt``.
diff --git a/docs/dovetailtool/dovetail.tool.overview.rst b/docs/dovetailtool/dovetail.tool.overview.rst
new file mode 100644
index 00000000..a1133f34
--- /dev/null
+++ b/docs/dovetailtool/dovetail.tool.overview.rst
@@ -0,0 +1,27 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International
+.. License.
+.. http://creativecommons.org/licenses/by/4.0
+.. (c) OPNFV, Huawei Technologies Co.,Ltd and others.
+
+==============
+Dovetail Tool
+==============
+
+What is Dovetail tool
+#####################
+
+A toolset for providing an evaluation of a deployed cloud environment for OPNFV certification.
+
+Overview
+########
+
+Dovetail tool intends on being THE source of tools to provide evaluation of the use of OPNFV trademarks.
+
+Dovetail tool provides users with a wrapper which leverage other test projects, such as Functest,
+Yardstick, etc, that helps to provide evaluation of the use of OPNFV trademarks.
+It does so by validating any NFV(Network Function Virtualization) implementation against the test cases in Dovetail.
+
+Get involved!
+#############
+- Wiki: https://wiki.opnfv.org/display/dovetail/Dovetail+Home
+- Git Repo: https://git.opnfv.org/dovetail
diff --git a/docs/installationprocedure/index.rst b/docs/dovetailtool/index.rst
index 9a755800..a025cd50 100644
--- a/docs/installationprocedure/index.rst
+++ b/docs/dovetailtool/index.rst
@@ -10,5 +10,7 @@ Dovetail Overview
.. toctree::
:maxdepth: 2
- installation.instruction
- feature.configuation
+ dovetail.tool.overview.rst
+ dovetail.tool.installation.rst
+ dovetail.tool.configuation.rst
+ dovetail.tool.configtemplate.rst
diff --git a/docs/installationprocedure/feature.configuation.rst b/docs/installationprocedure/feature.configuation.rst
deleted file mode 100644
index 0bc4ae33..00000000
--- a/docs/installationprocedure/feature.configuation.rst
+++ /dev/null
@@ -1,45 +0,0 @@
-.. This work is licensed under a Creative Commons Attribution 4.0 International
-.. License.
-.. http://creativecommons.org/licenses/by/4.0
-.. (c) OPNFV, Huawei Technologies Co.,Ltd and others.
-
-Testcase Template Syntax
-=========================
-
-The testcases certification are defined in ``dovetail/dovetail/testcase``.
-Take testcase ``ipv6.tc001.yml`` as an example.
-
-Basic template syntax
----------------------
-
-::
-
- dovetail.ipv6.tc001:
- name: dovetail.ipv6.tc001
- objective: VIM ipv6 operations, to create/delete network, port and subnet in bulk operation
- scripts:
- type: functest
- testcase: tempest_smoke_serial
- sub_testcase_list:
- - tempest.api.network.test_networks.BulkNetworkOpsIpV6Test.test_bulk_create_delete_network
- - tempest.api.network.test_networks.BulkNetworkOpsIpV6Test.test_bulk_create_delete_port
- - tempest.api.network.test_networks.BulkNetworkOpsIpV6Test.test_bulk_create_delete_subnet
-
-The testcase needs at least three keys named as 'name', 'objective' and 'scripts'. The whole
-dovetail project can just recognize testcases by the 'name' section, which here is
-'dovetail.ipv6.tc001'. The 'objective' describes what exactly this testcase does. In the
-'scripts' part, there are some subsections such as 'type', 'testcase' and 'sub_testcase_list'.
-Dovetail now supports two kinds of types, functest and yardstick. If you define the type as
-functest, then you need to give the functest testcase that you want to use. If the type is
-yardstick, then a yardstick testcase is needed. The 'sub_testcase_list' lists the sub_testcases
-that you put a high value on. Even though the whole testcase faild, we still think it passed
-when all the sub_testcases pass. The sub_testcase_list is just available for functest. When
-for yardstick testcase, retain 'sub_testcase_list' section and keep the content empty.
-
-::
-
- sub_testcase_list:
- -
-
-This is the definition of the dovetail testcases. They can just be tested by adding into
-scenarios such as ``cert/basic.yml``.
diff --git a/docs/installationprocedure/installation.instruction.rst b/docs/installationprocedure/installation.instruction.rst
deleted file mode 100644
index aa1b436a..00000000
--- a/docs/installationprocedure/installation.instruction.rst
+++ /dev/null
@@ -1,142 +0,0 @@
-.. This work is licensed under a Creative Commons Attribution 4.0 International
-.. License.
-.. http://creativecommons.org/licenses/by/4.0
-.. (c) OPNFV, Huawei Technologies Co.,Ltd and others.
-
-=====================
-Dovetail Installation
-=====================
-
-Abstract
-========
-
-Dovetail currently supports installation on Ubuntu 14.04 or by using a docker image.
-Detailed steps about installing dovetail can be found below.
-
-To use dovetail you should have access to an OpenStack environment,
-with at least Nova, Neutron, Glance, Keystone and Heat installed.
-
-
-Run dovetail on local machine
-=============================
-
-The steps needed to run dovetail on Ubuntu are:
-
-1. Download source code and prepare environment.
-2. Create certification configuration file.
-3. Run certification.
-
-
-Download dovetail and prepare environment
------------------------------------------
-
-The source code of dovetail can be got from Gerrit:
-
-::
-
- git clone https://gerrit.opnfv.org/gerrit/dovetail
-
-After that you need to prepare the environment which means install some tools,
-modules and anything else dovetail needs. A file named ``prepare_env.py`` can
-do all of these for you.
-
-::
-
- cd dovetail/dovetail/
- python prepare_env.py
-
-Now the environment should be prepared for running the certification.
-
-Besides, you may want to install it in a python virtualenv, that is beyond the scope
-of this installation instruction.
-
-Create certification configuration file
----------------------------------------
-
-You can wirte a certification configuration file with the format of yaml,
-which can be defined to meet your own requirements. The yaml file should
-be located in the folder ``dovetail/dovetail/cert``. There provide a sample
-file named ``basic.yml``.
-
-::
-
- certification_basic:
- name: certification_basic
- testcase_list:
- - dovetail.ipv6.tc001
-
-As you can see, the configuration file combines the testcases you want to run
-together, and all of them should already been defined in ``dovetail/dovetail/testcase``.
-The name of the configuration file should be certification_%s, where %s (here is basic)
-can be used to run this certification.
-
-
-Run the certification
----------------------
-
-When you get the dovetail source code, prepare the environment and define the
-certification configuration file, you can then run the certification. Take
-certification_basic as the example. You can run it using the file ``run.py`` with
-basic (scenario name) as its argument.
-
-::
-
- python run.py --scenario basic
-
-If you did not give an argument, it will be default set as basic.
-
-
-Run dovetail on Docker container
-================================
-
-steps:
-1. pull image
-2. run container
-3. config
-4. run testcase
-
-pull image
-----------
-
-Get the latest docker image from docker hub.
-
-::
- sudo docker pull opnfv/dovetail:latest
-
-run container
--------------
-
-Start a container from the image that you just pulled.
-
-::
- sudo docker run -it --privileged=true -v /home/opnfv/dovetail/results:/home/opnfv/dovetail/results
- -v /var/run/docker.sock:/var/run/docker.sock opnfv/dovetail:latest "/bin/bash"
-
-config
-------
-
-For now, we need only change value of ``INSTALLER_TYPE`` and ``INSTALLER_IP``
-of the variable ``envs`` to your own environment.
-
-::
- sudo docker exec -it $(CONTAINER_ID) "/bin/bash"
- vi /home/opnfv/dovetail/dovetail/conf/functest_config.yml
- vi /home/opnfv/dovetail/dovetail/conf/yardstick_config.yml
-
-run testcase
-------------
-
-In docker, you just run following cmds to execute the testcase.
-
-::
- cd /home/opnfv/dovetail/dovetail
- python run.py
-
-
-
-
-Output
-======
-
-The running log is stored in ``/home/opnfv/dovetail/results/dovetail.log``.
-The report of certification is stored in ``/home/opnfv/dovetail/results/dovetail_report.txt``.
diff --git a/docs/userguide/index.rst b/docs/userguide/index.rst
index 0dcf55ce..03246e7b 100644
--- a/docs/userguide/index.rst
+++ b/docs/userguide/index.rst
@@ -14,4 +14,3 @@ Dovetail - user guide
./01-introduction.rst
./02-certification_criteria.rst
./03-certification_progress.rst
- ./04-dovetail_config_template.rst