summaryrefslogtreecommitdiffstats
path: root/healthcheck-container/README.md
diff options
context:
space:
mode:
authorJack Lucas <jflos@sonoris.net>2021-12-07 17:13:49 -0500
committerJack Lucas <jflos@sonoris.net>2021-12-09 10:55:36 -0500
commit2afffed5e9487fab47ddcb49063dd2cb55170841 (patch)
tree612d78027831c5ad7cf291569c94c72a2037f7e8 /healthcheck-container/README.md
parentc17752a8dc6920d027108c7afa45b1d62443a8d0 (diff)
[HEALTHCHECK] Add healthcheck for dynamically-deployed microservices2.4.0
Add health checks for DCAE microservices deployed after the initial installation of dcaegen2-services. Issue-ID: DCAEGEN2-2959 Signed-off-by: Jack Lucas <jflos@sonoris.net> Change-Id: I9da0216db695f65ed520b509db183170977fce51
Diffstat (limited to 'healthcheck-container/README.md')
-rw-r--r--healthcheck-container/README.md63
1 files changed, 14 insertions, 49 deletions
diff --git a/healthcheck-container/README.md b/healthcheck-container/README.md
index 878ef42..fa08f64 100644
--- a/healthcheck-container/README.md
+++ b/healthcheck-container/README.md
@@ -2,16 +2,16 @@
The Healthcheck service provides a simple HTTP API to check the status of DCAE or DCAE MOD components running in the Kubernetes environment. When it receives any incoming HTTP request, the service makes queries to the Kubernetes API to determine the current status of the DCAE or DCAE MOD components, as seen by Kubernetes. Most components have defined a "readiness probe" (an HTTP healthcheck endpoint or a healthcheck script) that Kubernetes uses to determine readiness.
-Three instances of the Healthcheck service are deployed in ONAP: one for DCAE (dcaegen2), one for DCAE Helm-deployed microservices (dcaegen2-services), and one for DCAE MOD (dcaemod).
+Three instances of the Healthcheck service are deployed in ONAP: one for DCAE platform (dcaegen2, to be eliminated during the R10 development cycle), one for DCAE Helm-deployed microservices (dcaegen2-services), and one for DCAE MOD (dcaemod).
The Healthcheck service has two sources for identifying components that should be running:
1. A list of components that are expected to be deployed by Helm as part of the ONAP installation, specified in a JSON array stored in a file at `/opt/app/expected-components.json`.
- dcaegen2, dcaegen2-services, and dcaemod have configurable deployments. By setting flags in the `values.yaml` file or in an override file, a user can select which components are deployed. The`/opt/app/expected-components.json` file is generated at deployment time based on which components have been selected for deployment. The file is stored in a Kubernetes ConfigMap that is mounted on the healthcheck container at `/opt/app/expected-components.json`. See the Helm charts for DCAE and DCAEMOD in the OOM repository for details on how the ConfigMap is created.
+ dcaegen2, dcaegen2-services, and dcaemod have configurable deployments. By setting flags in the `values.yaml` file or in an override file, a user can select which components are deployed. The`/opt/app/expected-components.json` file is generated at deployment time based on which components have been selected for deployment. The file is stored in a Kubernetes ConfigMap that is mounted on the healthcheck container at `/opt/app/expected-components.json`. See the Helm charts for dcaegen2, dcaegen2-services, and dcaemod in the OOM repository for details on how the ConfigMap is created.
2. Components whose Kubernetes deployments have been marked with the labeled specified by the environment variable `DEPLOY_LABEL`. These are identified by a query to the Kubernetes API requesting a list of all the deployments with the label. The query is made each time an incoming HTTP request is made, so that as new deployments are created, they will be detected and included in the health check.
- For the dcaegen2 instance of the Healthcheck service, the `DEPLOY_LABEL` variable is set to `cfydeployment`. This is the label that the DCAE k8s Cloudify plugin uses to mark every deployment that it creates. The dcaegen2 Healthcheck instance therefore includes all components deployed by the DCAE k8s plugin in its health check. For the dcaemod and dcaegen2-services instances of the Healthcheck service, the `DEPLOY_LABEL` is not set, so the dcaemod and dcaegen2-services health checks do not make any checks based on a label.
+ For the dcaegen2-services instance of the Healthcheck service, the `DEPLOY_LABEL` variable is set to `dcaeMicroserviceName`. This is the label that the dcaegen2-services-common deployment template inserts into every deployment that uses the template. The dcaegen2-services Healthcheck instance therefore includes in its healthcheck all components deployed using the dcaegen2-services-common deployment template. For the dcaemod and dcaegen2 instances of the Healthcheck service, the `DEPLOY_LABEL` is not set, so the dcaemod and dcaegen2-services health checks do not make any checks based on a label.
The Healthcheck service returns an HTTP status code of 200 if Kubernetes reports that all of the components that should be running are in a ready state. It returns a status code of 500 if some of the components are not ready. It returns a status code of 503 if some kind of error prevented it from completing a query.
@@ -22,83 +22,48 @@ For the 200 and 500 status codes, the Healthcheck service returns a body consist
- `items`: a JSON list(array) of objects, one for each deployment. Each object has the form:
`{"name": "k8s_deployment_name", "ready": number_of_ready_instances, "unavailable": number_number_of_unavailable_instances}`
-Here's an example of the body, with one component in an unavailable state:
+Here's an example of the body. It's showing the four components that are deployed automatically by default when dcaegen2-services is installed (dev-dcae-hv-ves-collector, dev-dcae-prh, dev-dcae-tcagen2, and dev-dcae-ves-collector) along with three components that were deployed (in separate Helm releases) after dcaegen2-services was installed (nginx-dcae-nginx, nginxinst2-dcae-nginx, and nginxinst3-dcae-nginx). Note that nginx-dcae-nginx is not ready.
```
{
"type": "summary",
- "count": 14,
- "ready": 13,
+ "count": 7,
+ "ready": 6,
"items": [
{
- "name": "dev-dcaegen2-dcae-cloudify-manager",
+ "name": "dev-dcae-hv-ves-collector",
"ready": 1,
"unavailable": 0
},
{
- "name": "dep-config-binding-service",
+ "name": "dev-dcae-prh",
"ready": 1,
"unavailable": 0
},
{
- "name": "dep-deployment-handler",
+ "name": "dev-dcae-tcagen2",
"ready": 1,
"unavailable": 0
},
{
- "name": "dep-inventory",
+ "name": "dev-dcae-ves-collector",
"ready": 1,
"unavailable": 0
},
{
- "name": "dep-service-change-handler",
+ "name": "nginx-dcae-nginx",
"ready": 0,
"unavailable": 1
},
{
- "name": "dep-policy-handler",
+ "name": "nginxinst2-dcae-nginx",
"ready": 1,
"unavailable": 0
},
{
- "name": "dep-dcae-ves-collector",
- "ready": 1,
- "unavailable": 0
- },
- {
- "name": "dep-dcae-tca-analytics",
- "ready": 1,
- "unavailable": 0
- },
- {
- "name": "dep-dcae-prh",
- "ready": 1,
- "unavailable": 0
- },
- {
- "name": "dep-dcae-hv-ves-collector",
- "ready": 1,
- "unavailable": 0
- },
- {
- "name": "dep-dcae-datafile-collector",
- "ready": 1,
- "unavailable": 0
- },
- {
- "name": "dep-dcae-snmptrap-collector",
- "ready": 1,
- "unavailable": 0
- },
- {
- "name": "dep-holmes-engine-mgmt",
- "ready": 1,
- "unavailable": 0
- },
- {
- "name": "dep-holmes-rule-mgmt",
+ "name": "nginxinst3-dcae-nginx",
"ready": 1,
"unavailable": 0
}
]
}
-``` \ No newline at end of file
+```