All Projects → bsdci → libioc

bsdci / libioc

Licence: other
A Python library to manage jails with ioc{age,ell}

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to libioc

ioc
libioc command line tool for BSD jail management
Stars: ✭ 13 (-65.79%)
Mutual labels:  freebsd, jail
ansible-sshjail
An Ansible connection plugin for provisioning FreeBSD jails remotely
Stars: ✭ 57 (+50%)
Mutual labels:  freebsd, jail
control-pane
ClonOS WEB control panel (CBSD WEB UI)
Stars: ✭ 112 (+194.74%)
Mutual labels:  freebsd, jail
potluck
This project contains the FreeBSD pot (jail) (pkg install pot) flavours which are regularly built with Jenkins and published on potluck.honeyguide.net.
Stars: ✭ 23 (-39.47%)
Mutual labels:  freebsd, jail
jail exporter
A Prometheus exporter for FreeBSD jail metrics
Stars: ✭ 21 (-44.74%)
Mutual labels:  freebsd, jail
nerfball
Want to see how something like Internet Chemotherapy works without bricking your own vms? This is a jail to reduce the python runtime from doing bad things on the host when running untrusted code. Nerf what you do not need 👾 + 🐛 ⚽ 🏈 🐳
Stars: ✭ 19 (-50%)
Mutual labels:  jail
cya
Easy to use snapshot and restore utility for any Linux (Unix) OS and filesystem powered by BASH
Stars: ✭ 73 (+92.11%)
Mutual labels:  freebsd
smooth
The smooth Class Library
Stars: ✭ 23 (-39.47%)
Mutual labels:  freebsd
freebsd-ports-nix
Nix package manager port for the FreeBSD Ports Collection
Stars: ✭ 33 (-13.16%)
Mutual labels:  freebsd
cxx
🔌 Configuration-free utility for building, testing and packaging executables written in C++. Can auto-detect compilation flags based on includes, via the package system and pkg-config.
Stars: ✭ 87 (+128.95%)
Mutual labels:  freebsd
BlackBox
Oberon Microsystems BlackBox Component Builder port for OpenBSD, GNU/Linux and FreeBSD
Stars: ✭ 24 (-36.84%)
Mutual labels:  freebsd
WendzelNNTPd
A usable and IPv6-ready Usenet-server (NNTP daemon). It is portable (Linux/*BSD/*nix), supports AUTHINFO authentication, contains ACL as well as role based ACL and provides "invisible" newsgroups. It can run on MySQL and SQLite backends.
Stars: ✭ 43 (+13.16%)
Mutual labels:  freebsd
bsdhwmon
Hardware sensor monitoring utility for FreeBSD
Stars: ✭ 16 (-57.89%)
Mutual labels:  freebsd
gnb udp over tcp
gnb_udp_over_tcp 是一个为GNB开发的通过tcp链路中转UDP分组转发的服务
Stars: ✭ 32 (-15.79%)
Mutual labels:  freebsd
jailman
Automated iocage Jail manager for FreeNAS
Stars: ✭ 26 (-31.58%)
Mutual labels:  freebsd
prisoners
حبس از دید اعداد واقعی - Persian translation for "Incarceration in real numbers"
Stars: ✭ 22 (-42.11%)
Mutual labels:  jail
InitWare
The InitWare Suite of Middleware allows you to manage services and system resources as logical entities called units. Its main component is a service management ("init") system.
Stars: ✭ 164 (+331.58%)
Mutual labels:  freebsd
fastd
Fast and Secure Tunnelling Daemon (fastd) for FreeBSD
Stars: ✭ 29 (-23.68%)
Mutual labels:  freebsd
FreeBSD-Ask
FreeBSD 教程——FreeBSD 从入门到跑路。
Stars: ✭ 113 (+197.37%)
Mutual labels:  freebsd
InitKit
Neo-InitWare is a modular, cross-platform reimplementation of the systemd init system. It is experimental.
Stars: ✭ 364 (+857.89%)
Mutual labels:  freebsd

libioc

Python Library to manage FreeBSD jails with ioc{age,ell}.

iocage is a jail/container manager fusioning some of the best features and technologies the FreeBSD operating system has to offer. It is geared for ease of use with a simple and easy to understand command syntax.

This library provides programmatic access to iocage features and jails, while aiming to be compatible with iocage_legacy, iocell and the Python 3 version of iocage (< 1.0).

Install

git clone https://github.com/bsdci/libioc
cd libioc
make install

The default Python version is 3.7. If you intend to run libioc from another version, please specify it during the installation:

make PYTHON=python3.8 install

At the current time libioc is not packaged or available in FreeBSD ports.

Documentation

Configuration

Active ZFS pool

libiocage iterates over existing ZFS pools and stops at the first one with ZFS property org.freebsd.ioc:active set to yes. This behavior is the default used by other iocage variants and is restricted to one pool managed by iocage

Root Datasets configured in /etc/rc.conf

When iocage datasets are specified in the jail hosts /etc/rc.conf, libiocage prefers them over activated pool lookups. Every ZFS filesystem that iocage should use as root dataset has a distinct name and is configured as ioc_dataset_<NAME>="zroot/some-dataset/iocage", for example:

$ cat /etc/rc.conf | grep ^ioc_dataset
ioc_dataset_mysource="zroot/mysource/iocage"
ioc_dataset_othersource="zroot/iocage"

iocage commands default to the first root data source specified in the file. Operations can be pointed to an alternative root by prefixing the subject with the source name followed by a slash.

import ioc
release = libioc.Release("12.0-RELEASE")

jail_a = libioc.Jail(new=True, {})
ioc create othersource/myjail
ioc rename othersource/myjail myjail2

When othersource is the only datasource with a jail named myjail the above operation would have worked without explicitly stating the dataset name.

Legacy Support

With upcoming releases existing and future legacy / compatibility features will be disabled by default. Setting the sysrc ioc_legacy_support="YES" these compatibility features:

  • ZFS Basejail Support (iocage_legacy)

On initialization libioc detects the hosts sysrc setting ioc_legacy_support that can be enabled to unlock features liste above.

sysrc ioc_legacy_support="YES"

Usage

Library

import ioc

jail = libioc.Jail()
jail.create("11.1-RELEASE")

CLI

libioc has a CLI tool called ioc that is no longer bundled with the library, but can be installed individually. It is inspired by the command line interface of iocage but meant to be developed along with the library and to spike on new features.

Documentation

The API Reference (html) documenting all public interfaces of libioc is updated with every release. The information found in the reference is compiled from Python docstrings and MyPy typings using Sphinx.

Development

Unit Tests

Unit tests may run on FreeBSD or HardenedBSD and require an activated ioc pool.

ZPOOL=zroot make test

Static Code Analysis

The project enforces PEP-8 code style and MyPy strong typing via flake8, that is required to pass before merging any changes. Together with Bandit checks for common security issues the static code analysis can be ran on Linux and BSD as both do not require py-libzfs or code execution.

make install-dev
make check

Project Status (Archive)

2018-09-22

Progress towards the transition of python-iocage using libiocage has been made. Recent changes to both projects ensure compatibility running on the same host, so that it is now possible to partially utilize libiocage in iocage until a full migration is performed. Because some changes to the command line arguments and the script output will occur, @skarekrow will continue to maintain the current implementation until users had time to follow the deprecation warnings and suggestions.

In terms of the "Advanced container management with libiocage" tutorial at EuroBSDCon 2018 the Handbook was published.

2018-08-07

libiocage is making small but continuous steps to stabilize the interfaces and become used in iocage/iocage. The project was first presented in the talk "Imprisoning software with libiocage" at BSDCan 2018 (Video Recording on YouTube). There will be a Tutorial about Advanced container management with libiocage on September 20th, 2018 at EuroBSDCon in Bucharest.

Ongoing preparations at this repository and iocage ensure that the transition to using libiocage under the hood of iocage go as smooth as possible for users. Features that exist in iocage will be further improved and tested or announced to be replaced or deprecated shortly. iXsystems let one imagine that libiocage once finds its way into FreeNAS where it can play its full strength behind a Web GUI.

2017-11-14

As of November 2017 this project is working towards an alpha release. This means stabilization of command-line and library interfaces, so that proper integration tests can be built. This phase requires manual verification and testing until reaching feature-completion and compatibility with Python iocage and prior iocage_legacy versions with ZFS property and UCL file config storage.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].