2020-11-06 10:44:25 +00:00
Installation
############
2021-12-03 17:37:25 +00:00
.. warning ::
2020-11-06 10:44:25 +00:00
2021-12-03 17:37:25 +00:00
Canaille is under heavy development and may not fit a production environment yet.
2020-11-06 10:44:25 +00:00
2021-12-03 17:37:25 +00:00
The installation of canaille consist in several steps, some of which you can do manually or with command line tool:
Get the code
2020-11-06 10:44:25 +00:00
============
2022-05-06 09:12:53 +00:00
As the moment there is no distribution package for canaille. However, it can be installed with the `` pip `` package manager.
2022-02-17 16:26:15 +00:00
Let us choose a place for the canaille environment, like `` /opt/canaille/env `` .
2021-12-03 17:37:25 +00:00
2022-11-15 14:25:50 +00:00
.. code-block :: bash
2021-12-03 17:37:25 +00:00
2022-02-17 16:26:15 +00:00
export CANAILLE_INSTALL_DIR=/opt/canaille
sudo mkdir --parents "$CANAILLE_INSTALL_DIR"
2022-03-19 11:19:48 +00:00
sudo virtualenv --python=python3 "$CANAILLE_INSTALL_DIR/env"
2023-08-16 15:14:11 +00:00
sudo "$CANAILLE_INSTALL_DIR/env/bin/pip" install "canaille[all]"
Extras
------
Canaille provides different package options:
- `front` provides all the things needed to produce the user interface;
- `oidc` provides the dependencies to perform OAuth2/OIDC authentication;
- `ldap` provides the dependencies to enable the LDAP backend;
- `sentry` provides sentry integration to watch Canaille exceptions;
- `all` provides all the extras above.
2021-12-03 17:37:25 +00:00
2024-08-15 17:40:11 +00:00
Configure
=========
2021-12-03 17:37:25 +00:00
2022-02-17 16:26:15 +00:00
Choose a path where to store your configuration file. You can pass any configuration path with the `` CONFIG `` environment variable.
2021-12-03 17:37:25 +00:00
2022-11-15 14:25:50 +00:00
.. code-block :: bash
2021-12-03 17:37:25 +00:00
2022-02-17 16:26:15 +00:00
export CANAILLE_CONF_DIR=/etc/canaille
sudo mkdir --parents "$CANAILLE_CONF_DIR"
2023-06-30 21:52:22 +00:00
sudo cp $CANAILLE_INSTALL_DIR/env/lib/python*/site-packages/canaille/config.sample.toml "$CANAILLE_CONF_DIR/config.toml"
2021-12-03 17:37:25 +00:00
2024-05-13 14:44:02 +00:00
You should then edit your configuration file to adapt the values to your needs. Look at the configuration details in the :doc: `configuration <../references/configuration>` page.
2021-12-03 17:37:25 +00:00
2024-08-15 17:40:11 +00:00
Install
=======
2021-12-03 17:37:25 +00:00
2024-08-15 17:40:11 +00:00
The :ref: `install command <cli_install>` will apply most of the things needed to get Canaille working.
Depending on the configured :doc: `database <databases>` it will create the SQL tables, or install the LDAP schemas for instance.
2021-10-12 16:14:09 +00:00
2022-11-15 14:25:50 +00:00
.. code-block :: bash
2021-10-12 16:14:09 +00:00
2024-08-15 17:40:11 +00:00
export CONFIG="$CANAILLE_CONF_DIR/config.toml"
"$CANAILLE_INSTALL_DIR/env/bin/canaille" install
2021-10-12 16:14:09 +00:00
2024-08-15 17:40:11 +00:00
Check
=====
2020-11-06 10:44:25 +00:00
2024-08-15 17:40:11 +00:00
After a manual installation, you can check your configuration file using the :ref: `check command <cli_install>` :
2020-11-06 10:44:25 +00:00
2022-11-15 14:25:50 +00:00
.. code-block :: bash
2020-11-06 10:44:25 +00:00
2024-08-15 17:40:11 +00:00
"$CANAILLE_INSTALL_DIR/env/bin/canaille" check