Skip to content

Commit eac0f0e

Browse files
committed
Fixing several issues encountered in vanilla Development Installation
1 parent f46f7d3 commit eac0f0e

File tree

1 file changed

+48
-30
lines changed

1 file changed

+48
-30
lines changed

docs/dev/install.rst

Lines changed: 48 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -4,95 +4,113 @@ Development Installation
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 :ref:`standards <install:Core team standards>` that are adhered to by the core development team while
8-
developing Read the Docs and related services. If you are a contributor to Read the Docs,
7+
These are development setup and :ref:`standards <install:Core team standards>` that are followed to by the core development team. If you are a contributor to Read the Docs,
98
it might a be a good idea to follow these guidelines as well.
109

11-
To follow these instructions you will need a Unix-like operating system,
12-
or `Windows Subsystem for Linux (WSL) <https://docs.microsoft.com/en-us/windows/wsl/>`_.
13-
Other operating systems are not supported.
10+
Requirements
11+
------------
1412

13+
A development setup can be hosted by your laptop, in a VM, on a separate server etc. These scenarios should all work fine. For the development setup to work, you need:
14+
15+
* a Unix-like system (Linux, BSD, Mac OSX) which supports Docker or Windows with WSL or Docker Desktop.
16+
* ``>=10 GB`` of free disk space on the drive where Docker's cache and volumes are stored. If you want to experiment with customizing Docker containers, you'll likely need more.
17+
* ``>=8 GB`` of system memory on a development laptop, Read the Docs consumes ``1-2 GB``
1518
.. note::
1619

17-
We do not recommend to follow this guide to deploy an instance of Read the Docs for production usage.
18-
Take into account that this setup is only useful for developing purposes.
20+
Take into account that this setup is intended for development purposes. We do not recommend to follow this guide to deploy an instance of Read the Docs for production.
1921

2022

21-
Set up your environment
22-
-----------------------
23+
Installing Docker
24+
-----------------
2325

24-
#. install `Docker <https://www.docker.com/>`_ following `their installation guide <https://docs.docker.com/install/>`_.
26+
You need `Docker <https://www.docker.com/>`_ to run a Read the Docs development setup. The easiest place to start is `Docker's installation guide <https://docs.docker.com/install/>`_, however there might be other more specific ways to get Docker for your exact system.
27+
28+
If you run Windows, you can run Docker on `Windows Subsystem for Linux (WSL) <https://docs.microsoft.com/en-us/windows/wsl/tutorials/wsl-containers>`_ or `Docker Desktop for Windows <https://docs.docker.com/desktop/windows/install/>`_.
2529

2630
.. tip::
2731

28-
If you run an Ubuntu-flavoured system, you can try the following:
32+
We always support Docker CE for the latest Ubuntu LTS. On Ubuntu 22.04, we are therefore supporting Docker 20.x, the version of the ``docker.io`` package.
33+
34+
This will install Docker Community Edition maintained by an Ubuntu/Canonical team:
2935

3036
.. prompt:: bash
3137

38+
# Install the docker.io package
3239
sudo apt install docker.io
40+
# Add the current user to the Docker group. After this, you should log out and back in for the group membership to be effective.
3341
sudo adduser $(whoami) docker
3442

35-
This will install Docker Community Edition maintained by an Ubuntu/Canonical team.
36-
37-
.. warning::
38-
39-
While setting up a Read the Docs development is fairly simple, it does consume a bit of resources: Expect to use ~10 GB for storing Docker images and run the environment on a system with 8+ GB of memory.
4043

44+
Set up your environment
45+
-----------------------
4146

42-
#. clone the ``readthedocs.org`` repository:
47+
#. Clone the ``readthedocs.org`` repository:
4348

4449
.. prompt:: bash
4550

4651
git clone --recurse-submodules https://github.com/readthedocs/readthedocs.org/
4752

48-
#. install the requirements from ``common`` submodule:
53+
#. Install the requirements from ``common`` submodule:
4954

5055
.. prompt:: bash
5156

5257
pip install -r common/dockerfiles/requirements.txt
5358

54-
#. build the Docker image for the servers:
59+
#. Build the Docker image for the servers:
5560

5661
.. warning::
5762

5863
This command could take a while to finish since it will download several Docker images.
5964

6065
.. prompt:: bash
6166

62-
inv docker.build
67+
COMPOSE_PROJECT_NAME=community inv docker.build
6368

6469
.. tip::
6570

6671
If you pass the ``GITHUB_TOKEN`` and ``GITHUB_USER`` environment variables to this command,
6772
it will add support for readthedocs-ext.
6873

69-
#. pull down Docker images for the builders:
74+
#. Pull down Docker images for the builders:
7075

7176
.. prompt:: bash
7277

7378
inv docker.pull --only-required
7479

75-
#. start all the containers:
80+
#. Start all the containers:
7681

7782
.. prompt:: bash
7883

79-
inv docker.up --init # --init is only needed the first time
84+
COMPOSE_PROJECT_NAME=community inv docker.up --init # --init is only needed the first time
85+
86+
#. Go to http://community.dev.readthedocs.io to access your local instance of Read the Docs. On newer versions of Firefox and Chrome, use a fresh Private/Incognito session.
87+
88+
Notice that the last two commands use the environment variable ``COMPOSE_PROJECT_NAME=community``. You might want to configure this globally. Running these commands without specifying ``COMPOSE_PROJECT_NAME`` currently `does not work <https://github.com/readthedocs/readthedocs.org/issues/9318>`_.
89+
90+
91+
Setting up MinIO
92+
----------------
93+
94+
This manual step is intended to be made redundant.
95+
96+
#. MinIO buckets need to be configured. Visit MinIO: http://127.0.0.1:9000
97+
98+
#. Login as ``admin`` / ``password``. Here you should see a list of "buckets".
8099

81-
#. go to http://community.dev.readthedocs.io to access your local instance of Read the Docs.
100+
#. Click "Manage" on each bucket and change the policy from Private to Public.
82101

83102

84103
Check that everything works
85104
---------------------------
86105

87-
#. go to http://community.dev.readthedocs.io and check that the appearance and style looks correct
88-
(otherwise the MinIO buckets might be misconfigured, see above)
106+
#. In a private/incognito session, visit http://community.dev.readthedocs.io
89107

90-
#. login as ``admin`` / ``admin`` and verify that the project list appears
108+
#. Login as ``admin`` / ``admin`` and verify that the project list appears.
91109

92-
#. go to the "Read the Docs" project, click on the "Build version" button to build ``latest``,
93-
and wait until it finishes
110+
#. Go to the "Read the Docs" project, under section "Build a version", click on the "Build version" button selecting "latest",
111+
and wait until it finishes (this can take several minutes).
94112

95-
#. click on the "View docs" button to browse the documentation, and verify that it works
113+
#. Click on the "View docs" button to browse the documentation, and verify that it works.
96114

97115

98116
Working with Docker Compose

0 commit comments

Comments
 (0)