My approach thus far has been to use Ansible to query EC2 for the docker swarm resources and modify them in place, or add to them as necessary. My thought was that this would be portable between upgrade versions, as long as the D4AWS topology did not change significantly between versions.
When updating D4AWS, it will create new EC2 instances for the master/worker nodes; and entirely new volumes (EBS and EFS). D4AWS will attempt to migrate your containers and volumes over… but as I mentioned, it was buggy. EFS data is lost entirely.
Your approach of a second cloudformation template is intriguing though. Have you found that to be portable between upgrades?
This part worked well because the VPC, subnets, security groups did not change between D4AWS updates. All my added AWS resources were still running and able to access new Docker Swarm (and vice versa).
I have a need to modify the load balancer that comes as a part of the default cloudformation template in order to restrict access to our internal company network.
I forgot I did make two small changes to D4AWS resources. I did manually removed the Docker default ELB SG and added my own SGs - only allow CloudFront or my company’s subnets to access the ELB. I had to re-apply that change after the upgrade.
I do agree about D4AWS ease-of-use. I have run into a few Docker Swarm bugs which is why I need to update at some point. I am using CodePipeline to do CICD. CodePipeline is limited in functionality compared to Jenkins, but it was really easy to setup. We have all git updates immediately deploy (if tests successfully) to our test Docker container. The problem with D4AWS 17.12CE is that the new containers do not respond for 10 minutes after an update. Previous two versions of D4AWS, there was no downtime at all. My guess is a mesh routing issue; my Docker experience is too limited to debug further.
WRT robustness… so far so good. But my current production system is a low-traffic WordPress system. The plan is to deploy more systems to AWS, but I will be recommending the ECS or EKS route.