Beginning DevOps with Docker - Joseph Muli - E-Book

Beginning DevOps with Docker E-Book

Joseph Muli

0,0
11,99 €

-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.

Mehr erfahren.
Beschreibung

It can be tough to roll out a pre-configured environment if you don’t know what you’re doing. We’ll show you how to streamline your service options with Docker, so that you can scale in an agile, responsive manner.

Key Features

  • Learn how to structure your own Docker containers
  • Create and manage multiple configuration images
  • Understand how to scale and deploy bespoke environments

Book Description

Making sure that your application runs across different systems as intended is quickly becoming a standard development requirement. With Docker, you can ensure that what you build will behave the way you expect it to, regardless of where it's deployed. By guiding you through Docker from start to finish (from installation, to the Docker Registry, all the way through to working with Docker Swarms), we’ll equip you with the skills you need to migrate your workflow to Docker with complete confidence.

What you will learn

  • Learn to design and build containers for different kinds of applications
  • Create a testing environment to identify issues that may cause production deployments to fail
  • Discover how you can correctly structure and manage a multi-tier environment
  • Run, debug, and experiment with example applications in Docker containers

Who this book is for

This book is ideal for developers, system architects and site reliability engineers (SREs) who wish to adopt a Docker-based workflow for consistency, speed and isolation of system resources within their applications. You’ll need to be comfortable working with the command line.

Joseph Muli is an experienced DevOps engineer. Over the years, he has built deep love for scripting and automation with Python. Currently his main areas of interest are monitoring, logging, and maintenance – the key data reference points in any configurable environment.

Sie lesen das E-Book in den Legimi-Apps auf:

Android
iOS
von Legimi
zertifizierten E-Readern

Seitenzahl: 77

Veröffentlichungsjahr: 2018

Bewertungen
0,0
0
0
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



Table of Contents

Beginning DevOps with Docker
Why subscribe?
PacktPub.com
Contributors
About the author
About the reviewer
Packt is searching for authors like you
Preface
Hardware
Software
Who This Book is for
Conventions
Reader Feedback
Customer Support
Downloading the Example Code
Installation
Errata
Piracy
Questions
1. Images and Containers
Lesson Objectives
Virtualization versus Containerization
How Docker Improves a DevOps Workflow
Recap of the Docker Environment
Basic Docker Terminal Commands
Activity 1 — Utilizing the docker pull Command
Activity 2 — Analyzing the Docker CLI
Dockerfile Syntax
Writing Dockerfiles for Python and JavaScript examples
Python
JavaScript
Activity 3 — Building the Dockerfile
Building Images
docker build
Removing Docker Images
Activity 4 — Utilizing the Docker Image
Running Containers From Images
Python
Versioning Images and Docker Hub
Deploying a Docker Image to Docker Hub
Summary
2. Application Container Management
Lesson Objectives
The docker-compose Tool
Installing docker-compose
Overview of a Multi-Container Application Setup
The Frontend
The Backend
The Database
Using docker-compose
docker-compose first run
Activity 1 — Running WordPress Using docker-compose
The docker-compose file: docker-compose.yml
The docker-compose CLI
Activity 2 — Analyzing the docker- compose CLI
Managing Multiple Containers and Distributed Application Bundles
Improve a Docker Workflow
The Django Compose File Broken Down
Endure Data Using Volumes
Ports
Activity 3 — Running the docker-compose File
Networking with docker-compose
Run the WordPress Containers
Summary
3. Orchestration and Delivery
Lesson Objectives
Orchestration
An Overview of Docker Swarm
Using Docker Engine to Create a Swarm
Creating Docker Machines
Listing Created Machines
Worker Machine Creation
Initializing our Swarm
Connecting to a Machine
Initializing Swarm Mode
Adding Workers to our Swarm
Viewing a Cluster's Status
Activity 1 — Adding Nodes to a Cluster
Managing Services and Applications in a Swarm
Creating a Service
Listing Services
Service Status
How Do We Know Our Site is Running?
Activity 2 — Running Services on a Swarm
Scaling Services Up and Down
Scaling Our Database Service
How Does Swarm Know Where to Schedule a Service?
How Does Swarm Load Balance Requests between Replicas?
Activity 3 — Scaling Services on a Swarm
Summary
Index

