feat(Production): Complete production deployment infrastructure

- Add comprehensive health check system with multiple endpoints
- Add Prometheus metrics endpoint
- Add production logging configurations (5 strategies)
- Add complete deployment documentation suite:
  * QUICKSTART.md - 30-minute deployment guide
  * DEPLOYMENT_CHECKLIST.md - Printable verification checklist
  * DEPLOYMENT_WORKFLOW.md - Complete deployment lifecycle
  * PRODUCTION_DEPLOYMENT.md - Comprehensive technical reference
  * production-logging.md - Logging configuration guide
  * ANSIBLE_DEPLOYMENT.md - Infrastructure as Code automation
  * README.md - Navigation hub
  * DEPLOYMENT_SUMMARY.md - Executive summary
- Add deployment scripts and automation
- Add DEPLOYMENT_PLAN.md - Concrete plan for immediate deployment
- Update README with production-ready features

All production infrastructure is now complete and ready for deployment.
This commit is contained in:
2025-10-25 19:18:37 +02:00
parent caa85db796
commit fc3d7e6357
83016 changed files with 378904 additions and 20919 deletions

View File

@@ -4,10 +4,10 @@ declare(strict_types=1);
namespace App\Framework\Queue\Entities;
use App\Framework\Queue\ValueObjects\WorkerId;
use App\Framework\Queue\ValueObjects\QueueName;
use App\Framework\Core\ValueObjects\Percentage;
use App\Framework\Core\ValueObjects\Byte;
use App\Framework\Core\ValueObjects\Percentage;
use App\Framework\Queue\ValueObjects\QueueName;
use App\Framework\Queue\ValueObjects\WorkerId;
/**
* Worker Entity für Distributed Job Processing
@@ -136,6 +136,7 @@ final readonly class Worker
return true;
}
}
return false;
}
@@ -144,7 +145,7 @@ final readonly class Worker
*/
public function isHealthy(): bool
{
if (!$this->isActive) {
if (! $this->isActive) {
return false;
}
@@ -204,7 +205,7 @@ final readonly class Worker
'id' => $this->id->toString(),
'hostname' => $this->hostname,
'process_id' => $this->processId,
'queues' => array_map(fn(QueueName $queue) => $queue->toString(), $this->queues),
'queues' => array_map(fn (QueueName $queue) => $queue->toString(), $this->queues),
'max_jobs' => $this->maxJobs,
'current_jobs' => $this->currentJobs,
'is_active' => $this->isActive,
@@ -216,7 +217,7 @@ final readonly class Worker
'registered_at' => $this->registeredAt->format('Y-m-d H:i:s'),
'last_heartbeat' => $this->lastHeartbeat?->format('Y-m-d H:i:s'),
'capabilities' => $this->capabilities,
'version' => $this->version
'version' => $this->version,
];
}
@@ -229,7 +230,7 @@ final readonly class Worker
'id' => $this->id->toString(),
'hostname' => $this->hostname,
'process_id' => $this->processId,
'queues' => json_encode(array_map(fn(QueueName $queue) => $queue->toString(), $this->queues)),
'queues' => json_encode(array_map(fn (QueueName $queue) => $queue->toString(), $this->queues)),
'max_jobs' => $this->maxJobs,
'current_jobs' => $this->currentJobs,
'is_active' => $this->isActive,
@@ -238,7 +239,7 @@ final readonly class Worker
'registered_at' => $this->registeredAt->format('Y-m-d H:i:s'),
'last_heartbeat' => $this->lastHeartbeat?->format('Y-m-d H:i:s'),
'capabilities' => json_encode($this->capabilities),
'version' => $this->version
'version' => $this->version,
];
}
@@ -248,13 +249,14 @@ final readonly class Worker
public static function fromArray(array $data): self
{
$queueStrings = json_decode($data['queues'], true);
$queues = array_map(function(string $queueString) {
$queues = array_map(function (string $queueString) {
// Parse queue string zurück zu QueueName
// Annahme: Format ist "type.name" oder "tenant.type.name"
$parts = explode('.', $queueString);
if (count($parts) >= 2) {
return QueueName::default(); // Vereinfacht - könnte erweitert werden
}
return QueueName::default();
}, $queueStrings);
@@ -274,4 +276,4 @@ final readonly class Worker
version: $data['version'] ?? '1.0.0'
);
}
}
}