|
| 1 | +--- |
| 2 | +sidebar_position: 1 |
| 3 | +--- |
| 4 | + |
| 5 | +# Deployment Overview |
| 6 | + |
| 7 | +Anomstack offers flexible deployment options to fit different organizational needs and infrastructure requirements. This page helps you choose the right deployment pattern for your use case. |
| 8 | + |
| 9 | +## Deployment Modes |
| 10 | + |
| 11 | +### 🎯 Full Stack Deployment |
| 12 | + |
| 13 | +Deploy the complete Anomstack platform including dashboard, backend services, and database infrastructure. |
| 14 | + |
| 15 | +```mermaid |
| 16 | +graph TB |
| 17 | + subgraph "Full Stack Deployment" |
| 18 | + subgraph "User Layer" |
| 19 | + USERS[👥 Users] |
| 20 | + ADMIN[🔐 Admins] |
| 21 | + end |
| 22 | + |
| 23 | + subgraph "Application Layer" |
| 24 | + DASH[📊 FastHTML Dashboard<br/>Port 8080] |
| 25 | + DAGSTER[⚙️ Dagster UI<br/>Port 3000] |
| 26 | + CODE[📦 Code Server<br/>Port 4000] |
| 27 | + end |
| 28 | + |
| 29 | + subgraph "Data Layer" |
| 30 | + DB[(🗄️ PostgreSQL<br/>Metadata)] |
| 31 | + DUCKDB[(🦆 DuckDB<br/>Metrics)] |
| 32 | + MODELS[📁 Model Storage<br/>Local/S3/GCS] |
| 33 | + end |
| 34 | + |
| 35 | + subgraph "External Services" |
| 36 | + EMAIL[📧 Email Service] |
| 37 | + SLACK[💬 Slack API] |
| 38 | + SOURCES[📊 Data Sources] |
| 39 | + end |
| 40 | + end |
| 41 | + |
| 42 | + USERS --> DASH |
| 43 | + ADMIN --> DAGSTER |
| 44 | + DAGSTER --> CODE |
| 45 | + DASH --> CODE |
| 46 | + CODE --> DB |
| 47 | + CODE --> DUCKDB |
| 48 | + CODE --> MODELS |
| 49 | + CODE --> EMAIL |
| 50 | + CODE --> SLACK |
| 51 | + CODE --> SOURCES |
| 52 | +``` |
| 53 | + |
| 54 | +**✅ Best for:** |
| 55 | +- New implementations |
| 56 | +- Teams wanting the full Anomstack experience |
| 57 | +- Organizations needing the dashboard interface |
| 58 | +- Proof of concepts and demos |
| 59 | + |
| 60 | +**📦 Includes:** |
| 61 | +- Interactive dashboard for metrics visualization |
| 62 | +- Dagster UI for pipeline management |
| 63 | +- Complete alerting system (Email, Slack, LLM) |
| 64 | +- Built-in storage for metrics and models |
| 65 | + |
| 66 | +### 🤖 Headless Deployment |
| 67 | + |
| 68 | +Deploy only the Dagster orchestration engine to integrate with your existing infrastructure. |
| 69 | + |
| 70 | +```mermaid |
| 71 | +graph TB |
| 72 | + subgraph "Headless Deployment" |
| 73 | + subgraph "Minimal Anomstack" |
| 74 | + DAGSTER[⚙️ Dagster Engine] |
| 75 | + CODE[📦 Anomaly Detection Jobs] |
| 76 | + end |
| 77 | + |
| 78 | + subgraph "Your Existing Infrastructure" |
| 79 | + YOUR_DB[(🏢 Your Database<br/>BigQuery/Snowflake/etc)] |
| 80 | + YOUR_DASH[📊 Your Dashboard<br/>Tableau/Looker/etc] |
| 81 | + YOUR_ALERTS[🔔 Your Alerting<br/>PagerDuty/OpsGenie/etc] |
| 82 | + YOUR_MODELS[📁 Your Storage<br/>S3/GCS/etc] |
| 83 | + end |
| 84 | + |
| 85 | + subgraph "External Data" |
| 86 | + SOURCES[📊 Data Sources] |
| 87 | + end |
| 88 | + end |
| 89 | + |
| 90 | + DAGSTER --> CODE |
| 91 | + CODE --> YOUR_DB |
| 92 | + CODE --> YOUR_MODELS |
| 93 | + YOUR_DB --> YOUR_DASH |
| 94 | + YOUR_DB --> YOUR_ALERTS |
| 95 | + SOURCES --> CODE |
| 96 | +``` |
| 97 | + |
| 98 | +**✅ Best for:** |
| 99 | +- Organizations with existing analytics infrastructure |
| 100 | +- Enterprise environments with strict data governance |
| 101 | +- Teams preferring their current dashboards/alerting |
| 102 | +- Microservices architectures |
| 103 | + |
| 104 | +**📦 Includes:** |
| 105 | +- Anomaly detection pipeline only |
| 106 | +- Writes results to your existing database |
| 107 | +- Configurable alert outputs (database, webhooks, etc.) |
| 108 | +- Model storage in your preferred system |
| 109 | + |
| 110 | +## Deployment Platforms |
| 111 | + |
| 112 | +### Local Development |
| 113 | + |
| 114 | +Perfect for development, testing, and small-scale deployments. |
| 115 | + |
| 116 | +| Method | Complexity | Best For | |
| 117 | +|--------|------------|----------| |
| 118 | +| **[Docker Compose](docker.md)** | 🟢 Low | Quick start, local development | |
| 119 | +| **Python Virtual Env** | 🟡 Medium | Development, debugging | |
| 120 | + |
| 121 | +### Cloud Platforms |
| 122 | + |
| 123 | +Scalable options for production workloads. |
| 124 | + |
| 125 | +| Platform | Complexity | Scalability | Best For | |
| 126 | +|----------|------------|-------------|----------| |
| 127 | +| **[Fly.io](fly.md)** | 🟢 Low | 🟡 Medium | Global edge deployment | |
| 128 | +| **[Google Cloud](gcp.md)** | 🟡 Medium | 🟢 High | GCP-native integration | |
| 129 | +| **[Dagster Cloud](https://docs.dagster.io/dagster-cloud)** | 🟢 Low | 🟢 High | Serverless, managed | |
| 130 | + |
| 131 | +### Containerized Deployment |
| 132 | + |
| 133 | +| Option | Use Case | |
| 134 | +|--------|----------| |
| 135 | +| **Docker Compose** | Single-node deployment | |
| 136 | +| **Kubernetes** | Multi-node, enterprise scale | |
| 137 | +| **Docker Swarm** | Simple orchestration | |
| 138 | + |
| 139 | +## Architecture Patterns |
| 140 | + |
| 141 | +### Pattern 1: All-in-One (Recommended for Getting Started) |
| 142 | + |
| 143 | +```bash |
| 144 | +# Everything in one deployment |
| 145 | +make docker # or |
| 146 | +make fly-deploy # or |
| 147 | +make dagster-cloud |
| 148 | +``` |
| 149 | + |
| 150 | +**Pros:** Simple setup, everything included |
| 151 | +**Cons:** Single point of failure, harder to scale components independently |
| 152 | + |
| 153 | +### Pattern 2: Service Separation |
| 154 | + |
| 155 | +```mermaid |
| 156 | +graph LR |
| 157 | + subgraph "Compute Layer" |
| 158 | + DAGSTER[Dagster Jobs<br/>Container/Serverless] |
| 159 | + end |
| 160 | + |
| 161 | + subgraph "Storage Layer" |
| 162 | + DB[(Database<br/>Managed Service)] |
| 163 | + MODELS[(Model Storage<br/>Cloud Storage)] |
| 164 | + end |
| 165 | + |
| 166 | + subgraph "Interface Layer" |
| 167 | + DASH[Dashboard<br/>Separate Deployment] |
| 168 | + end |
| 169 | + |
| 170 | + DAGSTER --> DB |
| 171 | + DAGSTER --> MODELS |
| 172 | + DASH --> DB |
| 173 | +``` |
| 174 | + |
| 175 | +**Pros:** Independent scaling, better reliability |
| 176 | +**Cons:** More complex setup and management |
| 177 | + |
| 178 | +### Pattern 3: Fully Distributed |
| 179 | + |
| 180 | +```mermaid |
| 181 | +graph TB |
| 182 | + subgraph "Data Processing" |
| 183 | + JOBS[Anomaly Detection Jobs<br/>Serverless Functions] |
| 184 | + end |
| 185 | + |
| 186 | + subgraph "Orchestration" |
| 187 | + SCHEDULER[Job Scheduler<br/>Managed Service] |
| 188 | + end |
| 189 | + |
| 190 | + subgraph "Storage" |
| 191 | + METRICS[(Metrics DB<br/>Data Warehouse)] |
| 192 | + MODELS[(Model Store<br/>Object Storage)] |
| 193 | + end |
| 194 | + |
| 195 | + subgraph "Interfaces" |
| 196 | + API[REST API<br/>Serverless] |
| 197 | + DASH[Dashboard<br/>Static Hosting] |
| 198 | + end |
| 199 | + |
| 200 | + SCHEDULER --> JOBS |
| 201 | + JOBS --> METRICS |
| 202 | + JOBS --> MODELS |
| 203 | + API --> METRICS |
| 204 | + DASH --> API |
| 205 | +``` |
| 206 | + |
| 207 | +**Pros:** Maximum scalability and reliability |
| 208 | +**Cons:** Most complex to set up and debug |
| 209 | + |
| 210 | +## Choosing Your Deployment |
| 211 | + |
| 212 | +### Quick Decision Tree |
| 213 | + |
| 214 | +```mermaid |
| 215 | +flowchart TD |
| 216 | + START[👋 Welcome to Anomstack!] --> NEED{What do you need?} |
| 217 | + |
| 218 | + NEED -->|Quick demo/POC| DEMO[🚀 Try Fly.io Demo<br/>anomstack-demo.fly.dev] |
| 219 | + NEED -->|Full experience| FULL{Infrastructure preference?} |
| 220 | + NEED -->|Just anomaly detection| HEADLESS{Integration needs?} |
| 221 | + |
| 222 | + FULL -->|Cloud-native| CLOUD[☁️ Dagster Cloud<br/>or GCP deployment] |
| 223 | + FULL -->|Self-hosted| DOCKER[🐳 Docker Compose<br/>or Fly.io] |
| 224 | + FULL -->|Local development| LOCAL[🐍 Python venv<br/>or Docker locally] |
| 225 | + |
| 226 | + HEADLESS -->|Existing data platform| PLATFORM[🏢 Headless + Your DB<br/>BigQuery/Snowflake/etc] |
| 227 | + HEADLESS -->|Simple integration| MINIMAL[🤖 Docker headless<br/>+ webhooks/API] |
| 228 | + |
| 229 | + DEMO --> DEMO_LINK[<a href='https://anomstack-demo.fly.dev'>View Live Demo</a>] |
| 230 | + CLOUD --> CLOUD_DOCS[<a href='https://docs.dagster.io/dagster-cloud'>Dagster Cloud Setup</a>] |
| 231 | + DOCKER --> DOCKER_DOCS[<a href='./docker'>Docker Guide</a>] |
| 232 | + LOCAL --> LOCAL_DOCS[<a href='../quickstart'>Quickstart Guide</a>] |
| 233 | + PLATFORM --> HEADLESS_CONFIG[See Headless Config below] |
| 234 | + MINIMAL --> MINIMAL_CONFIG[See Minimal Setup below] |
| 235 | +``` |
| 236 | + |
| 237 | +### Configuration Examples |
| 238 | + |
| 239 | +#### Full Stack Configuration |
| 240 | + |
| 241 | +```yaml |
| 242 | +# .env for full stack |
| 243 | +ANOMSTACK_DUCKDB_PATH=/data/anomstack.db |
| 244 | +ANOMSTACK_DASHBOARD_HOST=0.0.0.0 |
| 245 | +ANOMSTACK_DASHBOARD_PORT=8080 |
| 246 | + |
| 247 | + |
| 248 | +ANOMSTACK_SLACK_CHANNEL=#anomalies |
| 249 | +``` |
| 250 | + |
| 251 | +#### Headless Configuration |
| 252 | + |
| 253 | +```yaml |
| 254 | +# .env for headless deployment |
| 255 | +ANOMSTACK_DB=bigquery |
| 256 | +ANOMSTACK_TABLE_KEY=analytics.anomaly_detection.metrics |
| 257 | +ANOMSTACK_MODEL_PATH=gs://company-ml-models/anomstack/ |
| 258 | +ANOMSTACK_DISABLE_DASHBOARD=true |
| 259 | +ANOMSTACK_ALERT_WEBHOOK_URL=https://api.company.com/alerts |
| 260 | +``` |
| 261 | + |
| 262 | +## Next Steps |
| 263 | + |
| 264 | +### Getting Started |
| 265 | + |
| 266 | +1. **🚀 Quick Demo**: Visit [anomstack-demo.fly.dev](https://anomstack-demo.fly.dev) to see Anomstack in action |
| 267 | +2. **📖 Follow Guides**: Choose your deployment method from the guides below |
| 268 | +3. **⚙️ Configure Metrics**: Set up your first metric batch |
| 269 | +4. **🔔 Test Alerts**: Configure and test your alerting channels |
| 270 | + |
| 271 | +### Deployment Guides |
| 272 | + |
| 273 | +- **[Docker Deployment](docker.md)** - Self-hosted with Docker Compose |
| 274 | +- **[Fly.io Deployment](fly.md)** - Global edge deployment with managed infrastructure |
| 275 | +- **[Google Cloud Deployment](gcp.md)** - GCP-native integration |
| 276 | +- **[Storage Optimization](storage-optimization.md)** - Optimize storage for large deployments |
| 277 | + |
| 278 | +### Advanced Topics |
| 279 | + |
| 280 | +- **Environment Variables**: [Configuration Guide](../configuration/environment-variables.md) |
| 281 | +- **Metrics Setup**: [Metrics Configuration](../configuration/metrics.md) |
| 282 | +- **Hot Reloading**: [Dynamic Configuration](../configuration/hot-reload.md) |
| 283 | + |
| 284 | +## Support |
| 285 | + |
| 286 | +- 💬 **Community**: [GitHub Discussions](https://github.com/andrewm4894/anomstack/discussions) |
| 287 | +- 🐛 **Issues**: [GitHub Issues](https://github.com/andrewm4894/anomstack/issues) |
| 288 | +- 📚 **Documentation**: Browse the sections in the left sidebar |
| 289 | +- 🎯 **Examples**: [Metric Examples](https://github.com/andrewm4894/anomstack/tree/main/metrics/examples) |
| 290 | + |
| 291 | +Choose your deployment path and get started with reliable, open-source anomaly detection! 🎉 |
0 commit comments