Skip to content

Developer Quickstart

Florent Monjalet edited this page Sep 3, 2019 · 22 revisions

Using Phobos

The basic installation process and usage is described by README.md.

Compiling

These instructions describe how to compile Phobos on CentOS 7.

Dependencies

An always up-to-date dependency list can be retrieved from the Phobos specfile.

Build dependencies:

  • postgresql94-devel (from EPEL or any version compatible with Postgres 9.4)
  • glib2-devel >= 2.28
  • python-devel
  • jansson-devel >= 2.5
  • libini_config-devel
  • openssl-devel
  • libattr-devel
  • sg3_utils-devel

Runtime (and test) dependencies:

  • postgresql94-server (from EPEL or any version compatible with Postgres 9.4), although Postgres does not have to run on the same node as phobos.
  • postgresql94-contrib
  • postgresql94-libs
  • glib2 >= 2.28
  • jansson
  • libini_config
  • openssl
  • libattr
  • python
  • python-argparse
  • python-yaml
  • clustershell
  • python-psycopg2

Compilation

$ ./autogen.sh
$ ./configure.sh
$ make

Testing

Setting up the database

By default, Phobos tests expect to have a PostgreSQL database configured with a database named phobos, 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):

$ sudo -u postgres ./scripts/phobos_db_local setup_db -p phobos

And run the test suite:

$ make check

Note : For production use or manual experimentation, the database name, user and password can be set to arbitrary values (either manually or via phobos_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.

CI scripts

TODO

Clone this wiki locally