• Stars
    star
    132
  • Rank 264,901 (Top 6 %)
  • Language
    Nix
  • License
    MIT License
  • Created over 1 year ago
  • Updated 7 months ago

Reviews

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

Repository Details

NixOS Hyperconverged Infrastructure on Nomad/NixOS

Skyflake: Hyperconverged Infrastructure for NixOS

  • No Docker, no Kubernetes
  • Hosts run NixOS, payloads are NixOS in microvm.nix
  • Static hosts, dynamic virtual machines managed by Nomad
  • Deploy machines by git push your Nix Flake

Running the example cluster

  • Have a bridge virbr0.

  • Provide Internet access.

  • Have 3x 4 GB RAM.

  • Have 3x 20 GB disk.

  • Put your SSH public key into example-server.nix

  • Run MicroVMs in parallel:

    nix run .#example1
    nix run .#example2
    nix run .#example3
  • Login and check for the IP address.

  • Next, create your user flake:

    {
      outputs = { self, nixpkgs }: {
        nixosConfigurations =
          let
            mkHost = hostName:
              nixpkgs.lib.nixosSystem {
                modules = [ {
                  system.stateVersion = "22.11";
                  networking = { inherit hostName; };
                  services.openssh = {
                    enable = true;
                    permitRootLogin = "yes";
                  };
                  users.users.root.password = "";
                } ];
                system = "x86_64-linux";
              };
          in {
            skytest1 = mkHost "skytest1";
            skytest2 = mkHost "skytest2";
            skytest3 = mkHost "skytest3";
            skytest4 = mkHost "skytest4";
          };
      };
    }
  • Finally, deploy by pushing to a branch by hostname:

    git push [email protected]:example \
      HEAD:skytest1 HEAD:skytest2 \
      HEAD:skytest3 HEAD:skytest4

How it works

The central component is a nixosModule that is configured for servers to be part of a cluster.

Users have a flat hierarchy of flake repositories they can push to. Their ssh interaction is forced into a custom script that lets only git push, triggering a hook that does the following:

  1. Builds the NixOS system
  2. Copies the result into a cluster-shared binary cache
  3. Runs the job on the cluster through Nomad

Server configuration options

The nixosModule for the servers that make up the cluster provides the following knobs:

TODO

Deployment customization

Network setup, storage integration and more options of the MicroVMs must be customized for the environment.

See default-customization.nix

More Repositories

1

microvm.nix

NixOS MicroVMs
Nix
874
star
2

gitpop

More popular than Git*ub
JavaScript
583
star
3

deadnix

Scan Nix files for dead code
Rust
362
star
4

socksify-ruby

Redirect any TCP connection initiated by a Ruby script through a SOCKS5 proxy
Ruby
161
star
5

bitford

BitTorrent Client in a Chrome Packaged App
JavaScript
97
star
6

prittorrent

BitTorrent Content Distribution for Podcasts
Erlang
92
star
7

nix-openwrt-imagebuilder

Build OpenWRT images in Nix derivations
Nix
90
star
8

buzzrelay

Source to relay.fedi.buzz: relay the streaming API of Mastodon instances
Rust
64
star
9

remcached

Ruby EventMachine memcached client
Ruby
50
star
10

erlang-collectd

Send collectd statistics from your Erlang applications
Erlang
49
star
11

node-oembed

oEmbed consumer library for node.js & tools
JavaScript
37
star
12

em-dns

tmm1's em/dns_cache for asynchronous DNS resolving from EventMachine
Ruby
35
star
13

chaosbay

BitTorrent Tracker with upload & browsing, written on the 25th Chaos Communication Congress
Erlang
34
star
14

bitlove-ui

Bitlove.org on Yesod
JavaScript
31
star
15

noattach

Instant Personal Temporary File Sharing
JavaScript
19
star
16

firetail

HTTP REST to XMPP PubSub with node.js
JavaScript
18
star
17

rexml-dropin

Drop-in replacement for REXML using libxml-ruby and libxml-parser-ruby (expat binding)
Ruby
17
star
18

harvester

Web-based feed aggregator in Ruby
Ruby
13
star
19

norrent

Norrent is going to be a BitTorrent toolkit for node.js
JavaScript
13
star
20

collectd

Some personal modifications to collectd, the kick-ass data collector
C
13
star
21

lxc-top

Bird's eye view of Linux Containers
Ruby
13
star
22

ifdyndnsd

Watch netlink for interface address updates to do DynDNS just like nsupdate does (RFC2136 + RFC2845)
Rust
12
star
23

ruby-sasl

Simple Authentication and Security Layer (RFC 4422) for Ruby
Ruby
12
star
24

irssi-xmpp

Modifications to irssi-plugin-xmpp from CVS
C
12
star
25

deadnix-action

Workflow to find and delete dead nix code
12
star
26

hashvortex

Playing with the BitTorrent DHT in Haskell
Haskell
11
star
27

libxml-ruby

Make LibXML-Ruby's SAX parser a SAX push parser
11
star
28

em-asyncns

Resolve domain names from EventMachine with libasyncns
Ruby
11
star
29

s3erl

Erlang bindings for Amazon S3 storage web service
Erlang
11
star
30

utf8cleaner

Efficiently clean your UTF8 for Ruby in C
C
11
star
31

tokio-xmpp

XMPP with Rust and Tokio [MOVED]
10
star
32

rad1o-rust

Run Rust on the rad1o embedded hardware from Chaos Communication Camp 2015
Rust
9
star
33

spacesocket

WebSocket server for Node.js not invented here
JavaScript
9
star
34

tigger

XMPP Multi-User Chat Bot
Nix
9
star
35

superhighway

Superfeedr.com-powered feed reader webapp for standalone installation
JavaScript
9
star
36

faucheuse

Feed Aggregator (Harvester rewrite in Erlang)
Erlang
8
star
37

rust-waveshare-4inch-tft-touch-shield

Embedded Rust implementation of display+touchscreen drivers for STM32F429
Rust
8
star
38

node-vnc-client

VNC client implementation in JavaScript for node.js
JavaScript
8
star
39

dat-osm-import

Import OpenStreetMap data into dat
JavaScript
7
star
40

rust-pulse-simple

Simple Pulseaudio crate for the Rust language
Rust
7
star
41

pile

Programmatically Illuminated Lightening Environment
Rust
7
star
42

b-runner

JavaScript
7
star
43

sawrocket

Portable Raw Socket API for Firefox OS & Chrome Packaged Apps
JavaScript
7
star
44

dat-elasticsearch-upload

Upload from dat into ElasticSearch
JavaScript
7
star
45

sub2text

XMPP PubSub bridge in Erlang
Erlang
7
star
46

libpulse-sys

**Outdated!** Replaced by https://github.com/jnqnfe/pulse-binding-rust
Rust
7
star
47

node-collectdout

Periodically send values out to a Collectd server for statistics
JavaScript
6
star
48

superradar

Persistent Web Feed Reader powered by Superfeedr
JavaScript
6
star
49

rust-lpc43xx

Register definitions for the NXP LPC43xx microcontroller platform, generated through svd2rust
Rust
6
star
50

feedmonster

Push Parsing XML in Ruby
Ruby
5
star
51

sigh

HTTP signatures for ActivityPub in Rust
Rust
5
star
52

ceilingled

Yet another hackerspace illumination
CoffeeScript
5
star
53

atomstreamr

Ruby interface to http://updates.sixapart.com/atom-stream.xml
4
star
54

erlxslt

Dirty little libxslt Port for Erlang
Erlang
4
star
55

nix-cache-cut

Trim Nix binary caches according to GC roots
Rust
4
star
56

bitorama

A BitTorrent gadget on node.js
JavaScript
4
star
57

channels-xep

Condensing the Buddycloud channels protocol into a single document
4
star
58

jerry

The incredibly simple Jabber MUC client to run in screens
Ruby
3
star
59

ejabberd

Clone of Proccess One's Erlang jabber implementation from SVN.
Erlang
3
star
60

rust-kenburns

Ken Burns effect slideshow with Glium in Rust
Rust
3
star
61

youtube_to_feed

Free my content for Podcast feeds!
JavaScript
3
star
62

rust-protobuf-iter

Iterate over Protobuf messages while decoding on the fly
Rust
3
star
63

rust-sgtl5000

I2S/I2C sound output driver. Does not work.
Rust
3
star
64

network-protocol-xmpp

My branch of Network.Protocol.XMPP for Haskell
Haskell
3
star
65

spacemsg

Connecting sensors with 0mq
Haskell
3
star
66

exif-annex

node.js script to put EXIF metadata into git-annex using ffmpeg's ffprobe
JavaScript
3
star
67

superfeedr.github.com

Superfeedr's Blog
2
star
68

rust-r0ket

Embedded Rust on the CCCamp2011 r0ket badge
Rust
2
star
69

mcbench

memcached benchmark
Haskell
2
star
70

sharing2

Sharing Is Caring reimplemented
Haskell
2
star
71

openarena-distro

I accidently the whole OpenArena
2
star
72

h3c

Program β€œDie Drei C” in Haskell
Haskell
2
star
73

rust-osm-pbf-iter

Parse OpenStreetMap .pbf dumps while trying to avoid copying
Rust
2
star
74

osm-poi-db

Extract POIs from OSM PBFs and put them into LevelDB, ready for nearby query
JavaScript
2
star
75

dresden-haushalt

Visuallizing Public Data
JavaScript
2
star
76

democropticon

My Open Data Playground
JavaScript
2
star
77

underpass-turbo

[WIP] OSM query engine with zero runtime dependencies
Rust
2
star
78

HTTPbis

Clone of the Haskell HTTP package
Haskell
2
star
79

rust-lpc13xx

Peripheral access API for NXP LPC13xx microcontrollers generated through svd2rust
Rust
2
star
80

lazy_bencoding

Lazy BEncoding parser that gives you iterators over byte slices
Rust
2
star
81

ruby-feed-parser-benchmark

Ever wanted to know what was the most effiscient Ruby Library to parse feed, check this benchmark.
Ruby
2
star
82

luft-heatmap

Luftdaten.info visualisiert
CSS
1
star
83

rust-hash2hwaddr

Hashes anything to a private MAC address
Rust
1
star
84

moers-haushalt

Converts some XML to CSV
JavaScript
1
star
85

prittorrent2

Next-gen Bitlove.org backend
JavaScript
1
star
86

dht22-rs

Rust implementation for reading from DHT22 1-wire humidity/temperature sensor
Rust
1
star
87

remind2ics

Remind to iCalendar converter
Haskell
1
star
88

petze

Service monitoring not invented here
CoffeeScript
1
star
89

hashimi

Hash Torrents in da Browser
JavaScript
1
star
90

strom

STream Real-time Online Media
Rust
1
star
91

srtsplit

Split SRT subtitle files with too long lines
Rust
1
star
92

podleech

Download Podcast Enclosures
Shell
1
star
93

osm-pbf-parser

streaming open street maps protocol buffer parser
JavaScript
1
star
94

t1mel1ne

Who has got the longest Github profile timeline?
1
star