Skip to content

openrundev/openrun

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenRun-logo

App deployment simplified. Open source alternative to Google Cloud Run and AWS App Runner. Easily deploy internal tools across a team.

License Latest Release Build Status Code Coverage Go Report Card Mentioned in Awesome Go Listed in CNCF landscape

Menu

Overview

OpenRun is an Apache-2.0 licensed open source alternative to Google Cloud Run and AWS App Runner. OpenRun makes it easy to declaratively deploy applications built in frameworks like Streamlit/Gradio/FastHTML/NiceGUI etc.

OpenRun provides declarative GitOps based app deployment, OAuth/OIDC/SAML access controls, TLS certs & secrets management. OpenRun is built for teams to easily deploy internal tools, with full RBAC support. OpenRun apps are deployed directly from the git repo, no build step required. OpenRun scales idles apps down to zero and supports atomic updates across multiple apps.

This repo hosts the source code for OpenRun. The source for the documentation site openrun.dev is in the docs repo. App specifications, which are templates to create apps, are defined in the appspecs repo. Sample apps are in the apps repo.

OpenRun intro gif

Features

OpenRun can be used to:

OpenRun supports the following for all apps:

For containerized apps, OpenRun supports:

For building Hypermedia based apps, OpenRun supports:

Roadmap

The feature roadmap for OpenRun is:

  • Support for deployment to Kubernetes is planned.

Setup

Certs and Default password

OpenRun manages TLS cert using LetsEncrypt for prod environments. For dev environment, OpenRun uses mkcert for local certs. Installing OpenRun using brew will automatically install mkcert.

For container based apps, Docker or Podman or Orbstack should be installed and running on the machine. OpenRun automatically detects the container manager to use.

Install OpenRun On OSX/Linux

To install on OSX/Linux, run

curl -sSL https://openrun.dev/install.sh | sh

Start a new terminal (to get the updated env) and run openrun server start to start the OpenRun service.

Brew Install

To install using brew, run

brew tap openrundev/homebrew-openrun
brew install openrun
brew services start openrun

Install On Windows

To install on Windows, run

powershell -Command "iwr https://openrun.dev/install.ps1 -useb | iex"

Start a new command window (to get the updated env) and run openrun server start to start the OpenRun service.

Install Apps

Once OpenRun server is running, to install apps declaratively, open a new window and run

openrun apply --approve github.com/openrundev/openrun/examples/utils.star

To schedule a background sync, which automatically applies the latest app config, run

openrun sync schedule --approve --promote github.com/openrundev/openrun/examples/utils.star

To install apps using the CLI (imperative mode), run

openrun app create --approve github.com/openrundev/apps/system/list_files /files
openrun app create --approve github.com/openrundev/apps/system/disk_usage /disk_usage
openrun app create --approve github.com/openrundev/apps/utils/bookmarks /book

Open https://localhost:25223 to see the app listing. The disk usage app is available at https://localhost:25223/disk_usage (port 25222 for HTTP). The bookmark manager is available at https://localhost:25223/book, the list files app is available at https://localhost:25223/files.

See [installation]({{< ref "installation" >}}) for details. See [config options]({{< ref "configuration" >}}) for configuration options. To enable Let's Encrypt certificates, see [Automatic SSL]({{< ref "configuration/networking/#enable-automatic-signed-certificate" >}}).

The release binaries are also available at releases. See [install from source]({{< ref "installation/#install-from-source" >}}) to build from source.

To install a containerized app, ensure either Docker or Podman is running and run

openrun app create --spec python-streamlit --branch master --approve github.com/streamlit/streamlit-example /streamlit

If the source repo has a Dockerfile or Containerfile, run

openrun app create --spec container --approve <source_path> /myapp

to install the app.

Build from source

To install a release build, follow steps in the installation docs.

To install from source:

  • Ensure that a recent version of Go is available, version 1.21.0 or newer
  • Checkout the OpenRun repo, cd to the checked out folder
  • Build the openrun binary and place in desired location, like $HOME
# Ensure go is in the $PATH
mkdir $HOME/openrun_source && cd $HOME/openrun_source
git clone -b main https://github.com/openrundev/openrun && cd openrun
export OPENRUN_HOME=$HOME/clhome && mkdir -p $OPENRUN_HOME/config
go build -o $OPENRUN_HOME/openrun ./cmd/openrun/

Initial Configuration For Source Install

To use the openrun service, you need an initial config file with the service password and a work directory. The below instructions assume you are using $HOME/clhome/openrun.toml as the config file and $HOME/clhome as the work directory location.

  • Create the clhome directory
  • Create the openrun.toml file, and create a randomly generate password for the admin user account
cd $OPENRUN_HOME
git clone -C config https://github.com/openrundev/appspecs
$OPENRUN_HOME/openrun password > $OPENRUN_HOME/openrun.toml
$OPENRUN_HOME/openrun server start

The service will be started on https://localhost:25223 by default (HTTP port 25222).

Documentation

OpenRun docs are at https://openrun.dev/docs/. For doc bugs, raise a GitHub issue in the docs repo.

Getting help

Please use Github Discussions for discussing OpenRun related topics. Please use the bug tracker for bug reports and feature requests.

Contributing

PRs welcome for bug fixes and enhancements. For application behavior related fixes, refer the app unit test cases. Those test run as part of regular unit tests go test ./.... For API related changes, OpenRun uses the commander-cli library for automated CLI tests. To run the CLI test, run gmake test from the openrun home directory.