Skip to content

Instantly share code, notes, and snippets.

@rtang03
Last active March 9, 2020 04:25
Show Gist options
  • Save rtang03/e767f45163dcecebea59e888884a824a to your computer and use it in GitHub Desktop.
Save rtang03/e767f45163dcecebea59e888884a824a to your computer and use it in GitHub Desktop.
Hyperleder Fabric v1.4.x configtx.yaml
Organizations:
- &hktfp
Name: hktfp
ID: HktfpMSP
MSPDir: /var/artifacts/crypto-config/HktfpMSP/msp
Policies:
Readers:
Type: Signature
Rule: "OR('HktfpMSP.member')"
Writers:
Type: Signature
Rule: "OR('HktfpMSP.member')"
Admins:
Type: Signature
Rule: "OR('HktfpMSP.admin')"
- &etc
Name: etc
ID: EtcMSP
MSPDir: /var/artifacts/crypto-config/EtcMSP/msp
Policies:
Readers:
Type: Signature
Rule: "OR('EtcMSP.member')"
Writers:
Type: Signature
Rule: "OR('EtcMSP.member')"
Admins:
Type: Signature
Rule: "OR('EtcMSP.admin')"
OrdererEndpoints:
- orderer0-hktfp:7050
# - orderer1-hktfp:7150
# - orderer2-hktfp:7250
# - orderer3-hktfp:7350
# - orderer4-hktfp:7450
AnchorPeers:
- Host: peer0-etradeconnect
Port: 7051
- &pbctfp
Name: pbctfp
ID: PbctfpMSP
MSPDir: /var/artifacts/crypto-config/PbctfpMSP/msp
Policies:
Readers:
Type: Signature
Rule: "OR('PbctfpMSP.member')"
Writers:
Type: Signature
Rule: "OR('PbctfpMSP.member')"
Admins:
Type: Signature
Rule: "OR('PbctfpMSP.admin')"
OrdererEndpoints:
- orderer0-hktfp:7050
# - orderer1-hktfp:7150
# - orderer2-hktfp:7250
# - orderer3-hktfp.com:7350
# - orderer4-hktfp.com:7450
AnchorPeers:
- Host: peer0-pbctfp
Port: 7251
Capabilities:
Channel: &ChannelCapabilities
V1_4_3: true
V1_3: false
V1_1: false
Orderer: &OrdererCapabilities
V1_4_2: true
V1_1: false
Application: &ApplicationCapabilities
V1_4_2: true
V1_3: false
V1_2: false
V1_1: false
################################################################################
#
# SECTION: Application
#
# This section defines the values to encode into a config transaction or
# genesis block for application related parameters
#
################################################################################
Application: &ApplicationDefaults
# Organizations is the list of orgs which are defined as participants on
# the application side of the network
Organizations:
Policies:
Readers:
Type: ImplicitMeta
Rule: "ANY Readers"
Writers:
Type: ImplicitMeta
Rule: "ANY Writers"
Admins:
Type: ImplicitMeta
Rule: "MAJORITY Admins"
Capabilities:
<<: *ApplicationCapabilities
Orderer: &OrdererDefaults
OrdererType: etcdraft
Addresses:
- orderer0-hktfp:7050
# - orderer1-hktfp:7150
# - orderer2-hktfp:7250
# - orderer3-hktfp:7350
# - orderer4-hktfp:7450
BatchTimeout: 2s
BatchSize:
MaxMessageCount: 500
AbsoluteMaxBytes: 99 MB
PreferredMaxBytes: 2 MB
MaxChannels: 10
EtcdRaft:
Consenters:
- Host: orderer0-hktfp
Port: 7050
ClientTLSCert: /var/artifacts/crypto-config/HktfpMSP/orderer0.hktfp.com/tls-msp/signcerts/cert.pem
ServerTLSCert: /var/artifacts/crypto-config/HktfpMSP/orderer0.hktfp.com/tls-msp/signcerts/cert.pem
# - Host: orderer1-hktfp
# Port: 7150
# ClientTLSCert: /var/artifacts/crypto-config/HktfpMSP/orderer1.hktfp.com/tls-msp/signcerts/cert.pem
# ServerTLSCert: /var/artifacts/crypto-config/HktfpMSP/orderer1.hktfp.com/tls-msp/signcerts/cert.pem
# - Host: orderer2-hktfp
# Port: 7250
# ClientTLSCert: /var/artifacts/crypto-config/HktfpMSP/orderer2.hktfp.com/tls-msp/signcerts/cert.pem
# ServerTLSCert: /var/artifacts/crypto-config/HktfpMSP/orderer2.hktfp.com/tls-msp/signcerts/cert.pem
# - Host: orderer3-hktfp
# Port: 7350
# ClientTLSCert: /var/artifacts/crypto-config/HktfpMSP/orderer3.hktfp.com/tls-msp/signcerts/cert.pem
# ServerTLSCert: /var/artifacts/crypto-config/HktfpMSP/orderer3.hktfp.com/tls-msp/signcerts/cert.pem
# - Host: orderer4-hktfp
# Port: 7450
# ClientTLSCert: /var/artifacts/crypto-config/HktfpMSP/orderer4.hktfp.com/tls-msp/signcerts/cert.pem
# ServerTLSCert: /var/artifacts/crypto-config/HktfpMSP/orderer4.hktfp.com/tls-msp/signcerts/cert.pem
Options:
TickInterval: 500ms
ElectionTick: 10
HeartbeatTick: 1
MaxInflightBlocks: 5
SnapshotIntervalSize: 20 MB
Organizations:
Policies:
Readers:
Type: ImplicitMeta
Rule: "ANY Readers"
Writers:
Type: ImplicitMeta
Rule: "ANY Writers"
Admins:
Type: ImplicitMeta
Rule: "MAJORITY Admins"
BlockValidation:
Type: ImplicitMeta
Rule: "ANY Writers"
Channel: &ChannelDefaults
Policies:
Readers:
Type: ImplicitMeta
Rule: "ANY Readers"
Writers:
Type: ImplicitMeta
Rule: "ANY Writers"
Admins:
Type: ImplicitMeta
Rule: "MAJORITY Admins"
Capabilities:
<<: *ChannelCapabilities
Profiles:
OrgsOrdererGenesis:
<<: *ChannelDefaults
Orderer:
<<: *OrdererDefaults
Organizations:
- *hktfp
Capabilities:
<<: *OrdererCapabilities
Consortiums:
BankingHK:
Organizations:
- *etc
- *pbctfp
# - *hsbc
OrgsChannel:
Consortium: BankingHK
<<: *ChannelDefaults
Application:
<<: *ApplicationDefaults
Organizations:
- *etc
- *pbctfp
# - *hsbc
Capabilities:
<<: *ApplicationCapabilities
#!/bin/bash
# This script uses the logspout and http stream tools to let you watch the docker containers
# in action.
#
# More information at https://github.com/gliderlabs/logspout/tree/master/httpstream
if [ -z "$1" ]; then
DOCKER_NETWORK=dev-net_openplatform
else
DOCKER_NETWORK="$1"
fi
if [ -z "$2" ]; then
PORT=8000
else
PORT="$2"
fi
echo Starting monitoring on all containers on the network ${DOCKER_NETWORK}
docker kill logspout 2> /dev/null 1>&2 || true
docker rm logspout 2> /dev/null 1>&2 || true
docker run -d --name="logspout" \
--volume=/var/run/docker.sock:/var/run/docker.sock \
--publish=127.0.0.1:${PORT}:80 \
--network ${DOCKER_NETWORK} \
gliderlabs/logspout
sleep 3
curl http://127.0.0.1:${PORT}/logs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment