Create, modify, and run your own PaaS with modularized containers using DockerAbout This BookBuild your own PaaS using the much-appreciated software Docker.Isolate services in containers to have a fully modularized and portable system.Step-by-step tutorials that take you through the process of creating your own PaaS.Who This Book Is ForThis book is intended for those who want to take full advantage of separating services into module containers and connect them to form a complete platform. It will give you all the insights and knowledge needed to run your own PaaS.
What You Will LearnCreate your own custom Docker images to fit your needsHost your Docker repositories on GitHub and publicly publish them on Docker Registry HubSeparate data from services using data volume containersInstall Docker on any platform including Amazon EC 2Pass parameters to your containers when they start, to load different configurationsExport and back up data from shared data volume containersReverse proxy traffic to the right container using NginxIn DetailDocker is a great tool in many ways for developers and people in DevOps.
We begin by learning how easy it is to create and publish your own customized Docker images and making them available to everyone. We also see how practical it is to separate every service to its own container. When you have published separated service containers, the process of running all kinds of platforms in the same server is a walk in the park.
This book walks you through a use case project that will teach you how to customize and create your own Docker image, allowing you to run any platform you want. The project evolves throughout the book and emerges as a complete three containers Wordpress/MySQL platform when finished.
By the end of the book, you will know how to create such a container on a Wordpress/MySQL platform, among others.
Containerization is all the hype in 2015 and so I decided to dive into the specifics by migrating a LAMP stack to Docker. This book is one of the few sources that covered most - but not all - of my questions in the process.
Build your own PaaS with Docker is a rather short (~120 pages) introduction for developers and sysadmins new to containerized deployments. One of the most important aspects for me was the discussion of how to let containers communicate between each other - the way a webserver and a database container are used in the book.
What does the book cover?
Chapter 1 is a general introduction to the topic and it covers a trivial hello world example. I must admit I was only able to appreciate the things it taught me when I re-read it after having understood Docker better. I skipped the installation instructions as that isn't too complicated by itself.
Chapter 2 is about the fundamental aspects of Docker: images, containers, and the CLI commands. In the third chapter a new image running Wordpress is created, stepping through the creation of a Dockerfile. Chapter 4 on data containers was a little hard for me to understand as it is. I am still not 100% sure on how to come up with an architecture where to run app containers and which data containers I should define and how a best-practice backup routine would look like. In chapter 5 containers are connected. This also (briefly) introduces Compose. Using a reverse proxy is covered in chapter 6 and discusses both nginx and haproxy. Finally, chapter 7 goes into the details of how to deploy applications. Unfortunately it does not cover performing updates (e.g. using the concept of immutable servers), which I needed to figure out myself. I do not consider chapter 8 to be on the same level as the others, it merely introduces the concept of 12-factor-apps and gives an overview of the (quickly changing) tool landscape for Docker.
Overall I am satisfied with the book, it gave me much better insight and understanding of fundamental Docker techniques. I guess a single book (especially with just 120 pages) is capable of covering all areas. As such I give it four stars because it is very hands-on and useful to go into practice with a dockerized LAMP stack.
Highlights
For the the example was extremely real-world oriented and I was able to set up my own LAMP stack consisting of dedicated containers per component. The writing is straight-forward and includes the essentials needed to understand what and how to do it.
Lowlights
There are very few conceptual graphics explaining Docker throughout the book. I would have liked to see more - such as how images and containers are related or how connected containers communicate. Only in chapter 6 some of those conceptual images are present, the rest are screenshots.
This book is short, and though very useful, doesn't have the best ramp-up into Docker of the books out there. It's great if you come into it already established in dev-ops and have an intermediate level skill set in server administration and network maintenance, but not the best starter for you if not. I think its fair to dock it a little on that shortcoming because neither the packt-pub official page, the book's preface, and first chapter outline the prerequisite skill set of the intended reader. Because it's marked as a "Learning" level of difficulty and because the "who this is for" is very brief and mentions only a generally interested reader (the preface appends on "developers" as the target audience, even though the book is full of mostly wordpress related docker examples), a developer without any server/networking administration background (or one that is 10+ years old), will find themselves referring to external sources to fill in the knowledge gaps needed to approach this "Learning" level book. That was the only thing keeping it five-star worthy, in my opinion, as the book was still excellent.
The author outlines several tutorials for getting yourself set up with these technologies, and has a coherent tone that's easy to follow. Again, though basic familiarity with dev ops and networking/server administration is assumed, the walk-throughs are great for those of us new to Docker. He covers setups through not only Docker, but Amazon Web Services and publishing to GitHub. I feel this book is very useful because it helps you understand the whole Docker ecosystem and the additional tools that are its dependencies, without assuming prior knowledge. He tours you through basic usage of these tools and some of the most useful command-line switches, and even describes many ancillary software tools and add-ons, helping you to understand how rich the whole ecosystem is.
Overall it was a great read and is full of useful references that I've referred back to several times, as it contains some of the most straightforward walk-throughs of setup and usage of docker-related tools.
Build Your Own PaaS with Docker is short and kinda concise, but hard to comprehend at times.
Chapters-wise, the first 4 chapters are introductory and mostly boring unfortunately. They can be easily skipped by reading the Docker docs which IMO were much easier to follow through and understand.
At chapters 3 and 4 the author tried to crunch as most info as possible on the given topic, which only tires the reader and makes it harder to understand. Chapter 4 especially is the hardest to follow. Important Docker functionality as Data volumes and exposing them is only in paragraphs of text. Visuals would've made it much easier to understand.
Chapter 5 is a an intro to Docker Compose and Crane. Props to Oskar Hane for giving them each 1 section and providing the reader with enough info to understand the basics of both tools.
"Chapter 6 Reverse Proxy Requests" hits the interesting parts of Docker. Again, Oskar Hane chose a good approach on the subject. Enough diagrams and a problem then solution approach to introduce the information, really makes it easy to understand even though it's one of the more complex things to do with Docker. Also good choice of tools - HAProxy and Nginx, and giving them each 1 section. Again it makes it really easy for the reader to understand.
Chapter 7 and 8 are the mandatory Deployment and What's Next chapters. Not much to say there. Standard stuff.
Overall, Author Oskar Hane provides a lot (literally on every chapter) terminal screenshots that should help the reader navigate around the docker commands. However the terminal screenshots are not that helpful compared to 2-3 diagrams on how the containers operate at the given moment with the given Dockerfile. There are no diagrams until "Chapter 6 Reverse Proxy".
The hard to start, easy to understand later problem in this book is what makes me give it 3/5. Sure, it gets ~3 chapters right, but the mandatory ones that need to help you understand Docker are lacking. If I want to read a book about Docker, I would expect from it to keep me inside its domain and not read most of the Docker docs to understand it cause the book didn't help me.
Concise and useful but does not go deep into anything, would be considered an average overview of docker and how it could be used a minimal scale. good introductory book to docker and it's use cases.