Packaging

Serverboards has a Marketplace in which all plugins can be listed and easily installed from Serverboards itself.

Extra manifest.yaml fields

Packages can have a price, and screenshots:

id: company.package
name: My package
icon: icon.svg         # at static/icon.svg
screenshot: screenshot # at static/screenshot
price: 10.00           # price in euros
requires:
  - serverboards.ssh
  - serverboards.analytics
  - ...
description: ....

components:
  - ...

Package format and creation

The package format is a simple tar (xz compressed) with all the required data and program files. It has to have only one directory that matches the plugin id and all the contents in it.

A simple way to create this package is create a Makefile with a txz rule like this one:

FILES = $(wildcard manifest.yaml *.py *.txt *.sh static/ *.md)
PACKAGE_ID = $(shell awk '/^id:/ {print $$2}' manifest.yaml)

.PHONY: txz
txz: $(PACKAGE_ID).txz

$(PACKAGE_ID).txz: $(FILES)
	@echo $(PACKAGE_ID).txz: $(FILES)
	@tar --transform 's#^#'$(PACKAGE_ID)'/#' -cJf $(PACKAGE_ID).txz ${FILES}

This example is valid for most situations and can be included verbatim. For more complex cases consider adding a clean rule and some compilation rules.

Using a makefile is recommended as it can easily add other steps of compilation as setup and compile.

The options to tar are:

  • --transform 's#^#package.id/#' – Prefixes the file paths with the package id.
  • -cJf – Creates a package, Compresses with XZ and creates a file
  • package.id.txz – Creates this package name. The name is not important.
  • static manifest.yaml *.py *.txt *.sh – List of all the files (or file globs, *.py) to include.

Package upload

First you need to register as a developer. We are in closed beta, end an email to connect@serverboards.io to ask for an invitation.

Then log in into https://serverboards.app and on your packages section, there is an upload button. We are working on how to automate it with s10s.

All packages pass a code and functionality review, so don’t expect it to appear immediately after upload.