From 08563ca087aa92c6e0576f36e32e19b65fe1b72d Mon Sep 17 00:00:00 2001 From: Kamil Páral Date: Apr 21 2015 08:00:46 +0000 Subject: add README with quick setup instructions Differential Revision: https://phab.qadevel.cloud.fedoraproject.org/D343 --- diff --git a/.gitignore b/.gitignore index b9ae85c..f9a391a 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ conf/settings.py *dist/ *.egg* /test_env +/env*/ diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..bc37867 --- /dev/null +++ b/README.rst @@ -0,0 +1,36 @@ +fake_fedorainfra +================ + +A simple webapp which will allow to mock `Fedora Bodhi `_ +for comment submit requests. Mostly to be used together with +`libtaskotron `_. + +Quick development setup +----------------------- + +If you want to be able to quickly use ``fake_fedorainfra`` for development purposes, +follow these steps:: + + $ virtualenv --system-site-packages env + $ source env/bin/activate + $ pip install -r requirements.txt + $ DEV=true ./init_db.sh + $ DEV=true python runapp.py + +The app frontend is running at ``_. The real Bodhi-like +interface is running at ``_, for example you can +try ``_ - that requests a list of most recent +Bodhi updates, and this request should be redirected to the official Fedora Bodhi +instance. Any comment submit requests should be kept inside ``fake_fedorainfra``, +though. + +You need to configure libtaskotron now to use ``fake_fedorainfra`` instead of +real Bodhi. Edit ``/etc/taskotron/taskotron.yaml`` and set the following values:: + + bodhi_server: http://localhost:5000/bodhi/ + fas_password: 'anything' + +You might also need to adjust ``reporting_enabled`` and ``report_to_bodhi``, +depending on your local settings. + +You should be ready to use ``fake_fedorainfra`` now. diff --git a/init_db.sh b/init_db.sh old mode 100644 new mode 100755 diff --git a/runapp.py b/runapp.py old mode 100644 new mode 100755 index fa6ac4f..020f6b5 --- a/runapp.py +++ b/runapp.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python # # runapp.py - script to facilitate running the fake_fedorainfra app from the CLI # @@ -34,4 +34,3 @@ if __name__ == '__main__': os.environ['DEV'] = 'true' fake_fedorainfra.app.run(host = fake_fedorainfra.app.config['RUN_HOST'], port = fake_fedorainfra.app.config['RUN_PORT'], debug = True) -