We have prepared all the elements required to set up a Docker Swarm on the AWS EC2 infrastructure, we have run the scripts required to set up that infrastructure, and we have created the stack file required to deploy Notes to the swarm.
What's required next is to run docker stack deploy from our laptop, to deploy Notes on the swarm. This will give us the chance to test the stack file created earlier. You should still have the Docker context configured for the remote server, making it possible to remotely deploy the stack. However, there are four things to handle first, as follows:
- Install the secrets in the newly deployed swarm.
- Update the svc-notes environment configuration for the IP address of notes-public.
- Update the Twitter application for the IP address of notes-public.
- Log in to the ECR instance.
Let's take care of those things and then deploy the Notes stack.
Preparing to deploy the Notes stack to the swarm
We are ready to...