Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Docker for Developers

You're reading from   Docker for Developers Develop and run your application with Docker containers using DevOps tools for continuous delivery

Arrow left icon
Product type Paperback
Published in Sep 2020
Publisher Packt
ISBN-13 9781789536058
Length 468 pages
Edition 1st Edition
Tools
Arrow right icon
Authors (3):
Arrow left icon
Richard Bullington-McGuire Richard Bullington-McGuire
Author Profile Icon Richard Bullington-McGuire
Richard Bullington-McGuire
Michael Schwartz Michael Schwartz
Author Profile Icon Michael Schwartz
Michael Schwartz
Andrew K. Dennis Andrew K. Dennis
Author Profile Icon Andrew K. Dennis
Andrew K. Dennis
Arrow right icon
View More author details
Toc

Table of Contents (21) Chapters Close

Preface 1. Section 1: An Introduction to Docker – Containers and Local Development
2. Chapter 1: Introduction to Docker FREE CHAPTER 3. Chapter 2: Using VirtualBox and Docker Containers for Development 4. Chapter 3: Sharing Containers Using Docker Hub 5. Chapter 4: Composing Systems Using Containers 6. Section 2: Running Docker in Production
7. Chapter 5: Alternatives for Deploying and Running Containers in Production 8. Chapter 6: Deploying Applications with Docker Compose 9. Chapter 7: Continuous Deployment with Jenkins 10. Chapter 8: Deploying Docker Apps to Kubernetes 11. Chapter 9: Cloud-Native Continuous Deployment Using Spinnaker 12. Chapter 10: Monitoring Docker Using Prometheus, Grafana, and Jaeger 13. Chapter 11: Scaling and Load Testing Docker Applications 14. Section 3: Docker Security – Securing Your Containers
15. Chapter 12: Introduction to Container Security 16. Chapter 13: Docker Security Fundamentals and Best Practices 17. Chapter 14: Advanced Docker Security – Secrets, Secret Commands, Tagging, and Labels 18. Chapter 15: Scanning, Monitoring, and Using Third-Party Tools 19. Chapter 16: Conclusion – End of the Road, but not the Journey 20. Other Books You May Enjoy

Using virtualization to economize resource usage

Virtualization is the process of exposing a portion of a physical machine as a logical or virtual machine that acts enough like a real machine that it supports the installation of whole operating systems, their filesystems, and the software that runs on the operating system. For example, a machine with 64 GB of RAM and 4 CPUs could run virtualization software that masquerades as four 16 GB RAM machines with 1 CPU each. This machine could run four instances of Linux.

Virtualization is not a new concept, having been implemented by IBM in the early 1960s. It likely gained in overall popularity during the 1980s when it was used to run MS-DOS, and then Windows by computer systems such as the original Apple Macintosh (Mac) and Unix computers such as the Sun and Silicon Graphics workstations.

Initial virtualization software used what features were available on CPUs of the time, but often simply emulated the instruction set of the x86 on the 68000 family or custom CPUs of the professional Unix workstations. SoftPC was one of the most popular offerings in the 1980s.

SoftPC was quite slow, but the ability to run Windows or MS-DOS applications on a Mac computer allowed the use of these machines in business and education environments. Instead of adding Microsoft Office compatibility to all the programs on the Mac to support exchanging files between Windows/MS-DOS users and Mac users, users could run Microsoft Office.

People saw it in action and saw the value in it. Windows was the dominant operating system for home and business, and to fit in with Windows in the corporate environment, something like SoftPC was needed. The problem with SoftPC is that it was pure software emulation, which was quite slow in actual use. Virtualization is superior to emulation in terms of performance!

Entire companies were founded around providing consumer or business virtualization solutions. VMWare, founded in 1998, was one of the first of these companies.

Innotek developed VirtualBox and released it as open source in 2007, and was then acquired by Sun Microsystems in 2008. Then, Sun was acquired by Oracle in 2010. Parallels, a virtualization solution for Mac, was developed in 2004 and became mainstream in 2006.

The value of virtualization encouraged chip makers to gradually add CPU support for virtualization. With CPU support, an x86-based system could run virtualized machines or software at close enough to native speed to be much more tolerable. This, in turn, led the workstation companies (such as Apple, Sun, and Silicon Graphics) to move to x86 CPUs.  

A key component of virtualization software is the hypervisor. The hypervisor presents the virtual machine to the chosen operating system and then manages the resources and execution of the virtual machines over time. The virtual machines themselves are configurable, at least regarding the amount of RAM, the number of logical CPU cores, graphics card memory, the host operating system disk files to act as virtual disk drives in the virtual machine, the mounting and unmounting of CD-ROM in the virtual CD-ROM drive, and so on. The hypervisor assures that these resources are truly available and that no virtual machine starves the other virtual machines for the host machine's resources.

For the enterprise, the requirements were somewhat different. Instead of providing virtual machines via a general-purpose host operating system such as Linux, the entire operating system itself could be optimized just for being the hypervisor. VMWare offered its Elastic Sky X Integrated (ESXi) operating system in 2004. The University of Cambridge computer laboratory developed the Xen hypervisor in the late 1990s, and the first stable version was released in 2003. Xen was originally the hypervisor used by Amazon for its Elastic Compute Cloud offering, before moving to KVM.

KVM is a virtualization solution supported directly by the Linux kernel. The kernel can act as the hypervisor under KVM. KVM can additionally emulate processors other than the host's native CPU, which is typically x86. This allows KVM to be used to emulate targets such as the Raspberry Pi.

Scaling a dedicated hosted website can be problematic. It's possible to simply upgrade to a larger and more powerful server to handle growing traffic and services. At some point, however, there is no server that is large and powerful! To scale up from that point requires distributing services across multiple servers.  

You have been reading a chapter from
Docker for Developers
Published in: Sep 2020
Publisher: Packt
ISBN-13: 9781789536058
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime