Skip to content

Commit dff87f9

Browse files
committed
[FAB-4933] Add proper warnings on sample config
This CR update the comment text of the sample config core.yaml to include proper warnings, clarify verbiage, and general format of the comment text. It also removes deploytimeout, which is no longer used. Change-Id: I896424e7aa3b6722b094a9779b0cb7765fa926a0 Signed-off-by: Binh Q. Nguyen <[email protected]>
1 parent 279fe26 commit dff87f9

File tree

1 file changed

+59
-38
lines changed

1 file changed

+59
-38
lines changed

sampleconfig/core.yaml

+59-38
Original file line numberDiff line numberDiff line change
@@ -71,33 +71,40 @@ peer:
7171
#
7272
# chaincodeListenAddress: 127.0.0.1:7052
7373

74-
# When used as peer config, represents the endpoint to other peers in the same organization
75-
# for peers in other organization, see gossip.externalEndpoint
76-
# When used as cli config, will mean the peer node's endpoint to interact with
74+
# When used as peer config, this represents the endpoint to other peers
75+
# in the same organization for peers in other organization, see
76+
# gossip.externalEndpoint for more info.
77+
# When used as CLI config, this means the peer's endpoint to interact with
7778
address: 0.0.0.0:7051
79+
7880
# Whether the Peer should programmatically determine its address
7981
# This case is useful for docker containers.
8082
addressAutoDetect: false
81-
# Setting for runtime.GOMAXPROCS(n). If n < 1, it does not change the current setting
83+
84+
# Setting for runtime.GOMAXPROCS(n). If n < 1, it does not change the
85+
# current setting
8286
gomaxprocs: -1
8387

8488
# Gossip related configuration
8589
gossip:
8690
# Bootstrap set to initialize gossip with.
87-
# This is a list of peers that the peer reaches out to at startup.
91+
# This is a list of other peers that this peer reaches out to at startup.
8892
# Important: The endpoints here have to be endpoints of peers in the same
8993
# organization, because the peer would refuse connecting to these endpoints
9094
# unless they are in the same organization as the peer.
9195
bootstrap: 127.0.0.1:7051
9296

93-
# NOTE: orgLeader and useLeaderElection parameters are mutual exclusive
94-
# setting both to true would result in the termination of the peer, since this is undefined
95-
# state.
97+
# NOTE: orgLeader and useLeaderElection parameters are mutual exclusive.
98+
# Setting both to true would result in the termination of the peer
99+
# since this is undefined state. If the peers are configured with
100+
# useLeaderElection=false, make sure there is at least 1 peer in the
101+
# organization that its orgLeader is set to true.
96102

97103
# Defines whenever peer will initialize dynamic algorithm for
98104
# "leader" selection, where leader is the peer to establish
99105
# connection with ordering service and use delivery protocol
100-
# to pull ledger blocks from ordering service
106+
# to pull ledger blocks from ordering service. It is recommended to
107+
# use leader election for large networks of peers.
101108
useLeaderElection: false
102109
# Statically defines peer to be an organization "leader",
103110
# where this means that current peer will maintain connection
@@ -196,7 +203,9 @@ peer:
196203
# The server name use to verify the hostname returned by TLS handshake
197204
serverhostoverride:
198205

199-
# Path on the file system where peer will store data (eg ledger)
206+
# Path on the file system where peer will store data (eg ledger). This
207+
# location must be access control protected to prevent unintended
208+
# modification that might corrupt the peer operations.
200209
fileSystemPath: /var/hyperledger/production
201210

202211
# BCCSP (Blockchain crypto provider): Select which crypto implementation or
@@ -257,17 +266,21 @@ vm:
257266
key:
258267
file: docker/tls.key
259268

260-
# Enables/disables the standard out/err from chaincode containers for debugging purposes
269+
# Enables/disables the standard out/err from chaincode containers for
270+
# debugging purposes
261271
attachStdout: false
262272

