Skip to main content

README

Balič (read balitch) is a command-line toolset for working with LXC containers.

PyPI - License PyPI - Downloads
PyPI - Status PyPI - Format PyPI - Wheel
PyPI - Version PyPI - Python Versions PyPI - Implementation
coverage.io report

Installation

Install balic via pip:

pip install balic

Balic requires the following packages installed:

appdirs
cliff

Usage

Create a new container:

# create a new lxc container called test
balic create -n test

Build setup:

# create test build directory
mkdir test

# create build.sh that echos hello world inside the container
echo 'echo "hello world"' > test/build.sh

# copy test directory into the container and run build.sh
balic build -n test -d test

In case you need to prepare anything in the build directory:

# create prepare.sh which will be executed locally to prepare build dir
echo 'echo "prepare something inside build dir: `dirname "$0"`"' > test/prepare.sh

# run prepare.sh in given build dir
balic prepare -n test -d test

Multi-step builds can be done as well:

# create test_step2 build directory
mkdir test_step2

# create build.sh that echos "another step" inside the container
echo 'echo "another step"' > test_step2/build.sh

# copy test directory into container and run build.sh
balic build -n test -d test_step2

Pack the built container:

# pack test lxc container into rootfs.tar.gz
balic pack -n test -o rootfs.tar.gz

Destroy the container when no longer needed:

# destroy test lxc container
balic destroy -n test

Full workflow:

balic create -n test                 # creates lxc container names test
balic prepare -n test -d build_dir   # run prepare.sh inside the build_dir
balic build -n test -d build_dir     # builds test lxc container using content of build_dir
balic build -n test -d build_dir2    # builds test lxc container using content of build_dir2
balic build -n test -d build_dir3    # builds test lxc container using content of build_dir3
...
balic pack -n test -o rootfs.tar.gz  # packs test lxc container into rootfs.tar.gz
balic destroy -n test                # destroy test lxc container

Use environment input parameter for build and prepare commands:

# to run `build.sh environment` or `prepare.sh environment` use -e input parameter
balic prepare -n test -d test -e production
balic build -n test -d test -e production

Ie. whatever you specify as environment ends up as $1 in build.sh / prepare.sh.

Documentation

Source of the documentaton is available in the Balic repository https://gitlab.com/markuz/balic/tree/master/docs/source

Development

Pull requests welcomed.

Balic git repository is available at https://gitlab.com/markuz/balic

For more information, see https://gitlab.com/markuz/balic/-/blob/master/docs/source/development.rst

License

BSD 3-clause Clear License

Metadata

Release files for balic 0.0.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for balic 0.0.8
File Size Uploaded Provenance
balic-0.0.8.tar.gz 10.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for balic 0.0.8
File Interpreter ABI Platform
balic-0.0.8-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 21.5 kB

Release files / balic-0.0.8.tar.gz

Download URL balic-0.0.8.tar.gz
Size 10.4 kB
Tags Source
SHA-256 checksum
How to use checksums
bdf36991a05b5bd7be6d1517b8935d0fc126e23857ca5f3f9015e9c9a7ab48fd
BLAKE2b-256 checksum
How to use checksums
b24545bbfd85ccd970523239196c830dee0ae4c5c77344a7cad2314ad8e8e637
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

Release files / balic-0.0.8-py2.py3-none-any.whl

Download URL balic-0.0.8-py2.py3-none-any.whl
Size 11.1 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
ac593a1f302085ad5585548c340aae4275df75c39e5c38ccd6357b852be83aee
BLAKE2b-256 checksum
How to use checksums
25a4398665eb935343ded8b6b469c92f8771e0c2e87b765c04cf8aad37bb72e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

Security for balic 0.0.8

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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