lxc4u - A low level LXC tool targeted at Ubuntu
Warning! This is still a work in progress.
Provides tools for managing LXC in Ubuntu 12.04 and Ubuntu 12.04 Containers. Other containers are not supported (yet?)
Creates containers using overlayfs
Can handle multiple overlayfs layers
Working examples
Create a container named test1:
import lxc4u
test1_lxc = lxc4u.create('test1')
# Wait a long time...
# Start the container
test1_lxc.start()
Create a container that overlays test1:
import lxc4u
test1_overlay_lxc = lxc4u.create('test1_overlay', base='test1',
overlays=['overlay_path'])
# Start the container
test1_overlay_lxc.start()
test1_overlay_lxc.destroy()
Create a container with multiple overlays of test1. The right most overlay is the upper most overlay directory:
import lxc4u
test1_overlay_lxc = lxc4u.create('test1_overlay', base='test1',
overlays=['overlay1_path', 'overlay2_path'])
# Start the container
test1_overlay_lxc.start()
These examples have not yet been implemented. Soon!
Starting a container named test1. This assumes lxc is properly configured in your system:
import lxc4u
# Start container
test1_lxc = lxc4u.start('test1')
# Stop container
test1_lxc.stop()
# or lxc4u.stop('test1')
Possible interface examples
Starting an ephemeral container using test1 as a base:
import lxc4u
# Start container
test1_ephemeral_lxc = lxc4u.start('test1', ephemeral=True)
# Stop container
test1_ephemeral_lxc.stop()
Starting an ephemeral container using test1 with static network settings:
import lxc4u
network_settings = dict(
ip="10.0.3.5",
gateway="10.0.3.1",
netmask="255.255.255.0",
network="10.0.3.0",
)
# Start container
test1_ephemeral_lxc = lxc4u.start('test1', ephemeral=True,
static_network=network_settings)
# Stop container
test1_ephemeral_lxc.stop()
Starting an ephemeral container using with a startup command (must be available on the container’s path):
import lxc4u
# Start container
test1_ephemeral_lxc = lxc4u.start('test1', ephemeral=True,
startup_command="/usr/local/bin/somecommand")
# Stop container
test1_ephemeral_lxc.stop()
Metadata
Release files for lxc4u 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| lxc4u-0.0.4.tar.gz | 6.9 kB | Without provenance | Details |
Release files / lxc4u-0.0.4.tar.gz
| Download URL | lxc4u-0.0.4.tar.gz |
|---|---|
| Size | 6.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a4e36202866d01444406efe5b69bf481dfd1dba7379ddc7adc28daf57de90426
|
|
BLAKE2b-256 checksum How to use checksums |
bc5b8c6c229c82c5b49c981b8f26c0965823267195f63af825ad353a31ced13c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for lxc4u 0.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.