Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/grimmer0125/node-message-queue

Test Node.js Express (as RabbitMQ rpc client) with message queue, RabbitMQ/Zeromq, mainly RPC (Request And Reply) pattern. rpc server could be Python or Node.js. Test Kubernetes (minikube) to deploy local. More K8S+Google Cloud example: https://github.com/grimmer0125/express-mongo-rest-k8s-sample
https://github.com/grimmer0125/node-message-queue

Last synced: 7 days ago
JSON representation

Test Node.js Express (as RabbitMQ rpc client) with message queue, RabbitMQ/Zeromq, mainly RPC (Request And Reply) pattern. rpc server could be Python or Node.js. Test Kubernetes (minikube) to deploy local. More K8S+Google Cloud example: https://github.com/grimmer0125/express-mongo-rest-k8s-sample

Awesome Lists containing this project

README

        

## prepare

install minikube: https://github.com/kubernetes/minikube#installation

## run steps

### start local k8s

`minikube start`

### build the local docker image, everytime the code is changed

1. `eval $(minikube docker-env)`
3. `docker build -t express-rabbit-rpc .`

### run k8s cluster including docker containers
`kubectl create -f pod-config.yaml`

### test
1. ~type `minikube ip` to get its ip.~
2. ~type `kubectl services` to know the mapping external ip of express server, port. e.g. `my-service10 NodePort 10.105.153.56 3000:31045/TCP`. 31045 is the port.~
3. ~use browsers to open ip:port, request root path of express server. Also open ip:port/rabbit to get the results from the rabbitmq + rpc server.~

Use one of the following to test
1. `curl $(minikube service express-rabbit-service --url)`
2. `minikube service express-rabbit-service`, directly open the browser.
3. use curl or browser to test the endpoint, `$(minikube service express-rabbit-service --url)/rabbit`

### stop k8s cluster and minikube
1. `kubectl delete -f pod-config.yaml`
2. `minikube stop`