summaryrefslogtreecommitdiffstats
path: root/docs/installationprocedure/installation.instruction.rst
blob: aa1b436a179585b2142ebe1352bccbffbb8c1111 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
.. 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``.