Cleanup documentation.

Remove mention of Mongo and basic suites. Also adapt some part
to changes made to authelia-scripts.
pull/447/head
Clement Michaud 2019-11-16 15:43:20 +01:00 committed by Clément Michaud
parent bd19ee48fd
commit 5b836fc4cf
8 changed files with 38 additions and 75 deletions

View File

@ -16,8 +16,8 @@ For instance, you can build Authelia with:
authelia-scripts build authelia-scripts build
Or start the *docker-image* suite with: Or start the *Standalone* suite with:
authelia-scripts suites start docker-image authelia-scripts suites setup Standalone
You will find more information in the scripts usage helpers. You will find more information in the scripts usage helpers.

View File

@ -1,60 +1,50 @@
# Build and dev # Build and dev
**Authelia** is written in Go and comes with a dedicated CLI called [authelia-scripts](./authelia-scripts.md) **Authelia** is written in Go and comes with a dedicated CLI called [authelia-scripts](./authelia-scripts.md)
which is provided after running `source bootstrap.sh`. This CLI provides many useful tools to help you during which is available after running `source bootstrap.sh`. This CLI provides many useful tools to help you during
development. development.
In order to build and contribute to **Authelia**, you need to make sure Node with version >= 8 and < 12, In order to build and contribute to **Authelia**, you need to make sure Go v1.13, Docker,
Go v1.13 and Docker is installed on your machine. docker-compose and Node with version >= 8 and < 12 are installed on your machine.
## Build ## Get started
**Authelia** is made of two parts: the frontend and the backend. **Authelia** is made of Go application serving the API and a [React](https://reactjs.org/)
application for the portal.
The frontend is a [React](https://reactjs.org/) application written in Typescript and In order to ease development, Authelia uses the concept of [suites] to run Authelia from source
the backend is Go application. code so that your patches are included. This is a kind of virtual environment running **Authelia**
in a complete ecosystem (LDAP, Redis, SQL server). Note that Authelia is hotreloaded in the
environment so that your patches are instantly included.
The following command builds **Authelia** under dist/: The next command starts the suite called *Standalone*:
authelia-scripts build authelia-scripts suites setup Standalone
Or you can also build the Alpine-based official Docker image with: Most of the suites are using docker-compose to bootstrap the environment. Therefore, you
can check the logs of all application by running the following command on the component
you want to monitor.
authelia-scripts docker build docker logs authelia_authelia-backend_1 -f
## Development Then, edit the code and observe how **Authelia** is automatically reloaded.
In order to ease development, Authelia uses the concept of [suites]. This is
a kind of virutal environment for **Authelia**, it allows you to run **Authelia** in a complete
ecosystem, develop and test your patches. A hot-reload feature has been implemented so that
you can test your changes right after the file has been saved.
The next command will start the suite called [basic](../test/suites/basic/README.md):
authelia-scripts suites start basic
Then, edit the code and observe how **Authelia** is automatically updated.
### Unit tests ### Unit tests
To run the unit tests written, run: To run the unit tests, run:
authelia-scripts unittest authelia-scripts unittest
### Integration tests ### Integration tests
Integration tests run with Mocha and are based on Selenium. They generally Integration tests are located under the `suites` directory based on Selenium.
require a complete environment made of several components like redis, a SQL server and a
LDAP to run. That's why [suites] have been created. At this point, the *basic* suite should
already be running and you can run the tests related to this suite with the following
command:
authelia-scripts suites test authelia-scripts suites test
You don't need to start the suite before testing it. Given your environment is not running You don't need to start the suite before testing it. Given you're not running
any suite, just use the following command to test the basic suite. any suite, just use the following command to test the *Standalone* suite.
authelia-scripts suites test basic authelia-scripts suites test Standalone
The suite will be spawned, tests will be run and then the suite will be teared down The suite will be spawned, tests will be run and then the suite will be teared down
automatically. automatically.

View File

@ -16,11 +16,10 @@ non resilient to failures.*
**NOTE:** If not done already, we highly recommend you first follow the **NOTE:** If not done already, we highly recommend you first follow the
[Getting Started] documentation. [Getting Started] documentation.
In some cases, like protecting personal websites, it can be fine to use In some cases, like protecting personal projects/websites, it can be fine to use
**Authelia** in a non highly-available setup. We can **Authelia** in a non highly-available setup. This reduces the number
achieve that in order to reduce the number of components to only two: a of components to only two: a reverse proxy such as nginx or Traefik and
reverse proxy such as nginx or Traefik and Authelia as a companion of the Authelia as a companion of the proxy.
proxy.
As for a regular deployment in production, you need to install **Authelia** As for a regular deployment in production, you need to install **Authelia**
either by pulling the Docker image or building distributable version. either by pulling the Docker image or building distributable version.
@ -48,16 +47,16 @@ TODO
### Discard SQL server ### Discard SQL server
There is an option in the configuration file to avoid using a SQL server and use There is an option in the configuration file to avoid using an external SQL server
a local sqlite3 database instead. This option will therefore prevent you from running and use a local sqlite3 database instead. This option will therefore prevent you
multiple instances of **Authelia** in parallel. from running multiple instances of **Authelia** in parallel.
Consequently, this option is not meant to be used in production or at least Consequently, this option is not meant to be used in production or at least
not one that should scale out. not one that should scale out.
Here is the configuration block you should use: Here is the configuration you should use:
storage: storage:
# The directory where the sqlite3 file will be saved # The file path of the sqlite3 file where data will be persisted
local: local:
path: /var/lib/authelia/db.sqlite3 path: /var/lib/authelia/db.sqlite3
@ -159,7 +158,7 @@ Well, as stated before those instructions are not meant to be applied for
a production environment. That being said, in some cases it is just fine and a production environment. That being said, in some cases it is just fine and
writing an Ansible playbook to automate all this process is ok. writing an Ansible playbook to automate all this process is ok.
We would really be more than happy to review such a PR. We would really be more than happy to review such a PR.
In the meantime, you can check the *basic* [suite](./suites.md) to see all this In the meantime, you can check the *Standalone* [suite](./suites.md) to see all this
in a real example. in a real example.
[Getting Started]: ./getting-started.md [Getting Started]: ./getting-started.md

View File

@ -7,9 +7,9 @@ command and follow the instructions of bootstrap.sh:
source bootstrap.sh source bootstrap.sh
Then, start the *docker-image* [suite]. Then, start the *Standalone* [suite].
authelia-scripts suites start docker-image authelia-scripts suites setup Standalone
A [suite] is kind of a virtual environment for running Authelia in a complete ecosystem. A [suite] is kind of a virtual environment for running Authelia in a complete ecosystem.
If you want more details please read the related [documentation](./suites.md). If you want more details please read the related [documentation](./suites.md).

View File

@ -1,13 +0,0 @@
version: '3'
services:
authelia:
image: authelia:dist
restart: always
volumes:
- ./test/suites/docker-image/config.yml:/etc/authelia/config.yml:ro
environment:
- NODE_TLS_REJECT_UNAUTHORIZED=0
depends_on:
- redis
networks:
- authelianet

View File

@ -15,7 +15,7 @@ or deploy the dedicated [suite](/docs/suites.md) called *kubernetes*.
The simplest way to start a Kubernetes cluster is to deploy the *kubernetes* suite with The simplest way to start a Kubernetes cluster is to deploy the *kubernetes* suite with
authelia-scripts suites start kubernetes authelia-scripts suites setup kubernetes
This will take a few seconds (or minutes) to deploy the cluster. This will take a few seconds (or minutes) to deploy the cluster.

View File

@ -2,22 +2,9 @@
"name": "authelia", "name": "authelia",
"version": "3.16.3", "version": "3.16.3",
"description": "2FA Single Sign-On server for nginx using LDAP, TOTP and U2F", "description": "2FA Single Sign-On server for nginx using LDAP, TOTP and U2F",
"bin": {
"authelia": "./dist/server/src/index.js"
},
"engines": { "engines": {
"node": ">=8.0.0 <10.0.0" "node": ">=8.0.0 <10.0.0"
}, },
"scripts": {
"start": "./scripts/authelia-scripts suites start",
"build": "./scripts/authelia-scripts build",
"unittest": "./scripts/authelia-scripts unittest",
"test": "./scripts/authelia-scripts suites test",
"travis": "./scripts/authelia-scripts travis",
"cover": "NODE_ENV=test nyc npm t",
"scripts": "./scripts/authelia-scripts",
"hash-password": "./scripts/authelia-scripts hash-password"
},
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git+https://github.com/clems4ever/authelia" "url": "git+https://github.com/clems4ever/authelia"

View File

@ -1,4 +1,4 @@
# Basic suite # Network ACL suite
This suite has been created to test Authelia with basic feature in a non highly-available setup. This suite has been created to test Authelia with basic feature in a non highly-available setup.
Authelia basically use an in-memory cache to store user sessions and persist data on disk instead Authelia basically use an in-memory cache to store user sessions and persist data on disk instead