-
Notifications
You must be signed in to change notification settings - Fork 4
Developer Quickstart
The basic installation process and usage is described in Installing Phobos.
These instructions describe how to compile Phobos.
An always up-to-date dependency list can be retrieved from the Phobos specfile.
Build dependencies:
-
postgresql94-develfor CentOS 7 orpostgresql-develfor CentOS 8 (from EPEL or any version compatible with Postgres 9.4) glib2-devel >= 2.28-
python3-develfor CentOS 7 orpython36-develfor CentOS 8 jansson-devel >= 2.5libini_config-developenssl-devellibattr-develsg3_utils-develprotobuf-c-develsystemdautoconfautomakelibtoolmake
Runtime dependencies:
-
postgresql94-serverfor CentOS 7 orpostgresql-serverfor CentOS 8 (from EPEL or any version compatible with Postgres 9.4), although Postgres does not have to run on the same node as phobos. -
postgresql94-contribfor CentOS 7 orpostgresql-contribfor CentOS 8 glib2 >= 2.28janssonlibini_configopensslattrlibattr-
python3for CentOS 7 orpython36for CentOS 8 -
python-argparseif you are on CentOS 7, not needed for CentOS 8 -
python3-PyYAMLfor CentOS 7 orpython36-PyYAMLfor CentOS 8 -
python3-clustershellfor CentOS 7 orpython36-clustershellfor CentOS 8 -
python3-psycopg2for CentOS 7 orpython36-psycopg2for CentOS 8 -
python3-tabulatefor CentOS 7 orpython36-tabulatefor CentOS 8 protobufprotobuf-c
Test dependencies:
libcmockalibcmocka-devel-
python3-pylintfor CentOS 7 orpython36-pylintfor CentOS 8 gitbc-
mtxfor tape testing -
kernel-develfor tape testing -
mdadmfor tape testing -
librados2for rados testing
$ ./autogen.sh
$ ./configure
$ makePhobos tests use a PostgreSQL database configured with a name defined in the tests/phobos.conf file (currently, phobos_test), a user named phobos with phobos as a password. This configuration can be manually done or automatically done by invoking the following line (after the project has been successfully compiled):
$ phobos_conf=tests/phobos.conf
$ test_db="$(grep "dbname" "$phobos_conf" | awk -F 'dbname=' '{print $2}' | cut -d ' ' -f1)"
$ sudo -u postgres ./scripts/phobos_db_local setup_db -s -d "$test_db" -p phobosDepending on your umask, you may have to make some files readable and executable for the postgres user first:
chmod a+rx ./scripts/phobos_db{,_local}Note : For production use, manual experimentation or the integration test script
acceptance.sh, the database name, user and password can be set to arbitrary values (either manually or viaphobos_db_local, see./scripts/phobos_db_local setup_db -h). In this case, you can export the following environment variable:$ export PHOBOS_DSS_connect_string="dbname='<your db name>' user='<your user>' password='<your password>' > host=<postgresql instance hostname>"However, tests as they are written necessitate the hardcoded credentials (except for
acceptance.sh).
$ make checkBy default, only tests that use directories will be done. To execute tests with the rados pools. To execute tests with the tapes, you must either have a tape library available on your test node, or setup a virtual tape library, as explained below.
If you have all the Ceph related packages installed, you can use the provided script to properly setup Ceph and RADOS for the tests:
$ sudo ci/setup_ceph.sh
Then, to execute the tests, you must first recompile the project and add --enable-rados to the ./configure call, as such:
$ ./autogen.sh
$ ./configure --enable-rados
$ makeThen, you can run the tests, including those specific for RADOS:
$ make checkTo test all the tape, LTFS and SCSI related code, Phobos needs to have access to a tape library. By default, it will look for the /dev/changer device to gain access to a tape library (can be changed in configuration).
Having a real tape library to test Phobos is not very handy, this is why we tend to use a VTL (Virtual Tape Library), emulating a real tape library. As Phobos uses LTFS, the VTL needs to support physical partitioning of tapes, this is why we use Quadstorvtl instead of the opensource mhvtl.
The project was tested with QuadstorVTL 3.0.36, the RPM can be downloaded here https://www.quadstor.com/vtl-extended-edition-downloads.html.
Once QuadstorVTL is installed, run ci/setup_quadstor.sh to set up the appropriate drives and tapes for the Phobos test suite:
$ sudo ci/setup_quadstor.shThe test suite can then be run as root (for /dev/changer access), and this time all tape related tests (test_scsi.sh, and a subpart of test_store_retry.sh and acceptance.sh) will be executed:
$ sudo make checkMost of the setup described in this page is summed up by the ci/run-ci.sh script.