Tobias Brunner
b22ff9f6ae
cleanup unused checkup monitoring |
||
---|---|---|
backup | ||
contrib | ||
deployment | ||
docs | ||
iotbox | ||
odoo | ||
.gitignore | ||
README.md | ||
docker-compose.yml |
README.md
Odoo Pos Distribution
Dockerfiles, Docker Compose and Kubernetes configuration for running an Odoo based PoS in container and Kubernets.
Additionally it contains pos-addons for using receipt printers over the network.
Quickstart
Docker Compose
docker-compose up
Continue with "Odoo PoS configuration"
Kubernetes / K3s
The provided YAML files have been developed and tested with k3s.
Installation will happen in the namespace pos
.
- Install k3s (any other Kubernetes should work as well)
- Install local-path-provisioner
- Apply the deployment YAMLs:
kubectl apply -f deployment/
Continue with "Odoo PoS configuration"
Odoo PoS configuration
- Connect to Odoo and create a new database
On Kubernetes the Ingress defines the hostnames
pos
andiotbox
- Install Odoo Apps:
- "Point of Sale"
- "POS Network Printer"
- (Enable "Developer mode" under Odoo settings)
- Configure PoS for IoT Box (see docs/iotbox-config.png)
- Configure Order Printer (see docs/orderprinter.png)
Hardware and Networking
- Default network assumed:
192.168.233.0/24
- Printers: 192.168.233.3 and 192.168.233.5
- Printers used in this project: Epson TM-T20II
More hardware description and a network diagram: tbd.
Monitoring
There are two kinds of monitoring prepared: The cluster itself and the PoS application.
Simple Cluster Healthcheck
Under contrib/healthchecks-cronjob.yaml
a simple Kubernetes cronjob is
provided which regularly pings Healthchecks.io.
A secret with the ping URL needs to be added before the CronJobs does it's work:
kubectl -n hc create secret generic healthchecks-io --from-literal=HCURL=https://hc-ping.com/MYUUID
Backup configuration
Example contents of backup.env
:
RESTIC_REPOSITORY=rclone:myremote:posbackup
RESTIC_PASSWORD=extremelysecurepassword
RCLONE_CONFIG_FWUCLOUD_TYPE=webdav
RCLONE_CONFIG_FWUCLOUD_URL=https://nextcloud.example.com/remote.php/webdav/
RCLONE_CONFIG_FWUCLOUD_VENDOR=nextcloud
RCLONE_CONFIG_FWUCLOUD_USER=backupuser
RCLONE_CONFIG_FWUCLOUD_PASS=encryptedpassword
PGDATABASE=odoodbname
Restore of DB:
createdb -T template0 restoretest
pg_restore -d restoretest /data/odoo_data.dump