Skip to main content

Deployment Modes

Run one master and an agent on each monitored server: both on one server (All-in-One), a dedicated master (Multi-Node), or remote agents added to an all-in-one master (Hybrid).

All-in-One Deployment​

mac pull all
sudo mac start all

Open http://<this-host-ip>:23000.

Multi-Node Deployment​

Step 1 — Start the Master​

mac pull master
sudo mac start master

The master needs no GPU. Unless MAC_NODE_TOKEN is set, the first start writes the node token to /etc/mango/mac/node_token (Node Authentication).

Step 2 — Register Each Agent​

Copy the master's token securely, then run on each server:

sudo mac env set --global MASTER_IP=<master-ip>
sudo mac env set --global MAC_NODE_TOKEN=<master-token>
mac pull agent
mac start agent

If the agent enrolls with the wrong address, set MAC_NODE_IP_PREFIX.

Deregistering Agents​

mac stop agent # retire the node: deregister
mac stop agent --keep-registration # temporary stop: preserve enrollment

Hybrid Deployment​

Run sudo mac start all on the master, then register remote agents as in Step 2.

Verifying the Installation​

mac status -v
mac test --expect all # or master / agent for the local role

Then check that the dashboard shows each node with fresh data. See mac test.

Upgrading​

Upgrades are supported from 0.5.6 or later. An older release needs a fresh installation: uninstall it with its data, then install the new release. Remove obsolete MAC_VERSION pins, then upgrade the master before agents:

sudo apt update
sudo apt install --only-upgrade mango-ai-center
# standalone package: sudo dpkg -i mango-ai-center_<version>_amd64.deb
# RHEL family: sudo dnf upgrade ./mango-ai-center-<version>-<release>.<arch>.rpm
mac status -v
mac test --expect master # all or agent for other roles

The package restarts the running role with the new images; data, enrollment and users remain. If the restart fails, read /var/lib/mango-ai-center/upgrade-restart.log, fix node-wide settings (keep the agents' token) or the images, then run sudo env MAC_IGNORE_USER_ENV=1 mac start <mode>.

Offline hosts rerun the new bundle's installer.

warning

Upgrades overwrite edited release configuration files. Keep site overrides in /etc/mango/mac/env.

Uninstalling​

To keep data:

mac stop all
sudo apt remove mango-ai-center

To delete all MAC data:

mac stop all
mac clean --all
sudo apt purge mango-ai-center
danger

Purge deletes MAC volumes and /etc/mango/mac, including the node token. Never run mac clean --all during upgrades.

On RHEL-family hosts, sudo dnf remove mango-ai-center keeps data. To delete it, run mac clean --all first, then remove /etc/mango/mac and /var/lib/mango-ai-center.

Applying New Container Settings​

Dashboard updates replace images only. To apply new Compose files, privileges, ports or variables, upgrade the package on every node, then recreate each role, master first:

sudo env MAC_IGNORE_USER_ENV=1 mac restart <mode>