Commit 4972aab9 authored by Titouan Soulard's avatar Titouan Soulard

Add documentation on usage

parent b8faa6fe
# Gakeshadeba
*(ka. to be put in cache)*
Simple ShaCache and ShaDir implementation in plain Python.
For now, support is limited to **binary releases**.
## Server usage
The server script is meant to be easy to use. It requires four main things:
1. a configuration file for the cache server itself;
2. a directory where all binary releases (`.tar.gz` files) are stored;
3. a list of software releases, in JSON format;
4. a key used to sign software releases.
After everything is set up, the server can be launched using:
```bash
pip install -r requirements.txt
python3 server.py -c /path/to/config.ini`
```
### Configuring the server
Python's `configparser` module is used, therefore, create a `config.ini` file with the following content (adapted to your needs):
```ini
[server]
host = 192.168.32.10
port = 5050
[gakeshadeba]
content_directory = /mnt/device/software
sr_list_path = /mnt/device/miscellaneous/sr-list.json
signing_key_path = /mnt/device/miscellaneous/my.key
```
### Adding software releases
The `sr-list.json` file must be created and maintained manually for now, it contains several entries like:
```json
{
"cache_file": "re6stnet-1.0.349-ubuntu-22.04.tar.gz",
"software_release": "https://lab.nexedi.com/nexedi/slapos/raw/1.0.349/software/re6stnet/software.cfg",
"software_root": "/opt/slapgrid",
"multiarch": "x86_64-linux-gnu",
"os": ["ubuntu", "22.04", "jammy"]
}
```
blinker==1.7.0
cffi==1.16.0
click==8.1.7
cryptography==41.0.7
Flask==3.0.0
itsdangerous==2.1.2
Jinja2==3.1.2
MarkupSafe==2.1.3
pycparser==2.21
pyOpenSSL==23.3.0
Werkzeug==3.0.1
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment