overview.rst 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. Overview
  2. ========
  3. Pagure is split over multiple components, each having their purpose and all
  4. but two (the core web application and its workers) being optional.
  5. These components are:
  6. .. contents::
  7. Before going into the overall picture, one should realize that most of the
  8. components listed above are optional.
  9. Here is a diagram representing pagure without all the optional components:
  10. .. image:: _static/overview_simple.png
  11. :target: _images/overview_simple.png
  12. And here is a diagram of all the components together:
  13. .. image:: _static/overview.png
  14. :target: _images/overview.png
  15. Pagure core application
  16. -----------------------
  17. The core application is the flask application interacting with gitolite to
  18. provide a web UI to the git repositories as well as tickets and pull-requests.
  19. This is the main application for the forge.
  20. Pagure workers
  21. --------------
  22. Interacting with git repos can be a long process, it varies depending on the
  23. size of the repository itself but also based on hardware performances or
  24. simply the load on the system.
  25. To make pagure capable of handling more load, since pagure 3.0 the interactions
  26. with the git repositories from the web UI is performed by dedicated workers,
  27. allowing async processing of the different tasks.
  28. The communication between the core application and its worker is based on
  29. `celery <http://www.celeryproject.org/>`_ and defaults to using `redis
  30. <https://redis.org>`_ but any of the queueing system supported by `celery
  31. <http://www.celeryproject.org/>`_ could be used instead.
  32. Gitolite
  33. --------
  34. Currently pagure uses `gitolite <http://gitolite.com/gitolite/index.html>`_
  35. to grant or deny `ssh <https://en.wikipedia.org/wiki/Secure_Shell>`_ access
  36. to the git repositories, in other words to grant or deny read and/or write
  37. access to the git repositories.
  38. Pagure supports cloning over both ssh and http, but writing can only be done
  39. via ssh, through gitolite.
  40. Pagure doc server
  41. -----------------
  42. While integrated into the main application at first, it has been split out
  43. for security concern, displaying information directly provided by the user
  44. without a clear/safe way of filtering for unsafe script or hacks is a
  45. security hole.
  46. For this reason we also strongly encourage anyone wanting to deploy their
  47. own instance of pagure with the doc server, to run this application on a
  48. completely different domain name (not just a sub-domain) in order to reduce
  49. the cross-site forgery risks.
  50. Pagure can be run just fine without the doc server, all you need to do is to
  51. **not** define the variable ``DOC_APP_URL`` in the configuration file.
  52. Pagure milter
  53. -------------
  54. The milter is a script, receiving an email as input and performing an action
  55. with it.
  56. In the case of pagure, the milter is used to allow replying on a comment
  57. of a ticket or a pull-request by directly replying to the notification sent.
  58. No need to go to the page anymore to reply to a comment someone made.
  59. The milter integrates with a MTA such as postfix or sendmail that you will
  60. have running and have access to in order to change its configuration.
  61. Pagure EventSource Server
  62. -------------------------
  63. Eventsource or Server Sent Events are messages sent from a server to a browser.
  64. For pagure this technology is used to allow live-refreshing of a page when
  65. someone is viewing it. For example, while you are reading a ticket if someone
  66. comments on it, the comment will automatically show up on the page without
  67. the need for you to reload the entire page.
  68. The flow is: the main pagure server does an action, sends a message over
  69. redis, the eventsource server picks it up and send it to the browsers waiting
  70. for it, then javascript code is executed to refresh the page based on the
  71. information received.
  72. Pagure web-hook Server
  73. ----------------------
  74. Sends notifications to third party services using POST http requests.
  75. This is the second notifications system in pagure with `fedmsg <http://fedmsg.com/>`_.
  76. These notifications are running on their own service to prevent blocking the
  77. main web application in case the third part service is timing-out or just
  78. being slow.
  79. The flow is: the main pagure server does an action, sends a message over
  80. redis, the web-hook server picks it up, build the query and performs the
  81. POST request to the specified URLs.
  82. Pagure load JSON service
  83. ------------------------
  84. The load JSON service is an async service updating the database based on
  85. information pushed to the ticket or pull-request git repositories.
  86. This allows updating the database with information pushed to the git
  87. repositories without keeping the connection open with the client.
  88. Pagure log com service
  89. ----------------------
  90. The log com (for log commit) service is an async service updating the log
  91. table of the database on every pushed made to any repository allowing to
  92. build the data for the calendar heatmap graph displayed on every user's
  93. page.