創建連接配置文件
~/.composer-connection-profiles/bmx-stage1-kubes/connection.json
{
"name": "bmx-stage1-kubes-org1",
"description": "Connection profile for IBM Blockchain Platform",
"type": "hlfv1",
"orderers": [
{
"url": "grpc://169.47.123.123:31010"
}
],
"ca": {
"url": "http://169.47.123.123:30000",
"name": "CA1"
},
"peers": [
{
"requestURL": "grpc://169.47.123.123:30110",
"eventURL": "grpc://169.47.123.123:30111"
}
],
"keyValStore": "/Users/jeff/.composer-credentials/bmx-stage1-kubes-
org1",
"channel": "channel1",
"mspID": "Org1MSP",
"timeout": 300
}
確保公共地址的kubernetes集羣的公共地址相匹配。
建立我kubernetes ENV之後,我需要讓我可以用它來創建一個管理員ID(PeerAdmin) 爲了搶vim的信任狀相應的管理工具creds,我首先需要訪問莢一個在我kubernetes羣集
kubectl exec -ti $(kubectl get pods | grep ca| awk '{print $1}') bash
然後,我需要獲得CA的證書文件和密鑰文件。找到證書文件的位置:
/shared/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/admincerts
發現這裏的關鍵文件:
/shared/crypto-config/peerOrganizations/org1.example.com/users/[email protected]/msp/keystore
我再複製這些文件的內容轉換成一個證書文件(admincert.pem)和私鑰文件(關鍵。質子交換膜),我的本地系統上,然後跑:
composer identity import -p bmx-stage1-kubes-org1 -u PeerAdmin -c admincert.pem -k key.pem
這造成了我的PeerAdmin(管理員身份)
我可以然後運行
composer network deploy -a myBNA.bna -p bmx-stage1-kubes-org1 -i PeerAdmin -s abc
謝謝。我會稍後再嘗試。 –
我已經按照你的說法成功部署了。謝謝! –