Linux Containers and Virtualization


Book Description

Get a novel perspective on Linux containers and understand the world of virtualization. This book takes you down the rabbit hole to discover what lies below the API. You’ll go on a journey of virtualization and see how containers are realized in the Linux world. Linux Containers and Virtualization details the data structures within the Linux kernel which make up Linux containers. You will start with the fundamentals of virtualization including how different resources such as memory, CPU, network, and storage are virtualized. Then you will move on to hypervisors and virtualization using the Kernel virtual Machine (KVM) and Quick Emulator (QEMU). Next, you will learn about Linux namespace, cgroups, and layered file systems, which are the essential building blocks of Linux containers. The explanation traverses the Linux kernel codebase to show how these are realized in the Linux kernel. In the final chapter, you will code your own container by applying the concepts learnt in the previous chapters. On completion of the book, you will have the knowledge to start coding a Linux container. What You Will Learn Understand the basics of virtualization Discover how the Linux kernel supports virtualization See how the evolution of the Linux kernel and CPUs led to the creation of containerization technologies Develop the ability to create your own container framework Who This Book Is For Developers working on virtualized software deployment and containers. Architects designing platforms based on a container runtime as well as DevOps professionals who want to get a microscopic view on how containers and virtualization work would find the book useful.




Practical LXC and LXD


Book Description

Use Linux containers as an alternative virtualization technique to virtualize your operating system environment. This book will cover LXC’s unmatched flexibility with virtualization and LXD’s smooth user experience. Practical LXC and LXD begins by introducing you to Linux containers (LXC and LXD). You will then go through use cases based on LXC and LXD. Next, you will see the internal workings of LXC and LXD by considering the repositories and templates used. You will then learn how to integrate LXC and LXD with common virtualization and orchestration tools such as libvirt and SaltStack. Finally, you will dive into containerization and security. The book will explore some of the common problems in security and provide a case study on how containerization can help mitigate some of the operating system-level security issues in an IoT environment. What You Will Learn Get an introduction to Linux containers Discover the basics of LXC and LXD See use cases that can be solved with LXC and LXD – for developers, devops, and system administrators Master LXC and LXD repositories Use LXC and LXD with common virtualization and orchestration tools Consider a containerization and security in IoT case study Who This Book Is For The audience for this book should have basic knowledge of Linux and software development in general. The intended readership is primarily software developers, operations engineers, and system administrators who are interested in devops, though managers and enthusiasts will also benefit from this book.




Linux Containers and Virtualization


Book Description

This book is a practical, comprehensive guide to creating secure and efficient Linux containers using the Rust programming language. It utilizes a hands-on approach to teach Rust's programming constructs, security features, and its application in containerization. Author Shashank Mohan Jain starts with a gentle introduction to Rust to help you grasp the language's core concepts, syntax, and unique memory safety guarantees. He then transitions into the realm of Linux container development, where Rust shines as a robust and secure language for building containerized applications. Through hands-on examples, you will gain a deep understanding of how to harness Rust's features to create lightweight and secure Linux containers and how to leverage its strong type system and ownership model to eliminate common bugs and ensure memory safety in containerized applications. As you progress, you’ll explore the intricacies of working with system resources, networking, and interacting with the host operating system while maintaining isolation and security within the containers, as well as how Rust's concurrency model can build performant and responsive containerized applications. The book also covers advanced topics such as secure configuration handling, logging, and handling authentication within your containerized environment. After completing this book, you will be well-versed in Rust programming, equipped to create efficient and secure Linux containers, and confident in your ability to develop containerized applications for a variety of use cases. What You Will Learn Understand the basics of the Rust programming language Understand Rust's security features Create Linux constructs like namespaces in Rust Develop your own container runtime using Rust Who This Book Is For Developers, Architects and SREs working with cloud applications and dealing with container based workloads.




The Docker Book


Book Description

