Code Monkey home page Code Monkey logo

microservicestutorial's Introduction

Ticketing web application

Microservices application with Services that include User Authentication, Ticket Creation, Order Creation, Payment and timed expiration. Front-end is built using service-side rendering Next.js and reusable code is packaged into an npm module named common.

Development

Ingress-nginx installation

https://kubernetes.github.io/ingress-nginx/deploy/#docker-for-mac

kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v0.43.0/deploy/static/provider/cloud/deploy.yaml

Start development environment

skaffold dev

Create secret in k8

kubectl create secret generic jwt-secret --from-literal=JWT_KEY=asdf

Update common module and push to npm registry

cd common

npm run pub

Update common module dependency in tickets

cd tickets

npm update @bc_tickets/common

Running test in tickets

cd tickets

npm run test

Development only port forwarding

kubectl get pods

kubectl port-forward nats-depl-75854b5b89-dbbdz 4222:4222

Deployment (DigitalOcean)

Install doctl

brew install doctl

Authentication

DigitalOcean dashboard > API > Generate New Token

doctl auth init and paste in the generated token

Get connection info for our new cluster

doctl kubernetes cluster kubeconfig save <cluster_name>

List all contexts

kubectl config view

Use a different context

kubectl config use-context <context_name>

Add Docker Hub account information as a secret in GitHub

Settings > Secrets > New repository secret

Create secrets in cluster

kubectl create secret generic jwt-secret --from-literal=JWT_KEY=asdf

Install ingress-nginx in cluster

https://kubernetes.github.io/ingress-nginx/deploy/#digital-ocean

kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v0.43.0/deploy/static/provider/do/deploy.yaml

Add HTTPS

see cert-manager.io

Add Email support

see Mailchimp/Sendgrid

microservicestutorial's People

Contributors

benjaminchua avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.