This is an old revision of the document!
This is the unofficial procedure to run Functest within a docker.
$ curl -sSL https://get.docker.com/ | sh
Ubuntu: https://docs.docker.com/installation/ubuntulinux/
RHEL: https://docs.docker.com/installation/rhel/
$ sudo usermod -aG docker <your_user>
$ docker pull opnfv/functest
$ docker images
$ docker run -ti -e "INSTALLER_TYPE=fuel" -e "INSTALLER_IP=10.20.0.2" opnfv/functest
Now, you are inside the docker container.
$ {repos_dir}/functest/docker/start.sh
NOTE: This will run ALL the tests we have for SR1:
* In order to run only 1 suite of Rally bench, you need to modify the call to rally within start.sh script:
$ vi {repos_dir}/functest/docker/start.sh (go to line 126) python ${FUNCTEST_REPO_DIR}/testcases/VIM/OpenStack/CI/libraries/run_rally.py --debug ${FUNCTEST_REPO_DIR}/ all Change "all" to "keystone" for example: python ${FUNCTEST_REPO_DIR}/testcases/VIM/OpenStack/CI/libraries/run_rally.py --debug ${FUNCTEST_REPO_DIR}/ glance Other options are: - ['authenticate', 'glance', 'cinder', 'heat', 'keystone', 'neutron', 'nova', 'quotas', 'requests', 'vm', 'tempest', 'all', 'smoke']
# Remove any docker containers leftovers $ docker ps | grep opnfv/functest | awk '{print $1}' | xargs docker stop &>/dev/null $ docker ps -a | grep opnfv/functest | awk '{print $1}' | xargs docker rm &>/dev/null $ docker images | grep opnfv/functest | awk '{print $3}' | xargs docker rmi &>/dev/null # Pull and store fresh image from Dockerhub $ docker pull opnfv/functest # Run Functest (example for Fuel) $ docker run -t -e "INSTALLER_TYPE=fuel" -e "INSTALLER_IP=10.20.0.2" opnfv/functest \ "/home/opnfv/repos/functest/functest/docker/start.sh"
NOTE: the output will be shown on the screen until you press ^C. To attach to the docker output again type:
$ docker ps $ docker attach <ID_of_the_container>