The Dad Bot Cluster Manager is a simple server that allows the clusters to communicate with each other and also """"""very efficiently"""""" stores historical data about the clusters for our internal grafana monitoring.
Contributing is super simple, you can fork the repo, make your contribution, and make a PR. AlekEagle will review the PR, and do the normal PR review thingys.
Since Dad Bot and the various components are all essentially spaghetti code, it's unnecessarily complicated without any guidance. So here's that guidance.
- Follow the initial setup instructions for Dad Bot until you get to the step where it tells you to "make sure the cluster manager is configured correctly". Then come back here.
- Prepare the
.env
file (There is an example in the repo, you can start from there and modify it as needed) - Set up the users that are allowed to connect to the cluster manager. You do this by creating a file called
users.json
in theconfig
directory, there is an example in that directory, you can start from there and modify it as needed. The example file also explains how to get the token for a cluster client. - Set up a PostgreSQL database and give the cluster manager its own database user with full access to that database. It'll create the tables it needs on its own.
- (Optional, but recommended for production environments) Replace the placeholder fields in the
dadbot-cluster-manager.service
file with the correct paths and user information, then copy it to/etc/systemd/system/
and runsystemctl daemon-reload
to reload the systemd daemon, then runsystemctl enable dadbot-cluster-manager
to enable the service. - Run the damn thing.
- Systemd:
systemctl start dadbot-cluster-manager
- Manually:
node .
- Systemd:
Need extra logs for debugging? Set the DEBUG
environment variable to true
and it'll log additional information to the console.