Skip to main content

inmanta-module-podman

pypi version build status

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:

  1. podman::Network: to manage a podman network (subnets, routes, dns, driver, labels, options, ...).
  2. podman::NetworkDiscovery: to discover existing podman networks owned by a user on a host.
  3. podman::Pod: to manage a podman pod, including its networking, port publishing, id mapping and shared resources.
  4. podman::Container: to manage a podman container (image, command, environment, volumes, networks, healthcheck, security label, resource limits, auto-update, ...).
  5. podman::Image, podman::ImageFromRegistry and podman::ImageFromSource: to make sure a container image is present on a host, either pulled from a registry or built from a Containerfile.
  6. podman::ImageDiscovery: to discover existing container images owned by a user on a host.
  7. podman::AutoUpdate: to configure the podman auto-update service for a given user.
  8. podman::services::SystemdContainer, podman::services::SystemdPod and podman::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 the podman cli) 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!

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

inmanta_module_podman-1.13.1.tar.gz (37.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

inmanta_module_podman-1.13.1-py3-none-any.whl (44.1 kB view details)

Uploaded Python 3

File details

Details for the file inmanta_module_podman-1.13.1.tar.gz.

File metadata

  • Download URL: inmanta_module_podman-1.13.1.tar.gz
  • Upload date:
  • Size: 37.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for inmanta_module_podman-1.13.1.tar.gz
Algorithm Hash digest
SHA256 bdaa770c0751f3c6d430353b956d1c0f91d62cf337a288a83286eb8971a4e6f4
MD5 1042dffcb3e7e95a63664b3ad7fedead
BLAKE2b-256 13a02cef87c20b8a951b414f7275aad7bf74e1659d5a43b296b8d6f56feb37bd

See more details on using hashes here.

Provenance

The following attestation bundles were made for inmanta_module_podman-1.13.1.tar.gz:

Publisher: continuous-delivery.yml on edvgui/inmanta-module-podman

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file inmanta_module_podman-1.13.1-py3-none-any.whl.

File metadata

File hashes

Hashes for inmanta_module_podman-1.13.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e858fce25468cee0a82ef7427534fd8ba1a5e0256e9ada7e629439bb4156ee26
MD5 796f73fab28c2caa274a33450c8accbb
BLAKE2b-256 2f91c1bdf7affee60410879a5ac2d27385ae5a7d0b0b9c4a2faa6f8ab7b9b6bb

See more details on using hashes here.

Provenance

The following attestation bundles were made for inmanta_module_podman-1.13.1-py3-none-any.whl:

Publisher: continuous-delivery.yml on edvgui/inmanta-module-podman

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

1.13.1 This release

2 files

1.13.0

2 files

1.12.0

2 files

1.11.3

2 files

1.11.2

2 files

1.11.1

2 files

1.11.0

2 files

1.10.1

2 files

1.10.0

2 files

1.9.0

2 files

1.8.1

2 files

1.8.0

2 files

1.7.0

2 files

1.6.0

2 files

1.5.1

2 files

1.5.0

2 files

1.4.1

2 files

1.4.0

2 files

1.3.0

1 file

1.2.0

1 file

1.1.0

1 file

1.0.1

1 file

1.0.0

1 file

0.7.1

1 file

0.7.0

1 file

0.6.0

1 file

0.5.0

1 file

0.4.2

1 file

0.4.1

1 file

0.4.0

1 file

0.3.1

1 file

0.3.0

1 file

0.2.0

1 file

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page