A lightweight, serverless computing platform written in Go that allows you to deploy, manage, and invoke containerized functions via a simple CLI and HTTP gateway.
Nimbus is a simplified Function as a Service (FaaS) platform similar to AWS Lambda. It enables developers to:
- 🚀 Deploy serverless functions with a single CLI command
- 🐳 Run functions in isolated Docker containers
- ⚡ Invoke functions via HTTP endpoints
- 📅 Schedule function execution with cron-style scheduling
- 📊 Stream function logs in real-time
- 🔌 Support multiple runtimes (Node.js, Python, Go)
- CLI Tool: Deploy, invoke, manage, and delete functions from the command line
- HTTP Gateway: Routes requests to function containers with load balancing
- Container Management: Automatic Docker container lifecycle management
- Persistent Storage: SQLite database for function metadata and invocation logs
- Cron Scheduler: Schedule functions to run at specified intervals
- Real-time Logging: Stream and view function execution logs
The system consists of three main components:
- CLI (Client): Command-line tool for deploying and managing functions
- API Gateway: HTTP server that routes requests and manages deployments
- Runtime Manager: Manages Docker containers and function execution
Before installing Nimbus, ensure you have the following installed:
Download and run the installer script:
curl -fsSL https://raw.githubusercontent.com/infraspecdev/faas-engine-go/main/installer/install.sh | bashOr specify a version:
curl -fsSL https://raw.githubusercontent.com/infraspecdev/faas-engine-go/main/installer/install.sh | bash -s v1.0.0Verify installation:
nimbus --versionDownload the latest release from GitHub Releases and add it to your PATH.
# Clone the repository
git clone https://github.com/infraspecdev/faas-engine-go.git
cd faas-engine-go
# Build the CLI
go build -o nimbus ./cmd/cli
# Build the gateway (API server)
go build -o nimbus-gateway ./cmd/proxy
# Build the runtime manager
go build -o nimbus-runtime ./cmd/runtime-managerCreate a .env file in your project root or set environment variables:
# Proxy/Gateway Configuration
PROXY_URL=http://localhost:8080
PROXY_PORT=8080
# Runtime Manager Configuration
RUNTIME_PORT=9090
# Database Configuration
DB_PATH=./data/nimbus.db
# Docker Configuration
DOCKER_HOST=unix:///var/run/docker.sockThe PROXY_URL environment variable specifies the address where the FaaS gateway is running. This is used by the CLI to communicate with the server.
# Temporary (current session only)
export PROXY_URL=http://localhost:8080
# Permanent (add to ~/.bash_profile or ~/.zshrc)
echo 'export PROXY_URL=http://localhost:8080' >> ~/.bash_profile
source ~/.bash_profile# Temporary (current session only)
$env:PROXY_URL = "http://localhost:8080"
# Permanent (system-wide)
setx PROXY_URL "http://localhost:8080"
# Verify
echo $env:PROXY_URLCreate a .env file in your working directory:
PROXY_URL=http://localhost:8080
PROXY_PORT=8080Load it in your shell:
source .env # Linux/macOS
# or
Get-Content .env | ForEach-Object { $_.split('=') | % { if ($_.length -eq 2) { [Environment]::SetEnvironmentVariable($_[0], $_[1]) } } } # PowerShell./cmd/proxyThe Proxy API will be available at http://localhost:80
In another terminal:
./cmd/runtime-managerSet the PROXY_URL to point to your gateway:
export PROXY_URL=http://localhost:8080 # Linux/macOS
# or
setx PROXY_URL http://localhost:8080 # Windowsnimbus deploy ./samples/hello --name hello-func --runtime node# Via CLI
nimbus invoke hello-func --data "{}"
# Via HTTP
curl http://localhost:8080/hello-funcnimbus logs hello-funcnimbus list| Command | Description |
|---|---|
nimbus deploy <path> |
Deploy a function from a directory |
nimbus invoke <name> |
Invoke a function |
nimbus list |
List all deployed functions |
nimbus logs <name> |
Stream function logs |
nimbus delete <name> |
Delete a function |
nimbus schedule <name> |
Schedule a function |
nimbus --help |
Show help menu |
faas-engine-go/
├── cmd/
│ ├── cli/ # Command-line client
│ ├── proxy/ # HTTP Gateway/API server
│ └── runtime-manager/ # Container runtime manager
├── internal/
│ ├── api/ # API handlers
│ ├── service/ # Business logic
│ ├── sqlite/ # Database layer
│ ├── sdk/ # Docker SDK wrapper
│ └── types/ # Type definitions
├── samples/ # Example functions
├── runtimes/ # Runtime Docker images
└── installer/ # Installation scripts
The project includes sample functions in the samples/ directory:
// samples/echo/index.js
module.exports = (event) => {
return {
statusCode: 200,
body: JSON.stringify({ message: event.body || "Hello!" })
};
};# samples/calculator/index.py
def handler(event, context):
return {
"statusCode": 200,
"body": event.get("body", "Hello from Python!")
}// samples/hello/main.go
package main
import (
"fmt"
"log"
"net/http"
)
func handler(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "Hello from Go!")
}
func main() {
http.HandleFunc("/", handler)
log.Fatal(http.ListenAndServe(":8080", nil))
}