Workspace Design

Read time12 min

Preface

For every user in our platform, we would provision:

  1. A docker container with VSCode (VSCode in the browser)
  2. An EC2 VM with RDP Access

The user once enrolled into a micro-experience, can choose to either use VSCode in the browser or RDP into the machine and work.

In order to support this, the users home directory will be mounted on an NFS File Share (EFS on AWS) so the user can seamlessly switch between VCode in browser and the EC2 VM.

Base docker image/VM image:

- certain software is installed as a part of the base image in the contiainer and the VM. There may be some shared software accross the VM and container that will have to be installed (ex: filebeat, logstash, java, etc)

Personalization:

- when the container/VM is brought up for a user the runtime is personalised for the user (ex: ssh keys, password, etc).

NFS Mount

- Cloudformation template would bring up an NFS Share on EFS for all users

This NFS mount would be used to mount each users home directory into the runtime (container/VM).



EC2 VM

Cloudformation Template will to bring up EC2 VMs on trigger:

  1. User clicks on GetVM in the frontend
  2. Trigger cloudformation stack (taking some params from backend)
    1. Bring up EC2 instance with specified config & base image
    2. Attatch public ip, disk etc to new instance
    3. Ensure user home dir is mounted from the NFS mount
    4. Run the workspace personalisation ansible script to set ssh keys, etx (with params from the CF stack trigger)
    5. Ansible script should raise event when ready to backend
  3. Backend will persist the metadata from ansible script to db
  4. Inform frontend through websocket.

VSCode in Container

//TBA

Doc powered byarchbee