Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[controller-docs] Restructured Documentation: New Unified Documentation Website #867

Merged
merged 47 commits into from
Aug 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
f98f266
[docs] Restructured docs
pandafy Feb 21, 2024
dd94b9a
[chores] Fixed typo
pandafy Apr 26, 2024
93afaeb
[chores] Fixed references
pandafy Apr 26, 2024
b82d8f8
[docs] Restructured docs (part 1)
nemesifier May 14, 2024
82bf128
[docs] Improved Wireguard page
nemesifier May 16, 2024
7458e50
[docs] Link to images
nemesifier May 16, 2024
661e74a
[docs] Renamed VXLAN over wireguard
nemesifier May 16, 2024
9bf12be
[docs] Improved intro
nemesifier May 16, 2024
1d8829e
[docs] Renamed subnet division rule page
nemesifier May 16, 2024
3de0d2d
[docs] Restructured zerotier, wireguard-vxlan, other details
nemesifier May 16, 2024
8e75ddf
[docs] Renamed push-updates to push-operations
nemesifier May 16, 2024
d65cce7
[docs] Link wireguard
nemesifier May 16, 2024
448ba01
[docs] Import/Export consistency
nemesifier May 16, 2024
e260232
[docs] Restructured subnet division rule
nemesifier May 16, 2024
659e6b1
[docs] Fixed more links
nemesifier May 16, 2024
86fd27d
[docs] Reformatted docs with docstrfmt tool
nemesifier May 18, 2024
5f417ca
[docs] Added links to all screenshots
nemesifier May 18, 2024
c1bbaab
[docs] Dev Utils: move signals down and link django docs
nemesifier May 18, 2024
fe55296
[docs] Capitalized case, link Django 4.2, fix broken links
nemesifier May 18, 2024
c00fdb7
[docs] Updated UI instructions of push operations
nemesifier May 18, 2024
7675d56
[docs] Fixed a few more issues in extending.rst
nemesifier May 18, 2024
e25786d
[chores] Updated internal references after strucutral change
nemesifier May 24, 2024
bab88f1
[docs] Added label for OPENWISP_CONTROLLER_MANAGEMENT_IP_ONLY
pandafy May 29, 2024
29289d8
[docs] Updated install instructions
nemesifier May 29, 2024
79fe1a4
[docs] Updated references to other modules
nemesifier May 29, 2024
100bbc3
[docs] Removed :orphan: directives from README and CONTRIBUTING
nemesifier May 31, 2024
52fe337
[docs] Capitalized headings in installation.rst
nemesifier Jun 5, 2024
2e5cb82
[docs] Clarified how to run selenium tests
nemesifier Jun 6, 2024
633e672
[skip ci][docs] Added reference labels
pandafy Jun 7, 2024
6f1e89b
[skip ci] Fixed references
pandafy Jun 19, 2024
f4d3078
[docs] Minor improvements
nemesifier Jul 5, 2024
f1b0a21
[skip ci] Fixed target of images
pandafy Jul 8, 2024
c302cff
[docs] Added link to github repo
nemesifier Jul 11, 2024
c9309fe
[skip ci] Fixed references to OpenWISP modules
pandafy Jul 15, 2024
684c614
[skip ci] Updated docs website URL
pandafy Jul 15, 2024
16aae7c
Merge branch 'reorder-docs' of github.com:openwisp/openwisp-controlle…
nemesifier Jul 15, 2024
a3bfc5f
[docs] Table of contents, consistency, fixes
nemesifier Jul 16, 2024
3dbb1ac
[docs] Added OpenVPN page
nemesifier Jul 17, 2024
135466e
[docs] Cross reference VPN pages
nemesifier Jul 17, 2024
04b51d5
[docs] Added zerotier youtube video to zerotier page
nemesifier Jul 17, 2024
677b118
[docs] Reformatted
nemesifier Jul 18, 2024
efa4532
[docs] Added architecture diagram
nemesifier Jul 22, 2024
0ed9ff4
[docs] Reformatted index
nemesifier Jul 27, 2024
02eb4fc
Merge branch 'master' into reorder-docs
nemesifier Aug 1, 2024
3674bd9
[docs] Reformatted CONTRIBUTING.rst
nemesifier Aug 1, 2024
07570e9
Merge branch 'master' into reorder-docs
nemesifier Aug 3, 2024
d180014
[qa] Don't skip README in docstrfmt
nemesifier Aug 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4,533 changes: 21 additions & 4,512 deletions README.rst

Large diffs are not rendered by default.

873 changes: 873 additions & 0 deletions docs/developer/extending.rst

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions docs/developer/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Developer Docs
==============

.. include:: ../partials/developer-docs.rst

.. toctree::
:maxdepth: 2

