Skip to content

Developer Workstations

Jonathan Brill edited this page May 27, 2020 · 3 revisions

Overview

Evergreen provides a special class and configuration of spawn hosts for use as virtual workstations to provide a cloud-managed developer environment similar to Evergreen's execution environment. These workstations can use the same configuration as build hosts, but also have:

  • a persistent volume attached to each image (mounted at ~) that moves between instances, so users can upgrade by terminating their instance and starting a new one.

  • a web-based IDE based on Code Server, which is a distribution of the open source components of VSCode. This runs remotely on the workstation and proxies through the Evergreen application layer for a fully featured remote editing experience.

  • Evergreen supports an "unexpirable" spawn host which isn't subjected to the termination deadline of most spawn hosts. While there is a global per-user limit for unexpirable hosts, workstations will, by default.

  • Evergreen supports a start/stop mode for spawn hosts. This makes it possible for users to change to another instance type, though administrators must configure the allowable instance types. Users can also opt to stop hosts during vacations and other periods of known inactivity.

Administrators need to configure workstation instances to include the IDE, and any other software required for development. There is no limit to the number of distinct workstation images available in the system.

Evergreen site and project administrators should provide specific documentation for using these workstations in the course of normal development.

Project Setup

To support easier workstation setup, project configurations and the Evergreen CLI tool have a "project setup" command to help get projects checked out and running on workstations, though this feature is not necessarily dependent on workstations, and could be used on local systems.

Project configuration include a "Workstation Setup" section where administrators declare a number of simple commands (and directory contexts) that will run a project's setup. These commands are not shell interpolated, and are not meant to provision the development environment (e.g. install system packages or modify configuration files in ~/). Use these commands to clone a repository, generate index files, and/or run a test build.

As a prerequisite, users of the project setup must have configured their SSH keys with Github, with access to the Github repositories required for their project. The commands will assemble a clone operation for the project's core repository when selected, but required modules or other repositories would need to be cloned directly in another command.

The Evergreen CLI would resemble:

evergreen host configure --project=evergreen --distro=ubuntu1804-workstation

This will run the clone (if configured) and setup commands in the workstation distro's mounted volume directory ~/user_home/evergreen. Directories will be created prior to execution.

Commands that specify a directory will run as a sub-directory of the project directory. This allows a user to have multiple projects checked out in their persistent workspace. While this doesn't allow interaction between the setups of potentially similar projects, it greatly reduces the internal complexity of running setup.

To test workstation setup commands locally, the --dry-run argument causes all commands to noop, printing the commands that would have run.

You may also omit the --distro argument to use locally. This makes it possible to set your own --directory and setup a project at the location of your choice. The project directory and intermediate required directories will be created as normally. The -distro argument only modifies the path of the directory if the distro specified workstation. If you specify --distro and --directory the --directory creates a prefix within the workstation distro's persistant home directory.

Clone this wiki locally