A web application, written in NodeJS to upload, parse and process CSV files and store in S3 Bucket.
- Cloning the repo
$ git clone https://github.com/danishbacker/atg-test-01
- Installing dependencies
$ npm install
- Building an image
$ docker login
$ docker build -t danishbacker/atg-test-01:prod .
- Running containers
$ docker run -it -p 49162:3000 -d danishbacker/atg-test-01:prod
- Push build to dockerhub
$ docker push danishbacker/atg-test-01:prod
- Stop all containers
$ docker stop $(docker ps -a -q)
- Building an image
$ docker-compose build
- Running containers
$ docker-compose up
- Stopping containers
$ docker-compose down
- Starting minikube with hyperkit (recommened for mac)
$ minikube start --vm-driver=hyperkit
- Apply
$ minikube start --vm-driver=hyperkit
- Create or update Deployment and Serivce on Kubernetes
$ kubectl apply -f k8s
- Update Deployment or Serivce individually
$ kubectl apply -f k8s/service.yml
- Check deployment and services
$ kubectl get services
$ kubectl get delpoyments
$ kubectl get pods
- Start minikube dashboard
$ minikube dashboard
- Open application in browser
$ minikube service atg-test-01
- Delete minikube
$ minikube stop
$ minikube delete
- Test application scaling using Apache Benchmark (Note: installed by default in mac).
$ kubectl get hpa
$ ab -c 5 -n 100 -t 1000 http://<cluster-ip-addresss>:30003/
Home page
File Upload
Parse and store in S3 bucket
Bucket Policy overview
Bucket Policy details