Skip to content

Commit

Permalink
Improve documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
blaubaer committed Oct 18, 2024
1 parent 415225d commit b6a942a
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 2 deletions.
19 changes: 19 additions & 0 deletions docs/reference/environment/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,3 +188,22 @@ In cases if an [image](#property-image) needs to be pulled, either it does not e

<<property("image", "string", id_prefix="preparationProcess-pull-image-", heading=5)>>
Holds the tag of the image to be downloaded.


### Examples {: #examples}

1. Simple:
```yaml
type: docker
```
2. With ubuntu image:
```yaml
type: docker
image: ubuntu
```

## Compatibility

| <<dist("linux")>> | <<dist("windows")>> |
| - | - |
| <<compatibility_editions(True,True,"linux")>> | <<compatibility_editions(True,None,"windows")>> |
51 changes: 51 additions & 0 deletions docs/reference/environment/dummy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
description: An environment created for demonstration purposes, it simply prints a message and exists immediately.
toc_depth: 5
---

# Dummy environment

An environment created for demonstration purposes, it simply prints a message and exists immediately.

This feature is usually only makes sense for cases where you want to create dummy configurations of Bifröst to demonstrate some functionality, like we're utilizing it in our demonstration configurations: [contrib/configurations/dummy-windows.yaml](<<asset_url("contrib/configurations/dummy-windows.yaml")>>).


## Configuration {: #configuration}

<<property("type", "Environment Type", default="dummy", required=True)>>
Has to be set to `dummy` to enable the dummy environment.

<<property("banner", "string", template_context="../context/authorization.md", default="")>>
Will be displayed to the user upon connection to its environment.

<h4 id="property-banner-examples">Examples</h4>

1. If [simple user](../authorization/simple.md) is used, show its name in a message:
```yaml
banner: "Hello, {{.authorization.entry.name}}!\n"
```
2. If [users authorized via OIDC](../authorization/oidc.md) is used, show its name in a message:
```yaml
banner: "Hello, {{.authorization.idToken.name}}!\n"
```
<<property("exitCode", "int64", template_context="../context/authorization.md", default=0)>>
After [`banner`](#property-banner) was printed to the user, the environment will exit with this code.

### Examples {: #examples}

1. Simple:
```yaml
type: simple
```
2. With message:
```yaml
type: simple
banner: "Hello, {{.authorization.idToken.name}}!\n"
```

## Compatibility

| <<dist("linux")>> | <<dist("windows")>> |
| - | - |
| <<compatibility_editions(True,True,"linux")>> | <<compatibility_editions(True,None,"windows")>> |
1 change: 1 addition & 0 deletions docs/reference/environment/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Bifröst executes user sessions within environments. These environments can eith

1. `docker`: [Docker](docker.md)
2. `local`: [Local](local.md)
3. `dummy`: [Dummy](dummy.md)

## Examples

Expand Down
4 changes: 2 additions & 2 deletions docs/reference/environment/local.md
Original file line number Diff line number Diff line change
Expand Up @@ -320,9 +320,9 @@ If `true`, users are allowed to use SSH's port forwarding mechanism.
}}
```

## Compatibility
`## Compatibility
| <<dist("linux")>> | <<dist("windows")>> |
| - | - |
| <<compatibility_editions(True,True,"linux")>> | <<compatibility_editions(True,None,"windows")>> |

`
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ nav:
- reference/environment/index.md
- Docker: reference/environment/docker.md
- Local: reference/environment/local.md
- Dummy: reference/environment/dummy.md
- Sessions:
- reference/session/index.md
- Filesystem: reference/session/fs.md
Expand Down

0 comments on commit b6a942a

Please sign in to comment.