mukluk

package module
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 7, 2016 License: MIT Imports: 2 Imported by: 0

README

mukluk

An easy and modern OS deployment tool for clusters.

Why / Goal

Today's network booting tools leave much to be desired. Mukluk is an attempt at creating a modern network-booting server for cluster deployment and management without legacy burdens.

Features

  • No external dependencies at runtime (except the config file / env vars)
  • Boot any network-bootable OS, including Linux installers, thin-nodes, VMware, memtest, WinPE, etc
  • Small enough project that it can be understood
  • API for external inspection and node self-discovery

Installation / Building

Pre-built binary versions can be found under the Releases tag at the top

If you would like to build it yourself:

go get github.com/zgiles/mukluk

Database

A database will need to be configured.
If using MySQL, create the tables from docs/mysql/schema.sql
If using Redis, no work needs to be done, mukluk will create keys on the fly and prefix them with "mukluk:"

Usage / Config

mukluk currently pulls its config from the file config.toml, in the same folder as the binary. Fill in the config details. The sample config file is in the docs/ folder
Then run ./mukluk
Logging is to STDERR and pretty verbose.
Optionally make some type of startup script. ( or wait until I do it.. see TODOs)

KNOWN ISSUES

  • Redis plugin may be a bit behind.. mysql should be the only properly working one for now
  • Checking of values in the URL is not fully implemented. It could be possible to get a bad field and database error (but it will probably be handled well). It is not recommended to make a mukluk server publicly accessible. It is not very secure.

TODOs

  • API docs
  • 12 factor style config, etc, allow config in different location
  • startup scripts
  • tests
  • update redis functionality
  • detect schema on database server and update / change it
  • flatfile database
  • multiple databases / multiple readers writers
  • benchmarking
  • Debug GUI etc
  • CLI tool
  • nodediscovery to node conversion
  • godocs
  • variable verbosity / logging options
  • better abstraction in the handlers.go file
  • TLS
  • dependency versioning

Release History

  • 0.1.2 - switched everything to MUID for nodes with no UUID, but still need uniqueness. tons of code cleanup. broke out common handlers and code-wide utils. removed old double function DB calls. removed tons of dead code. reordered libraries for better future action
  • 0.1.1 - make action on failure an option through config
  • 0.1.0 - Initial release

License

Copyright (c) 2016 Zachary Giles
Licensed under the MIT license.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MUID

func MUID(uuid string, macaddress string, ip string) string

func MUIDmysqldefinition

func MUIDmysqldefinition() string

Types

type MUIDable

type MUIDable interface {
	MUID() string
}

type Node

type Node struct {
	Uuid        string `json:"uuid"`
	Hostname    string `json:"hostname"`
	Ipv4address string `json:"ipv4address"`
	Macaddress  string `json:"macaddress"`
	Os_name     string `json:"os_name"`
	Os_step     int64  `json:"os_step"`
	// Init_data []byte `json:"init_data"` // ignored because should be large
	Node_type string `json:"node_type"`
	Oob_type  string `json:"oob_type"`
	Heartbeat int64  `json:"heartbeat"`
}

func (Node) MUID

func (n Node) MUID() string

func (Node) MarshalJSON

func (n Node) MarshalJSON() ([]byte, error)

type NodesDiscovered

type NodesDiscovered struct {
	Uuid         string `json:"uuid"`
	Ipv4address  string `json:"ipv4address"`
	Macaddress   string `json:"macaddress"`
	Surpressed   bool   `json:"surpressed"`
	Enrolled     bool   `json:"enrolled"`
	Checkincount int64  `json:"checkincount"`
	Heartbeat    int64  `json:"heartbeat"`
}

func (NodesDiscovered) MUID

func (nd NodesDiscovered) MUID() string

func (NodesDiscovered) MarshalJSON

func (nd NodesDiscovered) MarshalJSON() ([]byte, error)

type Os

type Os struct {
	Os_name      string `json:"os_name"`
	Os_step      int64  `json:"os_step"`
	Boot_mode    string `json:"boot_mode"`
	Boot_kernel  string `json:"boot_kernel"`
	Boot_initrd  string `json:"boot_initrd"`
	Boot_options string `json:"boot_options"`
	Next_step    string `json:"next_step"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL