The purpose of this application is that to test/verificate/evaluate your infrastracture such like cloud-VMs, containers and k8s. It's easy to create cloud infrastraucre but it's still necesarry to prepare application/middleware to check operations, network, monitoring tools on the infrastracture from the view of application layer.
"choi" (check of infrastracture) is a super simple web-application using vuejs and node-express and this app can easily relay http(s) request, call external apis and output custom log like below. You can check your network communication path and your monitoring system.
In short, "choi" can emulates a real application which you or your team will developed and can also emulates error-case, so you can focus on your infrastracture/network/monitoring verification.
And "choi" shows an each latency of your network like below.
shyamagu/choi:http can be used for your quick test. This image's setting is only HTTP and port:80.
For each machine/vm/container
- install nodejs
- git clone -b release https://github.com/shyamagu/choi.git
- cd /choi
- npm install
- npm start
Then you can access a choi's setting page at this choi server (http://YOUR_SERVER_URL) , any url path available /*
If you want to change PORT, please note your PORT in a "/.env" file or in your process environment.
PORT=3000
If you want to use HTTPS, please add HTTPS configuration(PORT,pem file path, crt file path) in a "/.env" file like below.
*Not recommended, but if you want to use a self signed certification, use NODE_TLS_REJECT_UNAUTHORIZED=0 in this file.
...
HTTPS_PORT=443
HTTPS_PEM=./key/your_private_key.pem
HTTPS_CRT=./key/your_server.crt
NODE_TLS_REJECT_UNAUTHORIZED=0
choi can output custom log, using log4js-node. If you want to customize log format, rollup setting and so on, please customize "log4js.config.json" file in the root folder.
FROM node:14-alpine
# install Git & Bash
RUN apk update && apk add git && apk add bash && apk add dumb-init
WORKDIR /choi
COPY . .
# yarn install
RUN yarn install
EXPOSE 3000
CMD ["dumb-init","yarn","start"]
- Don't forget to open port at Windows Firewall
"choi" is like a no-code app application. you can configure server urls, application behaviors, and call external apis and output custom log.
Below picture shows a sample setting and how to work. Push "Send Request" button to start the process and you can see all results of calling apis and each network latency.
you can export and import setting to use "export" button and "import" button at the top of choi setting page.
An output json file includes all settings and all result.
Using choi, you can test your monitoring tool, verify networkcommunication path and latency to emulate application which has not yet been developed.
- try to call "http://169.254.169.254" which is an Azure Instance Metadata Service(Windows,Linux) in choi to get metadata of your infrastracure.