1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. http://creativecommons.org/licenses/by/4.0
5 Functional testing Installation
6 -------------------------------
8 Pull the Functest Docker image from the Docker hub::
10 $ docker pull opnfv/functest:brahmaputra.1.0
13 Check that the image is available::
17 Run the docker container giving the environment variables::
19 - INSTALLER_TYPE. Possible values are "apex", "compass", "fuel" or "joid".
20 - INSTALLER_IP. each installer has its installation strategy.
22 Functest may need to know the IP of the installer to retrieve the credentials
23 (e.g. usually "10.20.0.2" for fuel, not neede for joid...).
25 The minimum command to create the Functest docker file can be described as
28 docker run -it -e "INSTALLER_IP=10.20.0.2" -e "INSTALLER_TYPE=fuel" opnfv/functest:brahmaputra.1.0 /bin/bash
30 Optionally, it is possible to precise the container name through the option
33 docker run --name "CONTAINER_NAME" -it -e "INSTALLER_IP=10.20.0.2" -e "INSTALLER_TYPE=fuel" opnfv/functest:brahmaputra.1.0 /bin/bash
35 It is also possible to to indicate the path of the OpenStack creds using -v::
37 docker run -it -e "INSTALLER_IP=10.20.0.2" -e "INSTALLER_TYPE=fuel" -v <path_to_your_local_creds_file>:/home/opnfv/functest/conf/openstack.creds opnfv/functest:brahmaputra.1.0 /bin/bash
39 The local file will be mounted in the container under
40 /home/opnfv/functest/conf/openstack.creds
42 After the run command the prompt appears which means that we are inside the
43 container and ready to run Functest.
45 Inside the container, the following directory structure should be in place::
62 Basically the container includes:
64 * Functest directory to store the configuration (the OpenStack creds are paste
65 in /home/opngb/functest/conf), the data (images neede for test for offline
66 testing), results (some temporary artifacts may be stored here)
67 * Repositories: the functest repository will be used to prepare the
68 environment, run the tests. Other repositories are used for the installation
69 of the tooling (e.g. rally) and/or the retrieval of feature projects
70 scenarios (e.g. bgpvpn)
72 The arborescence under the functest repo can be described as follow::
80 | `-- traffic-profile-guidelines.rst
85 | |-- requirements.pip
96 |-- config_functest.py
97 |-- config_functest.yaml
99 |-- functest_utils.pyc
103 We may distinguish 4 different folders:
105 * commons: it is a folder dedicated to store traffic profile or any test
106 inputs that could be reused by any test project
107 * docker: this folder includes the scripts that will be used to setup the
108 environment and run the tests
109 * docs: this folder includes the user and installation/configuration guide
110 * testcases: this folder includes the scripts required by Functest internal
114 Firstly run the script to install functest environment::
116 $ ${repos_dir}/functest/docker/prepare_env.sh
118 NOTE: ${repos_dir} is a default environment variable inside the docker
119 container, which points to /home/opnfv/repos
121 Run the script to start the tests::
123 $ ${repos_dir}/functest/docker/run_tests.sh