/ticketing

Primary LanguageTypeScript

Microservices

  • Built a ticketing cloud service using microservice architecture with Node.js, React.js, Bull, MongoDB.
  • Solved concurrency issues in a distributed systems by communicating data between services using NATS streaming server as an event bus.
  • Designed the CI/CD workflow using Github Actions and deployed to Google Cloud and DigitalOcean with Docker, Kubernetes, and Skaffold;
  • Implemented a countdown expiration service using a queue system via Bull and Redis
  • Built a server-side rendered frontend using Next.js; Automated the testing process using Jest.

Prerequisites

Env

Ubuntu 20.04.4 LTS

Getting started

Docker

sudo usermod -aG docker $USER

Minikube

  • 2 CPUs or more
  • 2GB of free memory
  • 20GB of free disk space
  • Internet connection
  • Container or virtual machine manager, such as: Docker, Hyperkit, Hyper-V, KVM, Parallels, Podman, VirtualBox, or VMware Fusion/Workstation
sudo service docker start
minikube start

Install ingress

minikube addons enable ingress

Check the service namspace

kubectl get namespace
kubectl get services -n ingress-nginx

Change host file

vim /etc/hosts
# Add this line
192.168.49.2    ticketing.dev

Create secrets to k8s

kubectl create secret generic jwt-secret --from-literal=JWT_KEY=asdf
kubectl create secret generic stripe-secret --from-literal STRIPE_KEY=sk_test_XXX

Run

git clone git@github.com:Holychung/ticketing.git
cd ticketing
skaffold dev

Thanks