Git Product home page Git Product logo

openwisp2-docs's Introduction

OpenWISP Documentation

This repository contains the main source of the Unified Documentation of OpenWISP, published at openwisp.io/docs.

It implements logic which pulls source documents from different OpenWISP modules in order to build a single unified documentation website.

How to build the docs

Requirements: Python >= 3.9.

  1. Fork this repository
  2. Clone this repository using the following command:
git clone https://github.com/<your-username>/openwisp2-docs.git
  1. Install sphinx on your local machine using:
pip install -r requirements.txt
  1. You can build the documentation using the following command
# This command will generate the documentation in all formats - HTML, PDF and ePUB
make build
# The ``formats`` argument is a comma separated list of formats to build,
# e.g. ``formats=html,pdf,epub``. The default is to build all available
# formats, which currently are ``html``, ``pdf`` and ``epub``.
make build formats=pdf,html
# This command is a shortcut for generating only HTML documentation during
# development, since building PDF and ePUB takes time. It also supports
# the VERSION argument.
make build_html
  1. Open the generated HTML files in your browser.

Build options

Building different formats

By default, the make build command will generate documentation in all supported output formats: HTML, PDF, and ePUB.

If you want to generate the documentation in specific formats, you can specify the FORMATS argument. The FORMATS argument accepts a comma-separated list of formats to generate. The supported formats are:

  • html: HTML documentation
  • pdf: PDF documentation
  • epub: ePUB documentation

For example, to generate only HTML and PDF documentation, you can run:

make build FORMATS=html,pdf

To generate all supported formats, just omit the FORMATS argument:

make build
# This command will only generate HTML
make build FORMATS=html

Building specific version

By default, the make build command will generate documentation for all the versions defined in config.yml.

If you want to generate the documentation for a specific version, you can do so by using the VERSION argument. VERSION accepts any version that is specified in the config.yml file.

For example, if you want to generate documentation for the dev version, you can run:

make build VERSION=dev

This is useful if you only want to generate documentation for the version you are currently working on, or if you want to generate documentation for a specific version without having to rebuild all the other versions as well.

Overriding a module of a version

The make build command is programmed to generate the documentation for the modules that are defined in the config.yml file. Sometimes, it may be necessary to override the branch/remote of a module defined in the config.yml file to build the documentation for a specific version or to test a specific commit/branch of a module.

You can do so by using the MODULES argument. MODULES accepts a comma separated string where each item is of the following format:

version=<openwisp-version>,repository=<repo-owner>/<repo-name>,branch=<branch-name>

E.g. if you want to build the documentation for the dev version, but want to use the feature branch of openwisp-controller of your fork, then the command will be:

make build MODULES="version=dev:repository=<your-username>/openwisp-controller:branch=feature"

The MODULES argument allows you to override the default settings for a single module, or multiple modules, defined in the config.yml file.

You can use the MODULES argument to add modules to a version that is not defined in the config.yml file.

Building with SSH remotes

By default, the OpenWISP modules are cloned over HTTPS. This may pose a hurdle if you wish to make changes to the cloned modules and push them to the remote URL. To use SSH remotes, you can set the environment variable SSH=1. This will instruct the build to clone the modules using SSH instead of HTTPS. For example:

SSH=1 make build

Spell check

make spellcheck

Need help?

  • If any help regarding installing and using sphinx and reStructured Text is required then please visit this link.
  • Feel free to post any doubt or comment through our support channels.

openwisp2-docs's People

Contributors

a09hopper avatar aryamanz29 avatar atb00ker avatar brainbuzzer avatar cking100 avatar codesankalp avatar daffytheduck avatar dependabot[bot] avatar devkapilbansal avatar dumprop avatar edgeking810 avatar hargovindarora avatar hizkifw avatar jordyparker avatar kajol-kumari avatar manishshah120 avatar nemesifier avatar nepython avatar niteshsinha17 avatar noumbissivalere avatar nvzard avatar okraits avatar pablocastellano avatar pandafy avatar pawelplsi avatar ppabcd avatar purhan avatar totallynotvaishnav avatar xamfy avatar yashikajotwani12 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openwisp2-docs's Issues

Step by step tutorial to explain how to use the VPN-client automation feature

First of all, you should be able to replicate this feature in your own development environment.

How to do that is roughly explained in this mailing list thread: https://groups.google.com/d/msg/openwisp/xVZR7vy1kck/OQzzD8OfAgAJ

Take notes while you try to do it.

Once you are able to have a device automatically connect to the VPN after registration, use your notes to create a new page in the user documentation.

Document the following concepts

  • VPN automation what's for
  • VPN templates
  • explain what happens when a VPN template is flagged as default
  • explain the "auto client certificates" feature
  • explain how to install a VPN server with ansible and how to import the VPN server configuration into OpenWISP (explain also that this is not automated yet)

Once ready, send a pull request and follow up on our reviews.

[docs] Some possible improvements

