Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kfsoftware/meetup-k8s-hlf-june-2023
https://github.com/kfsoftware/meetup-k8s-hlf-june-2023
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/kfsoftware/meetup-k8s-hlf-june-2023
- Owner: kfsoftware
- Created: 2023-06-18T22:37:57.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-06-20T21:01:56.000Z (over 1 year ago)
- Last Synced: 2024-04-28T06:04:58.549Z (10 months ago)
- Language: TypeScript
- Size: 188 KB
- Stars: 5
- Watchers: 2
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Hyperledger Meetup 2023 on Hyperledger Fabric
## Sponsor
| | |
| ----------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ![kfs logo](https://avatars.githubusercontent.com/u/74511895?s=200&v=4) | If you want to design and deploy a secure Blockchain network based on the latest version of Hyperledger Fabric, feel free to contact [email protected] or visit [https://kfs.es/blockchain](https://kfs.es/blockchain) |## Getting started
# Tutorial
Resources:
- [Hyperledger Fabric build ARM](https://www.polarsparc.com/xhtml/Hyperledger-ARM-Build.html)
## Create Kubernetes Cluster
To start deploying our red fabric we have to have a Kubernetes cluster. For this we will use KinD.
Ensure you have these ports available before creating the cluster:
- 80
- 443If these ports are not available this tutorial will not work.
```bash
cat << EOF > resources/kind-config.yaml
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
extraPortMappings:
- containerPort: 30949
hostPort: 80
- containerPort: 30950
hostPort: 443
EOFkind create cluster --config=./resources/kind-config.yaml
```
## Install Kubernetes operator
In this step we are going to install the kubernetes operator for Fabric, this will install:
- CRD (Custom Resource Definitions) to deploy Fabric Peers, Orderers and Certification Authorities
- Deploy the program to deploy the nodes in KubernetesTo install helm: [https://helm.sh/docs/intro/install/](https://helm.sh/docs/intro/install/)
```bash
helm repo add kfs https://kfsoftware.github.io/hlf-helm-charts --force-updatehelm install hlf-operator --version=1.9.0 kfs/hlf-operator
```### Install the Kubectl plugin
To install the kubectl plugin, you must first install Krew:
[https://krew.sigs.k8s.io/docs/user-guide/setup/install/](https://krew.sigs.k8s.io/docs/user-guide/setup/install/)Afterwards, the plugin can be installed with the following command:
```bash
kubectl krew install hlf
```### Install Istio
Install Istio binaries on the machine:
```bash
curl -L https://istio.io/downloadIstio | ISTIO_VERSION=1.16.1 TARGET_ARCH=x86_64 sh -
export PATH="$PATH:$PWD/istio-1.16.1/bin"```
Install Istio on the Kubernetes cluster:
```bash
kubectl create namespace istio-system
istioctl operator init
kubectl apply -f - < resources/network.yaml
```### Create metadata file
```bash
# remove the code.tar.gz chaincode.tgz if they exist
rm code.tar.gz chaincode.tgz
export CHAINCODE_NAME=asset
export CHAINCODE_LABEL=asset
cat << METADATA-EOF > "metadata.json"
{
"type": "ccaas",
"label": "${CHAINCODE_LABEL}"
}
METADATA-EOF
```### Prepare connection file
```bash
## chaincode as a service
cat > "connection.json" <