minipod
a MINImal POdman Deployment
Summary
| Latest Version | Unknown |
|---|---|
| License | Unknown |
| CI Status | Failing |
| Stars | 2 |
| Forks | 3 |
| Open Issues | 0 |
| Last Commit | 2026-07-02 |
| Downloads | 0 |
| Last Indexed | 2026-08-01 04:44 |
Installation
nimble install minipod
choosenim install minipod
git clone https://gitlab.com/infai/minipod
OS Compatibility
| Platform | Linux | macOS | Windows | FreeBSD | OpenBSD | NetBSD | Android | iOS | WASM | Embedded |
|---|---|---|---|---|---|---|---|---|---|---|
| minipod | ✓ | ✓ | ✓ | - | - | - | - | - | - | - |
Source
| Repository | https://gitlab.com/infai/minipod |
|---|---|
| Homepage | https://gitlab.com/infai/minipod |
| Registry Source | gitlab |
README
MiniPoD a MINImal POdman Deployment
MiniPoD is a collection of small scripts that wire git, Podman, duplicity, Linux, SSH and systemd in a minimal deployment together.
MiniPoD:
- Provides minipods. A minipod is a script, which creates a Podman pod for a service. All provided minipods cleanly separate the container it's configuration and persistent storage.
- Registers each minipod with systemd for robustness.
- Runs each deployment rootless in its own user space. This gives security against hackerz and
podman pods stop --all. - Makes a clean and complete backup with a systemd service and duplicity.
Requirements:
- Your deployment target is a Linux host. Preferably Ubuntu 22.04 but other distributions should work.
- For continuous deployment you will need GitLab and SSH.
- podman
- duplicity
- age
A GIF showing the greatest feature.
[[TOC]]
Quick start
For testing MiniPoD locally or setting a deployment up without keeping your deployment configuration in a repository, or a GitLab CI job, which automatically deploys when the configuration is updated:
- Install dependencies:
For Ubuntu 22.04:
bash
echo 'deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/unstable/xUbuntu_22.04/ /' | sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:unstable.list
curl -fsSL https://download.opensuse.org/repositories/devel:kubic:libcontainers:unstable/xUbuntu_22.04/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/devel_kubic_libcontainers_unstable.gpg > /dev/null
sudo apt update
sudo apt install podman duplicity age
For Arch Linux:
bash
sudo pacman -S podman crun duplicity age
- Clone MiniPoD:
bash
git clone git@gitlab.com:infai/minipod.git
- Create configs:
bash
cd minipod
export ENVIRONMENT=NAME_FOR_YOUR_ENVIRONMENT
find . -name env-minipod-test -type f -execdir cp {} $ENVIRONMENT \;
- Modify minipod's config:
bash
vi $ENVIRONMENT
- Deploy all the minipods:
bash
./minipod enable $ENVIRONMENT
- Reach each minipod under
$SERVICE.$MINIPOD_HOST:$MINIPOD_PORT, for example ckan.localhost:7000.
Setup
A deployment targets a single host. A deployment can have multiple environments. An environment is defined by a set of environment config files.
The following steps should be repeated for each environment:
- Fork MiniPoD: Everything what you need to deploy and configure an environment is inside the MiniPoD repository. For versioning your own deployment you have to fork MiniPoD.
- Create your
environment config files. - Create
environment users for your deployment. - Setup GitLab
environment.
VERY IMPORTANT!
MiniPoD has the convention that in each deployment environment the following names:
environment config filesenvironment user- GitLab
environment
MUST be identical.
Fork MiniPoD
- Go to MiniPoD's repository.
- Click on
Forkin the upper left corner. - Fill out the form and press
Fork project. - Clone your fork locally and add upstream MiniPoD as a remote:
bash
git clone YOUR_FORK
cd YOUR_FORK
git remote add -f -t main minipod git@gitlab.com:infai/minipod.git
Create environment config files
- A working start configuration is given by the
env-minipod-testfiles. Copy and edit them to create a configuration for yourENVIRONMENT.
bash
cd YOUR_FORK
export ENVIRONMENT=NAME_FOR_YOUR_ENVIRONMENT
find . -name env-minipod-test -type f -execdir cp {} $ENVIRONMENT \;
- At least you should set
MINIPOD_HOST,MINIPOD_PORT_HTTPandMINIPOD_PORT_HTTPSinside theenvironment config filein the root directory. - You can enable and disable minipods by modifying the
MINIPOD_CREATE_SCRIPTSvariable.
Create environment user
Create user, configure ssh access and add your public key to the authorized keys file:
- SSH into deployment server as root.
- Create
environment useruser and login as this user:
bash
environment=NAME_FOR_YOUR_ENVIRONMENT
sudo adduser $environment
su - $environment
- Create an SSH key pair:
bash
mkdir ~/.ssh
ssh-keygen -b 4096 -t rsa -f .ssh/id_rsa -C $(whoami)
cat .ssh/id_rsa.pub >> .ssh/authorized_keys
cat .ssh/id_rsa # PRIVATE_DEPLOY_KEY
cat .ssh/id_rsa.pub # PUBLIC_DEPLOY_KEY
-
Add your public SSH key to
.ssh/authorized_keys, to be able to log in to the environment_user with SSH. -
In your local shell:
bash cat .ssh/id_rsa.pub -
In environment_user's shell:
bash echo "RESULT FROM LAST COMMAND (4.i)" >> .ssh/authorized_keys -
Create an GitLab CI environment for this user in your fork's GitLab repository: Go to Deployments -> Environments and create a
New Environmentwith the same name asenvironment_user. -
Add
SSH_PRIVATE_KEYvariable to your forks GitLab repository:
Go to Settings -> CI/CD -> Variables -> Add variable
- Key: SSH_PRIVATE_KEY
- Value: The result from
cat .ssh/id_rsa - Protected: Uncheck
- Environment scope:
environment_user
Set up GitLab CI job
- Add your
ENVIRONMENTto .gitlab-ci.yml.
Encrypt secrets
- Create a secrets file:
```bash environment=NAME_FOR_YOUR_ENVIRONMENT cp $environment "$environment"-secrets vi $environment # Remove non secret variables
```
- Encrypt secrets file:
bash
./minipod encrypt env-minipod-test
Deploy
After you did the steps described under the setup. You can push your changes to the main branch of your repository.
git add --all
git commit -m "Setup env"
git push
Go to YOUR_FORK -> Deployments -> Environments. To view your deployment.
Backup
Configuration
You can change your backup destination by modifying the BACKUP_DESTIATION variable inside the environment config file in the root directory. Possible backup backend are described in the duplicity documentation under URL FORMAT.
Backups are create automatically with a systemd service. Modify how the backup is run by editing the create-backup script and the minipod_backup.timer template.
Restore a backup
./minipod disable ENVIRONMENT
./restore-backup
./minipod enable ENVIRONMENT
FAQ
Privileged Ports
sudo sysctl -w net.ipv4.ip_unprivileged_port_start=80
Quotas exceeded
For example, the following error indicates, that the kernel key limit is set to small:
join keyctl `d34906332721de9a96f7b4fdd6e771ad23af513edaf07e6ee75438992c850bef`: Disk quota exceeded
sudo sysctl -w kernel.keys.maxkeys=2000
sudo sysctl -w kernel.keys.maxbytes=2000000
Also check out for further limits: Production setup - LXD documentation
Updating
TODO
Deploy script
TODO
Creating a new Minipod
TODO
- Should have
create.sh - use template
- Parameters that wont change inside create script
- named volumes must be unique prefix "$APP_NAME"
- Header
- Should have
nuke.sh - Template
Project owners
@fbrei @BonaBeavis @Kibubu
Acknowledgements
This project is developed with funding from the MaterialDigital support program (13XP5119F).