Install contrail test ci on a machine
Harish Kumar edited this page Jun 14, 2016
·
2 revisions
A script provided (install.sh) to install contrail-test-ci.
$ ./install.sh -h
Install or do docker build of Contrail-test and contrail-test-ci
Usage: ./install.sh (install|docker-build) [OPTIONS] (contrail-test|contrail-test-ci)
Subcommands:
install Install contrail-test/contrail-test-ci
docker-build Build docker container
Run ./install.sh <Subcommand> -h|--help to get subcommand specific help
$ ./install.sh install -h
Install Contrail-test or contrail-test-ci
Usage: ./install.sh install [OPTIONS] (contrail-test|contrail-test-ci)
-h|--help Print help message
--test-repo REPO Contrail-test git repo, Default: github.com/juniper/contrail-test-ci.git
--test-ref REF Contrail-test git reference - commit id, branch, tag, Default: master
--fab-repo FAB_REPO Contrail-fabric-utils git repo
--fab-ref FAB_REF Contrail-fabric-utils git reference (commit id, branch, or tag), Default: master
--ci-repo CI_REPO Contrail-test-ci git repo, Default: github.com/juniper/contrail-test.git
--ci-ref CI_REF Contrail-test-ci reference (commit id, branch, or tag), Default: master
--test-artifact ARTIFACT Contrail test tar file - this tar file will be used instead of git source in case provided
--ci-artifact CI_ARTICACT Contrail test ci tar file
--fab-artifact FAB_ARTIFACT Contrail-fabric-utils tar file
-u|--package-url PACKAGE_URL Contrail-install-packages deb package web url (http:// or https://) or scp path
(ssh://<server ip/name/< package path>), if url is provided, the
package will be installed and setup local repo.
In case of scp, user name and password will be read from environment variables
SSHUSER - user name to be used during scp
SSHPASS - user password to be used during scp
positional arguments
What to install Valid options are contrail-test, contrail-test-ci
Example:
$ ./install.sh install --ci-repo https://github.com/juniper/contrail-test-ci -e /tmp/export2 -u http://nodei16/contrail-install-packages_2.21-105~juno_all.deb contrail-test-ci
$ export SSHUSER=user1 SSHPASS=password
$ ./install.sh install --test-repo https://github.com/juniper/contrail-test --test-ref working
--ci-repo https://github.com/juniper/contrail-test-ci -e /tmp/export2
-u ssh://nodei16/var/cache/artifacts/contrail-install-packages_2.21-105~juno_all.deb contrail-test-ci
- Install with artifacts
$ ./install.sh install --ci-artifact /tmp/contrail-test-ci.tar.gz \
-u http://nodei16/contrail-install-packages_2.21-105~juno_all.deb \
--fab-artifact /tmp/contrail-fabric-utils.tar.gz contrail-test-ci
Once it is installed, one should copy testbed.py to /opt/contrail/utils/fabfile/testbeds (or any custom fab path in which case, one have to provide --contrail-fab-path while running run_tests.sh). Now just go to /opt/contrail-test and run run_tests.sh as they have done before.
NOTE: No need to run any fab tasks like setup_testenv or anything. Running run_tests.sh will read testbed.py and build required files to run the tests (like sanity_params.ini, sanity_testbed.json).
Here is how I run contrail-test-ci after Install it.
- Copy testbed.py to /opt/contrail/utils/fabfile/testbeds/
- cd /opt/contrail-test
- run ./run_ci.sh with appropriate parameters