Friday, August 31, 2018

'Learn Docker - Fundamentals of Docker 18.x' Book Review

What is Docker?

In the previous blog we looked at Docker/Containers at a high level and also compared VirtualBox with Dockers. VirtualBox and others like Xen, KVM, HyperV provide hardware level virtualization while Dockers/Containers provide OS level virtualization. Because of which Docker/Containers are lightweight.

Below is the virtualization using VirtualBox. As noticed multiple OS kernels which provides the application level isolation run on the same hardware making it heavy and also inefficient.


Here is the application level isolation provided by containers. As noticed the OS kernel is only run once for all the applications. This makes it efficient.


How to install Docker?

Docker can be installed/run on Windows, Mac and Linux. As I had been using Ubuntu as my primary OS, I followed the instructions for Linux. There is much more easier way to try Docker without any installation with all in a browser by using Play with Docker, every thing runs in the Cloud. It uses a concept called Docker in Docker (DID). All we need to do is to create an account with Docker and get started for free. Here we can try Docker on a single node or on a cluster of 5 nodes. Play with Docker is for the sake of learning, prototyping, demos and not for production purpose.

Review of Learn Docker Book

To explore more into Dockers, recently I completed reading the Learn Docker - Fundamentals of Docker 18.x and would be reviewing the book here.

  • The book starts with a light note on containers, ecosystem and then deep dives into Docker. The good think  about the book it is that it slowly increases the complexity towards the end of the book, this makes it easy for those who don't know what Docker is all about.
  • The book has equal emphasis on theory and practice. As soon as a concept is discussed immediately the complete example code and how to execute the same wherever appropriate is given. Once Docker has been installed, the examples can be tried out. Most of the cases the code can be executed as-is.
  • The book doesn't end at Docker, but also explains about container orchestration. There is in fact a few chapters on the inbuilt Docker orchestration layer Swarm and also on the latest Kubernetes again with examples. There are also few chapters on Dockers and orchestration in the Cloud.
  • It's not just about development against Docker, but also about making it production ready. There are a few sections on Security, Load Balancing, Blue-Green/Canary deployment, Secrets to name a few.
  • At the end of each chapter, there is a section for further reading to explore further. Also, included is a small quiz with answers.

Conclusion

I would definitely recommend Learn Docker - Fundamentals of Docker 18.x for anyone who is trying to get started with Docker. As mentioned Docker can be installed on Windows, Mac and Linux. If we don't want to install Docker, then Docker can be tried for free at PWD (https://labs.play-with-docker.com/).

Wednesday, August 1, 2018

Upgrading from Ubuntu 16.04 (Xenial Xerus) to 18.04 (Bionic Beaver)

I had been using Ubuntu for quite a few years and lately had been using Ubuntu 16.04 along with Windows 10 as dual boot on my Lenovo Z510. Ubuntu for pretty much everything and Windows for any software which is not compatible with Ubuntu. This has been a deadly combination which worked for me pretty well.

Why the upgrade in Ubuntu?

In Ubuntu 16.04 pretty much everything was working well, except the suspend and hibernate. The system was not able to resume from suspend every time. The only option left was to shutdown and restart the computer along with all the applications, which is not really nice.

Checking the different Ubuntu forums and trying out different suggested solutions didn't fix the problem. So, finally decided to upgrade Ubuntu to the latest version. There is a probability that the upgrade process got messed up and the data is lost. My data is backed up automatically to the different Clouds, so this was not an issue.

Ubuntu released 18.04 in April, a few months back. But, upgrade process from 16.04 (Xenial Xerus) to 18.04 (Bionic Beaver) is not recommended. Upgradation to the point release 18.04.1 is the safest approach. It gives Canonical time to fix the bugs and make the transition smoother.

So, as soon as 18.04.1 announced, I took a shot and upgraded to Ubuntu 18.04.1 by following the instructions mentioned here.

How was the Ubuntu upgradation?

During the initial days of Ubuntu, upgradation from one version to another messed up the Operating System, but it was really smooth this time. Here I am with the latest Ubuntu after a reboot.

Ubuntu 18.04 (Bionic Beaver) Desktop

The download and installation process took about 2 hours with a good number of prompts in between. Wish there was a 'Yes to all' option during the process which would have made the installation process unattended.

Was everything smooth after the upgradation?

Usually any software upgrade will have some major/minor issues which will get fixed overtime, same is the case with Ubuntu. Here is a list of some issues to start with. I am sure to update the list the more I use the latest Ubuntu and also with the possible solutions if any.

  • Ubuntu was using Unity UI and moved to GNOME, so it takes some time to get used to the new UI. But, my initial impressions are good with GNOME.

  • I had been using Phatch to batch mark the images on this blog, but it has been removed from the Ubuntu repository. Quick Googling around gave Converseen as an alternative which I am yet to try.

  • Right click on the mouse stopped working and has been replaced with two-finger click. There were a couple of solutions and quick try of some of them didn't work. Again it will take some time to get used to the two-finger click.

  • The good thing is that suspend start working and I was able to resume where I stopped. This basically increased the productivity and the focus. When I used the Nvidia display driver instead of the default open source Nouveau display driver, the suspend functionality broke and I had to revert to the Nouveau display driver.

  • Should I upgrade?

    If Canonical is supporting the Ubuntu version which you had been using for the next few years and there is no hard pressing issue like suspend in my case then I would recommend to stick to the current OS. Again, if you want to try the latest technology like me, then go ahead with the upgrade.