This repo allows setting up online replicas of Kiwix Hotspot Web Access from Hotspot-image (imager-service built).
Those replicas (called demos or deployments) are configured in the demos.yaml
file at the root of this repo.
The tool automatically monitors this file and adjusts on changes.
Kiwix Hotspot Demo adheres to openZIM's Contribution Guidelines.
Kiwix Hotspot Demo has implemented openZIM's Python bootstrap, conventions and policies v1.0.0.
Adding, removing or reordering demos is done by editing (via a PR) demo.offspot.yaml
file on kiwix/operations
repository.
ident
key must match the imager-service ident of the auto-image.name
key is an optionnal user-friendly label for the homepage.alias
key is an optionnal user-friendly replacement of ident
for the demo's sub-domain (xxx.demo.hotspot.kiwix.org
)ident
in /src/offspot_demo/multi-proxy/assets
)Installing this demo requires:
loop
must be enabled in kernel or module loadedIf you start from a bare machine, you can:
python -m venv env
echo "source ~/env/bin/activate" | tee /etc/profile.d/python-venv.sh
To install the demo, you have to:
pip install git+https://github.com/offspot/demo@main
contrib/environment
file to /etc/demo/environment
<src_path>/systemd-unit/demo-offspot.service
echo "export \$(grep -v '^#' /etc/demo/environment | xargs) && env | grep OFFSPOT_DEMO" | tee /etc/profile.d/demo-env.sh
# download and install aria2 (used for downloads)
wget -O /tmp/aria2.zip https://github.com/abcfy2/aria2-static-build/releases/download/1.37.0/aria2-x86_64-linux-musl_libressl_static.zip \
&& unzip -d /tmp /tmp/aria2.zip \
&& mv /tmp/aria2c /usr/local/bin \
&& rm /tmp/aria2.zip \
&& aria2c -v
# this folder must exists
mkdir -p /var/log/demo
# install systend units
cp src/offspot_demo/systemd-unit/* /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable --now multi-proxy.service demo-watcher.service demo-watcher.timer
multi-proxy
that responds to the FQDN and links to individual demosdemo.offspot.yaml
file in kiwix/operations repo and updates /etc/demo/environment
accordinglyCheck the source code starting from the config_watcher
and update-watcher
to discover the various steps.
Kiwix is running a demo instance at https://demo.hotspot.kiwix.org
demo.hotspot.kiwix.org A 62.210.206.65
*.demo.hotspot.kiwix.org CNAME demo.hotspot.kiwix.org
install.sh
)mount
, coreutils
and aria2
(in install.sh
)/root/demo/env
pip install git+https://github.com/offspot/demo@main
/etc/demo/environment
. Files in /data/demo