Skip to main content

definition of lxc containers using python

Project description

chibi_lxc

https://img.shields.io/pypi/v/chibi_lxc.svg https://img.shields.io/travis/dem4ply/chibi_lxc.svg Documentation Status

definition of lxc containers using python class and manage lxc similar to vagrant

Example

write a file with the container

from chibi_lxc import Container
class Centos_8( Container ):
        name = 'centos_8'
        distribution = 'centos'
        arch = 'amd64'
        version = '8'
        provision_folders = { 'scripts': 'provision' }
        env_vars = { 'LC_ALL': 'es_MX.utf8' }
        scripts = ( 'install_python.sh', ( 'add_user.py', 'chibi', ) )

write a config.py

with the next conten

import sys
from chibi.config import configuration
from chibi.file import Chibi_path
from chibi.module import import_

sys.path.append( Chibi_path( '.' ).inflate )

from containers.base import Centos_7


configuration.chibi_lxc.containers.add( Centos_7 )

the scripts should be in the folder provision_folders[ ‘scripts’ ]

create the container

chibi_lxc up Centos_8 # create the container
chibi_lxc provision Centos_8 # not needed the first time
chibi_lxc list # lista los container configurados
chibi_lxc status # lista el status de los container
chibi_lxc host # lista el estado y hosts de los container
chibi_lxc stop Centos_8 # stop the container
chibi_lxc destroy Centos_8 # destroy the container

Features

  • create container

  • provision container

  • destroy container

History

1.0.1 (2026-06-06)

  • se agrego una excepcion para cuando sea root no use la env var de USER

0.0.1 (2020-04-05)

  • First release on PyPI.

Project details


Download files

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

Source Distribution

chibi_lxc-1.0.1.tar.gz (17.6 kB view details)

Uploaded Source

Built Distribution

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

chibi_lxc-1.0.1-py2.py3-none-any.whl (9.9 kB view details)

Uploaded Python 2Python 3

File details

Details for the file chibi_lxc-1.0.1.tar.gz.

File metadata

  • Download URL: chibi_lxc-1.0.1.tar.gz
  • Upload date:
  • Size: 17.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for chibi_lxc-1.0.1.tar.gz
Algorithm Hash digest
SHA256 390b8c51812c386529b44253f57e07992d32558a553d2ee79bf068265541bf66
MD5 3145ea2da4f6cca359f315a18e74c64f
BLAKE2b-256 81054f268861c4a649870ec4e513315fa04a815dd96d75ae76b1f019d596e81a

See more details on using hashes here.

File details

Details for the file chibi_lxc-1.0.1-py2.py3-none-any.whl.

File metadata

  • Download URL: chibi_lxc-1.0.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 9.9 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for chibi_lxc-1.0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 86489d5e9595974eee3517416e502d41aed522d0842bc27631d5abbaad846a4a
MD5 5a0612a25c36be0f5e8029942be7c458
BLAKE2b-256 2abd003a6e39039bfeac6f803e872924baa0323f75945bc61e2f0d30290fe501

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page