setup and mock fixes
This commit is contained in:
@@ -7,13 +7,13 @@ For hybrid debugging workflows and service-specific guides, see [`docs/DEVELOPER
|
||||
|
||||
## Quick Start (automated)
|
||||
|
||||
Setup scripts validate prerequisites, start infrastructure, build solutions and Docker images, and launch the full platform.
|
||||
Setup scripts validate prerequisites, build solutions and Docker images, and launch the full platform.
|
||||
|
||||
**Windows (PowerShell 7):**
|
||||
|
||||
```powershell
|
||||
.\scripts\setup.ps1 # full setup
|
||||
.\scripts\setup.ps1 -InfraOnly # infrastructure only (PostgreSQL, Valkey, SeaweedFS, Rekor, Zot)
|
||||
.\scripts\setup.ps1 -InfraOnly # infrastructure only (PostgreSQL, Valkey, SeaweedFS, Zot; Rekor is opt-in)
|
||||
.\scripts\setup.ps1 -SkipBuild # skip .NET builds, build images and start platform
|
||||
.\scripts\setup.ps1 -SkipImages # build .NET but skip Docker images
|
||||
.\scripts\setup.ps1 -ImagesOnly # only build Docker images
|
||||
@@ -31,6 +31,36 @@ Setup scripts validate prerequisites, start infrastructure, build solutions and
|
||||
|
||||
The scripts will check for required tools (dotnet 10.x, node 20+, npm 10+, docker, git), warn about missing hosts file entries, and copy `.env` from the example if needed. See the manual steps below for details on each stage.
|
||||
|
||||
### Quick validation + demo seed (first-run path)
|
||||
|
||||
```powershell
|
||||
# 1) Bring platform up quickly (reuse existing images)
|
||||
.\scripts\setup.ps1 -SkipBuild -SkipImages
|
||||
|
||||
# 2) Validate platform health
|
||||
docker compose -f devops/compose/docker-compose.stella-ops.yml ps
|
||||
|
||||
# 3) Preview seed work
|
||||
dotnet run --project src/Cli/StellaOps.Cli/StellaOps.Cli.csproj -- `
|
||||
admin seed-demo --dry-run `
|
||||
--connection "Host=127.1.1.1;Port=5432;Database=stellaops_platform;Username=stellaops;Password=stellaops"
|
||||
|
||||
# 4) Execute demo seeding
|
||||
dotnet run --project src/Cli/StellaOps.Cli/StellaOps.Cli.csproj -- `
|
||||
admin seed-demo --confirm `
|
||||
--connection "Host=127.1.1.1;Port=5432;Database=stellaops_platform;Username=stellaops;Password=stellaops"
|
||||
```
|
||||
|
||||
### Known warnings vs blocking failures
|
||||
|
||||
| Output | Class | Meaning | Action |
|
||||
|---|---|---|---|
|
||||
| `health=starting` (RustFS) | Warning | Service still warming up | Wait and recheck `docker compose ... ps` |
|
||||
| `SM remote service probe failed (localhost:56080)` | Warning | Optional SM remote provider is unavailable | Ignore unless validating China SM remote crypto profile |
|
||||
| `stellaops-dev-rekor restarting` without `--profile sigstore` | Warning | Optional Sigstore container from prior run | Ignore for default profile or remove stale container |
|
||||
| `policy ... scheduler_exceptions_tenant_isolation already exists` | Blocking | Outdated Scheduler migration idempotency | Update code and rerun seeding |
|
||||
| `POST /api/v1/admin/seed-demo` returns 500 after patching source | Blocking | Running stale platform container image | Rebuild/restart platform image |
|
||||
|
||||
---
|
||||
|
||||
## 1. Prerequisites
|
||||
@@ -112,8 +142,8 @@ Infrastructure versions (from `docker-compose.dev.yml`):
|
||||
|---------|---------|----------|------|
|
||||
| PostgreSQL | 18.1 | `db.stella-ops.local` | 5432 |
|
||||
| Valkey | 9.0.1 | `cache.stella-ops.local` | 6379 |
|
||||
| SeaweedFS (S3) | -- | `s3.stella-ops.local` | 8080 |
|
||||
| Rekor v2 | -- | `rekor.stella-ops.local` | 3322 |
|
||||
| SeaweedFS (S3) | -- | `s3.stella-ops.local` | 8333 |
|
||||
| Rekor v2 (optional `sigstore` profile) | -- | `rekor.stella-ops.local` | 3322 |
|
||||
| Zot (OCI registry) | v2.1.3 | `registry.stella-ops.local` | 80 |
|
||||
|
||||
---
|
||||
@@ -281,7 +311,31 @@ docker compose -f devops/compose/docker-compose.stella-ops.yml ps
|
||||
|
||||
---
|
||||
|
||||
## 8. Hybrid debugging (quick reference)
|
||||
## 8. Seed demo data and verify endpoint errors
|
||||
|
||||
Use the CLI seeder for local bootstraps and demo datasets:
|
||||
|
||||
```powershell
|
||||
# dry-run
|
||||
dotnet run --project src/Cli/StellaOps.Cli/StellaOps.Cli.csproj -- `
|
||||
admin seed-demo --dry-run `
|
||||
--connection "Host=127.1.1.1;Port=5432;Database=stellaops_platform;Username=stellaops;Password=stellaops"
|
||||
|
||||
# execute
|
||||
dotnet run --project src/Cli/StellaOps.Cli/StellaOps.Cli.csproj -- `
|
||||
admin seed-demo --confirm `
|
||||
--connection "Host=127.1.1.1;Port=5432;Database=stellaops_platform;Username=stellaops;Password=stellaops"
|
||||
```
|
||||
|
||||
Seed API behavior (`POST /api/v1/admin/seed-demo`) now returns deterministic non-500 errors for expected failure modes:
|
||||
- `401/403` for auth policy failures (`platform.setup.admin`)
|
||||
- `503` when demo seeding is disabled (`STELLAOPS_ENABLE_DEMO_SEED=false`)
|
||||
- `400` for invalid module filters (for example, mixing `all` with specific modules)
|
||||
- `503` when database connection settings are missing
|
||||
|
||||
---
|
||||
|
||||
## 9. Hybrid debugging (quick reference)
|
||||
|
||||
1. Start the full platform in Docker (section 7).
|
||||
2. Stop the container for the service you want to debug:
|
||||
|
||||
Reference in New Issue
Block a user