How to get peer admin s certificate and key on Bluemix

0 votes
I am trying to deploy my bna on Bluemix but i am not getting how to get the cert and key of peer admin.
How can I get it?
Jul 16, 2018 in Blockchain by digger
• 26,740 points
687 views

1 answer to this question.

0 votes

Follow the steps mentioned below:

Create connection profile

~/.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
}


Make sure the public address matches the public address of your kubernetes cluster.

After setting up my kubernetes env, you should get the appropriate admin creds that you can use to create an admin id (PeerAdmin) 
In order to grab the creds, you first need to access one of the pods in my kubernetes cluster

kubectl exec -ti $(kubectl get pods | grep ca| awk '{print $1}') bash

Then you have to get the cert file and the key file for the ca. You will find the cert file here:

/shared/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/admincerts
you will find the key file here:

/shared/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore
Then copy the contents of those files into a cert file (admincert.pem) and a private key file (key.pem) on your local system and then run:

composer identity import -p bmx-stage1-kubes-org1 -u PeerAdmin -c admincert.pem -k key.pem
This will create your PeerAdmin (admin identity)

then run

composer network deploy -a myBNA.bna -p bmx-stage1-kubes-org1 -i PeerAdmin -s abc

answered Jul 16, 2018 by slayer
• 29,350 points

Related Questions In Blockchain

0 votes
2 answers

How to get notified when an event triggers on ethereum smart contract?

Muchas gracias. ?Como puedo iniciar sesion? READ MORE

answered May 2, 2020 in Blockchain by aqowcmbevs
2,148 views
0 votes
1 answer

How to get all address and send ethers in solidity using a loop?

I found a similar code somewhere: contract  Holders{ uint ...READ MORE

answered Jul 31, 2018 in Blockchain by digger
• 26,740 points
2,541 views
0 votes
1 answer

How to get results by running the voting code on Ethereum?

In mist go to your contract and ...READ MORE

answered Sep 18, 2018 in Blockchain by digger
• 26,740 points
442 views
0 votes
1 answer

Hyperledger Fabric: How to get transaction history using key?

history, err := stub.GetHistoryForKey(key_value) for history.HasNext() { ...READ MORE

answered Nov 20, 2018 in Blockchain by Omkar
• 69,210 points
3,298 views
0 votes
1 answer

Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

answered Sep 26, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
1,215 views
0 votes
1 answer

Invalid Batch or signature in Savtooth

This will solve your problem import org.apache.commons.codec.binary.Hex; Transaction txn ...READ MORE

answered Aug 1, 2018 in Blockchain by digger
• 26,740 points
708 views
+1 vote
1 answer

How do i change the names of validating peers in IBM Bluemix blockchain?

IBM Bluemix Blockchain service Hyperledger Fabric v0.6 will ...READ MORE

answered Apr 11, 2018 in Blockchain by Perry
738 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP