I have a git repo and local development environment for some Spring Micro-service application. I have a 10 EC2 instance for prod and 5 EC2 instances for test deployment.
For test and prod, we have two different branches of GIT and our plan is that ...
- First, we will develop code and do unit testing in our local.
- We will upload the code in git test brunch and deploy the changes in test EC2 instances
- After the successful test, we will upload the code changes in prod brunch and finally deploy the code prod EC2 instances.
copying the microservice war file in all EC2 instances one by one, for every change, is not a good idea at all I guess. Is there any automated way/service by which I can connect my GIT repo with AWS service, which will compile the code and run build and copy the war file to the specific local in a specific EC2 instance?
That has to be done per project bases, as it is a microservice so,
Procect1 war should go in EC2-1(say one ec2 instance) /home/user/war
Project2 war should go in EC2-2(say another ec2 instance) /home/user/war
something like that.

