• 1) Modify the world state database configuration
    • 기본적으로 'stateDatabase' 섹션의 'core.yaml' 에서 설정할수있는것 같다.
    • 예) state:
      • stateDatabase: goleveldb
      • totalQueryLimit: 10000
      • couchDBConfig:
        • couchDBAddress: couchdb:5984
        • username:
        • password:
        • maxRetries: 3
        • maxRetriesOnStartup: 10
        • requestTimeout: 35s
        • internalQueryLimit: 1000
        • maxBatchUpdateSize: 1000
        • warmIndexesAfterNBlocks: 1
    • 또한, CORE_LEDGER_STATE_STATEDATABASE 식으로~ 'docker 환경변수'를 통해 설정할수도있다.
    • ...
  • 2) Define initial multi-org configuration policy
    • 단순하게 "여러게의 초기 organization"으로 blockchain-network를 구성하는 영역인것 같다.
    • 우선 configtx.yaml 에 organization의 ID 및 MSP 등을 정의합니다.
    • 예) Organizations:
      • - &OrdererOrg
        • Name:
        • ID:
        • MSPDir:
      • - &PeerOrg1
        • Name:
        • ID:
        • MSPDir:
        • AnchorPeers:
          • Host:
          • Port:
    • Profiles: 에 XGenesis: 로 Orderer: 및 Consortiums: 을 정의하고, configtxgen 으로 genesis.block 을 생성할수있다.
    • Profiles: 에 XChannel: 로 Consortium: 및 ApplicationOrganizations: 을 정의하고, configtxgen 으로 channel.tx 을 생성할수있다.
    • 이후, order-node를 genesis.block 물고 띄운다음 -> 각 peer-node에서 peer channel create & join & update 하여 구성 할수있다.
  • 3) Configure Ordering service (Kafka)
    • ordering-service 설정은... 음... 일단 환경변수 'FABRIC_CFG_PATH' 의 'configtx.yaml', 'core.yaml', 'orderer.yaml' 에서 여러가지를 설정하면 된다.
    • 음... OrdererType: kafka 으로 하면되고... 음... 
    • 'orderer 이미지', 'MSP 생성', '.yaml 설정', 'genesis.block 생성' 을 다한뒤,
    • docker-compose -f docker.yaml up -d --no-deps orderer.example.com 식으로 부트스트랩 하면 된다.
    • ...
  • 4) Configure Hyperledger Fabric containers
    • 도커 컨테이너? 를 말하는것 인가?
    • orderer : ...
    • peer : ...
    • ca : ...
    • tools(cli) : ...
    • 간단히 docker.yaml에서 각각의 이미지를 환경변수로 설정하는 방법 정도로 했으면 한다...
  • 5) Define network config options (block creation options, etc)
    • 네트워크 설정? channel config-block 쪽을 말하는것 인가?
    • configtxlator 으로 channel config-block 를 다룰 수 있다.
    • ...
  • 6) Enable TLS for communication
    • peer-node의 "TLS server 모드". ('타peer-node','application','CLI') -> ('peer-node')
    • 예) peer 속성
      • peer.tls.enabled = true
      • peer.tls.cert.file = TLS server 인증서
      • peer.tls.key.file = TLS server 개인키
      • peer.tls.rootcert.file = root CA 인증서체인
    • 예) 환경변수
      • CORE_PEER_TLS_ENABLED
      • CORE_PEER_TLS_CERT_FILE
      • CORE_PEER_TLS_KEY_FILE
      • CORE_PEER_TLS_ROOTCERT_FILE
    • orderer-node의 "TLS server 모드".
    • 예) orderer 속성
      • General.TLS.Enabled
      • General.TLS.PrivateKey
      • General.TLS.Certificate
      • General.TLS.RootCAs
    • 예) 환경변수
      • ORDERER_GENERAL_TLS_ENABLED 
      • ORDERER_GENERAL_TLS_PRIVATEKEY 
      • ORDERER_GENERAL_TLS_CERTIFICATE 
      • ORDERER_GENERAL_TLS_ROOTCAS 
    • 커맨드에서는,
      • peer channel fetch 0 config.block ... --tls --cafile {orderer인증서 경로}
    • 이런식으로~ 사용을 한다.
  • 7) Generate genesis block
    • 앞서 이야기 한것 처럼, configtx.yaml 와 configtxgen 기반으로 genesis.block을 생성하면 된다.
  • 8) Configure service discovery node (e.g. peer and orderer addresses)
    • client에서는 SDK를 기반으로 blockchain-network node와 연결을 하는데...
    • 동적으로 변화하는 환경에 잘 대응을 하기위해, 필요한 정보를 discovery-service가 잘 제공해야한다.
    • (예: ledger 동기화도 안된 peer에게 proposal이 제출되면, 시스템적으로 낭비적!)
    • 즉, peer에서 discovery-service를 동작시키는 설정 입니다.
    • peer에 EXTERNAL_ENDPOINT 가 설정되어 있어야지, 공개될수있습니다.
      • 예) CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org1.example.com:8051
    • 설정파일을 저장 해두면 편합니다.
      • 예) discover --configFile conf.yaml --MSP Org1MSP saveConfig
    • peer의 MSP정보를 쿼리 할 수 있습니다.
      • 예) discover --configFile conf.yaml peers --channel mychannel --server peer0.org1.example.com:7051
    • config 정보를 쿼리 할 수 있습니다.
      • 예) discover --configFile conf.yaml config --channel mychannel --server peer0.org1.example.com:7051
    • 보증정책 정보를 쿼리할수있습니다.
      • 예) discover --configFile conf.yaml endorsers --channel mychannel --server peer0.org1.example.com:7051 --chaincode mycc

-끝-

+ Recent posts