* Import Full Stack Asset Transfer Guide at commit fb554befdbbeff9e69159b54fce0b811603f29c7 Signed-off-by: Josh Kneubuhl <jkneubuh@us.ibm.com> * Update the workshop with a new WORKSHOP_PATH under fabric-samples Signed-off-by: Josh Kneubuhl <jkneubuh@us.ibm.com> * Update the workshop with a new WORKSHOP_PATH under fabric-samples Signed-off-by: Josh Kneubuhl <jkneubuh@us.ibm.com> * missed a .git ignored directory on add Signed-off-by: Josh Kneubuhl <jkneubuh@us.ibm.com> * Updates to run the workshop on the Apple M1 Signed-off-by: Josh Kneubuhl <jkneubuh@us.ibm.com> * Workaround for https://github.com/eslint/eslint/issues/15299 in the contract tslinter Signed-off-by: Josh Kneubuhl <jkneubuh@us.ibm.com> * Build an arch-specific CC images on M1 Signed-off-by: Josh Kneubuhl <jkneubuh@us.ibm.com> * empty commit - force a build Signed-off-by: Josh Kneubuhl <jkneubuh@us.ibm.com> * revert an accidental commit that was building the top-level asset-transfer as arm64 Signed-off-by: Josh Kneubuhl <jkneubuh@us.ibm.com> Signed-off-by: Josh Kneubuhl <jkneubuh@us.ibm.com>
3 KiB
Deploy a Kubernetes Cluster
PREV: Setup <==> NEXT: Deploy a Fabric Network
Ready?
just check-setup
Provision a cloud Kubernetes Instance
-
Provision an IKS or EKS Kubernetes service at IBM or Amazon Cloud.
- Configure a 3x 4 CPU / 16 GRAM worker pool.
- single region is OK.
-
Configure your
kubectlCLI for access to the remote cluster. -
Test CLI access to the cluster:
kubectl cluster-info
- Open a new shell and observe the target namespace:
k9s -n test-network
Configuration Options
IBM Cloud / IKS
export WORKSHOP_NAMESPACE="test-network"
export WORKSHOP_CLUSTER_RUNTIME="k3s"
export WORKSHOP_COREDNS_DOMAIN_OVERRIDE="false"
export WORKSHOP_STAGE_DOCKER_IMAGES="false"
export WORKSHOP_STORAGE_CLASS="ibmc-file-gold"
Amazon Web Services / EKS
export WORKSHOP_NAMESPACE="test-network"
export WORKSHOP_CLUSTER_RUNTIME="k3s"
export WORKSHOP_COREDNS_DOMAIN_OVERRIDE="false"
export WORKSHOP_STAGE_DOCKER_IMAGES="false"
export WORKSHOP_STORAGE_CLASS="gp2"
Install Nginx Ingress
- Install the Nginx controller to the cluster
just nginx
Cluster Ingress DNS Domain
IKS
export INGRESS_IPADDR=$(kubectl -n ingress-nginx get svc/ingress-nginx-controller -o json | jq -r '.status.loadBalancer.ingress[0].ip')
export WORKSHOP_INGRESS_DOMAIN=$(echo $INGRESS_IPADDR | tr -s '.' '-').nip.io
EKS
export INGRESS_HOSTNAME=$(kubectl -n ingress-nginx get svc/ingress-nginx-controller -o json | jq -r '.status.loadBalancer.ingress[0].hostname')
export INGRESS_IPADDR=$(dig $INGRESS_HOSTNAME +short)
export WORKSHOP_INGRESS_DOMAIN=$(echo $INGRESS_IPADDR | tr -s '.' '-').nip.io
Take it Further
During the workshop, one of the steps involves building a chaincode image, tagging the image, and publishing to an insecure docker registry running at localhost:5000. For cloud based clusters, the remote instance will not have access to the local insecure registry.
To upload custom chaincode, configure your local docker client with access to an IBM cloud / public container registry. In addition, make sure that the Fabric target namespace has read access to the repository, allowing the pods created in the cluster with access to your code.
To run the workshop without building and uploading custom code, you can install a chaincode
package using the reference asset-transfer smart contract. This reference sample has been
made available for public read access, and does not require imagePullSecrets for the
chaincode pods to be started in the cluster.
To install the reference smart contract, in the "Install Chaincode" section of the workshop, skip the "build image" sections and install the contract from a CI pipeline.