Tools, FAQ, Tutorials:
Create "PeerAdmin@hlfv1" Card Manually
How to create the "PeerAdmin@hlfv1" card manually?
✍: FYIcenter.com
If you don't want to use the "createPeerAdminCard.sh" script
to create the "PeerAdmin@hlfv1" card automatically,
you can follow this tutorial to create it manually.
1. Create connection profile "connection.json":
$ mkdir ~/card $ cd ~/card $ vi connection.json { "name": "hlfv1", "x-type": "hlfv1", "x-commitTimeout": 300, "version": "1.0.0", "client": { "organization": "Org1", "connection": {} }, "channels": { "composerchannel": { "orderers": ["orderer.example.com"], "peers": {"peer0.org1.example.com": {}} } }, "organizations": { "Org1": { "mspid": "Org1MSP", "peers": ["peer0.org1.example.com"], "certificateAuthorities": ["ca.org1.example.com"] } }, "orderers": { "orderer.example.com": { "url": "grpc:\/\/localhost:7050" } }, "peers": { "peer0.org1.example.com": { "url": "grpc:\/\/localhost:7051" } }, "certificateAuthorities": { "ca.org1.example.com": { "url": "http:\/\/localhost:7054", "caName": "ca.org1.example.com" } } }
2. Copy the certificate and the private of admin user, "Admin@org1.example.com" included in the installation package:
$ cd ~/fabric-dev-servers/fabric-scripts/hlfv12/composer/crypto-config \ /peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp $ cp admincerts/Admin@org1.example.com-cert.pem ~/card/cert.pem $ cp keystore/114a...4457_sk ~/card/key.pem
3. Build the card file, PeerAdmin.card:
$ cd ~/card $ composer card create -p connection.json -u PeerAdmin@hlfv1 \ -c cert.pem -k key.pem -r PeerAdmin -r ChannelAdmin -f PeerAdmin.card Successfully created business network card file to Output file: PeerAdmin.card Command succeeded $ ls -l -rw-rw-r-- 1 fyicenter 1977 Apr 1 02:00 PeerAdmin.card -rw-r--r-- 1 fyicenter 790 Apr 1 01:32 cert.pem -rw-rw-r-- 1 fyicenter 419 Apr 1 01:15 connection.json -rwxr-xr-x 1 fyicenter 241 Apr 1 01:33 key.pem
4. Import the card file to wallet, ~/.composer/cards:
$ composer card import -f PeerAdmin@fabric-network.card Successfully imported business network card Card file: PeerAdmin.card Card name: PeerAdmin@hlfv1@hlfv1 Command succeeded
5. Check access cards in wallet:
$ composer card list The following Business Network Cards are available: Connection Profile: hlfv1 ┌───────────────────────┬─────────────────┬──────────────────┠│ Card Name │ UserId │ Business Network │ ├───────────────────────┼─────────────────┼──────────────────┤ │ PeerAdmin@hlfv1 │ PeerAdmin │ │ ├───────────────────────┼─────────────────┼──────────────────┤ │ PeerAdmin@hlfv1@hlfv1 │ PeerAdmin@hlfv1 │ │ └───────────────────────┴─────────────────┴──────────────────┘
There are 2 cards now in the Composer wallet:
Â
⇠"PeerAdmin@hlfv1" - Peer Admin Access Card
2020-07-14, 949👍, 0💬
Popular Posts:
How to create a new API on the Publisher Portal 2017 version of an Azure API Management Service? If ...
How to add request URL Template Parameters to my Azure API operation 2017 version to make it more us...
How to create a new API on the Publisher Dashboard of an Azure API Management Service? If you are ne...
How to use the "rewrite-uri" Policy Statement for an Azure API service operation? The "rewrite-uri" ...
How to add images to my EPUB books Images can be added into book content using the XHTML "img" eleme...