263-
# Parameters of docker container creating. For docker can created by custom parameters
264-
# If you have your own ipam & dns-server for cluster you can use them to create container efficient.
265-
# NetworkMode Sets the networking mode for the container. Supported standard values are: `host`(default),`bridge`,`ipvlan`,`none`
266-
# dns A list of DNS servers for the container to use.
267-
# note: not support customize for `Privileged` `Binds` `Links` `PortBindings`
268-
# not support set LogConfig using Environment Variables
269-
# LogConfig sets the logging driver (Type) and related options (Config) for Docker
270-
# you can refer https://docs.docker.com/engine/admin/logging/overview/ for more detail configruation.
273+
# Parameters on creating docker container.
274+
# Container may be efficiently created using ipam & dns-server for cluster
275+
# NetworkMode - sets the networking mode for the container. Supported
276+
# standard values are: `host`(default),`bridge`,`ipvlan`,`none`.
277+
# Dns - a list of DNS servers for the container to use.
278+
# Note: `Privileged` `Binds` `Links` and `PortBindings` properties of
279+
# Docker Host Config are not supported and will not be used if set.
280+
# LogConfig - sets the logging driver (Type) and related options
281+
# (Config) for Docker. For more info,
282+
# https://docs.docker.com/engine/admin/logging/overview/
283+
# Note: Set LogConfig using Environment Variables is not supported.
271284
hostConfig:
272285
NetworkMode: host
273286
Dns:
@@ -285,16 +298,14 @@ vm:
285298
#
286299
###############################################################################
287300
chaincode:
288-
# This is used if chaincode endpoint resolution fails with the chaincodeListenAddress
289-
# property
301+
# This is used if chaincode endpoint resolution fails with the
302+
# chaincodeListenAddress property
290303
peerAddress:
291304

292305
# The id is used by the Chaincode stub to register the executing Chaincode
293-
# ID with the Peerand is generally supplied through ENV variables
294-
# the Path form of ID is provided when deploying the chaincode. The name is
295-
# used for all other requests. The name is really a hashcode
296-
# returned by the system in response to the deploy transaction. In
297-
# development mode where user runs the chaincode, the name can be any string
306+
# ID with the Peer and is generally supplied through ENV variables
307+
# the `path` form of ID is provided when installing the chaincode.
308+
# The `name` is used for all other requests and can be any string.
298309
id:
299310
path:
300311
name:
@@ -319,23 +330,24 @@ chaincode:
319330
Dockerfile: |
320331
from $(DOCKER_NS)/fabric-javaenv:$(ARCH)-$(PROJECT_VERSION)
321332
322-
# timeout duration for starting up a container and waiting for Register
333+
# Timeout duration for starting up a container and waiting for Register
323334
# to come through. 1sec should be plenty for chaincode unit tests
324335
startuptimeout: 300s
325336

326-
# timeout duration for invokes and initialize commands
327-
# this timeout is used by all chaincodes in all the channels including
328-
# system chaincodes. Default is 30 seconds
337+
# Timeout duration for Invoke and Init calls to prevent runaway.
338+
# This timeout is used by all chaincodes in all the channels, including
339+
# system chaincodes.
340+
# Note that during Invoke, if the image is not available (e.g. being
341+
# cleaned up when in development environment), the peer will automatically
342+
# build the image, which might take more time. In production environment,
343+
# the chaincode image is unlikely to be deleted, so the timeout could be
344+
# reduced accordingly.
329345
executetimeout: 30s
330346

331-
#timeout duration for deploying chaincode from a remote repository.
332-
deploytimeout: 30s
333-
334-
#mode - options are "dev", "net"
335-
#dev - in dev mode, user runs the chaincode after starting validator from
336-
# command line on local machine
337-
#net - in net mode validator will run chaincode in a docker container
338-
347+
# There are 2 modes: "dev" and "net".
348+
# In dev mode, user runs the chaincode after starting peer from
349+
# command line on local machine.
350+
# In net mode, peer will run chaincode in a docker container.
339351
mode: net
340352

341353
# keepalive in seconds. In situations where the communiction goes through a
@@ -379,8 +391,17 @@ ledger:
379391
# CouchDB - store state database in CouchDB
380392
stateDatabase: goleveldb
381393
couchDBConfig:
394+
# It is recommended to run CouchDB on the same server as the peer, and
395+
# not map the CouchDB container port to a server port in docker-compose.
396+
# Otherwise proper security must be provided on the connection between
397+
# CouchDB client (on the peer) and server.
382398
couchDBAddress: 127.0.0.1:5984
399+
# This username must have read and write authority on CouchDB
383400
username:
401+
# The password is recommended to pass as an environment variable
402+
# during start up (eg LEDGER_COUCHDBCONFIG_PASSWORD).
403+
# If it is stored here, the file must be access control protected
404+
# to prevent unintended users from discovering the password.
384405
password:
385406
# Number of retries for CouchDB errors
386407
maxRetries: 3

0 commit comments

Comments
 (0)