skateboard

command module
v0.1.0-alpha Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2023 License: GPL-3.0 Imports: 5 Imported by: 0

README

skateboard

Warning! This is alpha software still under rapid development.

GitHub go.mod Go version (subdirectory of monorepo)

Your application, on wheels

(local trucks (require :trucks))

(do
  (trucks.mkconfig!)

  (trucks.system! {:panic "unwind"
    :verbose "true"})

  ;; (trucks.defaults! {:run-ctx "npm"
  ;;  :cmd "run devstart"
  ;;  :sync "npm install"})

  (trucks.service! :docs {:github "phasewalk1/phasewalk1.github.io"
                     :run-ctx "hugo"
                     :cmd "serve -D"
                     :sync "git submodule update --init --recursive"})
  (trucks.service! :courier {:github "phasewalk1/courier"
                     :run-ctx "cargo"
                     :cmd "watch -x run"})

  (local contract (trucks.contract!))
  contract)

skateboard is not virtualization software

For smaller teams who are deploying applications with only a handful of services, skateboard gives them wheels to share their system without relying on virtualization. This brings a few core advantages over what I would call container overkill.

  1. skateboard can sync and launch individual services much faster than containerized composers.
  2. skateboard has a much smaller footprint; no containers means no impactful storage footprint.
  3. no background daemon and no os-level virtualization means less RAM usage.
  4. trucks allows developers to be more expressive when defining their system than yaml.

Of course -- because skateboard is not virtualization software -- this means

  1. It doesn't provide the isolation between processes and system resources like CPU, memory, and I/O offered by full-fledged containerization solutions.
  2. It doesn't provide the same level of system security as software like Docker, which leverages namespaces and cgroups to isolate resources.
  3. It's not designed for deployment across multiple machines; instead, it excels in managing multi-service applications on a single host.
  4. It doesn't have an inbuilt dependency management system. Instead, it assumes that your services are managed by an appropriate language-specific package manager, such as npm, Cargo, pip, etc. Skateboard expects these tools to handle the heavy lifting of dependency management. In a trucks contract, the sync field specifies the command skateboard will run to ensure all dependencies are met, like npm install or cargo build, before it tries to run your services

In other words, skateboard is designed for simplicity and speed in situations where the overhead and complexity of virtualization are unnecessary. By focusing on sharing and running multi-service applications on a single host, it streamlines the development and deployment process for small teams building simpler applications.

Features

  • trucks
    • Give your application wheels by writing a trucks contract that defines your system and its components. Contracts are written in Lisp syntax using skateboard's trucks library in Fennel
    • skateboard embeds necessary Trucks / Fennel dependencies so you can get started right away
      • skateboard install
  • Sync service repositories
  • Run the system and all it’s services with goroutines in a single shell with unified logs
    • A user in possession of a valid trucks contract can spin up the application in a single command
      • skateboard up

Installation

⚠️ skateboard assumes you have a Lua runtime installed. If you don't already or you fear your runtime may be out of date, see https://lua.org/download.html.

Install the skateboard binary with go
 go install github.com/phasewalk1/skateboard@latest

Try to run skateboard -h to ensure that $GOPATH/bin is in path, usually at ~/go/bin/ or /usr/local/go/bin.

Install trucks

This will create a home for skateboard at $HOME/.skateboard, and will sync and build any dependencies needed to work with trucks.

 skateboard install

Documentation

More detailed documentation for skateboard and trucks cam be found at phasewalk1.github.io/skateboard.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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