Blame doc/deployment.rst

Pierre-Yves Chibon 300c54
Deployment
Pierre-Yves Chibon 300c54
==========
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
From sources
Pierre-Yves Chibon 300c54
------------
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
Clone the source::
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
 git clone http://git.fedorahosted.org/git/pagure.git
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
Install the dependencies listed in the ``requirements.txt`` file.
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
Copy the configuration files::
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
  cp pagure.cfg.sample pagure.cfg
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
Adjust the configuration files (secret key, database URL, admin group...).
Pierre-Yves Chibon 300c54
See :doc:`configuration` for detailed information about the configuration.
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
Create the database scheme::
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
   PAGURE_CONFIG=/path/to/pagure.cfg python createdb.py
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
Create the folder that will receive the different git repositories:
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
::
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
    mkdir {repos,docs,forks,tickets}
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
Set up the WSGI as described below.
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
From system-wide packages
Pierre-Yves Chibon 300c54
-------------------------
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
Start by install pagure::
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
  yum install pagure
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
Adjust the configuration files: ``/etc/pagure/pagure.cfg``.
Pierre-Yves Chibon 300c54
See :doc:`configuration` for detailed information about the configuration.
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
Find the file used to create the database::
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
  rpm -ql pagure |grep createdb.py
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
Create the database scheme::
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
   PAGURE_CONFIG=/etc/pagure/pagure.cfg python path/to/createdb.py
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
Set up the WSGI as described below.
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
Set-up WSGI
Pierre-Yves Chibon 300c54
-----------
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
Start by installing ``mod_wsgi``::
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
  yum install mod_wsgi
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
Then configure apache::
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
 sudo vim /etc/httd/conf.d/pagure.conf
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
uncomment the content of the file and adjust as desired.
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
Then edit the file ``/usr/share/pagure/pagure.wsgi`` and
Pierre-Yves Chibon 300c54
adjust as needed.
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
Then restart apache and you should be able to access the website on
Pierre-Yves Chibon 300c54
http://localhost/pkgdb
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
.. note:: `Flask <http: flask.pocoo.org="">`_ provides also  some documentation</http:>
Pierre-Yves Chibon 300c54
          on how to `deploy Flask application with WSGI and apache
Pierre-Yves Chibon 300c54
          <http: deploying="" docs="" flask.pocoo.org="" mod_wsgi="">`_.</http:>
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
For testing
Pierre-Yves Chibon 300c54
-----------
Pierre-Yves Chibon 300c54
Pierre-Yves Chibon 300c54
See :doc:`development` if you want to run pagure just to test it.
Pierre-Yves Chibon 300c54