Support and Maintenance Guide
This guide covers the operational tasks that follow the initial deployment:
- onboard an additional participant organization
- update deployed chaincode
- clean up Fabric resources and shared on-prem addons
The examples below use orgcompany as the new participant organization, org0 as the orderer organization, and org1 as an existing participant organization.
Participant Onboarding
Use this workflow to add a new participant organization that follows the same target layout as org1.
Prepare the Target Files
Create the new target by cloning the org1 scaffold, then rename embedded identifiers:
cp -R targets/org1 targets/orgcompany
find targets/orgcompany -depth -name '*org1*' -exec bash -lc 'mv "$1" "${1//org1/orgcompany}"' _ {} \;
find targets/orgcompany -type f -exec perl -0pi -e 's/org1/orgcompany/g; s/org1MSP/OrgCompanyMSP/g; s/org1_NS/ORGCOMPANY_NS/g; s/mychannel/orgcompanychannel/g' {} +
Then create the target-local environment files:
cp targets/orgcompany/env.example targets/orgcompany/env
cp targets/orgcompany/config/onprem.env.example targets/orgcompany/config/onprem.env
Adjust the values in targets/orgcompany/env and targets/orgcompany/config/onprem.env before bootstrapping the new target.
Bootstrap the New Participant
Provision the new target and deploy its Fabric resources:
./network onprem orgcompany init
./network onprem orgcompany cluster
./network onprem orgcompany addons
./network onprem orgcompany hosts /tmp/orgcompany-hosts
sudo tee -a /etc/hosts < /tmp/orgcompany-hosts
./network orgcompany up
Verify the result:
kubectl --kubeconfig targets/orgcompany/kubeconfig get nodes
kubectl --kubeconfig targets/orgcompany/kubeconfig -n ingress-nginx get pods
kubectl --kubeconfig targets/orgcompany/kubeconfig -n cert-manager get pods
kubectl --kubeconfig targets/orgcompany/kubeconfig -n test-network get deploy
Expected state:
- all expected nodes show
Ready - ingress controller pods are
Running - cert-manager pods are
Running - the new participant CA and peer deployments exist in
test-network
Add the New Participant to a Channel
Create or extend a channel from org0, then join the new participant:
./network org0 channel create channel2 --members orgcompany
./network orgcompany channel join channel2
Verify the join from the new peer:
kubectl --kubeconfig targets/orgcompany/kubeconfig -n test-network exec deploy/orgcompany-peer1 -- peer channel list
kubectl --kubeconfig targets/orgcompany/kubeconfig -n test-network exec deploy/orgcompany-peer1 -- peer channel getinfo -c channel2
Expected state:
peer channel listincludeschannel2peer channel getinfo -c channel2returns blockchain metadata such as the current height- neither command fails with TLS, join, or orderer connectivity errors
Chaincode Update
Update an existing chaincode deployment from a participant organization:
./network org1 chaincode update carboncc /path/to/api-golang-dmrv-fabric-chaincode
Verify the updated chaincode:
./network org1 chaincode query carboncc '{"Args":["HealthCheck"]}'
Expected state:
- the command returns
ok
For the initial deployment flow, see Deployment Guide.
Cleanup
Remove the deployed Fabric workloads before cleaning up shared on-prem components.
Remove Fabric Resources
Run the namespace-scoped teardown for each deployed organization:
./network org1 down
./network org0 down
./network <org> down removes the target namespace resources managed by the deployment bundle.
Remove Shared On-Prem Addons
After the Fabric workloads are gone, remove the target-scoped on-prem addons from each cluster:
./network onprem org1 clean
./network onprem org0 clean
./network onprem <org> clean removes ingress-nginx, cert-manager, and the on-prem registry from that target cluster.
This bundle does not provide a command to uninstall K3s or fully wipe the host machines.