Sandbox: emulators in the browser

All the emulators and simulators of damn.academy are gathered here, and each runs on its own, without a lesson or tasks. Everything works right in the browser, nothing needs installing, and the code is open source under Apache 2.0.

Linux simulator

This is a Linux command line that the trainer runs itself, without a processor emulator. It has a file system with permissions and owners, users and groups, processes and signals, systemd with its journal, a package manager, pipes and redirections, and more than a hundred and fifty commands from ls and grep to find, tar and sed. man and --help show the help of any command. The simulator opens in a fraction of a second and suits a first acquaintance with Linux, a phone included.

There is no kernel here, so programs the trainer does not know cannot run, and rare options of known commands may be missing. A real kernel runs in the “Real Alpine Linux” sandbox.

Real Alpine Linux

This is a real machine with Alpine Linux, run by an x86 processor emulator (v86) inside the browser tab. It has bash, OpenRC, sshd, nginx, iproute2, nftables, dnsmasq, LVM, parted, git and OpenTofu, with the man pages installed. The second variant boots the installer media with a blank 2 GB disk: install the system on it with setup-alpine and boot from the disk. The machine state is saved in this browser, and “Reset the machines” brings it back to the start.

The emulator is several times slower than a real processor, and the machine has no way out to the internet: it sees only the lab network 10.0.0.0/24, so packages cannot be installed from the internet.

Several machines and a switch

In this lab two or three real Linux machines run, each in its own browser thread, and their network cards are plugged into the trainer’s switch. Like a real one, the switch remembers which MAC address sits behind which port and forwards a frame only to where the receiver is. The diagram is drawn from its decisions: every frame moves along the cables, the MAC table fills as the switch learns, and you can turn the switch into a hub or pull a cable and watch the traffic change.

The machines run a small Linux with BusyBox rather than a full distribution, and they have no internet: their network exists only inside the tab.

A VLAN network on real machines

Three Alpine Linux machines are plugged into a switch with VLANs: machine a is on an access port of VLAN 10, machine b on VLAN 20, and machine sw on a trunk that receives the frames of both VLANs with 802.1Q tags. On these machines you can create VLAN interfaces, bridges, routes and nftables rules, and the switch records every frame. The recording downloads as a .pcap file that opens in Wireshark, and the line of any port can get loss and delay.

Three machines take more than a gigabyte of tab memory, so the lab needs a computer. The machines have no way out to the internet.

Network simulator

The simulator builds a network of several hosts: interfaces with addresses, routes, ARP neighbours, netfilter rules, DNS and HTTP services. You work on one of the hosts with ip, ss, ping, traceroute, dig, nslookup, curl, nc, tcpdump and iptables, and every command answers from the state of that network. The topology is chosen before the start: a home network, an office, two subnets, a NAT gateway or a load balancer with servers.

No packets really travel here: the simulator computes what would happen in such a network, so commands and options it does not know are unavailable.

Docker simulator

The Docker simulator reproduces the behaviour of the daemon and the client: docker run, ps, logs, exec, build from a Dockerfile with layers and cache, networks and published ports, volumes, inspect and docker compose. The images alpine:3.22 and nginx:1.30-alpine are already pulled, and curl knows the containers’ addresses and the published ports. Below Docker the low level is visible too: the crun command and the processes’ namespaces.

The containers do not run real programs: the images come from the trainer’s catalogue, and an arbitrary image from Docker Hub cannot be pulled.

Kubernetes simulator

The Kubernetes simulator keeps in the tab’s memory a cluster of a control-plane node and two workers: the scheduler, the Deployment, ReplicaSet, StatefulSet, DaemonSet and Job controllers, services, DNS, RBAC and admission. The terminal has kubectl and helm, and kubectl explain and --help show the help. The home directory holds the manifests web.yaml and svc.yaml: apply them with kubectl apply -f, and create your own with edit or cat > file.yaml. Pods start here in seconds.

