Skip to content

Commit a6dbdae

Browse files
committed
Add console app in docs
1 parent 9e18c60 commit a6dbdae

4 files changed

Lines changed: 50 additions & 38 deletions

File tree

docs/content/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ cascade:
2828

2929
<!-- prettier-ignore --> {{< hextra/feature-card title="Motivation" icon="flag" subtitle="<br>OpenRun is built with these goals:<br><br>➣ Declarative deployments made simple<br>➣ Start on single-node, scale to Kubernetes if needed<br>➣ Make auth and RBAC easy for internal tools<br>➣ Easy SAML support without paying the SSO tax<br>➣ Run thousands of apps - zero idle resource usage" class="openrun-feature-card openrun-feature-card-dark" >}}
3030

31-
<!-- prettier-ignore --> {{< hextra/feature-card title="OpenRun Features" icon="light-bulb" subtitle="<br>Some of the unique features of OpenRun are:<br>➣ Create and manage apps declaratively<br>➣ Easily upgrade from single-node to K8S <br>➣ Domain based or path based routing, with auto-TLS<br>➣ OAuth/OpenID/SAML/Cert auth, with RBAC<br>➣ Scales idle apps down to zero<br>➣ Staged deployment, for code and config changes<br>➣ Atomic (all or nothing) updates across apps" class="openrun-feature-card openrun-feature-card-dark" >}}
31+
<!-- prettier-ignore --> {{< hextra/feature-card title="OpenRun Features" icon="light-bulb" subtitle="<br>Some of the unique features of OpenRun are:<br>➣ Create and manage apps declaratively<br>➣ Easily upgrade from single-node to K8S <br>➣ Domain based or path based routing, with auto-TLS<br>➣ OAuth/OpenID/SAML/Cert auth, with RBAC<br>➣ Scales idle apps down to zero<br>➣ Staged deployment, for code and config changes<br>➣ Atomic (all or nothing) updates across apps<br>➣ Auto SQLite data replication using Litestream" class="openrun-feature-card openrun-feature-card-dark" >}}
3232

3333
{{< /hextra/feature-grid >}}
3434

