1. Setup development environment

1.1. Source Code

$ git clone https://github.com/release-engineering/product-definition-center.git

1.2. Installation

1.2.1. Option 1: Start it on RPM

For development purposes, install following deps:

1.2.2. Option 2: Start it on virtualenv

  • Koji is not available on PyPI. You must install the koji package to your system via

    $ sudo yum install koji

    before creating a virtualenv.

  • After that, run

    $ pip install virtualenvwrapper

    and setup according to ‘Setup’ steps in /usr/bin/virtualenvwrapper.sh. Then do with

    $ mkvirtualenv pdc --system-site-packages

    to include koji into your pdc virtualenv.

  • run the following

    $ workon pdc
    $ pip install -r requirements/devel.txt

    to active pdc virtualenv and install all the deps.

1.3. Customize settings

You can use the dist settings template by copying it to settings_local.py:

$ cp settings_local.py.dist settings_local.py

Feel free to customize your settings_local.py. Changes will be populated automatically. In local development environment, you may need to set “DEBUG = True” and comment out ” ALLOWED_HOSTS” setting, meanwhile uncomment ‘REST_FRAMEWORK’ section but keep ‘DEFAULT_PERMISSION_CLASSES’ item commented.

1.4. Init DB

To initialize database, run:

$ python manage.py migrate --noinput

1.5. Run devel server

To run development server, run:

$ make run

For development you may find it useful to enable Django Development Toolbar.

Related settings is documented in devel settings section in settings_local.py.dist.