The containers in the pods run no real programs, and the simulator rejects fields and resources it does not know with an error. Real Kubernetes runs in the “Real Kubernetes in the tab” sandbox.

Real Kubernetes in the tab

This is real Kubernetes, version 1.37. The control-plane components, that is kube-apiserver, the scheduler and the controllers, are built for WebAssembly and run in the tab itself, and the worker node with a kubelet and containerd boots the kuberoot distribution in a RISC-V processor emulator. kubectl commands run against this cluster, so pods go the whole real way from the scheduler to a running container.

The emulated node is slow: a new pod starts in one to three minutes, and pulling large images does not finish in a reasonable time, so pods use the images already on the node. The control-plane components are not a node of the cluster, and helm and metrics-server do not run in the cluster of the tab.

The cloud in the tab

The whole training cloud runs here: a workstation with curl, git and OpenTofu, the cloud REST API api.cloud.lab with its OpenAPI description, the object storage s3.cloud.lab, a metadata server, load balancers, the Git server git.lab and the CI ci.lab, which runs a pipeline after git push. Every VM created through the API or OpenTofu boots as a real Alpine Linux machine in this tab and gets an address, an SSH key and metadata, as in a real cloud.

Every VM adds about 250 MB of tab memory, so no more than three or four machines fit at once. The cloud exists only in this tab and starts afresh after the tab is closed.

Git and CI simulator

The home directory holds a clone of the project ~/site, and a training forge, much like GitLab, keeps its origin repository team/site. The git command works with a real object model: commits, branches, merges, rebase, conflicts and the reflog. After git push the forge runs the pipeline of .gitlab-ci.yml, and glab shows pipelines, jobs, their logs and merge requests. Files are edited with edit, and yamllint checks YAML.

The trainer runs the pipeline jobs, not a real runner with containers, and external repositories such as GitHub cannot be reached from here.

Vim 9

This is real Vim 9 on an Alpine Linux machine run by a processor emulator in the tab. Above the terminal a panel holds the keys the browser keeps for itself, such as Esc and Ctrl-W, and in Chrome and Edge the fullscreen button captures the whole keyboard. Training files are in /srv/train, and the same machine has Neovim, Emacs, tmux and ripgrep.

The editor needs a computer with a keyboard. The machine has no internet, so plugins cannot be installed from the network.

Neovim 0.12

This is real Neovim 0.12 on an Alpine Linux machine in the tab. A Lua configuration goes into ~/.config/nvim/init.lua, the built-in terminal and :help work as usual, and the panel above the terminal passes to the editor the keys the browser keeps for itself. The same machine has Vim and Emacs.

The editor needs a computer with a keyboard. The machine has no internet, so plugin managers cannot download anything.

Emacs 30

This is real Emacs 30 in terminal mode on an Alpine Linux machine in the tab. For commands like M-x, Option works as Meta on a Mac, and the panel above the terminal passes the chords C-x, C-g and M-x that the browser might take. Training files are in /srv/train, and the same machine has Vim and Neovim.

Emacs runs without a graphical window, in the terminal only, and the machine has no internet, so packages from ELPA cannot be installed.

Vim and Emacs keyboard shortcut trainer

Each drill shows a text and a cursor, and the goal says what the text must become. At a keyboard you type Vim or Emacs commands with real key presses and build the shortcut habit. On a phone the same drills become a command walkthrough, with Esc, Ctrl, Meta and the arrows as on-screen buttons. Either way the change of the text is checked against the expected result, not against the keys pressed.

The drills run on an emulation of Vim and Emacs in the CodeMirror editor, not on the editors themselves, so it lacks the undo tree, plugins and some commands. Real Vim, Neovim and Emacs run in the other sandboxes of the Editors group.

Flow of work simulator

This is a Kanban board with a team, tasks and working days. You drag cards and people, set work-in-progress limits and end the day, after which the team works, and the cumulative flow diagram, the throughput chart and the spread of lead times update. At the end the debrief compares your run with two bots on the same random sequence, so you see which decisions sped the flow up and which slowed it down. The scenario is chosen before the start.

