docs: add health probe checks to runbook

This commit is contained in:
lingniu
2026-07-01 12:11:14 +08:00
parent 59edc7a8d4
commit 5ff7cfb9bb
2 changed files with 23 additions and 1 deletions

View File

@@ -167,13 +167,23 @@ java --sun-misc-unsafe-memory-access=allow \
```bash ```bash
curl -sS http://127.0.0.1:20100/actuator/health curl -sS http://127.0.0.1:20100/actuator/health
curl -sS http://127.0.0.1:20100/actuator/health/liveness
curl -sS http://127.0.0.1:20100/actuator/health/readiness
curl -sS http://127.0.0.1:20400/actuator/health curl -sS http://127.0.0.1:20400/actuator/health
curl -sS http://127.0.0.1:20400/actuator/health/liveness
curl -sS http://127.0.0.1:20400/actuator/health/readiness
curl -sS http://127.0.0.1:20500/actuator/health curl -sS http://127.0.0.1:20500/actuator/health
curl -sS http://127.0.0.1:20500/actuator/health/liveness
curl -sS http://127.0.0.1:20500/actuator/health/readiness
curl -sS http://127.0.0.1:20200/actuator/health curl -sS http://127.0.0.1:20200/actuator/health
curl -sS http://127.0.0.1:20200/actuator/health/liveness
curl -sS http://127.0.0.1:20200/actuator/health/readiness
curl -sS http://127.0.0.1:20300/actuator/health curl -sS http://127.0.0.1:20300/actuator/health
curl -sS http://127.0.0.1:20300/actuator/health/liveness
curl -sS http://127.0.0.1:20300/actuator/health/readiness
``` ```
Expected: each endpoint returns `{"status":"UP"}` or an equivalent Spring Boot health JSON with top-level status `UP`. Expected: each aggregate, liveness, and readiness endpoint returns `{"status":"UP"}` or an equivalent Spring Boot health JSON with top-level status `UP`.
## End-to-End Verification ## End-to-End Verification

View File

@@ -68,6 +68,18 @@ class PortainerComposeResourceLimitsTest {
} }
} }
@Test
void productionRunbookChecksLivenessAndReadinessForActiveApps() throws IOException {
String runbook = Files.readString(repositoryRoot()
.resolve("docs/operations/gb32960-service-split-runbook.md"));
for (String httpPort : List.of("20100", "20400", "20500", "20200", "20300")) {
assertThat(runbook)
.contains("curl -sS http://127.0.0.1:" + httpPort + "/actuator/health/liveness")
.contains("curl -sS http://127.0.0.1:" + httpPort + "/actuator/health/readiness");
}
}
@Test @Test
void dockerEntrypointExecsJavaForSignalHandling() throws IOException { void dockerEntrypointExecsJavaForSignalHandling() throws IOException {
String dockerfile = Files.readString(repositoryRoot().resolve("Dockerfile")); String dockerfile = Files.readString(repositoryRoot().resolve("Dockerfile"));