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

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.0.tar.gz (17.5 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.0-py2.py3-none-any.whl (9.8 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: chibi_lxc-1.0.0.tar.gz
  • Upload date:
  • Size: 17.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for chibi_lxc-1.0.0.tar.gz
Algorithm Hash digest
SHA256 c70677f73c49811b51d560b7aa3b6f596ea35e1d1a20603386bdd3c655c1b639
MD5 86b96731bde51076c86de0052ad1490f
BLAKE2b-256 be2fb037c92142240ee8a6e771594a34b122c7a8fb17c1c8f0d284ee77dff28f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chibi_lxc-1.0.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 9.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for chibi_lxc-1.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 b21a810f3bef63dd11cdf2d198c2eefcddcd8b3570869dcf38c93cf029509071
MD5 e31866ac1f023196e970abe1523fb2b6
BLAKE2b-256 1769074b37d42f7576b433b0b2028606b0aef8ed558cc792193aaed2b9e5badf

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