Beginning DevOps with Docker

Beginning DevOps with Docker

Copyright © 2018 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, 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.

Acquisition Editor: Koushik Sen

Content Development Editor: Darren Patel

Production Coordinators: Vishal Pawar, Samita Warang

First published: May 2018

Production reference: 1310518

Published by Packt Publishing Ltd.

Livery Place

35 Livery Street

Birmingham B3 2PB, UK.

ISBN 978-1-78953-240-1

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 professionalsLearn better with Skill Plans built especially for youGet a free eBook or video every monthMapt is fully searchableCopy and paste, print, and bookmark content

PacktPub.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.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at <[email protected]> for more details.

At www.PacktPub.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 author

Joseph Muli is a DevOps engineer with three years of experience of extensive innovation and development. He has worked with Python and Bash, building a deep love for scripting and automation. He's currently focusing on monitoring, logging, and maintenance, three key data reference points in any environment.

You can get in touch with him on GitHub: mrmuli or on Twitter: @the_codeartist.

About the reviewer

John Kariuki has been developing software that helps migrate to a scalable microservice architecture for over 11 years now. He founded a start-up straight out of campus and has been a prominent member of the tech community in Nairobi. Outside of programming, John has an interest in writing blog posts and photography.

He's currently placed with First Access, an Andela partner and New York based credit scoring and profiling platform for microlenders in emerging markets.

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.

Preface

DevOps with Docker outlines the power of containerization and the influence this innovation has on development teams and general operations. We also get to understand what DevOps really is, the principles involved, and how the process contributes to product health, by implementing a Docker workflow. Docker is an open source containerization tool that makes it easier to streamline product delivery and reduce the time it takes to get from a whiteboard sketch of the business to a money-back implementation.

The book will provide knowledge of the following:

Docker and DevOps and why and how they integrateWhat containers are, and how to create and manage themScaling a delivery pipeline and multiple deployments with DockerOrchestration and delivery of containerized applications

Lesson 1, Images and Containers, shows how Docker improved a DevOps workflow and the basic Docker terminal commands that will be used in this book. We will learn the Dockerfile syntax in order to build images. We will run containers from images. We will then version images and Docker hub and deploy a Docker image to the Docker hub.

Lesson 2, Application Container Management, explores the docker-compose tool and gives an overview of a multi-container application setup. We will then manage multiple containers and distribute application bundles. Lastly, we will network with docker-compose.

Lesson 3, Orchestration and Delivery, gives us an overview of a Docker Swarm. We will then use the Docker engine to create a Swarm and manage services and applications in a Swarm. Finally, we will scale services up and down to test for a real-world application scenario.

Hardware

This book will require the following minimum hardware requirements:

Processor: 1.8 GHz or higher (Core 2 Duo and above)Memory: Minimum 2GB RAMHard disk: Minimum 10 GBA stable internet connection (for pulling and pushing images)

Software

Operating System: Windows 8 or higherBrowser: Google Chrome or Mozilla Firefox (latest updates installed)Docker installed

Who This Book is for

This book is ideal for developers, system architects, junior and mid-level site reliability engineers who wish to adopt Docker workflow for consistency, speed, and isolation in applications. You need to have a basic knowledge about UNIX concepts such as ssh, ports, and logs as we dive into Docker.

Conventions

In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "Once you have created a new directory, access the directory and create a file called run.js."

Any command-line input or output is written as follows:

docker pull

New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "Clicking the Next button moves you to the next screen."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader Feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of.

To send us general feedback, simply e-mail <[email protected]>, and mention the book's title in the subject of your message.