Updated for Docker Community Edition v18.09! Docker book designed for SysAdmins, SREs, Operations staff, Developers and DevOps who are interested in deploying the open source container service Docker. In this book, we'll walk you through installing, deploying, managing, and extending Docker. We're going to do that by first introducing you to the basics of Docker and its components. Then we'll start to use Docker to build containers and services to perform a variety of tasks. We're going to take you through the development lifecycle, from testing to production, and see where Docker fits in and how it can make your life easier. We'll make use of Docker to build test environments for new projects, demonstrate how to integrate Docker with continuous integration workflow, and then how to build application services and platforms. Finally, we'll show you how to use Docker's API and how to extend Docker yourself. We'll teach you how to: * Install Docker. * Take your first steps with a Docker container. * Build Docker images. * Manage and share Docker images. * Run and manage more complex Docker containers. * Deploy Docker containers as part of your testing pipeline. * Build multi-container applications and environments. * Learn about orchestration using Compose and Swarm for the orchestration of Docker containers and Consul for service discovery. * Explore the Docker API. * Getting Help and Extending Docker.




Containerization with LXC


Book Description

Get acquainted with the world of LXC About This Book Get the most practical and up-to-date resource on LXC and take full advantage of what Linux containers can offer in the day-to-day operations of large-scale applications Learn how to deploy and administer various workloads such as web applications inside LXC Save your organization time and money by building robust and secure containers and by speeding the deployment process of your software Who This Book Is For This book is for Linux engineers and software developers who are looking to deploy applications in a fast, secure, and scalable way for use in testing and production. What You Will Learn Deep dive into the foundations of Linux containers with kernel namespaces and cgroups Install, configure, and administer Linux containers with LXC and libvirt Begin writing applications using Python libvirt bindings Take an in-depth look at container networking Set up monitoring and security with LXC Build and deploy a highly available application with LXC in the cloud In Detail In recent years, containers have gained wide adoption by businesses running a variety of application loads. This became possible largely due to the advent of kernel namespaces and better resource management with control groups (cgroups). Linux containers (LXC) are a direct implementation of those kernel features that provide operating system level virtualization without the overhead of a hypervisor layer. This book starts by introducing the foundational concepts behind the implementation of LXC, then moves into the practical aspects of installing and configuring LXC containers. Moving on, you will explore container networking, security, and backups. You will also learn how to deploy LXC with technologies like Open Stack and Vagrant. By the end of the book, you will have a solid grasp of how LXC is implemented and how to run production applications in a highly available and scalable way. Style and approach A practical guide that introduces the core technologies behind Linux containers and provides a deep dive into installation, configuration, and operations of LXC.




Teach Yourself Linux Virtualization and High Availability


Book Description

High availability server virtualization currently powers the vast majority of public-facing compute deployments and Linux lies at the heart of nearly all of them. If you aren't already engaged in a virtualized project that touches some kind of Linux technology, you probably will be soon. What are you doing to build your skills to meet the future? The Linux Professional Institute's LPIC-3 304 certification expectations are an excellent, vendor neutral introduction to Linux server virtualization and cluster management. Even if you don't have plans to take the exam and earn the certification itself right now, using the 304 as a curriculum guide is a smart move. And, one way or another, this book is a great primary resource.




Using Docker


Book Description

Docker containers offer simpler, faster, and more robust methods for developing, distributing, and running software than previously available. With this hands-on guide, you’ll learn why containers are so important, what you’ll gain by adopting Docker, and how to make it part of your development process. Ideal for developers, operations engineers, and system administrators—especially those keen to embrace a DevOps approach—Using Docker will take you from Docker and container basics to running dozens of containers on a multi-host system with networking and scheduling. The core of the book walks you through the steps needed to develop, test, and deploy a web application with Docker. Get started with Docker by building and deploying a simple web application Use Continuous Deployment techniques to push your application to production multiple times a day Learn various options and techniques for logging and monitoring multiple containers Examine networking and service discovery: how do containers find each other and how do you connect them? Orchestrate and cluster containers to address load-balancing, scaling, failover, and scheduling Secure your system by following the principles of defense-in-depth and least privilege







Docker on Windows


Book Description

