手動部署Faribc網路

2021-09-23 18:37:54 字數 3345 閱讀 9354

生成peers、orderers用於網路配置的相關證書

cryptogen generate --config=./crypto-config.yaml
建立4個配置工作: order的genesis block, channel的channel configuration transaction, 以及兩個anchor peer transactions乙個對應乙個peer組織

configtxgen -profile twoorgsorderergenesis -outputblock ./channel-artifacts/genesis.block

configtxgen -profile twoorgschannel -outputcreatechanneltx ./channel-artifacts/channel.tx -channelid mychannel

configtxgen -profile twoorgschannel -outputanchorpeersupdate ./channel-artifacts/org1mspanchors.tx -channelid mychannel -asorg org1msp

configtxgen -profile twoorgschannel -outputanchorpeersupdate ./channel-artifacts/org2mspanchors.tx -channelid mychannel -asorg org2msp

docker-compose -f docker-compose-cli.yaml up -d
docker-compose -f docker-compose-cli.yaml down

進入cli容器,設定以下環境變數

core_peer_tls_rootcert_file=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerorganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt

peer channel create -o orderer.example.com:7050 -c yourchannel -f ./channel-artifacts/channel.tx --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererorganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
peer channel join -b yourchannel.block
peer channel update -o orderer.example.com:7050 -c mychannel -f ./channel-artifacts/org1mspanchors.tx --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererorganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
peer channel join -b mychannel.block
peer chaincode install -n andriycc -v 1.0 -l golang -p github.com/chaincode/chaincode_example02/go/
peer chaincode instantiate -o orderer.example.com:7050 --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererorganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -c mychannel -n andriycc -l golang -v 1.0 -c '' -p "and ('org1msp.member','org2msp.member')"
如下操作全部在cli容器中操作

peer chaincode query -c mychannel -n andriycc -c ''
# c 賬戶轉50到d 賬戶

手動部署Ceph集群

接上篇,這次使用全手工配置的方式部署一套集群。環境配置及需要做的準備工作和上篇一樣,不再多說了。先從單節點配起,然後逐步進行擴充套件,最終做到三節點。安裝ceph 這裡選擇從倉庫中進行安裝,而不是從源 開始編譯,因為實在是太慢了,跑了一天還沒跑完。apt install ceph ceph mds配...

Mac 手動部署MAMP環境

背景 由於mac自帶apache環境,以及php,之前一直使用一鍵安裝的xampp,相當於重新安裝了一套環境。強迫症忍不了有相同的軟體在系統裡,決定解除安裝xampp,手動配置乙個mamp的環境。m mac pro 2014,系統為目前最新的 osx el capitan 10.11 檢視這個檔案可...

jenkis 配置 ftp 手動部署

jenkis 配置 ftp 手動部署 1.安裝 ftp vsftpd jar包安裝 安裝移步 下面介紹 yum 安裝 yum install vsftpd yum install ftp 啟動 關閉 service vsftpd start service vsftpd stop 重啟伺服器 etc...