$ git clone https://github.com/release-engineering/product-definition-center.git
For development purposes, install following dependencies:
Koji is not available on PyPI. You must install the koji package to your system via yum before creating a virtualenv.
$ sudo yum install koji
After that, run
$ pip install virtualenvwrapper
and setup according to ‘Setup’ steps in /usr/bin/virtualenvwrapper.sh. Then run
$ mkvirtualenv pdc --system-site-packages
to include koji into your pdc virtualenv.
Run the following
$ workon pdc
$ pip install -r requirements/devel.txt
to activate pdc virtualenv and install all the dependencies.
Install Docker: see the official installation guide for details. Generally, it might be enough to run install it with yum and the run it.
$ sudo yum install docker-engine
$ sudo service docker start
Use this command to build a new image
$ sudo docker build -t <YOUR_NAME>/pdc <the directory your Dockerfile is located>
Run the container
$ docker run -it -P -v $PWD:$PWD <YOUR_NAME>/pdc python $PWD/manage.py runserver 0.0.0.0:8000
Check the address
Find the address of the docker machine (127.0.0.1 –> DOCKER_HOST).
Find the mapped port of your running container
$ sudo docker ps -l --> PORT
Access it by visiting DOCKER_HOST:PORT in your web browser.
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 to get better error messages and comment out ALLOWED_HOSTS setting.
For development you might also consider uncommenting REST_FRAMEWORK section but keeping nested DEFAULT_PERMISSION_CLASSES item commented. This will disable authentication.
To run development server, run:
$ make run
For development you may find it useful to enable Django Debug Toolbar.
Related settings is documented in comment at the top of settings_local.py.dist.