Friday, 20 February 2015

Quick Introduction to Docker (Part 2)

By Ilanchezhian Ganesamurthy

In part 1, we discussed - Why Docker? In this part, we will understand what is Docker, and when and where to use it, along with other additional information about it.

What is Docker?

Docker is an open-source project and it is a light weight virtualized environment for use in portable and distributed applications. To elaborate more, it is a light weight container environment running on Linux Container (LXC) technology. It helps to create portable deployment across machines, assists to build, deploy and run your application within a container.

Docker provides isolation and security, which allow running many containers on the same host in an isolated environment. It provides the right way to run your application securely and completely, isolated from other applications in the container. Docker runs without extra load on the hypervisor, which makes it very fast and economical.

Docker helps to separate your application from the infrastructure (OS, third party library, middleware, and database) and treat infrastructure as a managed application. Docker Inc. is behind the development of the open source Docker platform.

When can Docker be used?


Docker helps in packaging an application, its dependent third party libraries, middleware, webserver and database into one container. Just as shipping container contains all the shippable goods in one container, in similar fashion, Docker container contains all the application and required external dependencies in one single container. This helps to accomplish portability across machines and achieve objectives as:
  • Run Docker container anywhere in a local datacenter or on cloud. Frictionless move of workload (container) to any infrastructure. Distribute and ship those containers to further development and testing. 
  • The same container utilized on-premise can be moved to Microsoft Azure and later moved to Amazon Web Service (AWS) and other cloud supporting Docker container. Cloud interoperability should be achieved very easily.
  • It can automatically build the container from the source code and dependent infrastructure.
  • Docker helps to maximize resource utilization of the hardware. Compared to 2 or 3 VMs, which can be executed in parallel in a development machine, 10 Docker containers can be executed parallel. In a high end server, more than 100 containers can be executed parallelly without much of a performance problem.
  • Eliminate inconsistency existing between different environments (Dev, Integration, QA, and Production). This helps to minimize bugs due to different configurations existing in different environments.
  • Improve software quality and accelerate software delivery at reduced costs.
Docker is appreciated for:
  • It consumes low CPU / memory overhead when compare to VM.
  • It is extremely fast and inexpensive. It is capable of fast boot / shutdown container. VM takes more minutes to boot (in few instance it takes more time based on the software installed on it), whereas Docker takes only few seconds to boot up. This is extremely useful for distribute computing where you need to start, run, kill in short order.
  • Faster delivery of your application. It deploys code very fast and rapidly reduces shipping pain. It reduces most of the pain point related to committing final tested code in repo and its execution in production. 
  • Docker helps to take two containers and see the difference between them. This helps to version control your container.
  • It versions the container. By doing this, user can identify difference between version, commit new version and rollback and so on. It helps to simulate most of the GIT features. This is very huge advantage when compare to VM.
  • Docker is content agnostic and infrastructure agnostic. It can use to deploy Ruby, Java, Python, PHP and many more language code. It can contain any Linux distros; Database (Oracle / MySQL / PostgreSQL); Webserver / Middleware (Tomcat / Nginx / JBoss / WebLogic) and so on.
Docker strives to accomplish “Build, Ship and Run Any Application, Anywhere” seamlessly and very cost effectively:
  • Build: package your application in a container
  • Ship: move that container from a machine to another
  • Run: execute that container (i.e. your application)
  • Any application: anything that runs on Linux
  • Anywhere: local VM, cloud instance, bare metal
Where can Docker be used?

Organizations are firing in all cylinders to be agile and nimble in today’s competitive environment. Nowadays it is becoming a norm for new age companies to make frequent releases of their existing product. Gone are those days where companies used to make 12 releases per year. Currently, new age companies make 12 releases per day. It is not uncommon to see companies make 30+ releases a day. Organization embraces all process, methodologies, and technologies to realize the moto to be nimble and agile. Docker will play critical role in Continuous Delivery / Deployment of products. Through its containerization technology, it amplifies the software release cycle. This helps organizations to experiment very quickly with their product, prompt customer feedback and based on the feedback, improve, ship and deploy very swiftly (on a daily basis, instead of weekly or monthly release)

In addition to many uses cases, DevOps is one important use case, where Docker makes a huge difference. It helps to address most of the issues faced in DevOps successfully. Through containers, we can capture the entire state of the application and required dependencies easily. This makes the deployment process more efficient, consistent and repeatable across all the environments.

Conclusion

In the past, Agile and Lean methodologies have tremendously impacted software delivery in a positive way. Today, DevOps is playing a significant role. They help organizations and developers to be more efficient and effective in serving customers. From the technology perspective, the container technology (specifically Docker) will play a critical role in the future of software delivery pipeline. They will enable an organization to “accelerate innovation at the speed of business change”.

If you wish to learn more about Docker, you can visit the following sites:

Docker tutorial and documentation from Docker website - https://docs.docker.com

https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-getting-started

http://blog.flux7.com/blogs/docker/docker-tutorial-series-part-1-an-introduction

No comments:

Post a Comment