180 lines
5.2 KiB
YAML
180 lines
5.2 KiB
YAML
---
|
|
################################################################################
|
|
#
|
|
# Bagian: Organisasi
|
|
#
|
|
# - Bagian ini berisi mengenai pendefinisian organisasi yang akan digunakan
|
|
# dalam konfigurasi jaringan kemudian
|
|
#
|
|
################################################################################
|
|
Organizations:
|
|
# !PENTING! pastikan terdapat minimal 2 organisasi, orderer dan peer.
|
|
- &OrdererOrg
|
|
Name: OrdererOrg
|
|
ID: OrdererMSP
|
|
MSPDir: ../organizations/ordererOrganizations/hospital.com/msp
|
|
Policies:
|
|
Readers:
|
|
Type: Signature
|
|
Rule: "OR('OrdererMSP.member')"
|
|
Writers:
|
|
Type: Signature
|
|
Rule: "OR('OrdererMSP.member')"
|
|
Admins:
|
|
Type: Signature
|
|
Rule: "OR('OrdererMSP.admin')"
|
|
OrdererEndpoints:
|
|
# OrdererEndpoints berisi IP atau domain beserta port yang digunakan
|
|
# Jika menjalankan dalam environment lokal seperti WSL, dapat menggunakan
|
|
# orderer.example.com:7050 sebagai domain endpoints sesuai dengan dokumentasi
|
|
- "orderer.hospital.com:7050"
|
|
|
|
- &Hospital
|
|
Name: HospitalMSP
|
|
ID: HospitalMSP
|
|
MSPDir: ../organizations/peerOrganizations/hospital.com/msp
|
|
Policies:
|
|
Readers:
|
|
Type: Signature
|
|
Rule: "OR('HospitalMSP.admin', 'HospitalMSP.peer', 'HospitalMSP.client')"
|
|
Writers:
|
|
Type: Signature
|
|
Rule: "OR('HospitalMSP.admin', 'HospitalMSP.client')"
|
|
Admins:
|
|
Type: Signature
|
|
Rule: "OR('HospitalMSP.admin')"
|
|
Endorsement:
|
|
Type: Signature
|
|
Rule: "OR('HospitalMSP.peer')"
|
|
AnchorPeers:
|
|
- Host: peer0.hospital.com
|
|
Port: 7051
|
|
|
|
# Default
|
|
Capabilities:
|
|
Channel: &ChannelCapabilities
|
|
V2_0: true
|
|
Orderer: &OrdererCapabilities
|
|
V2_0: true
|
|
Application: &ApplicationCapabilities
|
|
V2_5: true
|
|
|
|
# Default
|
|
Application: &ApplicationDefaults
|
|
Organizations:
|
|
Policies:
|
|
Readers:
|
|
Type: ImplicitMeta
|
|
Rule: "ANY Readers"
|
|
Writers:
|
|
Type: ImplicitMeta
|
|
Rule: "ANY Writers"
|
|
Admins:
|
|
Type: ImplicitMeta
|
|
Rule: "MAJORITY Admins"
|
|
LifecycleEndorsement:
|
|
Type: ImplicitMeta
|
|
Rule: "MAJORITY Endorsement"
|
|
Endorsement:
|
|
Type: ImplicitMeta
|
|
Rule: "MAJORITY Endorsement"
|
|
Capabilities:
|
|
<<: *ApplicationCapabilities
|
|
|
|
################################################################################
|
|
#
|
|
# Bagian: Orderer
|
|
#
|
|
# - Bagian ini berisi mengenai konfigurasi orderer yang akan digunakan
|
|
# dalam konfigurasi transaksi jaringan atau genesis block terkait parameter
|
|
# orderer yang digunakan.
|
|
#
|
|
################################################################################
|
|
Orderer:
|
|
&OrdererDefaults # Berisi konfigurasi untuk konsensus Raft, sesuaikan dengan orderer yang digunakan
|
|
OrdererType: etcdraft
|
|
Addresses:
|
|
# Daftar alamat orderer yang digunakan dalam jaringan, dapat menggunakan
|
|
# IP atau domain sama seperti yang digunakan pada bagian OrdererEndpoints.
|
|
- "orderer.hospital.com:7050"
|
|
BatchTimeout: 2s
|
|
BatchSize:
|
|
MaxMessageCount: 10
|
|
AbsoluteMaxBytes: 99 MB
|
|
PreferredMaxBytes: 512 KB
|
|
EtcdRaft:
|
|
Consenters:
|
|
- Host: orderer.hospital.com
|
|
Port: 7050
|
|
ClientTLSCert: ../organizations/ordererOrganizations/hospital.com/orderers/orderer.hospital.com/tls/server.crt
|
|
ServerTLSCert: ../organizations/ordererOrganizations/hospital.com/orderers/orderer.hospital.com/tls/server.crt
|
|
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"
|
|
|
|
# Default
|
|
Channel: &ChannelDefaults
|
|
Policies:
|
|
Readers:
|
|
Type: ImplicitMeta
|
|
Rule: "ANY Readers"
|
|
Writers:
|
|
Type: ImplicitMeta
|
|
Rule: "ANY Writers"
|
|
Admins:
|
|
Type: ImplicitMeta
|
|
Rule: "MAJORITY Admins"
|
|
Capabilities:
|
|
- *ChannelCapabilities
|
|
|
|
################################################################################
|
|
#
|
|
# Profile
|
|
#
|
|
# - Bagian ini berisi mengenai konfigurasi profil yang akan digunakan sebagai
|
|
# parameter pada configtxgen tool untuk menghasilkan genesis block dan channel.
|
|
#
|
|
################################################################################
|
|
Profiles:
|
|
HospitalGenesis:
|
|
<<: *ChannelDefaults
|
|
Orderer:
|
|
# Menggunakan konfigurasi yang telah didefinisikan sebelumnya
|
|
<<: *OrdererDefaults
|
|
Organizations:
|
|
# Menggunakan organisasi orderer yang telah didefinisikan sebelumnya
|
|
- *OrdererOrg
|
|
Capabilities: *OrdererCapabilities
|
|
Consortiums:
|
|
SampleConsortium:
|
|
Organizations:
|
|
# Sesuaikan jumlah organisasi yang digunakan dalam konsorsium
|
|
- *Hospital
|
|
Application:
|
|
<<: *ApplicationDefaults
|
|
Organizations:
|
|
# Sesuaikan organisasi yang digunakan dalam aplikasi
|
|
- *Hospital
|
|
Capabilities: *ApplicationCapabilities
|
|
|
|
HospitalChannel:
|
|
Consortium: SampleConsortium
|
|
<<: *ChannelDefaults
|
|
Application:
|
|
<<: *ApplicationDefaults
|
|
Organizations:
|
|
- *Hospital
|
|
Capabilities:
|
|
- *ApplicationCapabilities
|