Skip to content
eduardojPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Standalone salt states to run minimal systemd-nspawn containers

Provide a minimal, safe, conteinerized environment to run an AI agent over a codebase.

Introduction

This repository defines a set of salt states used to:

  • create a systemd-nspawn server installation
  • create a systemd-networkd configuration that allows every nspawn container to access internet.
  • create a systemd-nspawn container with a minimal openSUSE Tumbleweed distribution.

Requirements

These salt states are meant to be run in a development machine with a default openSUSE Tumbleweed. That means that no previous systemd-networkd installation/configuration was performed.

List of requirements:

  • Base installation of openSUSE Tumbleweed
  • Packages: salt-minion
  • All salt commands must be run inside the copy of this repository.

How to run salt standalone

Test

sudo salt-call -c config state.apply test=True

Nspawn server

Install:

sudo salt-call -c config state.apply salt.nspawn_server

Nspawn container

Install:

sudo salt-call -c config state.apply salt.nspawn_container

Install everything

Install both, server and container:

sudo salt-call -c config state.apply

Use the container

  • State:
machinectl status tumbleweed     # show state
  • Start:
machinectl start tumbleweed     # Boot the container
  • Stop:
machinectl stop tumbleweed     # Shutdown the container
  • Open a shell inside the container:
machinectl shell tumbleweed     # Open a shell inside the container

Delete everything and return to initial state

You may want to leave your system as it initially was.

To remove the container, purge it with:

sudo salt-call -c config state.apply salt.nspawn_container.purge

If you also want to remove the systemd-nspawn and related packages, uninstall them with:

sudo salt-call -c config state.apply salt.nspawn_server.uninstall

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages