• Stars
    star
    1,140
  • Rank 40,879 (Top 0.9 %)
  • Language
    Go
  • License
    MIT License
  • Created over 6 years ago
  • Updated about 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Simplified Container System
   _____ __       ____
  / ___// /____  / / /___ ______
  \__ \/ __/ _ \/ / / __ `/ ___/
 ___/ / /_/  __/ / / /_/ / /
/____/\__/\___/_/_/\__,_/_/

Simplified Container Runtime Cluster

Stellar is designed to provide simple container runtime clustering. One or more nodes are joined together to create a cluster. The cluster is eventually consistent making it ideal for transient workloads or edge computing where nodes are not always guaranteed to have high bandwidth, low latency connectivity.

Why

There are several container platforms and container orchestrators out there. However, they are too complex for my use. I like simple infrastructure that is easy to deploy and manage, tolerates failure cases and is easy to debug when needed. With the increased tolerance in failure modes, this comes at a consistency cost. It may not be for you. Use the best tool for your use case. Enjoy :)

Features

  • Container execution via containerd
  • Multihost Networking via CNI
  • Service Discovery via DNS
  • Cluster event system via NATS
  • Builtin Proxy using Radiant (zero downtime reloads, canary deploys, health checks, automatic HTTPS)
  • Masterless design
  • Efficient use of system resources
  • Simple daemon deployment

Downloads

For official releases, see the Releases

You can also grab the latest Master Build

Building

In order to build Stellar you will need the following:

Once you have the requirements you can build.

If you change / update the protobuf definitions you will need to generate:

make generate

To build the binaries (client and server) run:

make

Docker

Alternatively you can use Docker to build:

To generate protobuf:

make docker-generate

To build binaries:

make docker-build

Running

To run Stellar, once you have a working containerd installation follow these steps:

  • Install Containerd version >=1.1
  • Build binaries or get a release
  • Copy /bin/sctl to /usr/local/bin/
  • Copy /bin/stellar to /usr/local/bin/
  • Copy /bin/stellar-cni-ipam to /opt/containerd/bin/ or /opt/cni/bin

First, we will generate a config:

$> stellar config > stellar.conf

This will produce a default configuration. Edit the addresses to match your environment. For this example we will use the IP 10.0.1.70.

{
    "ConnectionType": "local",
    "ClusterAddress": "10.0.1.70:7946",
    "AdvertiseAddress": "10.0.1.70:7946",
    "Debug": false,
    "NodeID": "dev",
    "GRPCAddress": "10.0.1.70:9000",
    "TLSServerCertificate": "",
    "TLSServerKey": "",
    "TLSClientCertificate": "",
    "TLSClientKey": "",
    "TLSInsecureSkipVerify": false,
    "ContainerdAddr": "/run/containerd/containerd.sock",
    "Namespace": "default",
    "DataDir": "/var/lib/stellar",
    "StateDir": "/run/stellar",
    "Bridge": "stellar0",
    "UpstreamDNSAddr": "8.8.8.8:53",
    "ProxyHTTPPort": 80,
    "ProxyHTTPSPort": 443,
    "ProxyTLSEmail": "",
    "GatewayAddress": "127.0.0.1:9001",
    "EventsAddress": "10.0.1.70:4222",
    "EventsClusterAddress": "10.0.1.70:5222",
    "EventsHTTPAddress": "10.0.1.70:4322",
    "CNIBinPaths": [
        "/opt/containerd/bin",
        "/opt/cni/bin"
    ],
    "Peers": [],
    "Subnet": "172.16.0.0/12"
}

To start the initial node run:

$> stellar -D server --config stellar.conf

To join additional nodes simply add the AdvertiseAddress of the first node to the Peers config option of the second node:

For example:

{
    "ConnectionType": "local",
    "ClusterAddress": "10.0.1.71:7946",
    "AdvertiseAddress": "10.0.1.71:7946",
    "Debug": false,
    "NodeID": "dev",
    "GRPCAddress": "10.0.1.71:9000",
    "TLSServerCertificate": "",
    "TLSServerKey": "",
    "TLSClientCertificate": "",
    "TLSClientKey": "",
    "TLSInsecureSkipVerify": false,
    "ContainerdAddr": "/run/containerd/containerd.sock",
    "Namespace": "default",
    "DataDir": "/var/lib/stellar",
    "StateDir": "/run/stellar",
    "Bridge": "stellar0",
    "UpstreamDNSAddr": "8.8.8.8:53",
    "ProxyHTTPPort": 80,
    "ProxyHTTPSPort": 443,
    "ProxyTLSEmail": "",
    "GatewayAddress": "127.0.0.1:9001",
    "EventsAddress": "10.0.1.71:4222",
    "EventsClusterAddress": "10.0.1.71:5222",
    "EventsHTTPAddress": "10.0.1.71:4322",
    "CNIBinPaths": [
        "/opt/containerd/bin",
        "/opt/cni/bin"
    ],
    "Peers": ["10.0.1.70:7946"],
    "Subnet": "172.16.0.0/12"
}

You will now have a two node cluster. To see node information, use sctl.

$> sctl --addr 10.0.1.70:9000 cluster nodes
NAME                ADDR                OS                       UPTIME              CPUS                MEMORY (USED)
stellar-00          10.0.1.70:9000      Linux (4.17.0-3-amd64)   7 seconds           2                   242 MB / 2.1 GB
stellar-01          10.0.1.71:9000      Linux (4.17.0-3-amd64)   6 seconds           2                   246 MB / 2.1 GB

Deploying an Application

To deploy an application, create an application config. For example, create the following as example.conf:

{
    "name": "example",
    "labels": [
        "env=prod",
        "region=us-east"
    ],
    "services": [
        {
            "name": "redis",
            "image": "docker.io/library/redis:alpine",
            "runtime": "io.containerd.runtime.v1.linux",
            "process": {
                "uid": 0,
                "gid": 0,
                "args": ["redis-server"]
            },
            "labels": [
                "env=prod"
            ],
            "network": true
        }
    ]
}

Then run the following to deploy:

$> sctl --addr 10.0.1.70:9000 apps create -f ./example.conf

You should now see the application deployed:

$> sctl --addr 10.0.1.70:9000 apps list
NAME                SERVICES
example             1

$> sctl --addr 10.0.1.70:9000 apps inspect example
Name: example
Services:
  - Name: example.redis
    Image: docker.io/library/redis:alpine
    Runtime: io.containerd.runtime.v1.linux
    Snapshotter: overlayfs
    Labels:
      containerd.io/restart.status=running
      stellar.io/application=example
      stellar.io/network=true

By default all applications that have networking enabled will have a corresponding nameserver record created. To view the records use the following:

$> sctl --addr 10.0.1.70:9000 nameserver list
NAME                    TYPE                VALUE                                            OPTIONS
example.redis.stellar   A                   172.16.0.4
example.redis.stellar   TXT                 node=stellar-00; updated=2018-09-08T10:71:02-04:00

More Repositories

1

shipyard

Composable Docker Management
6,382
star
2

interlock

Docker Event Driven Plugin System
Go
970
star
3

locksmith

AES encrypted password manager
Python
188
star
4

conduit

Deployment system for Docker
Go
106
star
5

docker-volume-libsecret

Docker Volume Driver plugin for libsecret
Go
93
star
6

certm

TLS certificate management
Go
92
star
7

reconstructor.engine

Reconstructor Build Engine
Python
56
star
8

docker-havok

Docker bridge to Vulcand
Go
50
star
9

circuit

Container Network Management
Go
43
star
10

dockerfiles

Miscellaneous Dockerfiles
Shell
38
star
11

docker-demo

Docker Demo Application
Go
36
star
12

fabric-maestro

DevOps management
Python
35
star
13

libsecret

Secret management abstraction library
Go
28
star
14

openshift-diy-py27-django

Django 1.4 on Python 2.7 powered by uWSGI running on OpenShift :)
Python
28
star
15

.dotfiles

Dotfiles
Shell
24
star
16

phoenix

Pluggable bot for Slack
Go
22
star
17

docker-hive

Docker Clustering
Go
21
star
18

docker-proxy

Simple proxy application for the Docker Remote API via sockets
Go
21
star
19

docker-sample-java-mysql-tomcat

Docker Sample Java application with MySQL
16
star
20

cli-plugins

Docker CLI Plugins
Go
13
star
21

ttlcache

Simple in-memory cache with TTL
Go
12
star
22

sensu-py

Python Sensu plugin
Python
12
star
23

heimdall

Private networks using Wireguard
Go
11
star
24

project-base

React + Go application template
JavaScript
9
star
25

vipd

Simple HA Virtual IPs
Go
8
star
26

nginx-rt-log

Real-time Nginx client access viewer
JavaScript
8
star
27

opencloud

OpenCloud : multi-organization, multi-account, varying provider cloud manager
Python
8
star
28

nginxmanager

Management library for the Nginx HTTP webserver
Python
8
star
29

docker-py-helloworld

Simple Hello World Flask App
Shell
7
star
30

tekken

Sensu administration console
Python
7
star
31

flow

Distributed Workflow System
Go
7
star
32

freight

Simple App Deployment
Go
7
star
33

puppet-module-graylog2

Puppet module for the Graylog2 logging server
Puppet
6
star
34

rivet

Docker Machine API Bridge
Go
6
star
35

gearbox

OpenShift application bootstrapper
Python
6
star
36

crate

Linux Container Management
Python
6
star
37

ignition

Python web application creator
Python
5
star
38

payments

Library to handle online payments (i.e. Amazon FPS, PayPal, etc.)
Python
5
star
39

slacker-wiki

Slack Command Service for searching Confluence
Go
5
star
40

docker-grid

Experimental Public Docker Grid
Go
5
star
41

axiom

Metadata service for Docker
Go
4
star
42

puppet-module-asgard

Puppet module for running Asgard (https://github.com/Netflix/asgard)
Puppet
4
star
43

libdiscover

Library for building distributed systems
Go
4
star
44

sshconsole

Lightweight, multi-session, tabbed SSH client
C#
3
star
45

machine-sync

Sync for Docker machines
Go
3
star
46

siryn

Opinionated Container Monitoring
Go
3
star
47

cloudfoundry-deploy

Multi-instance CloudFoundry deployment config
Shell
3
star
48

simplelog

Simple Log Formatter for Logrus
Go
3
star
49

docker-shipyard-tracker-ui

Shipyard Tracker UI built on Grafana
JavaScript
3
star
50

registry-manager

Docker Registry Manager
Go
3
star
51

docker-logman

Experimental Log Forwarder for Docker
Shell
3
star
52

shadow

Snapshot management tool for btrfs
Python
3
star
53

puppet-module-puppetdashboard

Installs and configures the Puppet Dashboard
Puppet
2
star
54

tlsutils

TLS Utilities for Go
Go
2
star
55

stack-demo

DockerCon Demo
2
star
56

sysinfo

Simple Go HTTP Demo app that shows system info
Go
2
star
57

redirector

Simple HTTP Redirector in Go
Go
2
star
58

gofs

Rapid filesystem prototyping using Go
Go
2
star
59

opencloud.core

Infrastructure management
Ruby
2
star
60

openshift-webpy-example

Shell
2
star
61

element

Simple Peer Fabric
Go
2
star
62

sonoscli

Sonos Music System Command Line Interface
Python
2
star
63

junction

Service mesh routing
Go
2
star
64

vagrant-boxes

Various vagrant boxes
Puppet
2
star
65

exile

Trust Orchestration
Go
2
star
66

dialogue

Communication System
Go
2
star
67

machine-server

JavaScript
1
star
68

circuit-coredns

Circuit CoreDNS Plugin
Go
1
star
69

docker-influxdb

InfluxDB
Shell
1
star
70

go-static

Static files served via HTTP in Go
Go
1
star
71

opencloud-puppet-module

OpenCloud Puppet Integration
Ruby
1
star
72

lightrail

Python
1
star
73

coredns-containerd

Go
1
star
74

graphite

Unofficial Git mirror of the Graphite project
JavaScript
1
star
75

docker-aws-tools

Docker image with AWS tools
Shell
1
star
76

reconstructor.org

Reconstructor site
JavaScript
1
star
77

launchpad

Launchpad
Python
1
star
78

interlock-plugin-example

Example Interlock Plugin
Go
1
star
79

docker-ghost

Ghost Publishing Platform
Shell
1
star
80

arcus

JavaScript
1
star
81

ehazlett

Personal site
Shell
1
star
82

locksmith-chrome

Locksmith Chrome Extension
JavaScript
1
star
83

docker-rethinkdb

RethinkDB
Shell
1
star
84

puppet-module-appserver

Puppet module to support various application frameworks
Puppet
1
star
85

singlehop

Python SingleHop API
Python
1
star
86

coiapi-flask

Python
1
star
87

slack-pagerduty

PagerDuty API integration bot for Slack
Go
1
star
88

informant

Github realtime notification dashboard
JavaScript
1
star
89

slack-dockerbuild

Slack notifications from Docker Trusted Builds
Go
1
star