13 Deploying distributed applications as stacks in Docker Swarm

 

I have a confession--in the last chapter I had you spend a lot of time learning how to create Docker Swarm services with the command line, but you won’t ever do that in a real project. It’s a useful way to get started with orchestration and to understand the difference between running containers yourself and having an orchestrator manage them for you. But in a real system you won’t connect to the manager and send it commands to run services. Instead, you’ll describe your application in a YAML file that you’ll send to the manager; it will then decide what actions to take to get your app running. It’s the same desired state approach that you’ve seen with Docker Compose--the YAML file specifies what you want the end state to be, and the orchestrator looks at what’s currently running and figures out what it needs to do to get to that state.

13.1 Using Docker Compose for production deployments

13.2 Managing app configuration with config objects

13.3 Managing confidential settings with secrets

13.4 Storing data with volumes in the Swarm

13.5 Understanding how the cluster manages stacks

13.6 Lab