1 Functional testing Installation
2 ===============================
4 Pull the Functest Docker image from the Docker hub::
6 $ docker pull opnfv/functest:brahmaputra.1.0
9 Check that the image is available::
13 Run the docker container giving the environment variables::
15 - INSTALLER_TYPE. Possible values are "apex", "compass", "fuel" or "joid".
16 - INSTALLER_IP. each installer has its installation strategy.
18 Functest may need to know the IP of the installer to retrieve the credentials
19 (e.g. usually "10.20.0.2" for fuel, not neede for joid...).
21 The minimum command to create the Functest docker file can be described as
24 docker run -it -e "INSTALLER_IP=10.20.0.2" -e "INSTALLER_TYPE=fuel" opnfv/functest:brahmaputra.1.0 /bin/bash
26 Optionally, it is possible to precise the container name through the option
29 docker run --name "CONTAINER_NAME" -it -e "INSTALLER_IP=10.20.0.2" -e "INSTALLER_TYPE=fuel" opnfv/functest:brahmaputra.1.0 /bin/bash
31 It is also possible to to indicate the path of the OpenStack creds using -v::
33 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
35 The local file will be mounted in the container under
36 /home/opnfv/functest/conf/openstack.creds
38 After the run command the prompt appears which means that we are inside the
39 container and ready to run Functest.
41 Inside the container, the following directory structure should be in place::
58 Basically the container includes:
60 * Functest directory to store the configuration (the OpenStack creds are paste
61 in /home/opngb/functest/conf), the data (images neede for test for offline
62 testing), results (some temporary artifacts may be stored here)
63 * Repositories: the functest repository will be used to prepare the
64 environment, run the tests. Other repositories are used for the installation
65 of the tooling (e.g. rally) and/or the retrieval of feature projects
66 scenarios (e.g. bgpvpn)
68 The arborescence under the functest repo can be described as follow::
76 | `-- traffic-profile-guidelines.rst
81 | |-- requirements.pip
92 |-- config_functest.py
93 |-- config_functest.yaml
95 |-- functest_utils.pyc
99 We may distinguish 4 different folders:
101 * commons: it is a folder dedicated to store traffic profile or any test
102 inputs that could be reused by any test project
103 * docker: this folder includes the scripts that will be used to setup the
104 environment and run the tests
105 * docs: this folder includes the user and installation/configuration guide
106 * testcases: this folder includes the scripts required by Functest internal
110 Firstly run the script to install functest environment::
112 $ ${repos_dir}/functest/docker/prepare_env.sh
114 NOTE: ${repos_dir} is a default environment variable inside the docker
115 container, which points to /home/opnfv/repos
117 Run the script to start the tests::
119 $ ${repos_dir}/functest/docker/run_tests.sh