Skip to content

Commit

Permalink
Improve health checker docs
Browse files Browse the repository at this point in the history
Add more details about health checkers, including ability
to not register Docker health checker if using
external chaincode builders.

Signed-off-by: David Enyeart <enyeart@us.ibm.com>
  • Loading branch information
denyeart authored and mastersingh24 committed Oct 10, 2021
1 parent 6897c80 commit b3cf25e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
4 changes: 3 additions & 1 deletion docs/source/cc_launcher.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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.
Expand Down
9 changes: 6 additions & 3 deletions docs/source/operations_service.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down Expand Up @@ -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``.
Expand Down
3 changes: 3 additions & 0 deletions sampleconfig/core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b3cf25e

Please sign in to comment.