So I have a few server farms running Glassfish/Payara and we are moving off letting developers on the box's for numerous reasons and we want to automate the deployment ..
The WAR file can reside on S3 or an EFS that all servers have access to so trying to think of the best way. The process would simply be they develop on a staging box, confirm things work, then say go live. With Bash and SSH I was able to cycle through the machines but had to put the servers in an array, and just removed from the target group, deployed and added, but we are also moving to more autoscaling groups, and the servers should really be able to be terminated and new ones just start from the launch template, deploy the latest version (as it maybe old), then put in the target group so I won't have the ability to do this in an array.
So, I thought about in bash someway to query where the tag was X, get the IP's and cycle though but that still seems a bit legacy. I have SSM up and in place, so trying to think of what the developers can do when there done, have a WAR file that needs to go to X number of servers and just say go. From there, it goes to server 1, 2, X amount and naturally sequential so they all don't get pulled out at once.
The other thought I used for some basics is code-deploy and have them just commit the WAR file. That would trigger the copy down, using the webhooks we could do a script after to say run this deploy now which I think maybe easier and cleaner all based on tags, etc. The only question I have on this path is that if the group says have 5 servers, 1 fail's and gets terminated, when the group starts a new one from the template, the code would be outdated, so how do I ensure on startup that its the latest codebase.
Thank you for all the help and thoughts in this.
Perfect, exactly what I was needing!