docs/content/console-tour.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ a secret, binding an app to it, deploying a containerized app from a git
99
repo, and the operational pages. Then the RBAC flow: enabling role based
1010
access control from the console and working with team-scoped grants.
1111
The screenshots follow the site theme - toggle light/dark to see the
12-
console in the other theme.
12+
console in the other theme. A live [demo](https://utils.demo.clace.io/console/)
13+
of the console is available. See
14+
[console install]({{< ref "docs/installation/#install-the-console-app" >}})
15+
for installing the console on your own server.
1316

1417
## Overview
1518

docs/content/docs/Installation.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,3 +205,35 @@ This will create an app at /disk_usage with the example disk_usage app. The disk
205205
To access the app, go to [https://localhost:25223/disk_usage](https://localhost:25223/disk_usage). Use `admin` as the username and use the password previously generated.
206206

207207
The code for the disk usage app is in [GitHub](https://github.com/openrundev/openrun/tree/main/examples/disk_usage/app.star). app.star is the Starlark config and app.go.html is the html template. The other files are generated files and are created during app development.
208+
209+
## Install the Console App
210+
211+
The [management console]({{< ref "/console-tour" >}}) is a web UI for managing the OpenRun server: apps, syncs, service bindings, containers, audit logs, server configuration and the AI app builder. A live [demo](https://utils.demo.clace.io/console/) of the console is available. The console is itself an OpenRun app, installed from the [openrundev/console](https://github.com/openrundev/console) repo:
212+
213+
```shell
214+
openrun app create --approve --auth system \
215+
--param enable_all_features=true --param enable_updates=true \
216+
github.com/openrundev/console /console
217+
```
218+
219+
Open https://localhost:25223/console and log in as `admin`, using the password printed during the OpenRun installation.
220+
221+
Since the console performs management operations, it should always run with an auth type that requires login. Using `system` auth is recommended: it needs no additional setup, the `admin` account with the password printed during installation is used to login. `system` is the server's default auth type, the `--auth system` option makes the choice explicit. OAuth/OIDC/SAML based [authentication]({{< ref "configuration/authentication" >}}) can also be used. Do not use `none` auth for the console: management operations are blocked for anonymous users.
222+
223+
The console features are controlled through app params, set with `--param name=value` during create:
224+
225+
| Param | Default | Description |
226+
| --------------------- | ------- | --------------------------------------------------------------------------------------- |
227+
| `enable_updates` | `false` | Enable write operations (create/update/delete). Without this, the console is read-only. |
228+
| `enable_container` | `false` | Enable the containers area |
229+
| `enable_config` | `false` | Enable the server configuration area |
230+
| `enable_builder` | `false` | Enable the AI app builder area |
231+
| `enable_all_features` | `false` | Enable all the areas above; write operations still need `enable_updates` |
232+
233+
The default install (no params) is a read-only console covering apps, syncs, bindings, the overview and audit logs. A disabled area registers no routes and requests no plugin permissions.
234+
235+
Params can be changed after install. Enabling a new area adds plugin permissions, which require re-approval; the change is staged and goes live on promotion:
236+
237+
```shell
238+
openrun param update --promote enable_builder true /console
239+
```

docs/content/docs/QuickStart.md

Lines changed: 13 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,19 @@ openrun app create --approve github.com/openrundev/apps/utils/bookmarks /book
7777

7878
Open https://localhost:25223 to see the app listing. The bookmark manager is available at https://localhost:25223/book.
7979

80-
## Application Types
80+
### Install the Console App
81+
82+
The [management console]({{< ref "/console-tour" >}}) is a web UI for managing the OpenRun server: apps, syncs, service bindings, containers, audit logs, server configuration and the AI app builder. A live [demo](https://utils.demo.clace.io/console/) of the console is available. The console is itself an OpenRun app; to install it, run
83+
84+
```shell
85+
openrun app create --approve --auth system \
86+
--param enable_all_features=true --param enable_updates=true \
87+
github.com/openrundev/console /console
88+
```
89+
90+
The console is available at https://localhost:25223/console. Log in as `admin`, using the password printed during the OpenRun installation. Using `system` auth (the server default) is recommended for the console; management operations are blocked for anonymous users, so do not use `none` auth. The `enable_*` params control which feature areas are enabled — the default install is a read-only console. See [console install]({{< ref "installation/#install-the-console-app" >}}) for the full param list.
91+
92+
## App Types
8193

8294
OpenRun allows easy management of multiple apps on one OpenRun server installation. There are three main types of OpenRun apps:
8395

@@ -115,41 +127,6 @@ openrun app create --spec container --approve \
115127

116128
See [containerized apps]({{< ref "container/overview/" >}}) for details.
117129

118-
## Action Apps
119-
120-
For use cases where an existing CLI application or API needs to be exposed as a web app, actions provide an easy solution. First, define the parameters to be exposed in the form UI. Create a `params.star` file with the params. For example,
121-
122-
```python {filename="params.star"}
123-
param("repo", description="The GitHub repository to look up", default="openrundev/openrun")
124-
```
125-
126-
The app defines a run handler which calls the GitHub API for the specified repository, using the [http plugin]({{< ref "docs/plugins/overview" >}}), and returns the stats as text.
127-
128-
```python {filename="app.star"}
129-
load ("http.in", "http")
130-
131-
def run(dry_run, args):
132-
repo = http.get("https://api.github.com/repos/" + args.repo).value.json()
133-
out = ["Stars: %d" % repo["stargazers_count"], "Forks: %d" % repo["forks_count"],
134-
"Open Issues: %d" % repo["open_issues_count"]]
135-
return ace.result("Repo info for " + args.repo, out)
136-
137-
app = ace.app("Repo Info",
138-
actions=[ace.action("Repo Info", "/", run, description="Show the GitHub stats for the specified repository")],
139-
permissions=[
140-
ace.permission("http.in", "get", ["regex:^https://api\\.github\\.com/.*"]),
141-
],
142-
)
143-
```
144-
145-
The app, when accessed, shows a form for the params, with the action output displayed below it:
146-
147-
<picture class="responsive-picture" style="display: block; margin-left: auto; margin-right: auto;">
148-
<source media="(prefers-color-scheme: dark)" srcset="/images/action_dark.png">
149-
<source media="(prefers-color-scheme: light)" srcset="/images/action_light.png">
150-
<img alt="Repo info action app" src="/images/action_light.png">
151-
</picture>
152-
153130
## Managing Applications
154131

155132
Multiple applications can be installed on an OpenRun server. Each app has a unique path and can be managed separately. The app path is made up of domain_name:url_path. If no domain_name is specified during app creation, the app is created in the default domain. The default domain is looked up when no specific domain match is found. See [app routing]({{< ref "applications/routing/" >}}) for details about routing.

0 commit comments

Comments
 (0)