Skip to content

Add libvirt provider for labctl#687

Open
fccagou wants to merge 4 commits into
jpetazzo:mainfrom
fccagou:prepare-labs-libvirt-provider
Open

Add libvirt provider for labctl#687
fccagou wants to merge 4 commits into
jpetazzo:mainfrom
fccagou:prepare-labs-libvirt-provider

Conversation

@fccagou
Copy link
Copy Markdown
Contributor

@fccagou fccagou commented May 7, 2026

This is the code for issue #685

I have done many tests to check vm creations and configurations then a test creating 3 nodes to run some commands from the slides :

  • labctl ssh container-training
  • k create deployment color --image jpetazzo/color
  • testing curl to cluster IP̀ ...
  • expose service ...

All works well on my laptop running Archlinux with 4 CPU and 16GB of RAM ( it works on my laptop -> production 😄 )

The commit message shows the command lines and indicate the limitations.

Please to help.

@fccagou fccagou force-pushed the prepare-labs-libvirt-provider branch 2 times, most recently from 8c0aa65 to d6c9468 Compare May 10, 2026 14:36
@fccagou fccagou force-pushed the prepare-labs-libvirt-provider branch from d6c9468 to 77db9b1 Compare May 16, 2026 16:47
fccagou added 4 commits May 16, 2026 18:48
…g TF_VAR_xxx from env

The main usecase is to create mini cluster to test changes without creating new settings/xxx file.
The next example

	TF_VAR_nodes_per_cluster=1 \
        TF_VAR_node_size=S  \
          ./labctl create --students 1 --settings settings/kubernetes.env --provider proxmox --tag container-training

will create 1 cluster on 1 node with S profile for hardware resource.

Signed-off-by: fccagou <me@fccagou.fr>
It's the first version working for only 1 student/cluster.
The code contains `TODO:` labels to remind some ideas for future
versions _( grep -r "TODO:" prepare-labs/terraform/*/libvirt)_

Running testing command on laptop:

     TF_VAR_nodes_per_cluster=2 \
     TF_VAR_node_size=S \
     ./labctl create \
        --students 1 \
        --settings settings/kubernetes.env \
        --provider libvirt  --tag container-training

To destroy , run

     ( TAG=container-training ; ./labctl destroy "$TAG" ; rm -f tags/"$TAG"/* )

Signed-off-by: fccagou <me@fccagou.fr>
Signed-off-by: fccagou <me@fccagou.fr>
…er of students

Signed-off-by: fccagou <me@fccagou.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant