Documentation
Installation and execution guide for OTLab laboratories.
OTLab Documentation
This documentation describes the steps required to configure the environment for running OTLab laboratories using Docker. It also presents the basic management commands and the overall project structure.
Requirements
Before starting, make sure you have installed:
- Git
- Docker Engine
- Docker Compose
- WSL2 (recommended for Windows users)
- Visual Studio Code (optional)
Docker Installation (Ubuntu / WSL2)
Update the system:
sudo apt update && sudo apt upgrade -y
Install dependencies:
sudo apt install -y ca-certificates curl gnupg
Add the official Docker repository:
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg \
| sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo "$VERSION_CODENAME") stable" \
| sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
Install Docker Engine and Docker Compose:
sudo apt update
sudo apt install -y \
docker-ce \
docker-ce-cli \
containerd.io \
docker-buildx-plugin \
docker-compose-plugin
Start Docker:
sudo service docker start
Allow Docker to run without sudo:
sudo usermod -aG docker $USER
newgrp docker
Verify installation:
docker --version
docker compose version
Clone the Repository
git clone https://github.com/substationworm/OTLab.git
cd OTLab
Run a Laboratory
Each laboratory includes its own management script.
Example for OTLab01:
cd OTLab01
chmod +x OTLab01.sh
./OTLab01.sh -start ubuntu
./OTLab01.sh -run
Management Commands
| Command | Description |
|---|---|
./OTLab01.sh -start ubuntu | Starts the laboratory |
./OTLab01.sh -run | Opens a terminal inside the otlab-student container |
./OTLab01.sh -status | Displays the current container status |
./OTLab01.sh -stop | Stops the containers |
./OTLab01.sh -restart | Restarts the containers |
./OTLab01.sh -clean | Removes containers, volumes, and networks |
Note: The script name changes depending on the laboratory (
OTLab02.sh,OTLab03.sh, etc.).
Repository Structure
βββ .github/
β βββ workflows/
β βββ hugo.yml
β
βββ .landingPage/
β βββ archetypes/
β βββ content/
β βββ i18n/
β βββ layouts/
β βββ static/
β βββ hugo.yaml
β βββ README.md
β βββ CONTRIBUTING.md
β
βββ OTLab01/
βββ OTLab02/
βββ OTLab03/
βββ OTLab04/
βββ OTLab05/
βββ OTLab06/
βββ OTLab07/
βββ OTLab08/
βββ OTLab09/
βββ OTLab10/
βββ OTLab11/
βββ OTLab12/
βββ OTLab13/
The .landingPage folder contains all Hugo website code, including layouts, content, translations and static assets.
Each OTLabXX folder contains the laboratory Markdown files, translated versions, automatically generated PDFs and execution scripts associated with the corresponding laboratory environment.
CI/CD
The website is automatically generated using GitHub Actions.
The pipeline performs:
- Hugo website build;
- Automatic generation of laboratory PDFs;
- Automatic deployment to GitHub Pages;
- Website updates after changes are pushed to the main branch.
