A complete, production-ready MongoDB deployment orchestrator for Docker Swarm, porting features from the MongoDB Kubernetes Operator.
./scripts/deploy-swarm.sh- ✅ MongoDB Community Edition replica set deployment
- ✅ Automated replica set initialization
- ✅ Rolling upgrades and downgrades
- ✅ SCRAM authentication and user management
- ✅ TLS/X.509 certificate support
- ✅ Prometheus monitoring and metrics export
- ✅ Persistent volume management
- ✅ Health checks and self-healing
- ✅ Custom roles and authorization
- ✅ Multi-node cluster constraints
┌─────────────────────────────────────────┐
│ Docker Swarm Cluster │
│ ┌──────────────────────────────────┐ │
│ │ MongoDB Replica Set (rs0) │ │
│ │ [mongo-0] [mongo-1] [mongo-2] │ │
│ │ primary secondary secondary │ │
│ └──────────────────────────────────┘ │
│ ▲ ▲ ▲ │
│ │ │ │ │
│ ┌────────┴─────────┴─────────┴──┐ │
│ │ Swarm Controller Service │ │
│ │ (Reconciliation Loop) │ │
│ └────────────────────────────────┘ │
│ ┌────────────────────────────────┐ │
│ │ Prometheus + MongoDB Exporter │ │
│ │ Grafana Dashboard │ │
│ └────────────────────────────────┘ │
└─────────────────────────────────────────┘
MIT License - See LICENSE file