This is a model, not a task tracker: the team, the tasks and the random events come from the scenario, and you cannot add tasks of your own.

Built-in documentation

Lessons and exams refer not to a retelling but to the real documentation: man pages, the output of --help and snapshots of the Docker, Kubernetes and GitLab documentation. All of it is stored in the platform itself and opens offline. Here the Linux simulator’s terminal runs: type man ls, ls --help, docker run --help or kubectl explain pod, and the page opens in a panel beside the terminal, where it can be searched.

The corpus holds the pages the courses need, not all the documentation in the world, so a rare command may have no page.

Process explainers

An explainer shows a process as a live model: what happens when a program starts, how a frame passes a switch, how the Kubernetes scheduler picks a node or how a CI pipeline hands artefacts on. You step through it forwards and backwards, before some steps it asks you to predict what comes next, and the model’s parameters and faults can be changed to watch the whole process change. Choose any explainer of the courses before the start.

An explainer shows a model of a process, not the real system, so it shows only the details the author found important for understanding.

AI mentor

The mentor works through your own AI provider: DeepSeek, OpenRouter, OpenAI, Google Gemini, Anthropic, a local Ollama or any server with an OpenAI-style API. Requests go straight from the browser to the chosen provider, so the course server sees neither the key nor the questions, and the key is stored encrypted in this browser. After the start the connection settings and a button that opens the mentor panel in free mode appear here.

Without a connected key the mentor does not answer itself and only packs the question into a text that can be pasted into any public chat. The quality of the answers depends on the chosen model.

Questions and review

This engine asks eight kinds of questions: one or several answers, the order of steps, matching, typing a command, predicting the output, finding the bug and labels on a diagram. It remembers every answer and decides from it when to bring a concept back for review: the intervals grow, and a concept with a mistake comes back sooner. Questions are at the end of lessons, in level checks and in exams, and the review queue opens in the Review section.

Every answer changes the review schedule, so the engine has no separate run in the Sandbox: the questions work where their answers mean something.

Business course trainers

In the business courses a task is checked not by the state of a machine but by written work, decisions and calculations. A model grades a text against the author’s rubric or plays a visitor at a conference booth, the learner sorts signals and features against an answer key, builds a GOVERNANCE.md from options, works a funnel or downloads a spreadsheet template. These trainers are built into the lessons of the sales, PR, product, events, open source, marketing, finance and metrics courses.

Each trainer works with the task of its lesson and keeps the attempts with it, so they start from the lessons of the business courses.

Department simulator

The department simulator is a text game of the business courses. You lead the marketing, PR, product or sales of a company with an open product, and a language model runs the game: it describes the company, the market and the people, answers your decisions and reviews the quarter at the end. There are seven scenarios, from a quarter in the marketing department to a year of a project in CNCF incubation. You play through the connected AI mentor or copy the ready game-master text into any chat.

The game keeps a session with the lesson its scenario belongs to, so it starts from the lessons of the business courses. The game master is always a language model, and without a key or a public chat the game cannot run.

The lab on a company’s servers

A company can run the lesson machines not in a browser tab but in its own Kubernetes or on its own Linux servers. It installs the server lab with the Helm chart deploy/server-lab, and the course site learns about it from the file server-lab.json. The learner signs in with an invitation or through the company’s single sign-on, and the lesson offers to start the machines on the server. To a lesson such a machine is no different from one in the tab: the same addresses, the same checks, the same facts.

The server lab is off on damn.academy, because a company deploys it on its own premises. On this site the machines in the tab open on the real Alpine Linux page.

Practice it in the trainer

Professions and courses are structured differently because they teach different things. They share one principle: every concept must be tried, not just read about. In the DevOps engineer profession, practice takes place in a terminal on real machines; in the business courses, it uses diagrams, trainers, spreadsheet templates and simulators of company departments where an AI acts as the facilitator.