So I had a task where I had to a vm with OpenWRT and connect it to OpenWISP locally. There were some challenges that I faced and here's a list of what can be improved so that other students/people don't get confused and know exactly what to do.

1.) I couldn't get the network to work in my OpenWRT vm.
refer to: https://openwrt.org/docs/guide-user/virtualization/virtualbox-vm
For the second adapter, it wasn't mention what to use. I was using the PCInet-III or something instead of the Intel Pro (82540EM)
I thought it would be good to let you know so that future individuals don't face this problem.

2.) Oh and for the allocation of , it would be better that on this tutorial if it was set to 192.168.56.3 (more than 192.168.56.2 as it is used for the OpenWISP Server).

3.) After setting up everything, I found out that no devices were being created on the local OpenWISP website.
I had the message "openwisp: OpenWISP config agent started" but there was nothing on the website.
I later found out (thanks to reza) how to fix all that. Some info on: http://openwisp.io/docs/user/configure-device.html need to be improved as there is some confusion. Firstly lines "option uuid" and "option key" should be commented I think, secondly it would be great if it was mentionned that if we had our OpenWISP server locally (e.g 192.168.56.2), then the "option url" would be 'https://192.168.56.2'. That is more beginner-friendly as they know what to write, if should be mentioned and if whether ".../admin" should be written or not.

Otherwise everything is great! I am not saying that anything was bad. On the contrary, the tutorial is really awesome! I am just suggesting how it would better, that's all!

Add a press & publications page

Add a page in the openwisp documentation where we provide the following information:

  • links to presentations (including slides and videos whenever possible) about OpenWISP (look on Google, ensure presentations from PyCon, OpenWRT Summit and FOSDEM are present)
  • links to popular blog posts mentioning OpenWISP (look on Google)
  • a section with links to logos and graphic material

[docs] Comprehensive/Unified Documentation Website

We need a comprehensive documentation which describes all the modules.

I want to avoid having the documentation of each module contained in this repo because that would make it harder to maintain: if we keep the documentation of each module in the module itself, we will be able to always request contributors to document their work because it will be easy for them.

We could use a system of git submodules, each OpenWISP module will be a submodule in this repo and we'll have some scripts which will glue everything together and generate the sphinx documentation.

The documentation could be divided as follows:

  • user documentation (quickstart, guides, explanation of features)
  • developer (information for developers and contributors)
  • general (project goals, values, press, etc)

The user and developer sections will then have one sub-directory for each module, or something similar.

Each module could have a structure like the following:

# user:
/openwisp-controller/docs/user
/openwisp-controller/docs/user/feature1
/openwisp-controller/docs/user/feature2
# docs:
/openwisp-controller/docs/developer
/openwisp-controller/docs/developer/setup
/openwisp-controller/docs/developer/extending

The Makefile will take each module user and developer directory and copy the files as follows:

cp /openwisp-controller/docs/user/* /openwisp2-docs/user/openwisp-controller/
cp /openwisp-controller/docs/developer/* /openwisp2-docs/developer/openwisp-controller/

Fix duplication of "Technologies" and "Glossary"

@xamfy, @HargovindArora right now we have two pages that seem redundant, we need to merge them.

Glossary has a nice structure and we should keep it that way, we could add some of the content in "Technologies Involved" which is missing from "Glossary", then I'm not sure which of the two titles is better, I really don't have a clear idea now, but for the moment we can focus on merging the contents, can you do this?

[dev] Python/django development tools page

We need to have a page in which we introduce our contributors to the python and django world, eg:

  • explain the advantages of using python
  • provide 2 links to get started with python 3
  • explain the advantages of using a framework like django and django-rest-framework
  • provide links to get started with django and django-rest-framework
  • link and provide a brief explaination of the development tools we use:
    • ipython
    • ipdb
    • django-extensions
      • shell_plus
      • runserver_plus
    • django-debug-toolbar
  • provide an example of how to enable and use those tools in one of our modules, for example openwisp-controller

[developer] Add and explain pre-commit-hook

In the past we had runflake8, runisort scripts all over the repos.

Now we don't have any script but I realize we may need to reintroduce a script for each repo because the flags passed to openwisp-qa-checks are slightly different for each repo.

This way we can have a run-qa-checks script for each repo and we can create pre-commit-hooks that run the script before each commit.

We can put the hook in each repo automatically as well as suggested here: https://stackoverflow.com/questions/3462955/putting-git-hooks-into-repository

The hook could be saved in openwisp-utils. Python packages could install it automatically in the setup.py script, eg:

  • if the current directory is a git repository and if pip install -e . is being called from within the project itself (eg: check the setup.py script and look for something unique in it)
  • then copy the pre-commit-hook from openwisp-utils and install it / symlink it, whatever

For non python packages we can do something similar as all the repos should have some kind of build/install script/procedure (if they don't have one, we must add one).

Improve contributing guidelines

While making any change to any file, it often happens that code editors introduce unnecessary changes in the code like extra spaces or new lines.

Mention some guidelines for contributors to tell them what editor to choose or what configurations should be done in the editors so that unnecessary changes are not introduced.

Also, mention the coding style used by org and respective tools used like Flake and everything else!

Enforce maximum line length in the docs

We should enforce the maximum line length of each rst file to 75 characters because this makes editing multiple files in split editor mode or in split terminal vim windows much easier which in turns increases productivity.

I have no idea yet how to do this, I hope there's some tool available that does it.

Once this is done, it should be added to the travis build mentioned in issue 28.

[docs] Named release and release notes

We should give a name to the releases and write clear release notes for each release.

The release notes of each module may be used as a base for creating release notes.

We may change the way we write our change logs in order to semi-automate this.

Possible reference: https://itnext.io/automate-your-releases-versioning-and-release-notes-with-semantic-release-d5575b73d986

Found some more useful tools:

Docs for contributing guidelines

A well-structured guide has to be prepared so that first-time contributors can know the do's and how's of contributing to this very organization.

Glossary for setup guide.

A documentation or glossary has to be created for developers so that they can start off quickly in setting up the project.

[coding] Style conventions

we need a style convention section in which we describe our coding style conventions:

  • commit message style (this is explained in the contributing guidelines but the section is not titled properly and I guess not many people are reading it)
  • python code convention
  • javascript code convention
  • openwrt related code convention

Explain how to use support channels

I've been repeating this too many times now:

If you need help in solving problems, using the chat is better, but if you want to discuss important implementation details or ask detailed questions regarding a specific openwisp module or feature using the mailing list is better for several reasons, but the best reason is that all discussions are indexed on search engines and easily retrievable in the future, so the mailing list over time become some kind of fall-back documentation archive which is very good for any open source project.

We need to find a good place in the docs to explain this.

Project structure guide.

A project structure guide has to be set up that lists the structure of the various projects in this organization.

[docs] Document basic template usage

Create a new page in the user documentation that explains the following:

  • what is a configuration template
  • mention (and link) NetJSON and netjsonconfig
  • provide at least 3 example templates for OpenWRT, you can take some from the netjsonconfig documentation
  • add a link to this new page at the end of the configure-device.rst to make it easier for users to find it
  • don't forget to add the page to the main index so it will be listed in the main menu of the documentation website

About HTML

After Doing Everything, At Last Step To Make HTML It Shows That, bash: make: command not found
Any Fix. What Should I Do

Code of conduct

We need a simple code of conduct which clearly states that any type of racial, religious or sexual harassment as well as ad-hominem attack is not tolerated in our community.

A good example is https://www.djangounderthehood.com/coc/ although we need something simpler.

We clearly need to state that anyone who will breach these rules will be kindly asked to leave the community or forcibly removed if they continues in assuming behaviour that goes against our values.

[docs] Make clear to have 1 PR for 1 feature

Contributors should try to send 1 PR for 1 feature.
If they are working on a PR that touches a group of related features, they can work on it in 1 PR if they prefer, but have to have 1 commit for each feature they change/introduce/remove.

Maintainers can work on branches and open PRs to merge various changes in one branch.

Remove mention of LEDE

LEDE has been merged back in OpenWRT, we can update the docs and remove any mention to it.

Note: the configure-device.rst page needs to be updated accordingly, including the download URLs.

Docs for Technologies used

A documentation guide has to be created to tell the contributors and newcomers that which technologies and architecture have been used up in this project and organization as well.

Improving gitignore

We can improve gitignore by adding virtual environment directory in ignore list. We can use tools like gitignore.io to generate gitignore file.

Add a presentation collection page

Add a page in which we collect presentations that talk about OpenWISP 2, different languages are allowed, each language will have its own section.

Setup for user

This is a kickstart for the documentation effort spawned on the mailing list.

Obviously the only supported way of installing openwisp2 should be the ansible playbook.

At minimum there should be

  • How to install ansible + ansible galaxy (link to external documentation)
  • How to install role from galaxy (link to external documentation)
  • Setting up the inventory
  • Setting up the playbook
  • Introduce default variables for playbook (mention they exists and list them)

[mesh] Tutorial on mesh networking

It would be great to have a tutorial that explains how to:

  • setup a configuration template that creates a mesh network with 802.11s and OLSRd2
  • mention encryption if needed
  • explain how to configure the network topology module to collect the topology information using the RECEIVE strategy, it's documented in Italian here: http://wiki.ninux.org/TopologyVisualizer (the script can be installed on the device with an additional template)
  • explain how to see the network topology graph
  • mention daily historic data is collected and can be viewed

In the future we could have more variants for 802.11s and Batman-adv, 802.11s and Babel, 802.11s and BMX7.

Define the values and goals of the OpenWISP community

I will add the following sections in the near future:

  • What are the values which the founders had when they created OpenWISP?
  • What other values were brought in by further contributors?
  • Where is the community heading to?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.