diff --git a/docs/assets/autoshutdown.png b/docs/assets/autoshutdown.png new file mode 100644 index 0000000..38025cf Binary files /dev/null and b/docs/assets/autoshutdown.png differ diff --git a/docs/assets/shutdown-api.png b/docs/assets/shutdown-api.png new file mode 100644 index 0000000..0ffb96a Binary files /dev/null and b/docs/assets/shutdown-api.png differ diff --git a/docs/assets/shutdown_env.png b/docs/assets/shutdown_env.png new file mode 100644 index 0000000..407514f Binary files /dev/null and b/docs/assets/shutdown_env.png differ diff --git a/docs/deploy-usage.md b/docs/deploy-usage.md index fb21cb6..755a255 100644 --- a/docs/deploy-usage.md +++ b/docs/deploy-usage.md @@ -4,18 +4,18 @@ Environment variables are used to configure the Helios container. The following environment variables are available: -| Name | Value | Required | -|-------------------|--------------------------------------------------------------------------------------------------------------------------------------|----------| -| USER | Name of the user | X | -| UID | POSIX compliant uid for the user | X | -| GID | POSIX compliant gid for the user | | -| PASSWORD | Password set for the user | | -| IDLE_TIME | Trigger the idle hook after x time | | -| DISABLE_VGL | Disable VirtualGL Wrapper around the entire desktop session. You will need to manually run applications that require it via `vglrun` | | -| DESKTOP_FILES | Paths separated by `:`. For example, `/some/path/1/*.desktop:/some/*/2/*.desktop` | | -| PREFIX | Prefix for URL for use behind a reverse proxy | | -| SELKIES_FRAMERATE | Set framerate as a range (e.g., `15-60`) or a fixed value (e.g., `30`) | | -| SUDO | Grant `SUDO` to the user on the container | | +| Name | Value | Required | +|-------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------| +| USER | Name of the user | X | +| UID | POSIX compliant uid for the user | X | +| GID | POSIX compliant gid for the user | | +| PASSWORD | Password set for the user | | +| IDLE_TIME | Trigger the idle hook after x minutes (only required when the [auto shutdown plugin](https://github.com/juno-fx/Terra-Official-Plugins/tree/main/plugins/helios-auto-shutdown) is installed) | | +| DISABLE_VGL | Disable VirtualGL Wrapper around the entire desktop session. You will need to manually run applications that require it via `vglrun` | | +| DESKTOP_FILES | Paths separated by `:`. For example, `/some/path/1/*.desktop:/some/*/2/*.desktop` | | +| PREFIX | Prefix for URL for use behind a reverse proxy | | +| SELKIES_FRAMERATE | Set framerate as a range (e.g., `15-60`) or a fixed value (e.g., `30`) | | +| SUDO | Grant `SUDO` to the user on the container | | When using the Orion Platform, you can configure them in the [Templates](https://juno-fx.github.io/Orion-Documentation/genesis/workstations/) diff --git a/docs/plugins-autoshutdown.md b/docs/plugins-autoshutdown.md new file mode 100644 index 0000000..808a64f --- /dev/null +++ b/docs/plugins-autoshutdown.md @@ -0,0 +1,27 @@ +# Auto shutdown plugin + +Juno supplies an official [Terra](https://juno-fx.github.io/Orion-Documentation/latest/terra/intro/) plugin for automatically shutting down idle workstations after a configurable amount of time. + +## Install the plugin + +The [plugin](https://github.com/juno-fx/Terra-Official-Plugins/tree/main/plugins/helios-auto-shutdown) can be installed from the official Terra repository. The plugin itself requires no configuration other than which project to enable it in. + +![shutdown plugin image](./assets/autoshutdown.png) + +## Setup the workload + +In order for the workstations to shutdown we need to configure two settings on the Helios workload. + +### IDLE_TIME environment variable + +On the Helios workload configuration screen you are given the option to add `env variables`. Add one with the name `IDLE_TIME` configured to the amount of **minutes** you would like to wait before an idle workstation is shutdown. For example set this to `60` to shutdown after an hour. + +![environment setup](./assets/shutdown_env.png) + +### Enable API access within the workstation + +In order for the workstation to be gracefully shutdown we need to allow the workstation to access the shutdown API endpoint. This is handled automatically and securely, all you need to do is set the setting `enableAPI` to `True` in the workload configuration window. + +![enableAPI setting](./assets/shutdown-api.png) + +Thats it! Your idle workstations will now automatically shutdown as per your configured time. \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index 704a288..102f080 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -119,6 +119,8 @@ nav: - deploy-k8s.md - Persistence: - deploy-session.md + - Plugins: + - plugins-autoshutdown.md - Building Workstations: - getting-started.md - Customization: