Skip to content

Immutable-Infrastructure-as-Code (IIaC) workspace for the Mars Desert Research Station (MDRS)

License

Notifications You must be signed in to change notification settings

mdrs-community/mdrs-workspace-image

Repository files navigation

MDRS Workspace (Kasm Image)

Screenshot from 2023-06-09 09-48-15

Introduction

This repo provides an Immutable-Infrastructure-as-Code (IIaC) workspace for the Mars Desert Research Station (MDRS), based on an Ansible template for KASM Ubuntu Jammy images. The workspace is configured with the following software:

Requirements

  1. A Bash terminal (Ubuntu on WSL2 recommended for Windows users).
  2. Docker Compose (Docker Desktop recommended for non-Linux users)
  3. UDEV Rules for Teensy boards placed in /etc/udev/rules.d/00-teensy.rules. See https://www.pjrc.com/teensy/td_download.html

Setup/Installation

  1. Install prerequisites

As stated in the Requirements, installation requires a Bash terminal. On Linux bash is readily available and on Mac the built-in terminal is sufficiently compatible. On Windows we recommend a using a Linux virtual machine, which will include a real bash terminal, rather than a Linux-like environment such as Cygwin. We recommend using the Windows Subsystem for Linux (WSL) as an easy and minimal way to run a Linux VM. See the link in the Requirements section for instructions on how to install and configure Ubuntu on WSL.

Also as stated in the Requirements, installation requires Docker Compose, and the simplest way for non-Linux users to get that is via Docker Desktop. See the link in the Requirements section for instructions on how to install Docker Desktop.

Note: you should have Docker Desktop both installed and running before running any docker-compose commands below.

From a bash terminal,

  1. Clone this repo
cd ~
git clone https://github.com/mdrs-community/mdrs-workspace-image.git

For those unfamiliar, this command will make a local copy of the mdrs-workspace-image repository into the current directory, using the Git source control system. This step only needs to be done once.

  1. Change directory into mdrs-workspace-image.
cd mdrs-workspace-image
  1. Run docker-compose pull (Note: Linux users may need to prepend this command with sudo, and Windows and Mac users must have Docker Desktop running) to pull the published version of the workspace image or run docker-compose build to build the image locally. This command is needed initially and can also be used later to retrieve updated versions of the repo.

Using the image locally

Once pulled or built, the image can be run locally on port 6901 using docker-compose.

  • Starting the image locally: Run docker-compose up
  • Stopping the image locally: Use keyboard shortcut Ctrl+C

This starts up a Linux container (essentially a lightweight virtual machine) that is pre-configured with various tools needed for use at MDRS. This virtual machine does not have its own window, instead it serves the desktop up over http/https.

When running locally, the workspace can be accessed at https://localhost:6901 with

  • User: kasm_user
  • Passwordd: password