Skip to content

SaifRehman/Kubernitized-Tinder-Blockchain

Repository files navigation

Kubernitized Proof of Stake Blockchain on ICP


Lotion
Kubernitized Blockchain Tinder app on IBM Cloud Private

Powered by Tendermint ✨ Lotion ✨ Kubernetes and IBM Cloud Private

Travis Build


Pre Requisites

  1. Signup to IBM Cloud
  2. Install Cloud Foundry CLI
  3. Install Bluemix CLI
  4. Install Kubernetes CLI
  5. Install Minikube Minikube
  6. Install Docker Docker

Tasks

  • Creating user service
  • Creating location service
  • Creating Blockchain services
  • Connecting to real database
  • Creating cron jobs for matching
  • Creating frontend app
  • Deploying to ICP (IBM Cloud Private)

Reading images locally

$ eval $(minikube docker-env)

Build and run Docker images

  1. Creating user-service
$ cd user-service
$ docker build -t user-service .
$ docker run -i -t -p 30094:30094 user-service:latest 
  1. Creating location-service
$ cd location-service
$ docker build -t location-service .
$ docker run -i -t -p 30095:30095 location-service:latest 
> Add google map api key in main.go
  1. Creating blockchain-node1
$ cd blockchain-validator1
$ docker build -t blockchain-validator1 .
$ docker run -i -t -p 30090:30090 -p 30091:30091 blockchain-validator1:latest 
  1. Creating blockchain-node2
$ cd blockchain-validator2
$ docker build -t blockchain-validator2 .
$ docker run -i -t -p 30092:30092 -p 30093:30093 blockchain-validator2:latest 

Deploy to minikube

  1. Start Minikube
$ minikube start
  1. Get cluster info
$ kubectl cluster-info
  1. minikube dashboard
$ minikube dahsboard
  1. running service-deployment.yml file
$ kubectl create -f service-deployment.yml
  1. get minikube ip
$ minikube ip

Services

  1. Blockchain node1
  • Tendermint RPC port 30090
  • Tendermint p2p port 30091
  1. Blockchain node2
  • Tendermint RPC port 30092
  • Tendermint p2p port 30093
  1. User Service
  • port 30094
  1. Location Service
  • port 30095

Apis

User service

  • (GET) :30094/all
  • (GET) :30094/user/{id}
  • (POST) :30094/create
   { "id": "1",
    "name": "Matt",
    "gender": "Male",
    "age": 23,
    "userlocation": {
        "Lat": 54.234,
        "Long": 55.234
    }
   }
  • (DELETE) :30094/delete/{id}

Location service

  • (GET) :30095/location

Blockchain Node1

  • (GET) :30090/ # Tendermint RPC Port

Blockchain Node2

  • (GET) :30092/ # Tendermint RPC Port

About

Kubernitized Blockchain Tinder app on IBM Cloud Private

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published