Skip to content

Commit 9b1866c

Browse files
committed
Rename /development/standards to /development/install
We are promoting the usage of Dockr compose as the standard way of contributing/developing.
1 parent b82d094 commit 9b1866c

File tree

7 files changed

+80
-68
lines changed

7 files changed

+80
-68
lines changed

docs/contribute.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Contributing to development
2525

2626
If you want to deep dive and help out with development on Read the Docs, then
2727
first get the project installed locally according to the
28-
:doc:`installation guide </development/standards>`. After that is done we
28+
:doc:`installation guide </development/install>`. After that is done we
2929
suggest you have a look at tickets in our issue tracker that are labelled `Good
3030
First Issue`_. These are meant to be a great way to get a smooth start and
3131
won't put you in front of the most complex parts of the system.

docs/development/front-end.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ in.
5555
Getting Started
5656
---------------
5757

58-
You will need to follow our :doc:`guide to install a development Read the Docs instance </development/standards>` first.
58+
You will need to follow our :doc:`guide to install a development Read the Docs instance </development/install>` first.
5959

6060
The sources for our bundles are found in the per-application path
6161
``static-src``, which has the same directory structure as ``static``. Files in

docs/development/index.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ for development or taking the open source Read the Docs codebase for your own cu
88
:maxdepth: 1
99

1010
architecture
11-
standards
11+
install
1212
design
1313
docs
1414
front-end

docs/development/standards.rst renamed to docs/development/install.rst

+74-62
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,22 @@
1-
Development Setup and Standards
2-
===============================
1+
Install local development instance
2+
==================================
33

44
.. meta::
55
:description lang=en: Install a local development instance of Read the Docs with our step by step guide.
66

7-
These are development setup and standards that are adhered to by the core development team while
7+
These are development setup and :ref:`standards <Core team standards>` that are adhered to by the core development team while
88
developing Read the Docs and related services. If you are a contributor to Read the Docs,
99
it might a be a good idea to follow these guidelines as well.
1010

11+
.. note::
1112

12-
Core team standards
13-
-------------------
14-
15-
Core team members expect to have a development environment that closely
16-
approximates our production environment, in order to spot bugs and logical
17-
inconsistencies before they make their way to production.
18-
19-
This solution gives us many features that allows us to have an
20-
environment closer to production:
21-
22-
Celery runs as a separate process
23-
Avoids masking bugs that could be introduced by Celery tasks in a race conditions.
24-
25-
Celery runs multiple processes
26-
We run celery with multiple worker processes to discover race conditions
27-
between tasks.
28-
29-
Docker for builds
30-
Docker is used for a build backend instead of the local host build backend.
31-
There are a number of differences between the two execution methods in how
32-
processes are executed, what is installed, and what can potentially leak
33-
through and mask bugs -- for example, local SSH agent allowing code check
34-
not normally possible.
35-
36-
Serve documentation under a subdomain
37-
There are a number of resolution bugs and cross-domain behavior that can
38-
only be caught by using `USE_SUBDOMAIN` setting.
39-
40-
PostgreSQL as a database
41-
It is recommended that Postgres be used as the default database whenever
42-
possible, as SQLite has issues with our Django version and we use Postgres
43-
in production. Differences between Postgres and SQLite should be masked for
44-
the most part however, as Django does abstract database procedures, and we
45-
don't do any Postgres-specific operations yet.
46-
47-
Celery is isolated from database
48-
Celery workers on our build servers do not have database access and need
49-
to be written to use API access instead.
50-
51-
Use NGINX as web server
52-
All the site is served via NGINX with the ability to change some configuration locally.
53-
54-
MinIO as Django storage backend
55-
All static and media files are served using Minio --an emulator of S3,
56-
which is the one used in production.
57-
58-
Serve documentation via El Proxito
59-
Documentation is proxied by NGINX to El Proxito and proxied back to NGINX to be served finally.
60-
El Proxito is a small application put in front of the documentation to serve files
61-
from the Django Storage Backend.
62-
63-
Search enabled by default
64-
Elasticsearch is properly configured and enabled by default.
65-
All the documentation indexes are updated after a build is finished.
13+
We do not recommend to follow this guide to deploy an instance of Read the Docs for production usage.
14+
Take into account that this setup is only useful for developing purposes.
6615

6716

6817
Set up your environment
6918
-----------------------
7019

71-
After cloning ``readthedocs.org`` repository, you need to
72-
73-
7420
#. install `Docker <https://www.docker.com/>`_ following `their installation guide <https://docs.docker.com/install/>`_.
7521

7622
#. clone the ``readthedocs.org`` repository:
@@ -112,7 +58,17 @@ After cloning ``readthedocs.org`` repository, you need to
11258

11359
inv docker.up --init # --init is only needed the first time
11460

