Docker Containers: Build and Deploy with Kubernetes, Flannel, Cockpit, and Atomic by Christopher Negus

The book Docker Containers: Build and Deploy with Kubernetes, Flannel, Cockpit, and Atomic by Christopher Negus is an awesome book for those who want to have an introduction to Docker and advanced concepts like Kubernetes. It’s easy to read and concise, one of the best books I’ve read so far and I’ve read many of them about Docker:). Chapters are clear and “short”, with short I mean they are not full of boring information, you’ll start working with containers right away.

It was published at the end of 2015 and still valid of course!, but as usual and inevitable due to the nature of Docker container evolution… some commands (really few) may fail so I’m sharing with you in this post some updates. If you’re reading the book and something doesn’t work as expected this could help. I’m using the O’Reilly Safari version in case it differs from yours.

Chapter 7 – Start a Container to inspect

The following command:

docker run -d -p 8080:8080 --name="fed_web"   \
--restart="on-failure:5"  -w /var/www/html    \
-v /var/www/html:/var/www/html                \
fedora python -m SimpleHTTPServer 8080

Should be changed to:

docker run -d -p 8080:8080 --name="fed_web"   \
--restart="on-failure:5"  -w /var/www/html    \
-v /var/www/html:/var/www/html                \
fedora python3 -u -m http.server 8080

Seems that the latest fedora container is not providing python 2.7 by default and python3 is the only available python. Thanks to the -u with python3 the outputs are not buffered and sent to STDOUT so you can use docker attach, docker logs… More info for that -u option here.

Chapter 7 – Using docker exec to Start a New Process in a Running Container

In recent Fedora versions (23 onwards) it seems that we have to start saying goodbye to yum and say hello to dnf. So to avoid warnings, it’s best to change:

docker exec -it fed_web yum install net-tools -y

With:

docker exec -it fed_web dnf install net-tools -y

Chapter 9 – Mounting sockets

Once again the dnf issue 🙂 It’s best to change:

RUN yum -y update; yum -y install systemd-libs docker; yum clean all

With:

RUN dnf -y update; dnf -y install systemd-libs docker; dnf clean all

To avoid ugly warnings.

Chapter 11 – Summary

As a rule, keep an eye on the amount of disk space available in the /var/log/dockerdirectory,

Should be:

As a rule, keep an eye on the amount of disk space available in the /var/lib/dockerdirectory,

Chapter 16 – Step 2: Set Up Kubernetes Master

The

KUBE_API_ADDRESS="--address=0.0.0.0" 

configuration line for our master server should be

KUBE_API_ADDRESS="--insecure-bind-address=0.0.0.0" as --address

has been deprecated.

The

KUBE_SERVICE_ADDRESSES="--portal_net=10.254.0.0/16" 

configuration line should be 

KUBE_SERVICE_ADDRESSES="--service-cluster-ip-range=10.254.0.0/16"

Cheers!

Advertisements

Puppet 3 Beginner’s Guide by John Arundel – A quick review

puppet_coverI’ve started to learn about Puppet and I’ve found this book in my Safari Books suscription. It has been published recently by Packt and I’ve read it in just a few hours but I’ll surely reread it to be sure that I’ve understood all the concepts :-D.

The book is clear about it’s target audience… it’s a beginner’s guide! and it has been a valuable resource. If you are looking for a more in-depth analysis for Puppet advanced topics, I guess you should try other books and resources, but I surely try to read the same author’s Puppet 2.7 Cookbook

The author provides many examples for each topic covered and it’s very easy to read.  The examples were written using Ubuntu but I had no problem trying them in my CentOS system. I also liked the thoughts shared by the author about his practical experience with system administration and why Puppet is awesome. It also provides a nice and brief introduction about Git and explains how to use it to distribute the manifests to your machines instead of using the centralized approach with Puppetmaster (this topic is not covered by the book).

Sure, you have plenty of information and tutorials about Puppet… but I’m a beginner and I wanted a single book to start learning…. I really liked it!.

OpenNebula 3 Cloud Computing by Giovanni Toraldo – A quick review

Open Nebula documentation is quite clear and is full of great examples so it’ll help you to install your cloud, but you may find useful this book published by Packt: OpenNebula 3 Cloud Computing by Giovanni Toraldo. I read it after installing my Open Nebula (I’m preparing my guide for CentOS and Open Nebula 3.8 ) and it helped me to understand better some Open Nebula concepts.

I read the first six chapters (in my Safari Books subscription) and in my opinion the writer provides a fine step-by-step guide to get your cloud infrastructure running with many different hypervisors and storage options. If you use the book to install Open Nebula and you’re an Ubuntu user you just can copy/paste the apt-get install commands, but don’t worry if you use any other GNU/Linux distributions you’ll only have to find the right packages for your favourite distribution.

As OpenNebula is evolving quickly you’ll find that some commands shown in the book  have different parameters (I think the author used the 3.4 version), but with little effort you will be able to follow the guide for the 3.6 version.