Merge "Create docker layer container for Docker Bench"
[validation.git] / bluval / README.rst
1 .. ############################################################################
2 .. Copyright (c) 2019 AT&T, ENEA AB, Nokia and others                         #
3 ..                                                                            #
4 .. Licensed under the Apache License, Version 2.0 (the "License");            #
5 .. you maynot use this file except in compliance with the License.            #
6 ..                                                                            #
7 .. You may obtain a copy of the License at                                    #
8 ..       http://www.apache.org/licenses/LICENSE-2.0                           #
9 ..                                                                            #
10 .. Unless required by applicable law or agreed to in writing, software        #
11 .. distributed under the License is distributed on an "AS IS" BASIS, WITHOUT  #
12 .. WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.           #
13 .. See the License for the specific language governing permissions and        #
14 .. limitations under the License.                                             #
15 .. ############################################################################
16
17
18 Overview
19 ========
20 BluVal is a diagnostic toolset framework to validate different layers in the
21 Akraino infrastructure developed and used in Akraino edge stack. BluVal
22 integrates different test cases, its development employs a declarative approach
23 that is version controlled in LF Gerrit. They are integrated in CI/CD tool
24 chain where peer Jenkins jobs can run the test cases and the results are
25 reported in LF Repo (Nexus). The test cases cover all blueprint layers in the
26 cluster.
27
28 Installation and execution
29 ==========================
30 Bluval tool can be ran directly from the repo, or can be called from a container.
31
32
33 When ran directly, minimum requirements are python verson 3.5. To setup the
34 environment follow the commands below.
35
36 .. code-block:: console
37
38     ns156u@aknode82:~$ git clone https://gerrit.akraino.org/r/validation.git
39     ns156u@aknode82:~$ cd validation
40     ns156u@aknode82:~/validation$ python -m venv .py35
41     ns156u@aknode82:~/validation$ source .py35/bin/activate
42     (.py35) ns156u@aknode82:~/validation$ pip install -r bluval/requirements.txt
43
44 To run the tests for a certain blueprint, follow the commands below. Optionally
45 the layer of testing can be specified too.
46
47 .. code-block:: console
48     (.py35) ns156u@aknode82:~/validation$ python bluval/bluval.py -l \
49                              hardware dummy # this will run hardware test cases of dummy blue print
50     (.py35) ns156u@aknode82:~/validation$ deactivate
51
52
53 When ran from a container, docker needs to be installed on the machine.
54 To run the tests for a certain blueprint, follow the steps below. Optionally
55 the layer of testing can be specified too.
56
57 Note that before issuing the blucon command, you need to fill in the volumes
58 that will be mounted in the container. These are locations of the config files
59 or access files (ssh keys or clients configs) that will be used to connect to
60 the cluster. Also custom volumes can be added here.
61
62 .. code-block:: console
63
64     ns156u@aknode82:~$ git clone https://gerrit.akraino.org/r/validation.git
65     ns156u@aknode82:~$ cd validation
66     ns156u@aknode82:~$ vi bluval/volumes.yaml # fill in the volumes to be \
67                                                 mounted in the container
68     ns156u@aknode82:~$ python3 bluval/blucon.py dummy -l hardware