Simple module to manage podman resources
Project description
inmanta-module-podman
This package is an adapter that is meant to be used with the inmanta orchestrator: https://docs.inmanta.com
Features
This module allows to manage podman resources, on a unix host. It contains the following resources:
podman::Network: to manage a podman network (subnets, routes, dns, driver, labels, options, ...).podman::NetworkDiscovery: to discover existing podman networks owned by a user on a host.podman::Pod: to manage a podman pod, including its networking, port publishing, id mapping and shared resources.podman::Container: to manage a podman container (image, command, environment, volumes, networks, healthcheck, security label, resource limits, auto-update, ...).podman::Image,podman::ImageFromRegistryandpodman::ImageFromSource: to make sure a container image is present on a host, either pulled from a registry or built from aContainerfile.podman::ImageDiscovery: to discover existing container images owned by a user on a host.podman::AutoUpdate: to configure the podman auto-update service for a given user.podman::services::SystemdContainer,podman::services::SystemdPodandpodman::services::SystemdAutoUpdate: to wrap a container, a pod or the auto-update service into a systemd service. These services can either be generated as plain systemd unit files (calling thepodmancli) or as quadlet unit files.
Example
The following example shows how to run a container as a systemd service, using a quadlet unit file. The container is a simple nginx web server, exposing its port 80 on the host port 8080.
import mitogen
import podman
import podman::container_like
import podman::services
import std
host = std::Host(
name="localhost",
os=std::linux,
via=mitogen::Local(),
)
# Make sure the container image is present on the host
image = podman::ImageFromRegistry(
host=host,
name="docker.io/library/nginx:latest",
)
# Define the container
web = podman::Container(
host=host,
name="nginx-web",
image=image.name,
publish=[
podman::container_like::Publish(host_port="8080", container_port="80"),
],
)
# Wrap the container into a systemd service, using a quadlet unit file
podman::services::SystemdContainer(
container=web,
state="running",
enabled=true,
systemd_unit_dir="/etc/systemd/system",
systemd_container_dir="/etc/containers/systemd",
quadlet=true,
)
Find more examples in the tests folder of this module!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file inmanta_module_podman-1.11.0.tar.gz.
File metadata
- Download URL: inmanta_module_podman-1.11.0.tar.gz
- Upload date:
- Size: 34.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dec8408a5a467bc1a8053ee4dc484803dcd0165cf1bb73ff36e38b0f64aafb52
|
|
| MD5 |
ed054a36a2cb7c68ad87b5cf4332f4c2
|
|
| BLAKE2b-256 |
547c7b713b50d599517d211149fef71ded916b85c05e3539b637bf785d0075bd
|
Provenance
The following attestation bundles were made for inmanta_module_podman-1.11.0.tar.gz:
Publisher:
continuous-delivery.yml on edvgui/inmanta-module-podman
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
inmanta_module_podman-1.11.0.tar.gz -
Subject digest:
dec8408a5a467bc1a8053ee4dc484803dcd0165cf1bb73ff36e38b0f64aafb52 - Sigstore transparency entry: 1629769067
- Sigstore integration time:
-
Permalink:
edvgui/inmanta-module-podman@d8d82cb6c8b5cd443e5989d4f69eccb3a3759448 -
Branch / Tag:
refs/tags/1.11.0 - Owner: https://github.com/edvgui
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
continuous-delivery.yml@d8d82cb6c8b5cd443e5989d4f69eccb3a3759448 -
Trigger Event:
push
-
Statement type:
File details
Details for the file inmanta_module_podman-1.11.0-py3-none-any.whl.
File metadata
- Download URL: inmanta_module_podman-1.11.0-py3-none-any.whl
- Upload date:
- Size: 43.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f0f21d33ef3b01f28377cfee9ab2f228fd124454a4c55389aa84c6008cfeea4e
|
|
| MD5 |
6204e74e9aa774dfeb0606994b762bd8
|
|
| BLAKE2b-256 |
1022062372cad3621ece4e5b22149a362403a215deacf146a753754400b9a950
|
Provenance
The following attestation bundles were made for inmanta_module_podman-1.11.0-py3-none-any.whl:
Publisher:
continuous-delivery.yml on edvgui/inmanta-module-podman
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
inmanta_module_podman-1.11.0-py3-none-any.whl -
Subject digest:
f0f21d33ef3b01f28377cfee9ab2f228fd124454a4c55389aa84c6008cfeea4e - Sigstore transparency entry: 1629769089
- Sigstore integration time:
-
Permalink:
edvgui/inmanta-module-podman@d8d82cb6c8b5cd443e5989d4f69eccb3a3759448 -
Branch / Tag:
refs/tags/1.11.0 - Owner: https://github.com/edvgui
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
continuous-delivery.yml@d8d82cb6c8b5cd443e5989d4f69eccb3a3759448 -
Trigger Event:
push
-
Statement type: