Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Discover millions of ebooks, audiobooks, and so much more with a free trial

From $11.99/month after trial. Cancel anytime.

Docker High Performance: Complete your Docker journey by optimizing your application's work?ows and performance, 2nd Edition
Docker High Performance: Complete your Docker journey by optimizing your application's work?ows and performance, 2nd Edition
Docker High Performance: Complete your Docker journey by optimizing your application's work?ows and performance, 2nd Edition
Ebook272 pages1 hour

Docker High Performance: Complete your Docker journey by optimizing your application's work?ows and performance, 2nd Edition

Rating: 0 out of 5 stars

()

Read preview

About this ebook

Leverage Docker to unlock efficient and rapid container deployments to improve your development workflow




Key Features



  • Reconfigure Docker hosts to create a logging system with the ElasticSearch-Logstash-Kibana (ELK) stack


  • Tackle the challenges of large-scale container deployment with this fast-paced guide


  • Benchmark the performance of your Docker containers using Apache JMeter





Book Description



Docker is an enterprise-grade container platform that allows you to build and deploy your apps. Its portable format lets you run your code right from your desktop workstations to popular cloud computing providers. This comprehensive guide will improve your Docker work?ows and ensure your application's production environment runs smoothly.






This book starts with a refresher on setting up and running Docker and details the basic setup for creating a Docker Swarm cluster. You will then learn how to automate this cluster by using Chef Server and Cookbook. After that, you will run the Docker monitoring system with Prometheus and Grafana, and deploy the ELK stack. You will also learn some tips for optimizing Docker images.






After deploying containers with the help of Jenkins, you will then move on to a tutorial on using Apache JMeter to analyze your application's performance. You will learn how to use Docker Swarm and NGINX to load-balance your application and how common debugging tools in Linux can be used to troubleshoot Docker containers.






By the end of this book, you will be able to integrate all the optimizations that you have learned and put everything into practice in your applications.





What you will learn



  • Automate provisioning and setting up nodes in a Docker Swarm cluster


  • Configure a monitoring system with Prometheus and Grafana


  • Use Apache JMeter to create workloads for benchmarking the performance of Docker containers


  • Understand how to load-balance an application with Docker Swarm and Nginx


  • Deploy strace, tcdump, blktrace, and other Linux debugging tools to troubleshoot containers


  • Integrate Docker optimizations for DevOps, Site Reliability Engineering, CI, and CD





Who this book is for



If you are a software developer with a good understanding of managing Docker services and the Linux file system and are looking for ways to optimize working with Docker containers, then this is the book for you. Developers fascinated with containers and workflow automation with benefit from this book.

LanguageEnglish
Release dateApr 30, 2019
ISBN9781789804409
Docker High Performance: Complete your Docker journey by optimizing your application's work?ows and performance, 2nd Edition

Related to Docker High Performance

Related ebooks

System Administration For You

View More

Related articles

Reviews for Docker High Performance

Rating: 0 out of 5 stars
0 ratings

0 ratings0 reviews

What did you think?

Tap to rate

