Learning CoreOS
eBook - ePub

Learning CoreOS

  1. 190 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

About this book

Your one-stop guide for building, configuring, maintaining, and deploying one of the world's fastest growing OSes

About This Book

  • Understand the features of CoreOS and learn to administrate and secure a CoreOS environment
  • Develop, test, and deploy cloud services and applications more quickly and efficiently inside lightweight containers using CoreOS
  • This is a complete tutorial on CoreOS, which is the preferred OS for cloud computing as it contains components that facilitate cloud management

Who This Book Is For

This book is for cloud or enterprise administrators and application developers who would like to gain knowledge about CoreOS to deploy a cloud application or micro-services on a cluster of cloud servers. It is also aimed at administrators with basic networking experience. You do not need to have any knowledge of CoreOS.

What You Will Learn

  • Understand the benefits of CoreOS as a cloud orchestration platform
  • Learn about lightweight containers and various container frameworks such as Docker and RKT in CoreOS
  • Manage services and containers across cluster using Fleet and systemd
  • Set up a CoreOS environment using Vagrant
  • Create and manage CoreOS clusters
  • Discover the service parameters using etcd
  • Find out about chaining services running on the cluster using Flannel / Rudder and Weave
  • Create a virtual tenant network and service chaining using OVS

In Detail

CoreOS is an open source operating system developed upon the Linux kernel. The rise of CoreOS is directly related to the rise of Docker (a Linux container management system). It is a minimal operating system layer and takes a different approach to automating the deployment of containers. The major difference between CoreOS and other Linux distributions is that CoreOS was designed to deploy hundreds of servers. CoreOS immensely helps the users to create systems, which are easy to scale and manage, making life easier for all, be it developer, QA, or deployer.

This book is all about setting up, deploying, and using CoreOS to manage clusters and clouds. It will help you understand what CoreOS is and its benefits as a cloud orchestration platform. First, we'll show you how to set up a simple CoreOS instance with single node in the cluster and how to run a Docker container inside the CoreOS instance. Next, you'll be introduced to Fleet and systemd, and will deploy and distribute Docker services across different nodes in cluster using Fleet.

Later, you'll be briefed about running services in a cluster with constraints, publishing the services already running on the cluster to new services, and making your services interact with each other. We conclude by teaching you about advanced container networking. By the end of the book, you will know the salient features of CoreOS and will be able to deploy, administrate, and secure a CoreOS environment.

Style and approach

This practical guide covers the basics and advanced topics related to CoreOS and lightweight containers. The topics are covered in an easy-to-follow manner with each feature explained in detail, beginning with a brief overview and followed by an explanation of its corresponding configuration files.

Tools to learn more effectively

Saving Books

Saving Books

Keyword Search

Keyword Search

Annotating Text

Annotating Text

Listen to it instead

Listen to it instead

Information

Learning CoreOS


Table of Contents

