From 319a7b389c896ad7b41305b2961a5358798ecd02 Mon Sep 17 00:00:00 2001 From: Eric Date: Wed, 20 Oct 2021 16:30:08 -0400 Subject: [PATCH] Update Consul ECS documentation with health sync changes This also switches the task startup image to an svg so it isn't pixelated anymore --- website/content/docs/ecs/architecture.mdx | 23 +++++++++++++++++++--- website/public/img/ecs-task-startup.png | Bin 10694 -> 0 bytes website/public/img/ecs-task-startup.svg | 4 ++++ 3 files changed, 24 insertions(+), 3 deletions(-) delete mode 100644 website/public/img/ecs-task-startup.png create mode 100644 website/public/img/ecs-task-startup.svg diff --git a/website/content/docs/ecs/architecture.mdx b/website/content/docs/ecs/architecture.mdx index e3d9dcb345..b6e262832e 100644 --- a/website/content/docs/ecs/architecture.mdx +++ b/website/content/docs/ecs/architecture.mdx @@ -31,12 +31,17 @@ at startup and sets up initial configuration for Consul and Envoy. This diagram shows the timeline of a task starting up and all its containers: -![Task Startup Timeline](/img/ecs-task-startup.png) +Task Startup Timeline - **T0:** ECS starts the task. The `consul-client` and `mesh-init` containers start: - `consul-client` uses the `retry-join` option to join the Consul cluster - - `mesh-init` registers the service for this task and its sidecar proxy into Consul. It runs `consul connect envoy -bootstrap` to generate Envoy’s bootstrap JSON file and write it to a shared volume. After registration and bootstrapping, `mesh-init` exits. -- **T1:** The `sidecar-proxy` container starts. It runs Envoy by executing `envoy -c `. + - `mesh-init` registers the service for the current task and its sidecar proxy with + Consul. It runs `consul connect envoy -bootstrap` to generate Envoy’s + bootstrap JSON file and write it to a shared volume. `mesh-init` exits after completing these operations. + +- **T1:** The following containers start: + - The `sidecar-proxy` container starts and runs Envoy by executing `envoy -c `. + - If applicable, the `health-sync` container syncs health checks from ECS to Consul (see [ECS Health Check Syncing](#ecs-health-check-syncing)). - **T2:** The `sidecar-proxy` container is marked as healthy by ECS. It uses a health check that detects if its public listener port is open. At this time, your application containers are started since all Consul machinery is ready to service requests. The only running containers are `consul-client`, `sidecar-proxy`, and your application container(s). ### Task Shutdown @@ -77,3 +82,15 @@ token does not yet exist. The ACL controller stores all ACL tokens in AWS Secrets Manager, and tasks are configured to pull these tokens from AWS Secrets Manager when they start. + +### ECS Health Check Syncing + +If the following conditions apply, ECS health checks automatically sync with Consul health checks for all application containers: + +* marked as `essential` +* have ECS `healthChecks` +* are not configured with native Consul health checks + +The `mesh-init` container creates a TTL health check for +every container that fits these criteria and the `health-sync` container ensures +that the ECS and Consul health checks remain in sync. diff --git a/website/public/img/ecs-task-startup.png b/website/public/img/ecs-task-startup.png deleted file mode 100644 index 6b9e587b2c607d313e7b4c7849e1d7f226c42f6c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10694 zcmd72c|6qJ8~;Bl5s8YrMYJ!p$(DVq6xm`-(U9!R3>iiYL$=ah$W9c>F!m9{SWEVG z7{*Y_K0{dsGnU_(`*T0;JNqmu!8Ny{?I!LUc1F3f!f?lCFkYS6juI~L`yqeL8Sv}Q<2-%{B#3f|z6k<3K;Y#} z?BVJElP^_qSrphsObk^9zLt=N;jbwz)=LH!F=`(ODpCmueWg86qR)(>EdGgv#>&qS zOj+^m>P@oue%>xoqV|yjF!3^u^RY@OhsILWSgZUDiH-LiOY&)^_Z6Bx58-2{A z&Ydm)sg0`U-uv-EK@u4U%M?Xjem+ejQc*p**6uF7_@vRLXqc6APmbkS`KF*eAvD)l zNDiFX^JKq@!pPnE4&8*|PmeR5*S|m4perp7pq?wy^J<%?ax0NAy|I=A$Hv#EUHL?$ z?96j4M#{B|z;utdd^|&>pBJO3ul%fyVutbW%}B)MLvyWY%%?gOTCpoEzVy9$PW=89 zb9^LqVO!8GADTBaC18jYz;Gc+RA3erNur8#7*CpW}dZs?yhCI(t z9usd=z-BM zhv{oa3-fSd?Jndjd$!kjd$rp3uaesTJoKdg7QQ{FVn_M69J>~Kd$Vyb9&XxSxVdK9 z8Z3Ub!9&)eZ4e&8f7VtSUgnj5Uspx8IZ35=`+nta;nNn~*om5O0kMJUm%5bICQ{9G zUBqsN%xXc`yQ`62l9j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viewer does not support full SVG 1.1
\ No newline at end of file