Open research

In the spirit of free and open source software the central topic of this site is to make my research open to the public. My methodology is freely available via the internet, along with any data or results extracted or derived from them. This permits collaboration, which anyone may participate at any level of the project. So feel free to contribute on Github.

Homepage » CoreOS Linux for Massive Server Deployment

CoreOS

CoreOS is designed to be a modern, minimal base to build your platform. Consumes 40% less RAM on boot than an average Linux installation.

CoreOS runs on most cloud providers e.g. EC2, Rackspace, Google Compute Engine or virtualization platforms e.g. Vagrant, VMware, OpenStack, QEMU, KVM as well as bare metal servers e.g. PXE, iPXE, ISO, Installer.

Definition

Omaha Protocol

Core Components

Containers

Services

cloud-config

cloudinit

systemd

etcd

etcd is a highly available key value store for shared configuration, service discovery, & distributed locking. It ships on every CoreOS instance.

Locksmith

fleet

fleet scheduler

Examples

More configuration parameters, etcd documentation

#cloud-config

coreos:
  etcd:
    name: node001
    # generate a new token for each unique cluster from https://discovery.etcd.io/new
    discovery: https://discovery.etcd.io/<token>
    # multi-region and multi-cloud deployments need to use 	$public_ipv4
    addr: $public_ipv4:4001
    peer-addr: $private_ipv4:7001

…will generate a systemd unit drop-in like this:

[Service]
Environment="ETCD_NAME=node001"
Environment="ETCD_DISCOVERY=https://discovery.etcd.io/<token>"
Environment="ETCD_ADDR=203.0.113.29:4001"
Environment="ETCD_PEER_ADDR=192.0.2.13:7001"

Discovery API

$ curl https://discovery.etcd.io/new
https://discovery.etcd.io/348fe9f9feee9039r00rf

cloud-config

update

The coreos.update.* parameters manipulate settings related to how CoreOS instances are updated.

Parameters are:

Example

coreos:
  etcd:
    discovery: https://discovery.etcd.io/<your-token>
    addr: $private_ipv4:4001
    peer-addr: $private_ipv4:7001
  units:
    - name: etcd.service
      command: start
    - name: fleet.service
      command: start
  users:
    - name: core
      coreos-ssh-import-github: guttertec

  write_files:
    - path: /etc/fleet/fleet.conf
      content: |
        public_ip="$private_ipv4"
        metadata="elastic_ip=true,public_ip=$public_ipv4"

Unit file

[Unit]
Description=A Redis Server
[Service]
TimeoutStartSec=0
EnvironmentFile=/etc/environment
Environment="IMAGE=guttertec/redis"
ExecStartPre=/usr/bin/docker pull $IMAGE
ExecStart=/bin/zsh -c "exec /usr/bin/docker run --rm -p $COREOS_PRIVATE_IPV:6379 --name %n $IMAGE"
ExecStop=/usr/bin/docker kill %n

Launch a service

# start
fleetctl --tunnel my.coreos-cluster.com start redis.service
# status
fleetctl --tunnel my.coreos-cluster.com list-units
fleetctl --tunnel my.coreos-cluster.com status redis.service
fleetctl --tunnel my.coreos-cluster.com journal redis.service
# stop
fleetctl --tunnel my.coreos-cluster.com stop redis.service
fleetctl --tunnel my.coreos-cluster.com destroy redis.service

Vagrant

Interesting resources

To Do

These are just some notes on what I should still embrace…