github.com/hechain20/hechain@v0.0.0-20220316014945-b544036ba106/docs/source/deploypeer/peerchecklist.md (about)

     1  #  Checklist for a production peer
     2  
     3  As you prepare to build a production peer, you need to customize the configuration by editing the [core.yaml](https://github.com/hechain20/hechain/blob/{BRANCH}/sampleconfig/core.yaml) file, which is copied into the `/config` directory when downloading the Fabric binaries, and available within the Fabric peer image at `/etc/hyperledger/fabric/core.yaml`.
     4  
     5  While in a production environment you could override the environment variables in the `core.yaml` file in your Docker container or your Kubernetes job, these instructions show how to edit `core.yaml` instead. It’s important to understand the parameters in the configuration file and their dependencies on other parameter settings in the file. Blindly overriding one setting using an environment variable could affect the functionality of another setting. Therefore, the recommendation is that before starting the peer, you make the modifications to the settings in the configuration file to become familiar with the available settings and how they work. Afterwards, you may choose to override these parameters using environment variables.
     6  
     7  This checklist covers key configuration parameters for setting up a production network. Of course, you can always refer to the core.yaml file for additional parameters or more information. It also provides guidance on which parameters should be overridden. The list of parameters that you need to understand and that are described in this topic include:
     8  
     9  - [peer.id](#peer-id)
    10  - [peer.networkId](#peer-networkid)
    11  - [peer.listenAddress](#peer-listenaddress)
    12  - [peer.chaincodeListenAddress](#peer-chaincodelistenaddress)
    13  - [peer.chaincodeAddress](#peer-chaincodeaddress)
    14  - [peer.address](#peer-address)
    15  - [peer.mspConfigPath](#peer-mspconfigpath)
    16  - [peer.localMspId](#peer-localmspid)
    17  - [peer.fileSystemPath](#peer-filesystempath)
    18  - [peer.gossip.*](#peer-gossip)
    19  - [peer.tls.*](#peer-tls)
    20  - [peer.bccsp.*](#peer-bccsp)
    21  - [chaincode.externalBuilders.*](#chaincode-externalbuilders)
    22  - [ledger.*](#ledger)
    23  - [operations.*](#operations)
    24  - [metrics.*](#metrics)
    25  
    26  ## peer.id
    27  
    28  ```
    29  # The peer id provides a name for this peer instance and is used when
    30  # naming docker resources.
    31  id: jdoe
    32  ```
    33  - **`id`**: (Default value should be overridden.) Start by giving your peer an ID (which is analogous to giving it a name). Often the name indicates the organization that the peer belongs to, for example `peer0.org1.example.com`. It is used for naming the peer's chaincode images and containers.
    34  
    35  ## peer.networkId
    36  
    37  ```
    38  # The networkId allows for logical separation of networks and is used when
    39  # naming docker resources.
    40  networkId: dev
    41  ```
    42  
    43  - **`networkId`**: (Default value should be overridden.) Specify any name that you want. One recommendation would be to differentiate the network by naming it based on its planned usage (for example, “dev”, “staging”, “test”, ”production”, etc). This value is also used to build the name of the chaincode images and containers.
    44  
    45  ## peer.listenAddress
    46  
    47  ```
    48  # The Address at local network interface this Peer will listen on.
    49  # By default, it will listen on all network interfaces
    50  listenAddress: 0.0.0.0:7051
    51  ```
    52  - **`listenAddress`**: (Default value should be overridden.) Specify the address that the peer will listen on, for example, `0.0.0.0:7051`.
    53  
    54  ## peer.chaincodeListenAddress
    55  
    56  ```
    57  # The endpoint this peer uses to listen for inbound chaincode connections.
    58  # If this is commented-out, the listen address is selected to be
    59  # the peer's address (see below) with port 7052
    60  chaincodeListenAddress: 0.0.0.0:7052
    61  ```
    62  
    63  - **`chaincodeListenAddress`**: (Default value should be overridden.) Uncomment this parameter and specify the address where this peer listens for chaincode requests. It needs to be different than the `peer.listenAddress`, for example, `0.0.0.0:7052`.
    64  
    65  ## peer.chaincodeAddress
    66  ```
    67  # The endpoint the chaincode for this peer uses to connect to the peer.
    68  # If this is not specified, the chaincodeListenAddress address is selected.
    69  # And if chaincodeListenAddress is not specified, address is selected from
    70  # peer address (see below). If specified peer address is invalid then it
    71  # will fallback to the auto detected IP (local IP) regardless of the peer
    72  # addressAutoDetect value.
    73  chaincodeAddress: 0.0.0.0:7052
    74  ```
    75  - **`chaincodeAddress`**: (Default value should be overridden.) Uncomment this parameter and specify the address that chaincode containers can use to connect to this peer, for example, `peer0.org1.example.com:7052`.
    76  
    77  ## peer.address
    78  ```
    79  # When used as peer config, this represents the endpoint to other peers
    80  # in the same organization. For peers in other organization, see
    81  # gossip.externalEndpoint for more info.
    82  # When used as CLI config, this means the peer's endpoint to interact with
    83  address: 0.0.0.0:7051
    84  ```
    85  - **`address`**: (Default value should be overridden.) Specify the address that other peers in the organization use to connect to this peer, for example, `peer0.org1.example.com:7051`.
    86  
    87  ## peer.mspConfigPath
    88  ```
    89  mspConfigPath: msp
    90  ```
    91  - **`mspConfigPath`**: (Default value should be overridden.) This is the path to the peer's local MSP, which must be created before the peer can be deployed. The path can be absolute or relative to `FABRIC_CFG_PATH` (by default, it is `/etc/hyperledger/fabric` in the peer image). Unless an absolute path is specified to a folder named something other than "msp", the peer defaults to looking for a folder called “msp” at the path (in other words, `FABRIC_CFG_PATH/msp`) and when using the peer image: `/etc/hyperledger/fabric/msp`. If you are using the recommended folder structure described in the [Registering and enrolling identities with a CA](https://hyperledger-fabric-ca.readthedocs.io/en/release-1.4/deployguide/use_CA.html) topic, it would be relative to the FABRIC_CFG_PATH as follows:
    92  `config/organizations/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp`. **The best practice is to store this data in persistent storage**. This prevents the MSP from being lost if your peer containers are destroyed for some reason.
    93  
    94  ## peer.localMspId
    95  ```
    96  # Identifier of the local MSP
    97  # ----!!!!IMPORTANT!!!-!!!IMPORTANT!!!-!!!IMPORTANT!!!!----
    98  # Deployers need to change the value of the localMspId string.
    99  # In particular, the name of the local MSP ID of a peer needs
   100  # to match the name of one of the MSPs in each of the channel
   101  # that this peer is a member of. Otherwise this peer's messages
   102  # will not be identified as valid by other nodes.
   103  localMspId: SampleOrg
   104  ```
   105  
   106  - **`localMspId`**: (Default value should be overridden.) This is the value of the MSP ID of the organization the peer belongs to. Because peers can only be joined to a channel if the organization the peer belongs to is a channel member, this MSP ID must match the name of at least one of the MSPs in each of the channels that this peer is a member of.
   107  
   108  ## peer.fileSystemPath
   109  ```
   110  # Path on the file system where peer will store data (eg ledger). This
   111  # location must be access control protected to prevent unintended
   112  # modification that might corrupt the peer operations.
   113  fileSystemPath: /var/hyperledger/production
   114  ```
   115  - **`fileSystemPath`**: (Default value should be overridden.) This is the path to the ledger and installed chaincodes on the local filesystem of the peer. It can be an absolute path or relative to `FABRIC_CFG_PATH`. It defaults to `/var/hyperledger/production`. The user running the peer needs to own and have write access to this directory. **The best practice is to store this data in persistent storage**. This prevents the ledger and any installed chaincodes from being lost if your peer containers are destroyed for some reason. Note that ledger snapshots will be written to  `ledger.snapshots.rootDir`, described in the [ledger.* section](#ledger).
   116  
   117  ## peer.gossip.*
   118  
   119  ```
   120  gossip:
   121      # Bootstrap set to initialize gossip with.
   122      # This is a list of other peers that this peer reaches out to at startup.
   123      # Important: The endpoints here have to be endpoints of peers in the same
   124      # organization, because the peer would refuse connecting to these endpoints
   125      # unless they are in the same organization as the peer.
   126      bootstrap: 127.0.0.1:7051
   127  
   128      # Overrides the endpoint that the peer publishes to peers
   129      # in its organization. For peers in foreign organizations
   130      # see 'externalEndpoint'
   131      endpoint:
   132  
   133      # This is an endpoint that is published to peers outside of the organization.
   134      # If this isn't set, the peer will not be known to other organizations.
   135      externalEndpoint:
   136  
   137      # NOTE: orgLeader and useLeaderElection parameters are mutual exclusive.
   138      # Setting both to true would result in the termination of the peer
   139      # since this is undefined state. If the peers are configured with
   140      # useLeaderElection=false, make sure there is at least 1 peer in the
   141      # organization that its orgLeader is set to true.
   142  
   143      # Defines whenever peer will initialize dynamic algorithm for
   144      # "leader" selection, where leader is the peer to establish
   145      # connection with ordering service and use delivery protocol
   146      # to pull ledger blocks from ordering service.
   147      useLeaderElection: false
   148  
   149      # Statically defines peer to be an organization "leader",
   150      # where this means that current peer will maintain connection
   151      # with ordering service and disseminate block across peers in
   152      # its own organization. Multiple peers or all peers in an organization
   153      # may be configured as org leaders, so that they all pull
   154      # blocks directly from ordering service.
   155      orgLeader: true
   156  
   157      # Gossip state transfer related configuration
   158      state:
   159          # indicates whenever state transfer is enabled or not
   160          # default value is false, i.e. state transfer is active
   161          # and takes care to sync up missing blocks allowing
   162          # lagging peer to catch up to speed with rest network
   163          enabled: false
   164  
   165      pvtData:
   166        implicitCollectionDisseminationPolicy:
   167            # requiredPeerCount defines the minimum number of eligible peers to which the peer must successfully
   168            # disseminate private data for its own implicit collection during endorsement. Default value is 0.
   169            requiredPeerCount: 0
   170  
   171            # maxPeerCount defines the maximum number of eligible peers to which the peer will attempt to
   172            # disseminate private data for its own implicit collection during endorsement. Default value is 1.
   173            maxPeerCount: 1
   174  ```
   175  
   176  Peers leverage the Gossip data dissemination protocol to broadcast ledger and channel data in a scalable fashion. Gossip messaging is continuous, and each peer on a channel is constantly receiving current and consistent ledger data from multiple peers. While there are many Gossip parameters that can be customized, there are three groups of settings you need to pay attention to at a minimum:
   177  
   178  * **Endpoints** Gossip is required for service discovery and private data dissemination. To use these features, you must configure the gossip `bootstrap`, `endpoint`, and `externalEndpoint` parameters in addition to **setting at least one anchor peer** in the peer’s channel configuration.
   179  
   180    - **`bootstrap`**: (Default value should be overridden.) Provide the list of other peer [addresses](#address) in this organization to discover.
   181  
   182    - **`endpoint`**: (Default value should be overridden.) Specify the address that other peers _in this organization_ should use to connect to this peer. For example, `peer0.org1.example.com:7051`.
   183  
   184    - **`externalEndpoint:`** (Default value should be overridden.) Specify the address that peers in _other organizations_ should use to connect to this peer, for example, `peer0.org1.example.com:7051`.
   185  
   186  * **Block dissemination** In order to reduce network traffic, it is recommended that peers get their blocks from the ordering service instead of from other peers in their organization (the default configuration starting in Fabric v2.2). The combination of the `useLeaderElection:`, `orgLeader:`, and `state.enabled` parameters in this section ensures that peers will pull blocks from the ordering service.
   187  
   188    - **`useLeaderElection:`** (Defaults to `false` as of v2.2, which is recommended so that peers get blocks from ordering service.) When `useLeaderElection` is set to false, you must configure at least one peer to be the org leader by setting `peer.gossip.orgLeader` to true. Set `useLeaderElection` to true if you prefer that peers use Gossip for block dissemination among peers in the organization.
   189  
   190    - **`orgLeader:`** (Defaults to `true` as of v2.2, which is recommended so that peers get blocks from ordering service.) Set this value to `false` if you want to use Gossip for block dissemination among peers in the organization.
   191  
   192    - **`state.enabled:`** (Defaults to `false` as of v2.2 which is recommended so that peers get blocks from ordering service.) Set this value to `true` when you want to use Gossip to sync up missing blocks, which allows a lagging peer to catch up with other peers on the network.
   193  
   194  * **Implicit data** Fabric v2.0 introduced the concept of private data implicit collections on a peer. If you’d like to utilize per-organization private data patterns, you don’t need to define any collections when deploying chaincode in Fabric v2.*. Implicit organization-specific collections can be used without any upfront definition. When you plan to take advantage of this new feature, you need to configure the values of the `pvtData.implicitCollectionDisseminationPolicy.requiredPeerCount` and `pvtData.implicitCollectionDisseminationPolicy.maxPeerCount`. For more details, review the [Private data tutorial](../private_data_tutorial.html).
   195    - **`pvtData.implicitCollectionDisseminationPolicy.requiredPeerCount`:** (Recommended that you override this value when using private data implicit collections.) **New in Fabric 2.0.** It defaults to 0, but you will need to increase it based on the number of peers belonging to your organization. The value represents the required number of peers within your own organization that the data must be disseminated to, to ensure data redundancy in case a peer goes down after it endorses a transaction.
   196  
   197    - **`pvtData.implicitCollectionDisseminationPolicy.maxPeerCount`:** (Recommended that you override this value when using private data implicit collections.) **New in Fabric 2.0.** This is an organization-specific collection setting that is used to ensure the private data is disseminated elsewhere in case this peer endorses a request and then goes down for some reason. While the `requiredPeerCount` specifies the number of peers that must get the data, the `maxPeerCount` is the number of attempted peer disseminations. The default is set to `1` but in a production environment with `n` peers in an organization, the recommended setting is `n-1`.
   198  
   199  ## peer.tls.*
   200  
   201  ```
   202  tls:
   203      # Require server-side TLS
   204      enabled:  false
   205      # Require client certificates / mutual TLS for inbound connections.
   206      # Note that clients that are not configured to use a certificate will
   207      # fail to connect to the peer.
   208      clientAuthRequired: false
   209      # X.509 certificate used for TLS server
   210      cert:
   211          file: tls/server.crt
   212      # Private key used for TLS server
   213      key:
   214          file: tls/server.key
   215      # rootcert.file represents the trusted root certificate chain used for verifying certificates
   216      # of other nodes during outbound connections.
   217      # It is not required to be set, but can be used to augment the set of TLS CA certificates
   218      # available from the MSPs of each channel’s configuration.
   219      rootcert:
   220          file: tls/ca.crt
   221      # If mutual TLS is enabled, clientRootCAs.files contains a list of additional root certificates
   222      # used for verifying certificates of client connections.
   223      # It augments the set of TLS CA certificates available from the MSPs of each channel’s configuration.
   224      # Minimally, set your organization's TLS CA root certificate so that the peer can receive join channel requests.
   225      clientRootCAs:
   226          files:
   227            - tls/ca.crt
   228  ```
   229  
   230  Configure this section to enable TLS communications for the peer. After TLS is enabled, all nodes that transact with the peer will also need to enable TLS. Review the topic on [Registering and enrolling identities with a CA](https://hyperledger-fabric-ca.readthedocs.io/en/release-1.4/deployguide/use_CA.html) for instructions on how to generate the peer TLS certificates.
   231  
   232  - **`enabled`:** (Default value should be overridden.) To ensure your production environment is secure, TLS should be enabled for all communications between nodes by setting `enabled: true` in the `tls` section of the config file. While this field is disabled by default, which may be acceptable for a test network, it should to be enabled when in production. This setting will configure **server-side TLS**, meaning that TLS will guarantee the identity of the _server_ to the client and provides a two-way encrypted channel between them.
   233  
   234  - **`cert.file`:** (Default value should be overridden.) Every peer needs to register and enroll with its TLS CA before it can transact securely with other nodes in the organization. Therefore, before you can deploy a peer, you must first register a user for the peer and enroll the peer identity with the TLS CA to generate the peer's TLS signed certificate. If you are using the recommended folder structure from the [Registering and enrolling identities with a CA](https://hyperledger-fabric-ca.readthedocs.io/en/release-1.4/deployguide/use_CA.html) topic, this file needs to be copied into `config/organizations/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls`
   235  
   236  - **`key.file`:** (Default value should be overridden.) Similar to the `cert.file`, provide the name and location of the generated TLS private key for this peer, for example, `/msp/keystore/87bf5eff47d33b13d7aee81032b0e8e1e0ffc7a6571400493a7c_sk`. If you are using the recommended folder structure from the [Registering and enrolling identities with a CA](https://hyperledger-fabric-ca.readthedocs.io/en/release-1.4/deployguide/use_CA.html) topic, this file needs to be copied into `config/organizations/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls`.  If you are using an [HSM](#bccsp) to store the private key for the peer, this field will be blank.
   237  
   238  - **`rootcert.file`:**  (Default value can be unset.) This value contains the name and location of the root certificate chain used for verifying certificates of other nodes during outbound connections. It is not required to be set, but can be used to augment the set of TLS CA certificates available from the MSPs of each channel’s configuration. If you are using the recommended folder structure from the [Registering and enrolling identities with a CA](https://hyperledger-fabric-ca.readthedocs.io/en/release-1.4/deployguide/use_CA.html) topic, this file can be copied into `config/organizations/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls`.
   239  
   240  The next two parameters only need to be provided when mutual TLS is required:
   241  
   242  - **`clientAuthRequired`:** Defaults to `false`. Set to `true` for a higher level of security by using **mutual TLS**, which can be configured as an extra verification step of the client-side TLS certificate. Where server-side TLS is considered the minimally necessary level of security, mutual TLS is an additional and optional level of security.
   243  
   244  - **`clientRootCAs.files`:** Contains a list of additional root certificates used for verifying certificates of client connections. It augments the set of TLS CA certificates available from the MSPs of each channel’s configuration. Minimally, set your organization's TLS CA root certificate so that the peer can receive join channel requests.
   245  
   246  ## peer.bccsp.*
   247  
   248  ```
   249  BCCSP:
   250          Default: SW
   251          # Settings for the SW crypto provider (i.e. when DEFAULT: SW)
   252          SW:
   253              # TODO: The default Hash and Security level needs refactoring to be
   254              # fully configurable. Changing these defaults requires coordination
   255              # SHA2 is hardcoded in several places, not only BCCSP
   256              Hash: SHA2
   257              Security: 256
   258              # Location of Key Store
   259              FileKeyStore:
   260                  # If "", defaults to 'mspConfigPath'/keystore
   261                  KeyStore:
   262          # Settings for the PKCS#11 crypto provider (i.e. when DEFAULT: PKCS11)
   263          PKCS11:
   264              # Location of the PKCS11 module library
   265              Library:
   266              # Token Label
   267              Label:
   268              # User PIN
   269              Pin:
   270              Hash:
   271              Security:
   272  ```
   273  
   274  (Optional) This section is used to configure the Blockchain crypto provider.
   275  
   276  - **`BCCSP.Default:`** If you plan to use a Hardware Security Module (HSM), then this must be set to `PKCS11`.
   277  
   278  - **`BCCSP.PKCS11.*:`** Provide this set of parameters according to your HSM configuration. Refer to this [example]((../hsm.html) of an HSM configuration for more information.
   279  
   280  ## chaincode.externalBuilders.*
   281  
   282  ```
   283  # List of directories to treat as external builders and launchers for
   284      # chaincode. The external builder detection processing will iterate over the
   285      # builders in the order specified below.
   286      externalBuilders: []
   287          # - path: /path/to/directory
   288          #   name: descriptive-builder-name
   289          #   propagateEnvironment:
   290          #      - ENVVAR_NAME_TO_PROPAGATE_FROM_PEER
   291          #      - GOPROXY
   292  ```
   293  
   294  (Optional) **New in Fabric 2.0.** This section is used to configure a set of paths where your chaincode builders reside. Each external builder definition must include a name (used for logging) and the path to parent of the `bin` directory containing the builder scripts. Also, you can optionally specify a list of environment variable names to propagate from the peer when it invokes the external builder scripts. For details see [Configuring external builders and launchers](../cc_launcher.html).
   295  
   296  - **`externalBuilders.path:`** Specify the path to the builder.
   297  - **`externalBuilders.name:`** Give this builder a name.
   298  - **`externalBuilders.propagateEnvironment:`** Specify the list of environment variables that you want to propagate to your peer.
   299  
   300  ## ledger.*
   301  
   302  ```
   303  ledger:
   304  
   305    state:
   306      # stateDatabase - options are "goleveldb", "CouchDB"
   307      # goleveldb - default state database stored in goleveldb.
   308      # CouchDB - store state database in CouchDB
   309      stateDatabase: goleveldb
   310  
   311      couchDBConfig:
   312         # It is recommended to run CouchDB on the same server as the peer, and
   313         # not map the CouchDB container port to a server port in docker-compose.
   314         # Otherwise proper security must be provided on the connection between
   315         # CouchDB client (on the peer) and server.
   316         couchDBAddress: 127.0.0.1:5984
   317  
   318         # This username must have read and write authority on CouchDB
   319         username:
   320  
   321         # The password is recommended to pass as an environment variable
   322         # during start up (eg CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD).
   323         # If it is stored here, the file must be access control protected
   324         # to prevent unintended users from discovering the password.
   325         password:
   326  ```
   327  
   328  This section is used to select your ledger database type, either `goleveldb` `CouchDB`. To avoid errors all peers should use the same database **type**.  CouchDB is an appropriate choice when JSON queries are required. While CouchDB runs in a separate operating system process, there is still a 1:1 relation between a peer node and a CouchDB instance, meaning that each peer will have a single database and that database will only be associated with that peer. Besides the additional JSON query capability of CouchDB, the choice of the database is invisible to a smart contract.
   329  
   330  - **`ledger.state.stateDatabase:`** (Override this value when you plan to use CouchDB.) Defaults to goleveldb which is appropriate when ledger states are simple key-value pairs. A LevelDB database is embedded in the peer node process.
   331  
   332  - **`ledger.state.couchDBConfig.couchDBAddress:`** (Required when using CouchDB.) Specify the address and port where CouchDB is running.
   333  
   334  - **`ledger.state.couchDBConfig.username:`** (Required when using CouchDB.) Specify the CouchDB user with read and write authority to the database.
   335  
   336  - **`ledger.state.couchDBConfig.password:`** (Required when using CouchDB.) Specify the password for the CouchDB user with read and write authority to the database.
   337  
   338  The `ledger` section also contains your default snapshot directory where snapshots are stored. For more information about snapshots, check out [Taking ledger snapshots and using them to join channels](../peer_ledger_snapshot.html).
   339  
   340  ```
   341  snapshots:
   342    # Path on the file system where peer will store ledger snapshots
   343    rootDir: /var/hyperledger/production/snapshots
   344  ```
   345  
   346  - **`ledger.snapshots.rootDir:`** (Default value should be overridden.) This is the path to where snapshots are stored on the local filesystem of the peer. It can be an absolute path or relative to `FABRIC_CFG_PATH` and defaults to `/var/hyperledger/production/snapshots`. When the snapshot is taken, it is automatically organized by the status, channel name, and block number of the snapshot. For more information, check out [Taking a snapshot](../peer_ledger_snapshot.html#taking-a-snapshot). The user running the peer needs to own and have write access to this directory.
   347  
   348  ## operations.*
   349  
   350  ```
   351  operations:
   352      # host and port for the operations server
   353      listenAddress: 127.0.0.1:9443
   354  
   355      # TLS configuration for the operations endpoint
   356      tls:
   357          # TLS enabled
   358          enabled: false
   359  
   360          # path to PEM encoded server certificate for the operations server
   361          cert:
   362              file:
   363  
   364          # path to PEM encoded server key for the operations server
   365          key:
   366              file:
   367  
   368          # most operations service endpoints require client authentication when TLS
   369          # is enabled. clientAuthRequired requires client certificate authentication
   370          # at the TLS layer to access all resources.
   371          clientAuthRequired: false
   372  
   373          # paths to PEM encoded ca certificates to trust for client authentication
   374          clientRootCAs:
   375              files: []
   376  ```
   377  
   378  The operations service is used for monitoring the health of the peer and relies on mutual TLS to secure its communication. Therefore, you need to set `operations.tls.clientAuthRequired` to `true`. When this parameter is set to `true`, clients attempting to ascertain the health of the node are required to provide a valid certificate for authentication. If the client does not provide a certificate or the service cannot verify the client’s certificate, the request is rejected. This means that the clients will need to register with the peer's TLS CA and provide their TLS signing certificate on the requests. See [The Operations Service](../operations_service.html) to learn more.
   379  
   380  If you plan to use Prometheus [metrics](#metrics) to monitor your peer, you must configure the operations service here.
   381  
   382  In the unlikely case where two peers are running on the same node, you need to modify the addresses for the second peer to use a different port. Otherwise, when you start the second peer, it will fail to start, reporting that the addresses are already in use.
   383  
   384  - **`operations.listenAddress:`** (Required when using the operations service.) Specify the address and port of the operations server.
   385  - **`operations.tls.cert.file*:`** (Required when using the operations service). Can be the same file as the `peer.tls.cert.file`.
   386  - **`operations.tls.key.file*:`** (Required when using the operations service). Can be the same file as the `peer.tls.key.file`.
   387  - **`operations.tls.clientAuthRequired*:`** (Required when using the operations service). Must be set to `true` to enable mutual TLS between the client and the server.
   388  - **`operations.tls.clientRootCAs.files*:`** (Required when using the operations service). Similar to the [peer.tls.clientRootCAs.files](#tls), it contains a list of client root CA certificates that can be used to verify client certificates. If the client enrolled with the peer organization CA, then this value is the peer organization root CA cert.
   389  
   390  ## metrics.*
   391  
   392  ```
   393  metrics:
   394      # metrics provider is one of statsd, prometheus, or disabled
   395      provider: disabled
   396      # statsd configuration
   397      statsd:
   398          # network type: tcp or udp
   399          network: udp
   400  
   401          # statsd server address
   402          address: 127.0.0.1:8125
   403  ```
   404  By default this is disabled, but if you want to monitor the metrics for the peer, you need to choose either `statsd` or `Prometheus` as your metric provider. `Statsd` uses a "push" model, pushing metrics from the peer to a `statsd` endpoint. Because of this, it does not require configuration of the operations service itself. See the list of [Available metrics for the peer](../metrics_reference.html#peer-metrics).
   405  
   406  - **`provider`:** (Required to use `statsd` or `Prometheus` metrics for the peer.) Because Prometheus utilizes a "pull" model there is not any configuration required, beyond making the operations service available. Rather, Prometheus will send requests to the operations URL to poll for available metrics.
   407  - **`address:`** (Required when using `statsd`.) When `statsd` is enabled, you will need to configure the hostname and port of the statsd server so that the peer can push metric updates.
   408  
   409  ## Next steps
   410  
   411  After deciding on your peer configuration, you are ready to deploy your peers. Follow instructions in the [Deploy the peer](./peerdeploy.html) topic for instructions on how to deploy your peer.
   412  
   413  <!--- Licensed under Creative Commons Attribution 4.0 International License
   414  https://creativecommons.org/licenses/by/4.0/ -->