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 AppRunner. 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 project building an open source alternative to Google Cloud Run and AWS AppRunner. OpenRun allows you to deploy containerized apps. OpenRun is cross-platform (Linux/Windows/OSX) and provides a GitOps workflow for managing web apps.

OpenRun apps are deployed directly from the git repo, no build step required. For example, OpenRun can be used to deploy Streamlit/Gradio apps, adding OAuth authentication for access control across a team.

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:

  • Suport for deployment to Kubernetes is planned.

Setup

Certs and Default password

OpenRun manages TLS cert using LetsEncrypt for prod environments. For dev environment, it is recommended to install mkcert. OpenRun will automatically create local certs using mkcert if it is present. Install mkcert and run mkcert -install before starting OpenRun server. 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.

OpenRun creates an admin user account as teh system auth for accessing apps. A random password is generated for this account during initial OpenRun server installation. Note down this password for accessing apps if using system auth.

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 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

This will print a random password on the screen, note that down as the password to use for accessing the applications. 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. For feature enhancements, please first file a ticket with the feature label and discuss the change before working on the code changes.

The Google go style guide is used for OpenRun. 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.