losizm / beetle

A lightweight service framework for Scala.

Version Matrix

Beetle

Maven Central

Beetle is a lightweight service framework for Scala.

Getting Started

There are two roles to using the Beetle project. One is as a developer building service software. The other is as an operator managing the application that runs service software.

To develop service software, add Beetle to your project:

libraryDependencies += "com.github.losizm" %% "beetle" % "0.3.0" % "provided"

As an operator, you must download and install the Beetle application.

Download and Install

To begin, ensure Java 8 or higher is installed. If it isn't, you can head over to Adoptium to download prebuilt OpenJDK binaries.

For the Beetle application, visit its download page. The application package is available in both TAR and ZIP archives, so you have options as far as installation goes.

Here's an example script to manage the download and install process if you're running Linux or macOS:

# Create and change to a deployment directory
mkdir -p "$HOME/beetle" && cd "$HOME/beetle"

# Download application package
curl -LO 'https://github.com/losizm/beetle/releases/download/0.3.0/beetle-0.3.0.tgz'

# Unpackage content
tar -opxvf beetle-0.3.0.tgz

# Set up environment
export BEETLE_HOME="$HOME/beetle/beetle-0.3.0"
export PATH="$BEETLE_HOME/bin:$PATH"

Once everthing's in place, you can get a list of commands in beetle help.

Usage:
  beetle [-C <directory>] <command> [<arg> ...]

Description:
  Runs command in beetle instance.

Options:
  -C <directory>
    Runs command as if started from supplied base directory

Commands:
  init        Starts up server
  halt        Shuts down server
  state       Gets service state
  definition  Gets service definition
  start       Starts service
  stop        Stops service
  restart     Restarts service
  remove      Removes service

Run 'beetle help <command>' for more information about command.

API Documentation

See scaladoc for additional details.

License

Beetle is licensed under the Apache License, Version 2. See LICENSE for more information.