115-
#. go to http://localhost:9000/ (MinIO S3 storage backend), click "..." and then "Edit Policy" and give "Read Only" access on all the buckets (``static`` and ``media``).
61+
#. add read permissions to the storage backend:
62+
63+
* go to http://localhost:9000/ (MinIO S3 storage backend)
64+
* login as admin / password
65+
* click "..." next to the bucket name and then "Edit Policy"
66+
* give "Read Only" access on all the buckets (``static`` and ``media``)
67+
68+
.. note::
69+
70+
``media`` bucket may be created after the first build is finished.
71+
You will need to repeat this step after that.
11672

11773
#. go to http://community.dev.readthedocs.io to access your local instance of Read the Docs.
11874

@@ -137,7 +93,7 @@ save some work while typing docker compose commands. This section explains these
13793
``inv docker.shell``
13894
Opens a shell in a container (web by default).
13995

140-
* ``--running`` the shell is open in a container that it's already running
96+
* ``--no-running`` spins up a new container and open a shell
14197
* ``--container`` specifies in which container the shell is open
14298

14399
``inv docker.manage {command}``
@@ -253,3 +209,59 @@ For others, the webhook will simply fail to connect when there are new commits t
253209
* Take the "Client ID" and "Secret" for each service and enter it in your local Django admin at:
254210
``http://community.dev.readthedocs.io/admin/socialaccount/socialapp/``.
255211
Make sure to apply it to the "Site".
212+
213+
214+
Core team standards
215+
-------------------
216+
217+
Core team members expect to have a development environment that closely
218+
approximates our production environment, in order to spot bugs and logical
219+
inconsistencies before they make their way to production.
220+
221+
This solution gives us many features that allows us to have an
222+
environment closer to production:
223+
224+
Celery runs as a separate process
225+
Avoids masking bugs that could be introduced by Celery tasks in a race conditions.
226+
227+
Celery runs multiple processes
228+
We run celery with multiple worker processes to discover race conditions
229+
between tasks.
230+
231+
Docker for builds
232+
Docker is used for a build backend instead of the local host build backend.
233+
There are a number of differences between the two execution methods in how
234+
processes are executed, what is installed, and what can potentially leak
235+
through and mask bugs -- for example, local SSH agent allowing code check
236+
not normally possible.
237+
238+
Serve documentation under a subdomain
239+
There are a number of resolution bugs and cross-domain behavior that can
240+
only be caught by using `USE_SUBDOMAIN` setting.
241+
242+
PostgreSQL as a database
243+
It is recommended that Postgres be used as the default database whenever
244+
possible, as SQLite has issues with our Django version and we use Postgres
245+
in production. Differences between Postgres and SQLite should be masked for
246+
the most part however, as Django does abstract database procedures, and we
247+
don't do any Postgres-specific operations yet.
248+
249+
Celery is isolated from database
250+
Celery workers on our build servers do not have database access and need
251+
to be written to use API access instead.
252+
253+
Use NGINX as web server
254+
All the site is served via NGINX with the ability to change some configuration locally.
255+
256+
MinIO as Django storage backend
257+
All static and media files are served using Minio --an emulator of S3,
258+
which is the one used in production.
259+
260+
Serve documentation via El Proxito
261+
Documentation is proxied by NGINX to El Proxito and proxied back to NGINX to be served finally.
262+
El Proxito is a small application put in front of the documentation to serve files
263+
from the Django Storage Backend.
264+
265+
Search enabled by default
266+
Elasticsearch is properly configured and enabled by default.
267+
All the documentation indexes are updated after a build is finished.

docs/development/search.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Currently we are using `Elasticsearch 6.3`_.
99
Local Development Configuration
1010
-------------------------------
1111

12-
Elasticsearch is installed and run as part of the :doc:`development setup </development/standards>`.
12+
Elasticsearch is installed and run as part of the :doc:`development setup </development/install>`.
1313

1414
Indexing into Elasticsearch
1515
^^^^^^^^^^^^^^^^^^^^^^^^^^^

docs/gsoc.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ the more likely we are to choose your application!
3333
Getting Started
3434
---------------
3535

36-
The :doc:`/development/standards` doc is probably the best place to get going.
36+
The :doc:`/development/install` doc is probably the best place to get going.
3737
It will walk you through getting a basic environment for Read the Docs setup.
3838

3939
Then you can look through our :doc:`/contribute` doc for information on how to get started contributing to RTD.

docs/index.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ of Read the Docs and the larger software documentation ecosystem.
195195

196196
* **Getting involved with Read the Docs**:
197197
:doc:`Contributing <contribute>` |
198-
:doc:`Development setup </development/standards>` |
198+
:doc:`Development setup </development/install>` |
199199
:doc:`roadmap` |
200200
:doc:`Code of conduct <code-of-conduct>`
201201

0 commit comments

Comments
 (0)