Update directory-structure.rst content to fix internal references

- Delete references to zilencer
- Replace "local server" references
- Add directories for message views, frontend templates/tests, and docs

(imported from commit 7295835434c17609595399e3aec7f9d565fd6b3d)
This commit is contained in:
Yoyo Zhou 2015-08-18 20:26:48 -07:00
parent 1629e77174
commit 6e55b4df8a
1 changed files with 49 additions and 39 deletions

View File

@ -3,7 +3,7 @@ Directory structure
=================== ===================
.. attention:: .. attention::
Needs content review ``tools/build-enterprise-tarball`` needs a new name. (``build-server-tarball``?)
This page documents our directory structure and how to decide where to This page documents our directory structure and how to decide where to
put a file. put a file.
@ -11,75 +11,85 @@ put a file.
Scripts Scripts
======= =======
+----------------------+-----------------------------------------------------------------------------------+ +--------------------+-----------------------------------------------------------------------------------+
| ``scripts/`` | Scripts that local server users might run manually (e.g. ``restart/server``) | | ``scripts/`` | Scripts that production deployments might run manually (e.g. ``restart-server``) |
+----------------------+-----------------------------------------------------------------------------------+ +--------------------+-----------------------------------------------------------------------------------+
| ``bin/`` | Scripts that are needed on local server deployments but humans should never run | | ``bin/`` | Scripts that are needed on production deployments but humans should never run |
+----------------------+-----------------------------------------------------------------------------------+ +--------------------+-----------------------------------------------------------------------------------+
| ``scripts/setup/`` | Tools that local server installations will only run once, during installation | | ``scripts/setup/`` | Tools that production deployments will only run once, during installation |
+----------------------+-----------------------------------------------------------------------------------+ +--------------------+-----------------------------------------------------------------------------------+
| ``tools/`` | Internal tools (not distributed) | | ``tools/`` | Development tools |
+----------------------+-----------------------------------------------------------------------------------+ +--------------------+-----------------------------------------------------------------------------------+
Bots Bots
==== ====
+------------------------+---------------------------------------------------+ +------------------------+----------------------------------------------------------------------+
| ``bots/`` | Not distributed, even to local server instances | | ``bots/`` | Not distributed, even to production deployment instances |
+------------------------+---------------------------------------------------+ +------------------------+----------------------------------------------------------------------+
| ``api/integrations`` | Distributed in our API bundle | | ``api/integrations`` | Distributed in our API bundle |
+------------------------+---------------------------------------------------+ +------------------------+----------------------------------------------------------------------+
Management commands Management commands
=================== ===================
+-------------------------------------+---------------------------------------------------------------------------------------------------------------------------+ +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+
| ``zerver/management/commands/`` | Management commands one might run at a local server site (e.g. scripts to change a value or deactivate a user properly) | | ``zerver/management/commands/`` | Management commands one might run at a production deployment site (e.g. scripts to change a value or deactivate a user properly) |
+-------------------------------------+---------------------------------------------------------------------------------------------------------------------------+ +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+
| ``zilencer/management/commands/`` | Management commands for internal use only (e.g. analytics) |
+-------------------------------------+---------------------------------------------------------------------------------------------------------------------------+
Views Views
===== =====
+--------------------------------+-----------------------------------------+
| ``zilencer/views.py`` | Internal-only views (analytics, etc.) |
+--------------------------------+-----------------------------------------+ +--------------------------------+-----------------------------------------+
| ``zerver/tornadoviews.py`` | Tornado views | | ``zerver/tornadoviews.py`` | Tornado views |
+--------------------------------+-----------------------------------------+ +--------------------------------+-----------------------------------------+
| ``zerver/views/webhooks.py`` | Webhook views | | ``zerver/views/webhooks.py`` | Webhook views |
+--------------------------------+-----------------------------------------+ +--------------------------------+-----------------------------------------+
| ``zerver/views/messages.py`` | message-related views |
+--------------------------------+-----------------------------------------+
| ``zerver/views/__init__.py`` | other Django views | | ``zerver/views/__init__.py`` | other Django views |
+--------------------------------+-----------------------------------------+ +--------------------------------+-----------------------------------------+
Static assets Static assets
============= =============
+---------------+----------------------------------------------------------------------------------------------------------------+ +---------------+---------------------------------------------------------------------------------------------------------------+
| ``assets/`` | For assets not to be served to the web (e.g. the system to generate our favicons, or our tshirt design data) | | ``assets/`` | For assets not to be served to the web (e.g. the system to generate our favicons) |
+---------------+----------------------------------------------------------------------------------------------------------------+ +---------------+---------------------------------------------------------------------------------------------------------------+
| ``static/`` | For things we do want to both server to the web and distribute to local server users (e.g. the webpages) | | ``static/`` | For things we do want to both serve to the web and distribute to production deployments (e.g. the webpages) |
+---------------+----------------------------------------------------------------------------------------------------------------+ +---------------+---------------------------------------------------------------------------------------------------------------+
Puppet Puppet
====== ======
+-----------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ +--------------------+----------------------------------------------------------------------------------+
| ``puppet/zulip`` | For common configuration relevant to both internal servers and local server (e.g. configuration to run our app, supervisor, etc.) | | ``puppet/zulip`` | For configuration for production deployments |
+-----------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ +--------------------+----------------------------------------------------------------------------------+
| ``puppet/zulip-internal`` | For configuration for our internal servers (e.g. SSH setup, Nagios setup) |
+-----------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
Templates Templates
========= =========
+--------------------------+----------------------------------------------------------------------------------------------------------------------+ +--------------------------+--------------------------------------------------------+
| ``templates/zerver`` | For templates related to zerver views. | | ``templates/zerver`` | For templates related to zerver views |
+--------------------------+----------------------------------------------------------------------------------------------------------------------+ +--------------------------+--------------------------------------------------------+
| ``templates/zilencer`` | For templates related to zilencer views, including random other pages from our corporate website (e.g. job posts). | | ``static/templates`` | Handlebars templates for the frontend |
+--------------------------+----------------------------------------------------------------------------------------------------------------------+ +--------------------------+--------------------------------------------------------+
You can consult the code for ``tools/build-local-server-tarball`` to Tests
check exactly which components are shipped along with local server -- =====
+--------------------+---------------------------------+
| ``zerver/tests`` | Frontend tests |
+--------------------+---------------------------------+
Documentation
=============
+-------------+-----------------------------------------------+
| ``docs/`` | Source for this documentation |
+-------------+-----------------------------------------------+
You can consult the code for ``tools/build-enterprise-tarball`` to
check exactly which components are deployed --
since that is the tool that does the builds, it controls the since that is the tool that does the builds, it controls the
distribution. distribution.