Review must be at least 10 words

    Book preview

    Docker High Performance - Espinosa Allan

    Docker High Performance, Second Edition

    Docker High Performance

    Second Edition

    Complete your Docker journey by optimizing your application's workflows and performance

    Allan Espinosa

    Russ McKendrick

    BIRMINGHAM - MUMBAI

    Docker High Performance Second Edition

    Copyright © 2019 Packt Publishing

    All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

    Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author(s), nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book.

    Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

    Commissioning Editor: Vijin Boricha

    Acquisition Editor: Aditi Gour

    Content Development Editor: Roshan Kumar

    Technical Editor: Adya Anand

    Copy Editor: Safis Editing

    Project Coordinator: Namrata Swetta

    Proofreader: Safis Editing

    Indexer: Tejal Daruwale Soni

    Graphics: Jisha Chirayil

    Production Coordinator: Jisha Chirayil

    First published: January 2016

    Second edition: April 2019

    Production reference: 1300419

    Published by Packt Publishing Ltd.

    Livery Place

    35 Livery Street

    Birmingham

    B3 2PB, UK.

    ISBN 978-1-78980-721-9

    www.packtpub.com

    mapt.io

    Mapt is an online digital library that gives you full access to over 5,000 books and videos, as well as industry leading tools to help you plan your personal development and advance your career. For more information, please visit our website.

    Why subscribe?

    Spend less time learning and more time coding with practical eBooks and Videos from over 4,000 industry professionals

    Improve your learning with Skill Plans built especially for you

    Get a free eBook or video every month

    Mapt is fully searchable

    Copy and paste, print, and bookmark content

    Packt.com

    Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.packt.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at customercare@packtpub.com for more details.

    At www.packt.com, you can also read a collection of free technical articles, sign up for a range of free newsletters, and receive exclusive discounts and offers on Packt books and eBooks. 

    Contributors

    About the authors

    Allan Espinosa is a DevOps practitioner and an active open source contributor to various distributed system tools, such as Docker and Chef. Allan maintains several Docker images for popular open source software that were popular even before their official release from the upstream open source groups.

    Throughout his career, Allan has worked on large distributed systems containing hundreds to thousands of servers in production. He has built scalable applications on various platforms, ranging from large supercomputing centers to production clusters in the enterprise. He is currently managing distributed systems at scale for Bloomberg, where he oversees the company's Hadoop infrastructure. Allan can be contacted through his Twitter handle, @AllanEspinosa. 

    I would like to thank my wife, Kana, for the continuous support that allowed me to spend significant time with this project.

    Russ McKendrick is an experienced system administrator who has been working in IT and related industries for over 25 years. During his career, he has had varied responsibilities, from looking after an entire IT infrastructure to providing first-line, second-line, and senior support in both client-facing and internal teams for large organizations.

    Russ supports open source systems and tools on public and private clouds at N4Stack, a Node4 company, where he is the practice manager (SRE and DevOps). In his spare time, he has written several books including Mastering Docker, Learn Ansible and Kubernetes for Serverless Applications, all published by Packt Publishing.

    About the reviewer

    Shashikant Bangera is a lead DevOps architect working for a multinational IT service provider. He specializes in architecting automated, efficient delivery pipelines to help build software rapidly and effectively. He has extensive experience with the cloud, containers, and DevOps tools and process. He has worked across a variety of domains, and designed DevOps processes and automation for large-scale projects. He is an open source enthusiast and has multiple projects under his name on GitHub. He has a master's degree from Welingkar University. 

    Packt is searching for authors like you

    If you're interested in becoming an author for Packt, please visit authors.packtpub.com and apply today. We have worked with thousands of developers and tech professionals, just like you, to help them share their insight with the global tech community. You can make a general application, apply for a specific hot topic that we are recruiting an author for, or submit your own idea.

    Table of Contents

    Title Page

    Copyright and Credits

    Docker High Performance Second Edition

    About Packt

    Why subscribe?

    Packt.com

    Contributors

    About the authors

    About the reviewer

    Packt is searching for authors like you

    Preface

    Who this book is for

    What this book covers

    To get the most out of this book

    Download the example code files

    Download the color images

    Conventions used

    Get in touch

    Reviews

    Preparing Docker Hosts

    Preparing a Docker host

    Enabling remote access

    Setting up a certificate authority

    Enabling remote access in Docker Engine

    Connecting remotely from the Docker client

    Building a Docker Swarm cluster

    Summary

    Configuring Docker with Chef

    Importance of configuration management

    Using Chef

    Signing up for a Chef server

    Setting up our workstation

    Bootstrap nodes

    Configuring the Docker host

    Writing Chef recipes

    Push Chef policies

    Initializing Docker Swarm

    Alternative methods

    Summary

    Monitoring Docker

    The importance of monitoring

    Collecting metrics with Prometheus

    Exposing Prometheus's metrics

    Scraping and visualizing metrics

    Consolidating logs in an ELK stack

    Deploying Elasticsearch, Logstash, and Kibana

    Forwarding Docker container logs

    Other monitoring and logging solutions

    Summary

    Optimizing Docker Images

    Reducing deployment time

    Improving image build time

    Using registry mirrors

    Reusing image layers

    Reducing the build context size

    Using caching proxies

    Reducing Docker image size

    Chaining commands

    Separating build and deployment images

    Guide to Optimization

    Summary

    Deploying Containers

    Deploying and configuring Jenkins

    Deploying the Jenkins container

    Finishing the Jenkins Configuration

    Setting up our Docker credentials within Jenkins

    Building and deploying a container

    Preparing our application

    Creating a Jenkins job

    Running the Pipeline

    Summary

    Benchmarking

    Setting up Apache JMeter

    Deploying a sample application

    Installing JMeter

    Building a benchmark workload

    Creating a test plan in JMeter

    Analyzing benchmark results

    Viewing the results of JMeter runs

    Calculating throughput

    Plotting response time

    Observing performance in Grafana and Kibana

    Tuning the benchmark

    Increasing concurrency

    Running distributed tests

    Other benchmarking tools

    Summary

    Load Balancing

    Preparing application backends

    Balancing load with NGINX

    Scaling out our Docker applications

    Deploying with zero downtime

    Other load balancers

    Summary

    Troubleshooting Containers

    Inspecting containers with the docker exec command

    Debugging from outside Docker

    Tracing system calls

    Analyzing network packets

    Observing block devices

    Other container debugging tools

    Summary

    Onto Production

    Performing web operations

    Supporting web applications with Docker

    Deploying applications

    Scaling applications

    Further reading

    Summary

    Other Books You May Enjoy

    Leave a review - let other readers know what you think

    Preface

    Docker is an enterprise-grade container platform that allows you to build and deploy your apps. Its portable format lets you run your code anywhere, from your desktop workstation, to popular cloud computing providers. This book will help you realize the full potential of Docker.

    In this book, you will learn a lot about how Docker works. You will learn the basics of Docker, along with some of the fundamental concepts of web operations. You will gain knowledge of Docker and the relevant operating system concepts to get a deeper understanding of what is happening behind the scenes. You will also learn a lot about the tools to deploy and troubleshoot our Docker containers in production in a scalable and manageable fashion.

    Who this book is for

    If you are a software developer with a good understanding of managing Docker services and the Linux file system, and are looking for ways to optimize working with Docker containers, then this is the book for you. Developers fascinated by containers and workflow automation will also benefit from this book.

    What this book covers

    Chapter 1, Preparing Docker Hosts, helps you familiarize yourself with Docker Engine and how to prepare a Docker host. We will then build a PKI to ensure secure communication between our Docker host and our Docker client workstation. We will also build a small Docker Swarm cluster, consisting of multiple Docker hosts.

    Chapter 2, Configuring Docker with Chef, shows how to automate the configuration of our Docker deployments. We will also use Chef, a piece of configuration management software, to manage Docker hosts in scale.

    Chapter 3, Monitoring Docker, helps us to understand the importance of monitoring and collecting metrics in Prometheus. We will also learn how to consolidate logs in an ELK stack.

    Chapter 4, Optimizing Docker Images, discusses optimizing our Docker images and improving our development workflow. We will also learn to reduce image deployment time and improve image build time.

    Chapter 5, Deploying Containers, looks at how we can use Jenkins to build, distribute, and deploy our containerized application. We will also learn to build and deploy a simple application using a three-stage pipeline.

    Chapter 6, Benchmarking, helps us create benchmarks to gauge the performance of our Docker application.

    Chapter 7, Load Balancing, talks about how to scale out our Docker applications to increase our capacity. We will use load balancers, which are a key component in the architecture of various web scale applications. We will also learn to balance load with NGINX.

    Chapter 8, Troubleshooting Containers, inspects containers with Docker exec, and help us understand what debugging is, along with other container debugging tools.

    Chapter 9, Onto Production, wraps up the book by teaching us how to perform web operations. We will also learn to deploy and scale our applications.

    To get the most out of this book

    A Linux workstation with a recent

    Enjoying the preview?
    Page 1 of 1