我已尝试在Bluemix kubernetes群集上部署我的bna,截至以下网站的描述 https://ibm-blockchain.github.io/interacting/
但我怀疑对等管理员的证书和密钥是在hlfv1 env上部署所必需的。 https://hyperledger.github.io/composer/business-network/bnd-deploy.html https://hyperledger.github.io/composer/reference/composer.identity.import.html
有没有人知道如何通过以下简单安装脚本env获得对等管理员的证书和密钥? https://ibm-blockchain.github.io/simple/
谢谢。答案 0 :(得分:1)
创建连接个人资料
~/.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) 为了获取信用,我首先需要访问我的kubernetes集群中的一个pod
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/Admin@org1.example.com/msp/keystore
然后我将这些文件的内容复制到我的本地系统上的证书文件(admincert.pem)和私钥文件(key.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