/kato

The catabolic catalyst

Primary LanguageGoApache License 2.0Apache-2.0

The Káto system

License Widget GoReportCard Widget Travis Widget Coverage Status Widget

Káto (from Greek κάτω: 'down', 'below', 'underneath') is an opinionated software-defined infrastructure (SDI) which governs diverse computing workloads and work-flows. Like in catabolism (from Greek κάτω káto, 'downward' and βάλλειν ballein, 'to throw'), the Káto system is the catalyst used to breakdown complex monolithic platforms into its fundamental microservices.


Booddies logo

Distinctive attributes

  • Geolocation
  • Multidatacenter
  • Cloud agnostic
  • Variable costs
  • Hardware abstraction
  • Endo/exo-elasticity
  • Microservices
  • Containerization
  • Task scheduling
  • CI/CD pipelines
  • Service discovery
  • Load balancing
  • High availability
  • Self-healing

Overview

CoreOS is the foundation on which Káto is built. It provides the fundamental components used to assemble container-based distributed systems: etcd is used for consensus and discovery, fleet is a distributed init system, flannel is used for virtual networking and rkt and docker are container engines.

All this CoreOS goodies are used to bootstrap a Mesos cluster. Mesos is a distributed systems kernel which abstracts compute resources away from machines. Accordingly, it provides schedulers (or frameworks in Mesos parlance) which can run on top in order to utilise the exposed compute resources.

Marathon is one of such frameworks. It is a cluster-wide init and control system for long-running applications. Other frameworks like Jenkins and Elasticsearch might share the same cluster resources.

REX-Ray delivers persistent storage access for container runtimes, such as Docker and Mesos, and provides an easy interface for enabling advanced storage functionality across common storage, virtualization and cloud platforms.

Components

Component Current Version Container
CoreOS alpha -
Mesos 0.28.0 Docker Pulls
Mesos-DNS 0.5.2 Docker Pulls
Marathon 1.1.1 Docker Pulls
Zookeeper 3.4.8 Docker Pulls
go-dnsmasq 1.0.5 Docker Pulls
cAdvisor 0.22.0 Docker Pulls
Pritunl 1.21.954.48 Docker Pulls
REX-Ray 0.3.3 -

1. Install katoctl

From the latest release (for Káto end users)
not yet
From the source (for Káto developers)
marc@desk-1 ~ $ go get -u github.com/h0tbird/kato/cmd/katoctl
marc@desk-1 ~ $ go install github.com/h0tbird/kato/cmd/katoctl
marc@desk-1 ~ $ eval "$(katoctl --completion-script-${0#-})"

2. Deploy Káto's infrastructure

Káto can be deployed on a few IaaS providers. More providers are planned but feel free to send a pull request if your prefered provider is not supported yet. Find below deployment guides for each supported provider:

Vagrant Packet.net Amazon EC2 Google GCE Digital Ocean Microsoft Azure

3. Pre-flight checklist

Once you have deployed the infrastructure, run sanity checks to evaluate whether the cluster is ready for normal operation. Use the edge-1 node if you are in the cloud or the master-1 node if you are using Vagrant and you decided not to deploy an edge node:

marc@desk-1 ~ $ ssh -A core@edge-1.ext.<your-ns1-managed-public-domain>
core@edge-1 ~ $ etcdctl cluster-health
core@edge-1 ~ $ fleetctl list-machines
core@edge-1 ~ $ watch "fleetctl list-units"

4. Start the stack

Open a second terminal to edge-1 (bastion host) and jump to master-1 from there (don't forget to enable forwarding of the authentication agent ssh -A). If you are using Vagrant you can ssh directly to master-1 instead:

marc@desk-1 ~ $ ssh -A core@edge-1.ext.<your-ns1-managed-public-domain>
core@edge-1 ~ $ ssh master-1

Use fleetctl to start all the service units while you check the status on the first terminal. Wait for Zookeeper to become active and running before starting all the remaining units:

core@master-1 ~ $ fleetctl start /etc/fleet/zookeeper.service
core@master-1 ~ $ fleetctl start /etc/fleet/*.service

5. Setup pritunl

Pritunl is an OpenVPN server that provides secure access to Káto's private networks. Access your Pritunl WebGUI at http://edge-1.ext.<your-ns1-managed-public-domain> Make sure you setup udp port 18443 for VPN connections.