/spring-boot-hlf-k8s-fullstack-blockchain-app

Spring Boot Hyperledger Fabric Fullstack Blockchain Application running on Kubernetes

Primary LanguageShell

Spring Boot Hyperledger Fabric Fullstack Blockchain Application running on Kubernetes

Blockchain Based Asset Transfer Application

Spring boot Hlf Starter is a library I wrote.It provides an easy way to get your Spring boot application using Hyperledger Fabric Gateway SDK v2.2 up and running quickly.

Spring boot Hlf Starter Project Link: https://github.com/susimsek/spring-boot-hlf-starter

I developed the backend of The Asset Transfer application using this library. Asset Transfer Application is a blockchain based fullstack application.The chaincode part of the application is written in Go, the backend part is written in Spring boot, and the frontend part is written in Angular.

Spring Boot Hyperledger Fabric Fullstack Blockchain Application running on Kubernetes

Application Introduction

The asset transfer application can be accessed from this link.
http://hlf-k8.tk

Fullstack Blockchain Application Introduction 1

Fullstack Blockchain Application Introduction 2

Fullstack Blockchain Application Introduction 3

Fullstack Blockchain Application Introduction 4

Swagger Introduction

The swagger ui can be accessed from this link.
http://api.hlf-k8.tk/swagger-ui.html

Fullstack Blockchain Application Swagger Introduction 1

Fullstack Blockchain Application Swagger Introduction 2

Fullstack Blockchain Application Swagger Introduction 3

Fullstack Blockchain Application Swagger Introduction 4

Fullstack Blockchain Application Swagger Introduction 5

Hyperledger Explorer Introduction

The hyperledger explorer dashboard can be accessed from this link.
http://explorer.hlf-k8.tk

You can login to hyperledger explorer with these credentials.

Username Password
admin adminpw

Fullstack Blockchain Application Hyperledger Explorer Introduction 1

Fullstack Blockchain Application Hyperledger Explorer Introduction 2

Fullstack Blockchain Application Hyperledger Explorer Introduction 3

Fullstack Blockchain Application Hyperledger Explorer Introduction 4

Fullstack Blockchain Application Hyperledger Explorer Introduction 5

Grafana Introduction

The grafana dashboard can be accessed from this link.
http://grafana.hlf-k8.tk

You can login to grafana with these credentials.

Username Password
admin adminpw

Fullstack Blockchain Application Grafana Introduction 1

Fullstack Blockchain Application Grafana Introduction 2

Prerequisites for Kubernetes Deployment

  • Kubernetes 1.12+

  • Nfs Server

  • Ingress Controller

  • Minimum 8 cpu

  • Minimum 10 GB Ram

Preparation for Kubernetes Deployment

Edit these files according to your nfs server configuration.

Replace 192.168.12.9 with your nfs server ip

Replace /srv/kubedata with your nfs sharing path

Paths of the files to be edited

deploy/k8s/pv/fabricfiles-pv.yaml
deploy/k8s/pv/kafka-pv.yaml
deploy/k8s/pv/zookeeper-pv.yaml
deploy/setup/copy_fabricfiles.sh
deploy/setup/create_fabric_dir.sh

Copy deploy folder to your nfs server.

Go the path of deploy folder,run these scripts on your nfs server.

cd deploy/setup/nfs-server-setup
sudo chmod u+x *.sh
./create_fabric_dir.sh
./copy_fabricfiles.sh

Installation for Kubernetes Deployment

cd deploy/k8s
sudo chmod u+x *.sh
./install.sh

Installation Using Vagrant for Kubernetes Deployment

Fullstack Blockchain Application Vagrant Installation

Prerequisites for Kubernetes Deployment

  • Vagrant 2.2+
  • Virtualbox or Hyperv
  • Minimum 8 cpu
  • Minimum 10 GB Ram

Virtual Machine Setup

cd deploy
vagrant up

Nfs Server Installation

vagrant ssh nfsserver
cd /vagrant/setup/nfs-server-setup
sudo chmod u+x *.sh
sudo ./install_nfs.sh
./create_fabric_dir.sh
./copy_fabricfiles.sh
exit

Haproxy Installation

vagrant ssh haproxy
cd /vagrant/setup/haproxy-setup
sudo chmod u+x *.sh
sudo ./install_haproxy.sh
exit

Kubernetes Installation

vagrant ssh k8smaster
 cd /vagrant/setup/kubernetes-setup
sudo chmod u+x *.sh
./install-prereqs.sh

Application Installation

cd /vagrant/k8s
sudo chmod u+x *.sh
./install.sh

Used Technologies

Fullstack Blockchain Application Used Technologies

  • Go 1.14.6
  • Spring Boot 2.5.5
  • Angular 8.2.14
  • Kafka
  • Hyperledger Fabric 2.3
  • Couchdb
  • Hyperledger Explorer 1.1.8
  • Swagger
  • Docker
  • Kubernetes
  • Vagrant

Contact

Şuayb Şimşek - @linkledin - suaybsimsek58@gmail.com

Project Link: https://github.com/susimsek/spring-boot-hlf-k8s-fullstack-blockchain-app