Categorygithub.com/TroutSoftware/labomatic
modulepackage
0.0.0-20241218163418-6133b446a7a1
Repository: https://github.com/troutsoftware/labomatic.git
Documentation: pkg.go.dev

# README

Lab-O-Matic: A Language Description for Labs

labomatic is a tool to configure and run a lab. It aims to provide a singular point in the lab creation space:

  • use configuration-as-code (versioning, …)
  • the network structure is described using Python (Starlark)
  • all systems are image-based, with a new well-known images
  • we only aim to emulate SME-level infrastructure
  • QEMU + netlink
  • minimalist

Other tools (netlab, containerlab, …) will make different choices.

First install (Ubuntu)

NOTE: all those steps are meant to be automated too.

The Ubuntu image from upstream needs to be configured to accept authentication.

https://cloud-images.ubuntu.com/minimal/releases/jammy/release/ubuntu-22.04-minimal-cloudimg-amd64.img

  1. Generate the seed image

cloud-localds seed.img user-data.yaml metadata.yaml

  1. Run the VM

sudo qemu-system-x86_64
-machine accel=kvm,type=q35
-cpu host
-m 2G
-nographic
-device virtio-net-pci,netdev=net0
-netdev user,id=net0
-drive if=virtio,format=qcow2,file=/tmp/ubuntu-22.04-minimal-cloudimg-amd64.img
-drive if=virtio,format=raw,file=seed.img

run

sudo systemctl disable systemd-networkd-wait-online.service sudo systemctl mask systemd-networkd-wait-online.service

# Packages

No description provided by the author
No description provided by the author

# Functions

Build creates the full virtual lab from the Starlark definitions.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Open a QMP socket in network namespace ns, using transport ntw and address addr.
No description provided by the author
RunVM starts the given node as virtual machine.
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
standard telnet.
No description provided by the author

# Structs

No description provided by the author
Nodes are VMs or light namespaces in the current lab.
TemplateNode is the data structure passed to node init templates.

# Interfaces

works around different implementations of the agent.

# Type aliases

Addr exposes IP addresses to Starlark.
Controllers are used to define what commands to run on the lab.
No description provided by the author
No description provided by the author