# π ATLAS-GATE Complete Deployment Setup
Everything is ready for server deployment with Windsurf & Antigravity integration.
## What's Been Created
### Core Deployment Files β
```
β deploy.sh - One-command deployment script
β docker-compose.yml - Docker Compose setup
β Dockerfile - Container image
β k8s-deployment.yaml - Kubernetes manifests
```
### Integration Guides β
```
β WINDSURF_HTTP_INTEGRATION.md - Windsurf setup & configuration
β ANTIGRAVITY_HTTP_INTEGRATION.md - Antigravity setup & configuration
β DEPLOYMENT_QUICK_START.md - Fast 5-minute guide
β DEPLOYMENT_COMPLETE.md - This file
```
### Infrastructure Files β
```
β core/multi-tenant-manager.js - Tenant isolation engine
β api/http-server.js - HTTP API server
β api/client-sdk.js - JavaScript client library
β bin/ATLAS-GATE-HTTP.js - Server entrypoint
```
### Documentation β
```
β HTTP_QUICK_START.md - 5-minute quickstart
β HTTP_SERVER_SUMMARY.md - Architecture overview
β MULTI_TENANT_DEPLOYMENT.md - Complete guide
β HTTP_SERVER_INDEX.md - Documentation index
```
## π Quick Start (3 Steps)
### Step 1: Deploy to Server
```bash
# Copy to your server
scp -r ATLAS-GATE-MCP/ root@100.93.214.100:/opt/
# SSH into server
ssh root@100.93.214.100
cd /opt/ATLAS-GATE-MCP
# Make script executable
chmod +x deploy.sh
# Deploy with Docker (easiest)
./deploy.sh docker
# OR deploy with Kubernetes
./deploy.sh kubernetes --domain atlas-gate.example.com
```
**Output includes:**
- Server URL: `http://100.93.214.100:3000`
- API Key: `5f6e7d8c9b0a1f2e3d4c5b6a7f8e9d0c`
- Credentials file: `.atlas-gate-creds`
### Step 2: Connect Windsurf
**Edit:** `~/.windsurf/settings.json`
```json
{
"mcpServers": {
"atlas-gate": {
"command": "node",
"args": [
"/path/to/atlas-gate-mcp-adapter.js",
"--server-url", "http://100.93.214.100:3000",
"--api-key", "5f6e7d8c9b0a1f2e3d4c5b6a7f8e9d0c"
]
}
}
}
```
**Test:** In Windsurf, run `@atlas-gate read_file package.json`
See: [WINDSURF_HTTP_INTEGRATION.md](./WINDSURF_HTTP_INTEGRATION.md)
### Step 3: Connect Antigravity
**Set environment variables:**
```bash
export ATLAS_GATE_URL="http://100.93.214.100:3000"
export ATLAS_GATE_API_KEY="5f6e7d8c9b0a1f2e3d4c5b6a7f8e9d0c"
export ATLAS_GATE_WORKSPACE="/path/to/repo"
export ATLAS_GATE_ROLE="ANTIGRAVITY"
```
**Test:**
```bash
antigravity session create --name test
antigravity plan bootstrap --intent "Initial setup"
antigravity audit view
```
See: [ANTIGRAVITY_HTTP_INTEGRATION.md](./ANTIGRAVITY_HTTP_INTEGRATION.md)
## π Architecture
```
Your Server (100.93.214.100)
βββββββββββββββββββββββββββββββββββ
Windsurf IDE βββ HTTP API β Antigravity CLI
(port 3000)
β
βββββββββββββββββββ
β ATLAS-GATE β
β HTTP Server β
β β
β β’ Multi-tenant β
β β’ 3 replicas β
β β’ Auto-scaling β
β β’ Load balanced β
β β’ HTTPS/TLS β
βββββββββββββββββββ
β
[Audit Logs]
[Plan Registry]
[Workspace Data]
```
## π Security Features
β **API Key Authentication** - X-API-Key header, cryptographically secure
β **Multi-Tenant Isolation** - Separate data per tenant
β **HTTPS/TLS** - Automatic in Kubernetes, add Nginx for Docker
β **Rate Limiting** - Prevent abuse (100 req/min per IP)
β **Audit Trail** - Complete immutable log of all operations
β **Network Policy** - Kubernetes NetworkPolicy included
## π Scaling
### Docker (Single Server)
- Up to ~1000 concurrent sessions
- CPU: 500m, Memory: 512Mi per instance
- Scale by adding replicas manually
### Kubernetes (Enterprise)
- Auto-scales 3-10 replicas based on CPU/memory
- Horizontal Pod Autoscaler configured
- Pod Anti-Affinity spreads across nodes
- LoadBalancer for external access
## π Monitoring
### Docker Compose
```bash
docker-compose logs -f atlas-gate
docker stats
```
### Kubernetes
```bash
kubectl get pods -n atlas-gate
kubectl logs -n atlas-gate -f deployment/atlas-gate
kubectl top pods -n atlas-gate
```
### Health Check
```bash
curl http://100.93.214.100:3000/health
```
## π οΈ Common Operations
### Create a Tenant (Team)
```bash
curl -X POST http://100.93.214.100:3000/tenants/create \
-H "Content-Type: application/json" \
-d '{
"name": "backend-team",
"config": {
"maxSessions": 50,
"allowedRoles": ["WINDSURF", "ANTIGRAVITY"]
}
}'
```
### Create a Session (Workspace)
```bash
curl -X POST http://100.93.214.100:3000/sessions/create \
-H "X-API-Key: 5f6e7d8c9b0a1f2e3d4c5b6a7f8e9d0c" \
-H "Content-Type: application/json" \
-d '{
"workspaceRoot": "/path/to/repo",
"role": "WINDSURF"
}'
```
### Switch Workspace (Runtime)
```bash
curl -X PUT http://100.93.214.100:3000/sessions/session_abc123 \
-H "X-API-Key: 5f6e7d8c9b0a1f2e3d4c5b6a7f8e9d0c" \
-H "Content-Type: application/json" \
-d '{
"workspaceRoot": "/path/to/another/repo"
}'
```
### View Audit Log
```bash
curl http://100.93.214.100:3000/audit/log \
-H "X-API-Key: 5f6e7d8c9b0a1f2e3d4c5b6a7f8e9d0c" | jq .
```
## π Documentation Map
| Document | Purpose | Audience |
|----------|---------|----------|
| [DEPLOYMENT_QUICK_START.md](./DEPLOYMENT_QUICK_START.md) | Fast deployment (3 steps) | Everyone |
| [WINDSURF_HTTP_INTEGRATION.md](./WINDSURF_HTTP_INTEGRATION.md) | Windsurf setup | Windsurf users |
| [ANTIGRAVITY_HTTP_INTEGRATION.md](./ANTIGRAVITY_HTTP_INTEGRATION.md) | Antigravity setup | Antigravity users |
| [HTTP_QUICK_START.md](./HTTP_QUICK_START.md) | Server basics (5 min) | Developers |
| [MULTI_TENANT_DEPLOYMENT.md](./MULTI_TENANT_DEPLOYMENT.md) | Complete guide (80+ pages) | DevOps/Architects |
| [DEPLOYMENT_CHECKLIST_HTTP.md](./DEPLOYMENT_CHECKLIST_HTTP.md) | Production readiness | DevOps/QA |
| [HTTP_SERVER_SUMMARY.md](./HTTP_SERVER_SUMMARY.md) | Architecture & design | Architects |
| [HTTP_SERVER_INDEX.md](./HTTP_SERVER_INDEX.md) | Documentation index | Navigation |
## β
Pre-Deployment Checklist
- [ ] SSH access to server (100.93.214.100)
- [ ] Server has Docker or Kubernetes installed
- [ ] At least 2GB RAM available
- [ ] Port 3000 (or 443 for HTTPS) accessible
- [ ] Git access to fetch repository
- [ ] API keys securely stored (won't be shown again)
## π’ Deployment Steps
### Using Docker (Recommended for Quick Setup)
```bash
# 1. SSH to server
ssh root@100.93.214.100
# 2. Clone or copy repository
cd /opt
git clone https://github.com/dylanmarriner/ATLAS-GATE-MCP.git
cd ATLAS-GATE-MCP
# 3. Deploy
chmod +x deploy.sh
./deploy.sh docker
# 4. Verify
curl http://localhost:3000/health
```
### Using Kubernetes (Recommended for Production)
```bash
# 1. SSH to server with kubectl access
ssh root@100.93.214.100
# 2. Clone repository
cd /opt
git clone https://github.com/dylanmarriner/ATLAS-GATE-MCP.git
cd ATLAS-GATE-MCP
# 3. Deploy to Kubernetes
chmod +x deploy.sh
./deploy.sh kubernetes --domain atlas-gate.example.com --registry gcr.io/my-project
# 4. Verify
kubectl get pods -n atlas-gate
kubectl port-forward -n atlas-gate svc/atlas-gate-service 3000:3000
curl http://localhost:3000/health
```
## π Workflow After Deployment
1. **Antigravity Creates Plans**
- Plans define governance, execution strategy
- Example: "Implement feature X with safety guardrails"
2. **Windsurf Executes Plans**
- Uses plans created by Antigravity
- Reference plan signature in write operations
- All operations automatically audited
3. **Monitor & Verify**
- View audit log for what Windsurf did
- Verify workspace integrity
- Generate attestation bundles for compliance
4. **Iterate**
- Refine plans based on execution
- Adjust governance policies
- Scale as needed
## π Support & Troubleshooting
### Can't Connect to Server
```bash
# Check server is running
curl http://100.93.214.100:3000/health
# Check firewall
sudo ufw allow 3000
# Check Docker containers
docker ps
docker logs atlas-gate-http
```
### API Key Issues
```bash
# View key from logs
docker logs atlas-gate-http 2>&1 | grep "API Key"
# Create new tenant for new key
curl -X POST http://100.93.214.100:3000/tenants/create \
-H "Content-Type: application/json" \
-d '{"name": "new-tenant"}'
```
### Windsurf Can't Connect
- Verify server URL is correct
- Verify API key is correct
- Check firewall allows port 3000
- Try with curl first to debug
### Antigravity Can't Connect
- Set ATLAS_GATE_URL environment variable
- Set ATLAS_GATE_API_KEY environment variable
- Test with `curl http://server/health`
## π Need Help?
- **Quick questions?** β [DEPLOYMENT_QUICK_START.md](./DEPLOYMENT_QUICK_START.md)
- **Integration questions?** β [WINDSURF_HTTP_INTEGRATION.md](./WINDSURF_HTTP_INTEGRATION.md) or [ANTIGRAVITY_HTTP_INTEGRATION.md](./ANTIGRAVITY_HTTP_INTEGRATION.md)
- **Deployment issues?** β [MULTI_TENANT_DEPLOYMENT.md](./MULTI_TENANT_DEPLOYMENT.md)
- **Production readiness?** β [DEPLOYMENT_CHECKLIST_HTTP.md](./DEPLOYMENT_CHECKLIST_HTTP.md)
## π― Success Metrics
After deployment, you should see:
β Server responding to health checks
β Windsurf can call tools via HTTP API
β Antigravity can create plans
β Audit logs recording all operations
β API key working for authentication
β Multiple tenants/teams isolated
## π Final Notes
- API keys are generated at startup and shown once
- Store credentials in `.atlas-gate-creds` (git-ignored)
- For production, implement HTTPS/TLS
- Monitor audit logs regularly
- Rotate API keys quarterly
- Test disaster recovery procedures
---
**Setup Complete!** π
Your ATLAS-GATE HTTP server is ready for deployment.
**Next:** Run `./deploy.sh docker` or `./deploy.sh kubernetes` on your server.
Version: 2.0.0 (HTTP)
Created: February 14, 2024
Status: Production Ready