Learning CoreOS
Credits
About the Authors
About the Reviewer
www.PacktPub.com
eBooks, discount offers, and more
Why subscribe?
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the color images of this book
Errata
Piracy
Questions
1. CoreOS, Yet Another Linux Distro?
Introduction to CoreOS
CoreOS versus other Linux distributions
CoreOS high-level architecture
Service discovery
etcd
Container management
Linux Container
cgroups
Namespace
Chroot
Docker
Docker versus LXC
Rocket
CoreOS cluster management:
systemd
fleet
CoreOS and OpenStack
Summary
2. Setting Up Your CoreOS Environment
Installing GIT
Installing VirtualBox
Introduction to Vagrant
Installing Vagrant
Vagrant configuration files
Cloud-config
The config.rb configuration file
Starting a CoreOS VM using Vagrant
Setting up CoreOS on VMware vSphere
Installing VMware vSphere Client
Introduction to Docker
Image
Container
Volumes
Links
Installing Docker
Creating a sample Docker image using Docker File
Docker File
Pulling the Docker image from Docker Hub
Running Docker Image
Summary
3. Creating Your CoreOS Cluster and Managing the Cluster
Introduction to clustering
The why and the benefits of clustering
CoreOS clustering
Cluster discovery
Static discovery
etcd discovery
DNS discovery
systemd
Service unit files
Starting and stopping a service
fleet
Architectural overview
Engine
Agent
fleetctl
Standard (local) and global units
Unit file options for fleet
Instantiating the service unit in the cluster
Recovering from node failure
Summary
4. Managing Services with User-Defined Constraints
Introduction to service constraints
Predefined constraints using metadata
Service level affinity/anti-affinity
Node-level affinity
High availability
Summary
5. Discovering Services Running in a Cluster
Introduction and necessity of service discovery
Mechanism for service discovery
Operations of etcd
Operations using etcdctl
etcd write using etcdctl
etcd read using etcdctl
etcd watch using etcdctl
Example of etcd using etcdctl
Operations using cURL
etcd read using curl
etcd write using curl
etcd watch using curl
Example using curl
HAProxy and service discovery
Summary
6. Service Chaining and Networking Across Services
Introduction to and necessity of service chaining
Introduction to Docker networking
Container–Container communication
Docker0 bridge and veth pair
Using Link
Using common network stack
Container to CoreOS host communication
Host networking
docker0 bridge
Container to CoreOS outside world communication
Host networking
Port mapping
Container – Container communication in different CoreOS nodes
Introduction to Weave
Introduction to Flannel/Rudder
Installation
Setting up Weave
Container startup
Integrating Flannel with CoreOS
Summary
7. Creating a Virtual Tenant Network and Service Chaining Using OVS
Introduction to OVS
OVS architectural overview
Advantages of using OVS in CoreOS
Introduction to overlay and underlay networks
Introduction to network virtualization
OpenFlow support in OVS
OpenFlow switch
OpenFlow controller
OpenFlow channel
Running OVS in CoreOS
Attaching docker0 bridge to OVS
Configuration in CoreOS Instance 1
Configurations during the instantiation of a CoreOS node 1 in a cluster
Configurations during the creation of a container for CoreOS Instance 1
Configuration in CoreOS Instance 2
Configurations during the instantiation of CoreOS node 2 in a cluster
Configurations during the creation of a container for CoreOS Instance 2
Attaching container's veth interface to OVS
Configuration in CoreOS Instance 1
Configurations during the instantiation of a CoreOS node in a cluster
Configurations during the creation of the first container for a tenant
Configurations during the creation of subsequent containers for a tenant
Configuration in CoreOS Instance 2
Configurations during the instantiation of a CoreOS node in a cluster
Configurations during the creation of the first container for a tenant
Configurations during the creation of subsequent containers for a tenant
Looping issue
Summary
8. What Next?
Container security
Update and patches – CoreUpdate
Dex
sysdig
Competitive container orchestration mechanism
Kubernetes
Kubernetes master
Kubernetes nodes
Kubernetes pods
Kubernetes service
CoreOS and Kubernetes
Apache-Mesos
Mesos master
Mesos agent
ZooKeeper
Mesos frameworks
Swarm
Docker data volume management
Introduction to Flocker
Flocker control services
Flocker agents
Flocker plugin for Docker
Open Container Project
Summary
Index

Learning CoreOS

Copyright © 2016 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 authors, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be 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.
First publis...

Table of contents

  1. Learning CoreOS

Frequently asked questions

Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription
No, books cannot be downloaded as external files, such as PDFs, for use outside of Perlego. However, you can download books within the Perlego app for offline reading on mobile or tablet. Learn how to download books offline
Perlego offers two plans: Essential and Complete
  • Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
  • Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Both plans are available with monthly, semester, or annual billing cycles.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 990+ topics, we’ve got you covered! Learn about our mission
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more about Read Aloud
Yes! You can use the Perlego app on both iOS and Android devices to read anytime, anywhere — even offline. Perfect for commutes or when you’re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app
Yes, you can access Learning CoreOS by Kingston Smiler. S, Shantanu Agrawal in PDF and/or ePUB format, as well as other popular books in Computer Science & System Administration. We have over one million books available in our catalogue for you to explore.