From b3cf25e84ec731cf955ca1f7dd4218213f61807c Mon Sep 17 00:00:00 2001 From: David Enyeart Date: Fri, 8 Oct 2021 10:32:55 -0400 Subject: [PATCH] Improve health checker docs Add more details about health checkers, including ability to not register Docker health checker if using external chaincode builders. Signed-off-by: David Enyeart --- docs/source/cc_launcher.md | 4 +++- docs/source/operations_service.rst | 9 ++++++--- sampleconfig/core.yaml | 3 +++ 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/docs/source/cc_launcher.md b/docs/source/cc_launcher.md index 5a30a59d346..4922e7fa8df 100644 --- a/docs/source/cc_launcher.md +++ b/docs/source/cc_launcher.md @@ -8,7 +8,7 @@ Starting with Fabric 2.0, External Builders and Launchers address these limitati Note that if no configured external builder claims a chaincode package, the peer will attempt to process the package as if it were created with the standard Fabric packaging tools such as the peer CLI or node SDK. -**Note:** This is an advanced feature which unless your builders and launchers are simple enough, such as those used in the [basic asset transfer external chaincode Fabric sample](https://github.com/hyperledger/fabric-samples/blob/{BRANCH}/asset-transfer-basic/chaincode-external), will likely require custom packaging of the peer image with everything your builders and launchers depend on. For example, the following samples use `go` and `bash`, which are not included in the current official `fabric-peer` image. +**Note:** This is an advanced feature which will likely require custom packaging of the peer image with everything your builders and launchers depend on unless your builders and launchers are simple enough, such as those used in the [basic asset transfer external chaincode Fabric sample](https://github.com/hyperledger/fabric-samples/blob/{BRANCH}/asset-transfer-basic/chaincode-external). For example, the following samples use `go` and `bash`, which are not included in the current official `fabric-peer` image. ## External builder model @@ -198,6 +198,8 @@ When an `externalBuilder` configuration is present, the peer will iterate over t In the example above, the peer will attempt to use "my-golang-builder", followed by "noop-builder", and finally the peer internal build process. +If you do not need to fallback to the legacy Docker build process for your chaincodes, you can remove the Docker endpoint from the peer `core.yaml` `vm.endpoint` configuration. This will also remove the Docker daemon health check. + ## Chaincode packages As part of the new lifecycle introduced with Fabric 2.0, the chaincode package format changed from serialized protocol buffer messages to a gzip compressed POSIX tape archive. Chaincode packages created with `peer lifecycle chaincode package` use this new format. diff --git a/docs/source/operations_service.rst b/docs/source/operations_service.rst index e31279293f5..9279bd04df4 100644 --- a/docs/source/operations_service.rst +++ b/docs/source/operations_service.rst @@ -279,7 +279,8 @@ intended to be compatible with the liveness probe model used by Kubernetes but can be used in other contexts. When a ``GET /healthz`` request is received, the operations service will call all -registered health checkers for the process. When all of the health checkers +registered health checkers for the process to ensure all registered services and +dependencies are available. When all of the health checkers return successfully, the operations service will respond with a ``200 "OK"`` and a JSON body: @@ -307,8 +308,10 @@ information about which health checker failed: ] } -In the current version, the only health check that is registered is for Docker. -Future versions will be enhanced to add additional health checks. +The peer has the following health checks available: + +- Docker daemon health check (if a Docker endpoint is configured for chaincodes) +- CouchDB health check (if CouchDB is configured as the state database) When TLS is enabled, a valid client certificate is not required to use this service unless ``clientAuthRequired`` is set to ``true``. diff --git a/sampleconfig/core.yaml b/sampleconfig/core.yaml index e81994587a4..a2c5b47900c 100644 --- a/sampleconfig/core.yaml +++ b/sampleconfig/core.yaml @@ -498,6 +498,8 @@ vm: # unix:///var/run/docker.sock # http://localhost:2375 # https://localhost:2376 + # If you utilize external chaincode builders and don't need the default Docker chaincode builder, + # the endpoint should be unconfigured so that the peer's Docker health checker doesn't get registered. endpoint: unix:///var/run/docker.sock # settings for docker vms @@ -581,6 +583,7 @@ chaincode: # List of directories to treat as external builders and launchers for # chaincode. The external builder detection processing will iterate over the # builders in the order specified below. + # If you don't need to fallback to the default Docker builder, also unconfigure vm.endpoint above. # To override this property via env variable use CORE_CHAINCODE_EXTERNALBUILDERS: [{name: x, path: dir1}, {name: y, path: dir2}] externalBuilders: [] # - path: /path/to/directory