Skip to main content

Service Control

mac pull, mac start, mac stop, mac restart, mac status, mac logs, mac info, and mac clean.

mac pull

Pull container images from the configured registry. Mode is required.

~$ mac pull all # All images (master + agent)
~$ mac pull master # Master images only
~$ mac pull agent # Agent images only

Images are version-pinned to match the package version (see /usr/share/mango-ai-center/VERSION). Set MAC_REGISTRY to use a private mirror — see Environment.

mac start

Start MAC services. Mode is required.

~$ mac start all # Master + Agent on this host
~$ mac start master # Master only (web UI, API, Prometheus)
~$ mac start agent # Agent only (exporters, sdk-agent, bmc-agent)

mac start pulls any missing images, brings up the compose project in detached mode, and prints the access URLs. The agent mode also registers this host with the master at MASTER_IP.

mac stop

Stop the running services. Mode is required.

~$ mac stop all
~$ mac stop master
~$ mac stop agent

mac stop agent notifies the master so the node is deregistered from the inventory. This is the right command to use when you are retiring a server. For a temporary outage (reboot, maintenance window), it is fine to just power-cycle the host — agents that simply go offline remain registered, so your inventory survives.

mac restart

Convenience wrapper for mac stop <mode> followed by mac start <mode>. Mode is required.

~$ mac restart all
~$ mac restart master
~$ mac restart agent

Use this after editing variables with mac env set so the new values reach the containers.

mac status

Lists every MAC container on this host with its status and published ports.

mac logs

Stream container logs without remembering the exact docker-compose invocation.

~$ mac logs # tail every running MAC container
~$ mac logs api-server # tail one service
~$ mac logs api-server prometheus # tail a subset

mac info

Prints a single-screen summary of the local installation: CLI version, registry, config directory, effective env variables, and the role detected on this host. Use it as the first diagnostic when a node is behaving unexpectedly.

mac version

~$ mac version # or: mac -v / mac --version

Prints just the CLI version and exits — useful in scripts that gate on the installed MAC version.

mac clean

Removes everything: containers, the MAC docker network, named volumes (including the Prometheus time-series database and Loki logs), and the locally cached MAC images. Use this to start completely fresh.

~$ mac clean
warning

mac clean is destructive and cannot be undone. Back up Prometheus volumes first if you want to preserve historical metrics.