Quick Recap

Let's review what we have covered in this chapter.

Highlights

Excellent! We have been Docker Machining and Swarming like a boss. We have deployed our application to the cloud providers, creating the infrastructure we needed as we went.

  1. We covered the steps necessary to create a multi-node Swarm cluster on AWS and Digital Ocean.

  2. We deployed our application to the Swarm cluster by making our Docker CLI target the manager node:

    $ eval $(docker-machine env do-manager-1)
    

    and then deploying the application:

    $ docker stack deploy -c docker-stack.yml myapp
    
  3. We used the visualizer to see the placement of containers on our nodes.

  4. We learned about deploy, options that can be specified in our docker-stack.yml file, including placement constraints.

  5. We scaled up the service using both the following command:

    $ docker service scale myapp_web=3
    

    and by specifying the number of replicas for service in our docker-stack.yml:

       service:
          deploy:
             replicas: 2
    

What to expect in the next chapter?

It is sad to say that our Docker adventures (in this course at least) are coming to an end. In the next—and final—chapter, we will draw things to a close, and give you some helpful pointers for continuing your journey with Docker, especially when it comes to deploying to production.

Get hands-on with 1400+ tech skills courses.