Currency Conversion System in AWS, Google Cloud and Azure
- Java 8+
- Eclipse - Recent Version
- Maven
- Git
- Docker desktop
- Kubernetes
- ELB CLI
- Google Cloud Account
- AWS Account
- Azue Account
- Account in hub.docker
- Actual code to deploy (Download the one given by me. It also has needed scripts)
- eksctl
- Once you have a working code.
- Make its image using command >>>> mvn clean install
- Upload the image in the docker (it needs docker account) >>> docker push somesh0905/currency-exchange:0.0.1-RELEASE
- Deploy using kubernetes >>> kubernetes apply -f deployment.yaml
- As per respective clouds the commands will change.
Make Kubernetes Cluster and connect with them
- Create a cluster in the Google cloud (give name and choose features u want in the cluster)
- Connect with the cluster from Local PC console (goto the kubernetes cluster pager -> Select cluster -> Select "connect" option copy the command and run in ur consle.
kubectl set image deployment currency-exchange currency-exchange=somesh0905/currency-exchange:0.0.1-RELEASE
Steps to create image and push to hub.docker.com and deploy in Google Cloud
- Goto The Root directory of the code
- To create image
- Change code and in pom.xml change the version of the code.
- mvn clean install
- docker push <hub.docker.com user id>/: docker push somesh0905/currency-exchange:0.0.1-RELEASE
- kubectl apply -f deployment.yaml
Validate the execution of commands
-
docker images
-
kubectl get all //get the external ip example 35.232.160.148 and port 8080
-
Goto the google Cloud console
-
watch -n 0.1 curl 35.232.160.148:8080/currency-exchange/from/USD/to/INR
watch -n 0.1 curl 35.232.160.148:8080/
For AWS We have used eksctl Dowload that al
Please keep in mind, it takes money to keep running in the cloud (AWS/Azure or Google Cloud)
TIP: As deployment consumes money. Once you have learnt how to deploy please free all deployed resources.