Getting started
There are two types of resources to manage a channel:
- FabricMainChannel
- FabricFollowerChannel
FabricMainChannel
This resource creates and manages the channel configuration, including:
- Configuration
- Peer organizations
- Orderer organizations
FabricFollowerChannel
This resource joins the channel and manages the channel configuration, including:
- Anchor peers
- Peers to join
Wallet
For every resource we need a wallet to interact with the network.
The FabricMainChannel requires a wallet with the admin identity of the orderer organization and the peer organizations that will manage the channel.
The FabricFollowerChannel requires a wallet with the admin identity of the peer organization.
Enroll the orderer admin organization
CA_NAME=ord-ca
CA_NAMESPACE=default
CA_MSPID=OrdererMSP
CA_TYPE=tlsca # can be `ca` or `tlsca`
kubectl hlf ca register --name=$CA_NAME --namespace=$CA_NAMESPACE --user=admin --secret=adminpw --type=admin \
--enroll-id enroll --enroll-secret=enrollpw --mspid OrdererMSP
kubectl hlf ca enroll --name=$CA_NAME --namespace=$CA_NAMESPACE \
--user=admin --secret=adminpw --mspid $CA_MSPID \
--ca-name $CA_TYPE --output orderermsp.yaml
Enroll the admin peer organization
CA_NAME=org1-ca
CA_NAMESPACE=default
CA_MSPID=Org1MSP
CA_TYPE=ca # can be `ca` or `tlsca`
kubectl hlf ca register --name=$CA_NAME --namespace=$CA_NAMESPACE --user=admin --secret=adminpw --type=admin \
--enroll-id enroll --enroll-secret=enrollpw --mspid Org1MSP
kubectl hlf ca enroll --name=$CA_NAME --namespace=$CA_NAMESPACE \
--user=admin --secret=adminpw --mspid $CA_MSPID \
--ca-name $CA_TYPE --output org1msp.yaml