Docker Swarm
- Community Edition
- Enterprise Edition
Step #1: Initialize Docker Swarm
If you haven't already initialized Docker Swarm on your manager node, run the following command on the manager node:
docker swarm init
This initializes a new Docker Swarm and joins the current node as a manager.
Step #2: Deploy the Coroot Stack
Deploy the Coroot stack to your cluster by running the following command on the manager node. Before applying, you can review the configuration file in Coroot's GitHub repository: docker-swarm-stack.yaml
curl -fsS https://raw.githubusercontent.com/coroot/coroot/main/deploy/docker-swarm-stack.yaml | \
docker stack deploy -c - coroot
Step #3: Validate the deployment
After deploying the stack, you can use docker stack ls to list the deployed stacks in your Docker Swarm cluster. Here's an example of how the output might look:
NAME SERVICES
coroot 3
Step #4: Installing coroot-node-agent
Since Docker Swarm doesn't support privileged containers, you'll have to manually deploy coroot-node-agent on each cluster node.
Just replace NODE_IP with any node's IP address in the Docker Swarm cluster.
docker run --detach --name coroot-node-agent \
--pull=always \
--privileged --pid host \
-v /sys/kernel/tracing:/sys/kernel/tracing:rw \
-v /sys/kernel/debug:/sys/kernel/debug:rw \
-v /sys/fs/cgroup:/host/sys/fs/cgroup:ro \
ghcr.io/coroot/coroot-node-agent \
--cgroupfs-root=/host/sys/fs/cgroup \
--collector-endpoint=http://NODE_IP:8080
Step #5: Accessing Coroot
Access Coroot through any node in your Docker Swarm cluster using its published port: http://NODE_IP:8080.
Upgrade Coroot
To upgrade Coroot, re-run the deploy command from Step #2 — Docker Swarm resolves the latest images and updates the services:
curl -fsS https://raw.githubusercontent.com/coroot/coroot/main/deploy/docker-swarm-stack.yaml | \
docker stack deploy -c - coroot
To upgrade coroot-node-agent, remove the container on each node and re-run the command from Step #4 (it always pulls the latest image):
docker rm -f coroot-node-agent
Uninstall Coroot
To uninstall Coroot run the following command:
docker stack rm coroot
Coroot Enterprise Edition is a paid subscription (from $1 per CPU core/month) that offers extra features and priority support. To install the Enterprise Edition, you'll need a license. Start your free trial today.
Step #1: Initialize Docker Swarm
If you haven't already initialized Docker Swarm on your manager node, run the following command on the manager node:
docker swarm init
This initializes a new Docker Swarm and joins the current node as a manager.
Step #2: Deploy the Coroot Stack
Deploy the Coroot stack to your cluster by running the following command on the manager node. Before applying, you can review the configuration file in Coroot's GitHub repository: docker-swarm-stack.yaml
curl -fsS https://raw.githubusercontent.com/coroot/coroot/main/deploy/docker-swarm-stack.yaml | \
LICENSE_KEY="COROOT-LICENSE-KEY-HERE" docker stack deploy -c - coroot
Step #3: Validate the deployment
After deploying the stack, you can use docker stack ls to list the deployed stacks in your Docker Swarm cluster. Here's an example of how the output might look:
NAME SERVICES
coroot 4
Step #4: Installing coroot-node-agent
Since Docker Swarm doesn't support privileged containers, you'll have to manually deploy coroot-node-agent on each cluster node.
Just replace NODE_IP with any node's IP address in the Docker Swarm cluster.
docker run --detach --name coroot-node-agent \
--pull=always \
--privileged --pid host \
-v /sys/kernel/tracing:/sys/kernel/tracing:rw \
-v /sys/kernel/debug:/sys/kernel/debug:rw \
-v /sys/fs/cgroup:/host/sys/fs/cgroup:ro \
ghcr.io/coroot/coroot-node-agent \
--cgroupfs-root=/host/sys/fs/cgroup \
--collector-endpoint=http://NODE_IP:8080
Step #5: Accessing Coroot
Access Coroot through any node in your Docker Swarm cluster using its published port: http://NODE_IP:8080.
Upgrade Coroot
To upgrade Coroot, re-run the deploy command from Step #2 — Docker Swarm resolves the latest images and updates the services:
curl -fsS https://raw.githubusercontent.com/coroot/coroot/main/deploy/docker-swarm-stack.yaml | \
LICENSE_KEY="COROOT-LICENSE-KEY-HERE" docker stack deploy -c - coroot
To upgrade coroot-node-agent, remove the container on each node and re-run the command from Step #4 (it always pulls the latest image):
docker rm -f coroot-node-agent
Uninstall Coroot
To uninstall Coroot run the following command:
docker stack rm coroot