Learn how to run new and old Windows applications in Docker containers. About This Book Package traditional .NET Frameworks apps and new .NET Core apps as Docker images, and run them in containers for increased efficiency, portability, and security Design and implement distributed applications that run across connected containers, using enterprise-grade open source software from public Docker images Build a full Continuous Deployment pipeline for a .NET Framework application, and deploy it to a highly-available Docker swarm running in the cloud Who This Book Is For If you want to modernize an old monolithic application without rewriting it, smooth the deployment to production, or move to DevOps or the cloud, then Docker is the enabler for you. This book gives you a solid grounding in Docker so you can confidently approach all of these scenarios. What You Will Learn Comprehend key Docker concepts: images, containers, registries, and swarms Run Docker on Windows 10, Windows Server 2016, and in the cloud Deploy and monitor distributed solutions across multiple Docker containers Run containers with high availability and fail-over with Docker Swarm Master security in-depth with the Docker platform, making your apps more secure Build a Continuous Deployment pipeline by running Jenkins in Docker Debug applications running in Docker containers using Visual Studio Plan the adoption of Docker in your own organization In Detail Docker is a platform for running server applications in lightweight units called containers. You can run Docker on Windows Server 2016 and Windows 10, and run your existing apps in containers to get significant improvements in efficiency, security, and portability. This book teaches you all you need to know about Docker on Windows, from 101 to deploying highly-available workloads in production. This book takes you on a Docker journey, starting with the key concepts and simple examples of how to run .NET Framework and .NET Core apps in Windows Docker containers. Then it moves on to more complex examples—using Docker to modernize the architecture and development of traditional ASP.NET and SQL Server apps. The examples show you how to break up monoliths into distributed apps and deploy them to a clustered environment in the cloud, using the exact same artifacts you use to run them locally. To help you move confidently to production, it then explains Docker security, and the management and support options. The book finishes with guidance on getting started with Docker in your own projects, together with some real-world case studies for Docker implementations, from small-scale on-premises apps to very large-scale apps running on Azure. Style and approach Using a step-by-step approach, this book shows you how to use Docker on Windows. It includes practical examples and real-world technical and business scenarios that will help you effectively implement Docker in your environment.There are over 50 examples of Dockerized applications, using C# .NET projects as the source and packaging them into Docker images.




Linux in Action


Book Description

Summary Linux in Action is a task-based tutorial that will give you the skills and deep understanding you need to administer a Linux-based system. This hands-on book guides you through 12 real-world projects so you can practice as you learn. Each chapter ends with a review of best practices, new terms, and exercises. Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications. About the Technology You can't learn anything without getting your hands dirty including Linux. Skills like securing files, folders, and servers, safely installing patches and applications, and managing a network are required for any serious user, including developers, administrators, and DevOps professionals. With this hands-on tutorial, you'll roll up your sleeves and learn Linux project by project. About the Book Linux in Action guides you through 12 real-world projects, including automating a backup-and-restore system, setting up a private Dropbox-style file cloud, and building your own MediaWiki server. You'll try out interesting examples as you lock in core practices like virtualization, disaster recovery, security, backup, DevOps, and system troubleshooting. Each chapter ends with a review of best practices, new terms, and exercises. What's inside Setting up a safe Linux environment Managing secure remote connectivity Building a system recovery device Patching and upgrading your system About the Reader No prior Linux admin experience is required. About the Author David Clinton is a certified Linux Server Professional, seasoned instructor, and author of Manning's bestselling Learn Amazon Web Services in a Month of Lunches. Table of Contents Welcome to Linux Linux virtualization: Building a Linux working environment Remote connectivity: Safely accessing networked machines Archive management: Backing up or copying entire file systems Automated administration: Configuring automated offsite backups Emergency tools: Building a system recovery device Web servers: Building a MediaWiki server Networked file sharing: Building a Nextcloud file-sharing server Securing your web server Securing network connections: Creating a VPN or DMZ System monitoring: Working with log files Sharing data over a private network Troubleshooting system performance issues Troubleshooting network issues Troubleshooting peripheral devices DevOps tools: Deploying a scripted server environment using Ansible