mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-17 15:35:09 +00:00
* 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>
88 lines
2.2 KiB
Bash
Executable file
88 lines
2.2 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
set -v -eou pipefail
|
|
|
|
# All tests run in the workshop root folder
|
|
cd "$(dirname "$0")"/..
|
|
|
|
# Clean house on exit
|
|
function exitHook() {
|
|
|
|
# Just in case the just left some bits running around
|
|
kind delete cluster --name kind
|
|
|
|
# Just in case ...
|
|
if docker inspect kind-registry &>/dev/null; then
|
|
echo "Stopping container registry"
|
|
docker kill kind-registry
|
|
docker rm kind-registry
|
|
fi
|
|
|
|
# Delete the sample network configuration and crypto material
|
|
rm -rf "${WORKSHOP_PATH}"/_cfg
|
|
}
|
|
|
|
trap exitHook SIGINT SIGTERM EXIT
|
|
|
|
|
|
###############################################################################
|
|
# 00-setup
|
|
###############################################################################
|
|
|
|
curl -sSL https://raw.githubusercontent.com/hyperledger/fabric/main/scripts/install-fabric.sh | bash -s -- binary
|
|
|
|
export WORKSHOP_PATH="${PWD}"
|
|
export PATH="${WORKSHOP_PATH}/bin:${PATH}"
|
|
export FABRIC_CFG_PATH="${WORKSHOP_PATH}/config"
|
|
|
|
"${WORKSHOP_PATH}/check.sh"
|
|
|
|
|
|
###############################################################################
|
|
# 10-kube
|
|
###############################################################################
|
|
|
|
# env checks
|
|
[[ ${WORKSHOP_PATH+x} ]] || exit 1
|
|
[[ ${FABRIC_CFG_PATH+x} ]] || exit 1
|
|
|
|
just check-setup
|
|
|
|
# Set the ingress domain and target k8s namespace
|
|
export WORKSHOP_INGRESS_DOMAIN=localho.st
|
|
export WORKSHOP_NAMESPACE=fabricinfra
|
|
|
|
|
|
# Create a Kubernetes cluster in Docker, configure an Nginx ingress, and docker container registry
|
|
just kind
|
|
|
|
# KIND will set the current kube client context in ~/.kube/config
|
|
kubectl cluster-info
|
|
|
|
# Run k9s to observe the target namespace
|
|
# k9s -n $WORKSHOP_NAMESPACE
|
|
|
|
|
|
|
|
|
|
###############################################################################
|
|
# 40 - console.
|
|
###############################################################################
|
|
|
|
|
|
# Just launch the console. Straight to the point.
|
|
|
|
|
|
just console
|
|
|
|
|
|
# Operator running?
|
|
kubectl -n ${WORKSHOP_NAMESPACE} get deployment fabric-operator
|
|
|
|
# Console running?
|
|
kubectl -n ${WORKSHOP_NAMESPACE} get deployment hlf-console
|
|
|
|
# Console listening at the Nginx ingress?
|
|
curl --fail --insecure https://${WORKSHOP_NAMESPACE}-hlf-console-console.${WORKSHOP_INGRESS_DOMAIN}/
|
|
|
|
|