Join main channel

All members except the Retailer should run the following commands in their respective Cloud terminals.

Download the MSP admin certs from the shared S3 bucket.

cd
aws s3api get-object --bucket $BUCKET_NAME --key certs.tgz $HOME/certs.tgz
tar zxvf certs.tgz

Download the genesis block of the channel:

docker exec cli peer channel fetch oldest /opt/home/mainchannel.block -c mainchannel -o $ORDERER --cafile /opt/home/managedblockchain-tls-chain.pem --tls

The output should look like:

2020-07-23 03:59:31.157 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2020-07-23 03:59:31.164 UTC [cli/common] readBlock -> INFO 002 Received block: 0

Join the channel:

docker exec cli peer channel join -b /opt/home/mainchannel.block -o $ORDERER --cafile /opt/home/managedblockchain-tls-chain.pem --tls

The output should look like:

2020-07-23 03:59:37.234 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2020-07-23 03:59:37.518 UTC [channelCmd] executeJoin -> INFO 002 Successfully submitted proposal to join channel