./installation.rst
./utils.rst
./extending.rst

Other useful resources:

- :doc:`../user/rest-api`
- :doc:`../user/settings`
203 changes: 203 additions & 0 deletions docs/developer/installation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,203 @@
Developer Installation Instructions
===================================

.. include:: ../partials/developer-docs.rst

.. contents:: **Table of Contents**:
:depth: 2
:local:

Dependencies
------------

- Python >= 3.8
- OpenSSL

Installing for Development
--------------------------

Install the system dependencies:

.. code-block:: shell

sudo apt update
sudo apt install -y sqlite3 libsqlite3-dev openssl libssl-dev
sudo apt install -y gdal-bin libproj-dev libgeos-dev libspatialite-dev libsqlite3-mod-spatialite
sudo apt install -y chromium-browser

Fork and clone the forked repository:

.. code-block:: shell

git clone git://github.com/<your_fork>/openwisp-controller

Navigate into the cloned repository:

.. code-block:: shell

cd openwisp-controller/

Launch Redis and PostgreSQL:

.. code-block:: shell

docker-compose up -d redis postgres

Setup and activate a virtual-environment (we'll be using `virtualenv
<https://pypi.org/project/virtualenv/>`_):

.. code-block:: shell

python -m virtualenv env
source env/bin/activate

Make sure that your base python packages are up to date before moving to
the next step:

.. code-block:: shell

pip install -U pip wheel setuptools

Install development dependencies:

.. code-block:: shell

pip install -e .
pip install -r requirements-test.txt
sudo npm install -g jshint stylelint

Install WebDriver for Chromium for your browser version from
https://chromedriver.chromium.org/home and Extract ``chromedriver`` to one
of directories from your ``$PATH`` (example: ``~/.local/bin/``).

Create database:

.. code-block:: shell

cd tests/
./manage.py migrate
./manage.py createsuperuser

Launch celery worker (for background jobs):

.. code-block:: shell

celery -A openwisp2 worker -l info

Launch development server:

.. code-block:: shell

./manage.py runserver 0.0.0.0:8000

You can access the admin interface at ``http://127.0.0.1:8000/admin/``.

Run tests with:

.. code-block:: shell

./runtests.py --parallel

Some tests, such as the Selenium UI tests, require a PostgreSQL database
to run. If you don't have a PostgreSQL database running on your system,
you can use :ref:`the Docker Compose configuration provided in this
repository <controller_dev_docker>`. Once set up, you can run these
specific tests as follows:

.. code-block:: shell

# Run database tests against PostgreSQL backend
POSTGRESQL=1 ./runtests.py --parallel

# Run only specific selenium tests classes
cd tests/
DJANGO_SETTINGS_MODULE=openwisp2.postgresql_settings ./manage.py test openwisp_controller.config.tests.test_selenium.TestDeviceAdmin

Run quality assurance tests with:

.. code-block:: shell

./run-qa-checks

Alternative Sources
-------------------

Pypi
~~~~

To install the latest stable version from pypi:

.. code-block:: shell

pip install openwisp-controller

Github
~~~~~~

To install the latest development version tarball via HTTPs:

.. code-block:: shell

pip install https://github.com/openwisp/openwisp-controller/tarball/master

Alternatively you can use the git protocol:

.. code-block:: shell

pip install -e git+git://github.com/openwisp/openwisp-controller#egg=openwisp_controller

.. _controller_dev_docker:

Install and Run on Docker
-------------------------

.. warning::

This Docker image is for development purposes only.

For the official OpenWISP Docker images, see: :doc:`docker-openwisp
</docker/index>`.

Build from the Dockerfile:

.. code-block:: shell

docker-compose build

Run the docker container:

.. code-block:: shell

docker-compose up

Troubleshooting Steps for Common Installation Issues
----------------------------------------------------

You may encounter some issues while installing GeoDjango.

Unable to Load SpatiaLite library Extension?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

If you are incurring in the following exception:

.. code-block::

django.core.exceptions.ImproperlyConfigured: Unable to load the SpatiaLite library extension

You need to specify ``SPATIALITE_LIBRARY_PATH`` in your ``settings.py`` as
explained in `django documentation regarding how to install and configure
spatialte
<https://docs.djangoproject.com/en/2.1/ref/contrib/gis/install/spatialite/>`_.

Having Issues with Other Geospatial Libraries?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Please refer `troubleshooting issues related to geospatial libraries
<https://docs.djangoproject.com/en/2.1/ref/contrib/gis/install/#library-environment-settings/>`_.

.. important::

If you want to add OpenWISP Controller to an existing Django project,
then you can refer to the `test project in the openwisp-controller
repository
<https://github.com/openwisp/openwisp-controller/tree/master/tests/openwisp2>`_.
Loading