This is the REST APIs server for Voting Authority.
The following ENVs are required while starting the container:
AWS_KEY
: IAM access keyAWS_SECRET_KEY
: IAM secret keyAWS_REGION
: Region where managed blockchain member is deployedCA_USERNAME
: CA usernameCA_PASSWORD
: CA passwordNETWORK_ID
: Managed blockchain member IDORDERER_URL
: Orderer URL of the networkCORE_PEER_ADDRESS
: Peer URL of the memberCORE_PEER_TLS_ENABLED
: trueCORE_PEER_TLS_ROOTCERT_FILE
: /home/crypto/managedblockchain-tls-chain.pemCORE_PEER_LOCALMSPID
: Managed blockchain member IDCORE_PEER_MSPCONFIGPATH
: /home/crypto/admin-msp
First ssh into the EC2 that's running the container. Then gain access to shell of the container using this command: docker exec -i -t container_id /bin/bash
. Then create "voting" channel with only voting channel as member.
- Run this command to go to the crypto directory:
cd /home/crypto
- Replace content of configtx.yaml with this:
Organizations:
- &Org1
Name: member-id
ID: member-id
MSPDir: /home/crypto/admin-msp
AnchorPeers:
- Host:
Port:
Application: &ApplicationDefaults
Organizations:
Profiles:
OneOrgChannel:
Consortium: AWSSystemConsortium
Application:
<<: *ApplicationDefaults
Organizations:
- *Org1
Add Member ID of the voting organisation for values Name and ID
- Then run this command to generate the configtx peer block:
configtxgen -outputCreateChannelTx /home/crypto/voting.pb -profile OneOrgChannel -channelID voting --configPath /home/crypto/
- Now create the channel using this command:
peer channel create -c voting -f /home/crypto/voting.pb -o $ORDERER_URL --cafile /home/crypto/managedblockchain-tls-chain.pem --tls
- Join voting authority peer to the channel by running this command:
peer channel join -b /home/crypto/voting.block -o $ORDERER_URL --cafile /home/crypto/managedblockchain-tls-chain.pem --tls