-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart-unified.ps1
More file actions
83 lines (68 loc) · 3.57 KB
/
start-unified.ps1
File metadata and controls
83 lines (68 loc) · 3.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# Simple Menu - Unified Monitoring Quick Start
# One command to start everything: App + Prometheus + Grafana + ELK
Write-Host "🚀 Starting Simple Menu with Unified Monitoring..." -ForegroundColor Cyan
Write-Host ""
# Check Docker
try {
docker info | Out-Null
Write-Host "✓ Docker is running" -ForegroundColor Green
} catch {
Write-Host "✗ Docker is not running. Please start Docker first." -ForegroundColor Red
exit 1
}
# Check system resources
$memory = [math]::Round((Get-WmiObject -Class Win32_ComputerSystem).TotalPhysicalMemory / 1GB, 1)
Write-Host "ℹ️ System Memory: $memory GB" -ForegroundColor Blue
if ($memory -lt 4) {
Write-Host "⚠️ Warning: Unified monitoring requires 4GB+ RAM for optimal performance" -ForegroundColor Yellow
$continue = Read-Host "Continue anyway? (y/N)"
if ($continue -ne "y" -and $continue -ne "Y") {
Write-Host "Consider using: .\start.ps1 -Mode prometheus" -ForegroundColor Yellow
exit 0
}
}
Write-Host ""
Write-Host "🔧 Starting all services..." -ForegroundColor Yellow
Write-Host " This includes:"
Write-Host " • Simple Menu Application (Frontend + Backend)"
Write-Host " • Prometheus + Grafana (Metrics and Dashboards)"
Write-Host " • ELK Stack (Logs and Search)"
Write-Host ""
# Start unified stack docker-compose -f docker\docker-compose.unified.yml up -d
if ($LASTEXITCODE -eq 0) {
Write-Host "⏳ Waiting for services to initialize (3-5 minutes)..." -ForegroundColor Yellow
# Show progress dots
for ($i = 0; $i -lt 180; $i++) {
Write-Host "." -NoNewline -ForegroundColor Gray
Start-Sleep -Seconds 1
if (($i + 1) % 60 -eq 0) { Write-Host " $([math]::Floor(($i + 1) / 60))min" -ForegroundColor Gray }
}
Write-Host ""
Write-Host ""
Write-Host "🎉 Simple Menu with Unified Monitoring is ready!" -ForegroundColor Green
Write-Host ""
Write-Host "📱 APPLICATION:" -ForegroundColor Cyan
Write-Host " • Frontend: http://localhost:4200" -ForegroundColor White
Write-Host " • Backend: http://localhost:3000" -ForegroundColor White
Write-Host ""
Write-Host "📊 METRICS & MONITORING:" -ForegroundColor Cyan
Write-Host " • Grafana: http://localhost:3001 (admin/admin123)" -ForegroundColor White
Write-Host " • Prometheus: http://localhost:9090" -ForegroundColor White
Write-Host " • cAdvisor: http://localhost:8080" -ForegroundColor White
Write-Host " • Node Export: http://localhost:9100" -ForegroundColor White
Write-Host ""
Write-Host "🔍 LOGS & SEARCH:" -ForegroundColor Cyan
Write-Host " • Kibana: http://localhost:5601" -ForegroundColor White
Write-Host " • Elasticsearch: http://localhost:9200" -ForegroundColor White
Write-Host " • Logstash: http://localhost:9600" -ForegroundColor White
Write-Host ""
Write-Host "💡 QUICK TIPS:" -ForegroundColor Yellow
Write-Host " • Check container status: docker ps" -ForegroundColor Gray
Write-Host " • View logs: docker-compose -f docker-compose.unified.yml logs -f" -ForegroundColor Gray
Write-Host " • Stop everything: docker-compose -f docker-compose.unified.yml down" -ForegroundColor Gray
Write-Host ""
Write-Host "🎯 Resource Usage: ~3GB RAM, monitoring $(docker ps --format 'table {{.Names}}' | wc -l) containers" -ForegroundColor Blue
} else {
Write-Host "❌ Failed to start services" -ForegroundColor Red
Write-Host "💡 Try: docker-compose -f docker-compose.unified.yml logs" -ForegroundColor Yellow
}