I wish to implement Green-Blue deployment on my server with Java Sprint Boot.
As I understand the script should:
- Detect which version is currently run (Green or Blue).
- Deploy files into another slot
- Replace the port in the config of new app
- Run the app
- Route NGinx to newly used port
- ..testing...
- By admin's request save that this slot is tested and used, kill old slot's instance, update
systemd
startup scripts.
Actually I'm a bit scared of writing such tools for existing production server. Maybe I miss something and Spring Boot already has a feature to do this?