Book Image

Learning CoreOS

By : Kingston Smiler. S, Shantanu Agrawal
Book Image

Learning CoreOS

By: Kingston Smiler. S, Shantanu Agrawal

Overview of this book

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.
Table of Contents (15 chapters)
Learning CoreOS
Credits
About the Authors
About the Reviewer
www.PacktPub.com
Preface
Index

Running OVS in CoreOS


There are two ways to run or install OVS in a CoreOS environment:

  • Build a CoreOS image with OVS

  • Run OVS inside a Docker container with the –net=host option

As we have already seen in Chapter 1, CoreOS, Yet Another Linux Distro in CoreOS there is no way to install an application. Any service/application should be deployed in a container. So the simple way to run OVS is to run OVS inside a Docker container. Let us see how we can install an OVS docker in CoreOS.

There is already a docker image available with OVS (coreos-ovs). Download this docker image from https://github.com/theojulienne/coreos-ovs github link. Use the following cloud-config to start this container:

#cloud-config

coreos:
  units:
    - name: docker.service
      command: start
      drop-ins:
        - name: 50-custom-bridge.conf
          content: |
            [Service]
            Environment='DOCKER_OPTS=--bip="10.0.11.0/8" --fixed-cidr="10.0.11.0/24"'
    - name: OVS.service
      command: start
...