CoreOS in Action
Running Applications on Container Linux
Matt Bailey
  • May 2017
  • ISBN 9781617293740
  • 200 pages
  • printed in black & white

A useful compass to guide you through the complex paths of CoreOS and microservices.

Marco Zuppone, Gemalto SafeNet

CoreOS in Action is a clear tutorial for deploying container-based systems on CoreOS Container Linux.

Table of Contents detailed table of contents

Part 1: Getting to know CoreOS

1. Introduction to the CoreOS family

1.1. Meet CoreOS

1.1.1. The CoreOS Family

1.1.2. etcd and The Distributed Configuration State

1.1.3. fleet and The Distributed Service State

1.1.4. systemd as CoreOS's Init System

1.1.5. Docker and/or rkt, Your Container Runtime

1.1.6. Initial Configuration with cloud-config

1.2. Fitting the core services together

1.2.1. The CoreOS Workflow

1.2.2. Creating your unit files

1.2.3. Service topology and failover

1.3. Summary

2. Getting started on your workstation

2.1. Vagrant setup

2.1.1. Requirements and setup

2.1.2. Up and running with Vagrant

2.1.3. Getting a CoreOS cluster running in Vagrant

2.2. Tooling for interacting with CoreOS

2.2.1. fleetctl & etcdctl (internal & external)

2.2.2. The toolbox container

2.2.3. Limitations of what a Linux admin might be used to

2.3. Summary

3. Expecting Failure: Fault Tolerance in CoreOS

3.1. The Current State Of Monitoring

3.1.1. What is Lacking

3.1.2. What CoreOS Does Differently

3.2. Service Scheduling and Discovery

3.2.1. Production Nginx & Express Deployment

3.2.2. Using etcd for configuration

3.3. Breaking Things

3.3.1. Simulating a machine failure

3.3.2. Self Repair

3.4. Application Architectures and CoreOS

3.4.1. Common Pitfalls

3.4.2. Greenfield & Legacy

3.4.3. Configuration Management

3.5. Summary

Part 2: Application architecture

4. CoreOS in Production

4.1. Planning & Deployment Options

4.1.1. CoreOS on IaaS providers (AWS)

4.1.2. CoreOS on in-house VM infrastructure

4.1.3. CoreOS on bare metal

4.2. Networking considerations

4.2.1. How programmable is your network?

4.2.2. Up and running with flannel

4.3. Where is my mass storage?

4.3.1. Data Systems Background

NASs & Storage Outsourcing

4.3.2. Ceph

4.4. Summary

5. Application Architecture & Workflow

5.1. Your Application & 12 Factor

5.1.1. CoreOS's Approach

5.1.2. The Architecture Checklist

5.2. The Software Development Cycle

5.2.1. Codebase & Dependencies

5.2.2. Environment Logic & Micro-services

5.2.3. The Application Edge

5.3. Summary

6. Web Stack Application Example

6.1. Scope of this Example

6.1.1. What does this app do?

6.1.2. App Architecture Overview

6.1.3. Our Target Environment

6.2. Setting up Persistence Layers

6.2.1. Couchbase Setup

6.2.2. Setting up Memcached

6.3. Application Layer

6.3.1. The Worker

6.3.2. The Web Application

6.4. Where to from here?

6.4.1. Responding to Failure

6.4.2. What is missing?

6.5. Summary

7. Big Data Stack

7.1. Scope of this Example

7.1.1. Adding to the Architecture

7.1.2. New Data Source

7.2. New Stack Components

7.2.1. Twitter Scraper

7.2.2. Orchestrating Couchbase

7.2.3. Startup and Verification

7.2.4. Start your Workers

7.3. Breaking our Stack

7.3.1. Watch the failure

7.3.2. Restore the Machine

7.4. Summary

Part 3: CoreOS in production

8. CoreOS on AWS

8.1. AWS Background

8.1.1. AWS Regions & Uptimes

8.1.2. AWS Services

8.1.3. Chapter Requirements

8.1.4. CloudFormation Template

8.1.5. Cloud-Config in AWS

8.1.6. Deployment

8.2. Summary

9. Bringing it Together: Deployment

9.1. New CloudFormation Objects

9.1.1. Parameter & Output

9.1.2. Lambda

9.1.3. API Gateway

9.1.4. Updating Your Stack

9.2. Deploy the App!

9.2.1. Web Sidekick

9.2.2. Initial Deployment

9.3. Automated Deployment

9.3.1. Docker Hub Setup

9.3.2. Pushing a Change

9.4. Summary

10. System Administration

10.1. Logging and Backups

10.1.1. Logs Setup

10.1.2. Update Cloud-Config

10.1.3. AWSlogs in Units

10.1.4. Viewing Logs

10.1.5. Backing Up Data

10.2. Scaling Systems

10.2.1. Scaling Your Cluster

10.2.2. Scale Partition

10.2.3. Migrating Services

10.3. CoreOS Horizon

10.3.1. New Toys

10.3.2. Rkt

10.4. Summary

About the Technology

Traditional Linux server distributions include every component required for anything you might be hosting, most of which you don't need if you've containerized your apps and services. CoreOS Container Linux is a bare-bones distro with only the essential bits needed to run containers like Docker. Container Linux is a fast, secure base layer for any container-centric distributed application, including microservices. And say goodbye to patch scheduling; when Container Linux needs an update, you just hot-swap the whole OS.

About the book

CoreOS in Action is a clear tutorial for deploying container-based systems on CoreOS Container Linux. Inside, you'll follow along with examples that teach you to set up CoreOS on both private and cloud systems, and to practice common sense monitoring and upgrade techniques with real code. You'll also explore important container-aware application designs, including microservices, web, and Big Data examples with real-world use cases to put your learning into perspective.

What's inside

  • Handling scaling and failures gracefully
  • Container-driven application designs
  • Cloud, on-premises, and hybrid deployment
  • Smart logging and backup practices

About the reader

Written for readers familiar with Linux and the basics of Docker.

About the author

Matt Bailey is currently a technical lead at ZeniMax. He has worked in higher education and with scientific computing, medical, and networking technology companies, as well as a few startups. You can find him online via

combo $44.99 pBook + eBook
eBook $35.99 pdf + ePub + kindle

FREE domestic shipping on three or more pBooks

A very practical introduction with realistic deployment scenarios.

Michael Bright, Hewlett-Packard Enterprise

Great source, carefully crafted...offers compelling, in-depth insight.

Antonis Tsaltas, Huawei Technologies

Everything you need to get started, from the basic building blocks to advanced architectures.

Thomas Peklak, Emakina CEE, Austria