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-0.3.0.tar.gz (17.2 kB view details)

Uploaded Source

Built Distribution

chibi_lxc-0.3.0-py2.py3-none-any.whl (9.7 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: chibi_lxc-0.3.0.tar.gz
  • Upload date:
  • Size: 17.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for chibi_lxc-0.3.0.tar.gz
Algorithm Hash digest
SHA256 5522162d031997c0816494cbb1aad694dcb793f4bb4dde224b193e6a94ccfcca
MD5 0e855bb7ddd0a096b471aabd2fb9e77a
BLAKE2b-256 f503cbc822fe06d584bef05e3c4fb734d0f8d4add4c40537d87b6df24521edf0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chibi_lxc-0.3.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 9.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for chibi_lxc-0.3.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 04ca4628e43ee2756aa9a88ff058a9ff76cf327cf6f93aaf83299e6a2368fc12
MD5 475db6fbc8947d788cbf1e5526a5e6c1
BLAKE2b-256 2cd0332764d70762d6cea6a8c2d729cdd8396555c2bb4997bc094327be667ed6

See more details on using hashes here.

Supported by

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