/ticketing-microservices

Implementation of the second application of Stephen Grider's course: Microservices with Node JS and React :whale2:

Primary LanguageTypeScript

Ticketing microservices

This repository contains my implementation of the second application of the Stephen Grider's course Microservices with Node JS and React.

Local deployment

In order to deploy the application and the microservices your system should have installed the following technologies:

The development process was carried in a Linux environment. For that reason, Minikube and VirtualBox were needed to run a local Kubernetes cluster.

  1. Start the cluster:
$ minikube start --driver=virtualbox
  1. Run the command below to create jwt secret (replace jwt_secret with a secret of your choice):
$ kubectl create secret generic jwt-secret --from-literal=JWT_KEY=jwt_secret
  1. Run the commands below to create stripe secret and public key (replace stripe_key with a valid Stripe api key and stripe_public_key with it's corresponding public api key)
$ kubectl create secret generic stripe-secret --from-literal=STRIPE_KEY=stripe_key
$ kubectl create secret generic stripe-public-key --from-literal=STRIPE_PUBLIC_KEY=stripe_public_key
  1. Enable minikube ingress addon:
$ minikube addons enable ingress
  1. Create a LoadBalancer service that will expose the ingress-nginx-controller deployment:
$ kubectl expose deployment ingress-nginx-controller --target-port=80 --type=LoadBalancer -n kube-system
  1. Add a temporary line to /etc/hosts file (replace ip_address with the result of running minikube ip):

ip_address ticketing.dev

  1. Run Skaffold to create Kubernetes Objects (in order to stop Skaffold, press ctrl + c):
$ skaffold dev
  1. Navigate to https://ticketing.dev, click on the page background and type: thisisunsafe