From a1bcb591361cc06e0e1b004f2210e11dd6ea3038 Mon Sep 17 00:00:00 2001 From: Mark Milligan Date: Wed, 16 Mar 2022 11:52:52 -0500 Subject: [PATCH 1/2] updated lifecycle page --- workspaces/lifecycle.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/workspaces/lifecycle.md b/workspaces/lifecycle.md index 015239411..8edcbbe67 100644 --- a/workspaces/lifecycle.md +++ b/workspaces/lifecycle.md @@ -3,9 +3,7 @@ title: "Lifecycle" description: "Learn about the workspace lifecycle." --- -Workspaces are designed to sustain scheduled shutdowns and rebuilds. An -workspace lifecycle resilient to stops and starts means you can save dollars on -cloud compute and justify more powerful dev machines :). +A Coder workspace is designed to shutdown and re-built, either by scheduled workspace inactivity or manually by users and administrators. The persistent volume claim or `/home/` mounted to the workspace ensures checked out code repository and other personalization settings are retained. A Coder workspace's lifecycle can be administered at the organization-level to auto shut-down after a defined period of inactivity or when administrators want to force workspace re-builds. ## Rebuilds @@ -27,6 +25,10 @@ After a workspace hasn't been accessed for the specified threshold, it is shut down. A stopped workspace requires a [rebuild](#Rebuilds) before you can access it again. +## Auto-start + +Users can configure workspace [auto-start](https://coder.com/docs/coder/latest/workspaces/autostart) which rebuilds their workspaces at the start of their working day. + ## Hooks Coder exposes a few hooks during the build process. Once a workspace is @@ -38,11 +40,11 @@ available and running on an underlying host, the following steps are taken: a Git provider, your SSH key pair is injected during this step as well, allowing it to perform authenticated `git` operations. -1. **Execution of `/coder/configure`**: Execution of this script allows +1. **Execution of `/coder/configure`**: Execution of this script, that is included in the workspace image, allows [images](../images/index.md) to perform startup operations consistent across all of the workspaces that use the image. If you need your image to include - modifications to `/home`, include the instructions in this script. + modifications to `/home/`, include the instructions in this script. In other words, the configure script is not run as root but as the `/home/` so configurations are stored in `/home/`. You may also run commands as `sudo` which will not persist in `/home/`. -1. **Execution of ~/personalize`**: Execution of this script allows you to - customize your personal development workspace on each rebuild. Read more on +1. **Execution of `~/personalize`**: Execution of this script allows you to + customize your personal development workspace on each rebuild. Coder injects the personalize script into the workspace and it includes cloning logic if a user has specified a dotfiles repo. Read more on personalization [here](./personalization.md). From c4279ceee73edb1c748d6769dbddedf23265bcf1 Mon Sep 17 00:00:00 2001 From: Katie Horne Date: Wed, 16 Mar 2022 13:42:05 -0500 Subject: [PATCH 2/2] chore: edit text --- workspaces/lifecycle.md | 42 ++++++++++++++++++++++++++++++----------- 1 file changed, 31 insertions(+), 11 deletions(-) diff --git a/workspaces/lifecycle.md b/workspaces/lifecycle.md index 8edcbbe67..e07463635 100644 --- a/workspaces/lifecycle.md +++ b/workspaces/lifecycle.md @@ -3,7 +3,16 @@ title: "Lifecycle" description: "Learn about the workspace lifecycle." --- -A Coder workspace is designed to shutdown and re-built, either by scheduled workspace inactivity or manually by users and administrators. The persistent volume claim or `/home/` mounted to the workspace ensures checked out code repository and other personalization settings are retained. A Coder workspace's lifecycle can be administered at the organization-level to auto shut-down after a defined period of inactivity or when administrators want to force workspace re-builds. +A Coder workspace is designed to shutdown (triggered by either scheduled +workspace inactivity or manually by users and administrators) and be rebuilt. + +The persistent volume claim (or `/home/`) mounted to the workspace +ensures that the workspaces retain cloned code repositories and other +personalization settings. + +You can manage a Coder workspace's lifecycle at the organization-level to auto +shutdown after a defined period of inactivity or when administrators want to +force workspace rebuilds. ## Rebuilds @@ -17,6 +26,13 @@ even if the underlying [image](../images/index.md) or its dependencies change. **Note:** `username` is defined in the image. See [Docker's image documentation](https://docs.docker.com/engine/reference/builder/#user) +## Auto-start + +Users can configure a workspace +[auto-start](https://coder.com/docs/coder/latest/workspaces/autostart) time, +which sets the time when Coder will rebuild and start their workspaces. Users +typically set this time to coincide with the start of their working day. + ## Auto-off Organizations can set an @@ -25,10 +41,6 @@ After a workspace hasn't been accessed for the specified threshold, it is shut down. A stopped workspace requires a [rebuild](#Rebuilds) before you can access it again. -## Auto-start - -Users can configure workspace [auto-start](https://coder.com/docs/coder/latest/workspaces/autostart) which rebuilds their workspaces at the start of their working day. - ## Hooks Coder exposes a few hooks during the build process. Once a workspace is @@ -40,11 +52,19 @@ available and running on an underlying host, the following steps are taken: a Git provider, your SSH key pair is injected during this step as well, allowing it to perform authenticated `git` operations. -1. **Execution of `/coder/configure`**: Execution of this script, that is included in the workspace image, allows - [images](../images/index.md) to perform startup operations consistent across - all of the workspaces that use the image. If you need your image to include - modifications to `/home/`, include the instructions in this script. In other words, the configure script is not run as root but as the `/home/` so configurations are stored in `/home/`. You may also run commands as `sudo` which will not persist in `/home/`. +1. **Execution of `/coder/configure`**: Execution of this script, which is + included in the workspace image, allows [images](../images/index.md) to + perform startup operations that are consistent across all of the workspaces + that use the image. If you need your image to include modifications to + `/home/`, include the instructions in this script. + + In other words, the configure script is _not_ run as the root user but as the + `/home/`, so configurations are stored in `/home/`. You may also + run commands with `sudo`, but these changes will not persist in + `/home/`. 1. **Execution of `~/personalize`**: Execution of this script allows you to - customize your personal development workspace on each rebuild. Coder injects the personalize script into the workspace and it includes cloning logic if a user has specified a dotfiles repo. Read more on - personalization [here](./personalization.md). + customize your personal development workspace on each rebuild. Coder injects + the personalize script into the workspace and includes cloning logic if a + user has specified a dotfiles repo. Read more on personalization + [here](./personalization.md).