How it works...

In this recipe, we created two new services. One was a database to store the information for the other web service. We used secrets to protect our passwords, and we used those secrets instead of hardcoding our passwords in the image, or passing them in as environmental variables.

We also created a custom overlay network for our application, so that the two services could talk to each other across the cluster and that traffic was encrypted by default, which means that all communications between our two services is secure.

Docker for AWS has a service that listens for new services that get added to the Swarm and, when a new service has ports exposed, it will automatically configure the external load balancer to accept traffic for that service. When someone hits the load balancer, it will send the traffic to one of the Swarm managers, and then the Swarm will route the traffic to the correct host and container.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.219.141.208