The deployment

Spring Boot provides the ability to run and distribute your Spring application as a simple JAR and is a wonderful success in that regard.

It is, without a doubt, a step in the right direction, but sometimes your web application isn't the only thing you want to deploy.

When dealing with a complex system with multiple servers and datasources, the work of the operation team can become quite a headache.

Docker

Who hasn't heard about Docker? It is the new cool kid in the container world and has become quite a success, thanks to its vibrant community.

The ideas behind Docker are not new, it leverages LinuX Containers (LXC) and cgroups to provide a fully isolated environment for applications to run in.

You can find a tutorial on the Spring website that will guide you through your first steps with Docker at https://spring.io/guides/gs/spring-boot-docker.

Pivotal Cloud Foundry has been using container technology for years in their container manager called Warden. They recently moved to Garden, an abstraction that supports not only Linux containers, but also Windows containers.

Garden is part of the latest release of Cloud Foundry (called Diego) that also allows Docker images as units of deployment.

A developer version of Cloud Foundry has also been released under the name Lattice, which can be found at https://spring.io/blog/2015/04/06/lattice-and-spring-cloud-resilient-sub-structure-for-your-cloud-native-spring-applications.

If you want to test containers without the hassles of the command line, I recommend that you look at Kitematic. With this, you can run a Jenkins container or a MongoDB without installing the binaries on your system. Visit https://kitematic.com/ for more information on Kitematic.

Another tool in the Docker ecosystem that's worth mentioning is Docker Compose. It allows you to run and link multiple containers with a single configuration file.

Refer to http://java.dzone.com/articles/spring-session-demonstration for a good example of a Spring Boot application composed of two web servers, a Redis to store users' sessions, and an Nginx instance to do the load balancing. Of course, there is much more to learn about Docker Swarm, which will allow you to scale your application with a simple command, and Docker Machine, which will create Docker hosts for you on any machine, including Cloud providers.

Google Kurbernetes and Apache Mesos are also great examples of distributed systems that benefit greatly from Docker containers.

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

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