Skip to content

Commit 6717231

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

File tree

1 file changed

+49
-30
lines changed

1 file changed

+49
-30
lines changed

docs/dev/install.rst

Lines changed: 49 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -4,95 +4,114 @@ 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+
------------
12+
13+
A development setup can be hosted by your laptop, in a VM, on a separate server etc. Any such scenario should work fine, as long as it can satisfy the following:
14+
15+
* Is Unix-like system (Linux, BSD, Mac OSX) which **supports Docker**. Windows systems should have WSL+Docker or Docker Desktop.
16+
* Has ``>=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+
* Can spare ``2 GB`` of **system memory** for running Read the Docs, this typically means that a development laptop should have ``>=8 GB`` of memory in total.
1418

1519
.. note::
1620

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.
21+
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.
1922

2023

21-
Set up your environment
22-
-----------------------
24+
Installing Docker
25+
-----------------
26+
27+
You need `Docker <https://www.docker.com/>`_ to run a development setup of Read the Docs. 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.
2328

24-
#. install `Docker <https://www.docker.com/>`_ following `their installation guide <https://docs.docker.com/install/>`_.
29+
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/>`_.
2530

2631
.. tip::
2732

28-
If you run an Ubuntu-flavoured system, you can try the following:
33+
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.
34+
35+
The following will install Docker Community Edition maintained by a Ubuntu/Canonical team:
2936

3037
.. prompt:: bash
3138

39+
# Install the docker.io package
3240
sudo apt install docker.io
41+
# Add the current user to the Docker group. After this, you should log out and back in for the group membership to be effective.
3342
sudo adduser $(whoami) docker
3443

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.
4044

45+
Set up your environment
46+
-----------------------
4147

42-
#. clone the ``readthedocs.org`` repository:
48+
#. Clone the ``readthedocs.org`` repository:
4349

4450
.. prompt:: bash
4551

4652
git clone --recurse-submodules https://github.com/readthedocs/readthedocs.org/
4753

48-
#. install the requirements from ``common`` submodule:
54+
#. Install the requirements from ``common`` submodule:
4955

5056
.. prompt:: bash
5157

5258
pip install -r common/dockerfiles/requirements.txt
5359

54-
#. build the Docker image for the servers:
60+
#. Build the Docker image for the servers:
5561

5662
.. warning::
5763

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

6066
.. prompt:: bash
6167

62-
inv docker.build
68+
COMPOSE_PROJECT_NAME=community inv docker.build
6369

6470
.. tip::
6571

6672
If you pass the ``GITHUB_TOKEN`` and ``GITHUB_USER`` environment variables to this command,
6773
it will add support for readthedocs-ext.
6874

69-
#. pull down Docker images for the builders:
75+
#. Pull down Docker images for the builders:
7076

7177
.. prompt:: bash
7278

7379
inv docker.pull --only-required
7480

75-
#. start all the containers:
81+
#. Start all the containers:
7682

7783
.. prompt:: bash
7884

79-
inv docker.up --init # --init is only needed the first time
85+
COMPOSE_PROJECT_NAME=community inv docker.up --init # --init is only needed the first time
86+
87+
#. 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.
88+
89+
Notice that 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>`_.
90+
91+
92+
Setting up MinIO
93+
----------------
94+
95+
This manual step is intended to be made redundant.
96+
97+
#. MinIO buckets need to be configured. Visit MinIO: http://127.0.0.1:9000
98+
99+
#. Login as ``admin`` / ``password``. Here you should see a list of "buckets".
80100

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

83103

84104
Check that everything works
85105
---------------------------
86106

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)
107+
#. In a private/incognito session, visit http://community.dev.readthedocs.io
89108

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

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

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

97116

98117
Working with Docker Compose

0 commit comments

Comments
 (0)