The near bare metal multi-container supervisor and OS management system.

Overview

Pantavisor

What is Pantavisor?

Pantavisor is the easiest way to build and manage embedded Linux projects with lightweight containers. Put your Linux distribution or custom-made firmware and userland into containers and get all of the benefits of portable containerized lifecycle management without needing to replace your distribution.

Pantavisor is the Linux device init system that turns the runtime into a set of containerized microservices. It is not a container engine but rather a framework for assembling and managing containerized building blocks for firmware and applications. Pantavisor provides a simple way to deploy and atomically manage your containerized embedded firmware and apps across millions of devices in a reproducible manner.

Meets the requirements of low-spec devices

To ensure it can cover the low-spec end of the market, Pantavisor brings full container functionality into a single binary to keeps its size as small as possible. Depending on the software functions that are built into the container, the size can vary, but the average for a fully functional system puts the Pantavisor binary at around 1mg (as a compressed initial ramdisk).

Pantavisor takes advantage of pure Linux container technology. It implements parts of the LXC suite as a library that wraps around the basic building blocks of containers. Because LXC is a pure C project, the overall footprint of Pantavisor is very small.

Build your embedded system with containerized building blocks

With a containerized system, you can mix and match components from different distros to build your system and update and maintain customizations without replacing your distro or the entire board.

In a Pantavisor-enabled device, each application or service is defined as a container, including all of the associated objects that are needed to start them. In Pantavisor this includes:

  • Board Support Packages (BSPs): kernel, modules, and firmware. 
  • System Middleware Containers: you can choose to package your monolithic distro middleware in one or build your middleware in more fine-grained units. 
  • Apps: Linux or Docker containers.
  • Configuration: system level configurations

In the case of a multi-service system, there can be definitions of these that make up the full running system. This is what we refer to as the Pantavisor State Format. This state is declarative and is in JSON format. It is managed via the Pantavisor CLI and kept in our SaaS Pantacor Hub or managed locally on your device with the system utilities Pantabox.

Pantacor Hub and Pantavisor

Pantacor Hub is the open source SaaS that manages app and device state in the cloud. You can think of it as a cross between an image sharing repository, a device system revision repository and a deployment platform. The hub allows you to share images and device data between team members or other users. It also manages the atomic revisions of the device state and also deploys them over the air across device fleets. In addition, you can use it to view logs, troubleshoot and configure devices as well as edit application, and user meta-data.

How to Get Started

This is the quickest way to get to know Pantavisor:

If you have a device like a Raspberry Pi, you can download a pre-built image for Raspberry Pi and several other device types that come with Pantavisor installed:

After you've downloaded and flashed your device with Pantavisor, try out a tutorial:

Getting help and support

We're a friendly and helpful community and welcome questions, and any feedback you may have.

License

Pantavisor applies the MIT license with copyright.

Comments
  • Bugfix/fix bad storage report

    Bugfix/fix bad storage report

    Fix some errors with the storage report. I realized that the off_t type (in the struct pv_storage) is normally defined as a signed integer on POSIX and in another hand, the types inside of the struct statfs involved in the storage size calculation are __fsword_t that type is for internal use and the recommendation is to use an unsigned int and fsblkcnt_t who is defined as "unsigned integer type" so I change those off_t to unsigned to avoid the overflow. Also finally I change the pv_json_ser_int by pv_json_ser_number because the underlying library uses double

    opened by fortizc 3
  • improve scripts/volmount/crypt/crypt to be more robust against corruption

    improve scripts/volmount/crypt/crypt to be more robust against corruption

    1. we will move to explicit .init_done marker file that we only place if whole do_crypt_init function has succeeded with changes synched to disk
    2. we only do losetup logic for dm_type caam
    3. we create a .goodbak copy of the image file every time we successfully finish with do_mount_disk; we are extra careful and create a .prebak copy of the image file before the mounting happens.
    4. we make do_mount_disk try the following before giving up: - mount crypt disk as usual - if fails run an fsk.ext4 -y on that /dev/mapper/ device - if that fails we put back the .goodbak file (if such exist) at code we do this through recursive invocation of the do_mount_disk function with a 4th parameter 'specialrun' mode
    opened by asac 2
  • close logserver fds before killing its pid

    close logserver fds before killing its pid

    A bunch of small changes I did while testing appengine shuts down before WAIT state is reached. List of changes:

    • ctrl: unlink before binding to remove existing pv-ctrl sockets
    • logserver: merge close and stop functions
    • logserver: add fd closing before stopping the PID, which was causing a freeze
    • pantavisor: stop logserver after we stop ph_logger, platforms and pvctrl, but before unmount and free up memory
    • ph_logger: improve logs when stopping services
    opened by anibalportero 2
  • fix: runlevel not having the same status as group in run.json

    fix: runlevel not having the same status as group in run.json

    With this PR, we enable any string in run.json "runlevel", making it equivalent to "group". In case the two of them are configured and their values differ, the revision will be set as WONTGO.

    opened by anibalportero 2
  • fix: usermeta does not unescape all special characters

    fix: usermeta does not unescape all special characters

    Some change was added to this PR:

    • Add better function to unescape chars and replace the old pv_str_unescape_to_ascii from utils/str.h
    • Change the strategy of how user-meta is unescaped, now the data is unescaped after parsing

    Both changes help to fix a nasty bug I found if you create a variable with any name but with the value ooo\nooo (something with a \n in between) the device will freeze completely.

    opened by fortizc 2
  • Fix: crypt logging

    Fix: crypt logging

    crypt failures with CAAM are sporadic and no meaningful debug information available with existing state. Adapt volume handler and add additional debug logs in error exit path.

    opened by parthitce 2
  • refactor logging system: collect logs in one socket

    refactor logging system: collect logs in one socket

    This PR refactors the logging system. Creates the logserver who centralizes the log processing allowing two different log modes:

    • singlefile: in this mode, all logs (syslog, pantavisor logs, containers logs, lxc console, etc) are centralized in one file called pv.log that file is located in the folder of the current revision, inside of the logs/ directory
    • filetree: this is the traditional log organization

    Both modes are not exclusives and can be set at the same time. Important: currently only is possible to send logs to the cloud if the filetree option is not set.

    To set the different log modes, a new configuration option called log.server.outputs was added to the pantavisor.config file, the different modes can be set using a comma as a separator. For example:

    log.server.outputs=singlefile,filetree
    

    All current log options are working and the only issues/missing features are:

    • Currently the logs from the ph_logger fork are not sent to the log
    • The logs from logs/current/<container>/lxc/lxc.log aren't capture in singlefile mode
    opened by julianhartmer 2
  • dm-crypt: add pv_disk with dm-crypt

    dm-crypt: add pv_disk with dm-crypt

    dm-crypt: add pv_disk with dm-crypt

    add initial support for dm-crypt based pv_disks. current implementation handles only CAAM and DCP explicit.

    disk defaults to persistent storage. Brief features list are,

    • disks.json: added new disks.json for handling the control over physical meidum to use. Refer 1 for more details.
    • disk types: There are 4 disk types introduced. - Directory (default): will be used to mount to pvroot as default - dm-crypt-versatile: use the cryptsetup utils to mount the disk/file encrypted with plain text key - dm-crypt-dcp: specific to i.Mx2 & i.Mx6 low spec variants with hardware DCP module. Compared with versatile, the key will be encrypted using Hardware DCP and cryptsetup uses encrypted key blob - dm-crypt-caam: specific to all modern i.Mx platforms with CAAM. Encryption of the key and cryptsetup uses the black blob
    • run.json: to consume the disks to use, defined the disk entry to run.json. Refere 2 for more details.

    Signed-off-by: Parthiban Nallathambi [email protected]

    opened by parthitce 2
  • Groups timeout

    Groups timeout

    Implements groups timeout:

    • rollback if a group cannot achieve his status-goal before the timeout
    • unblock platform boot if previous group cannot achieve his status-goal
    opened by fortizc 1
  • dcp: use decrypted plain text key for dm-crypt

    dcp: use decrypted plain text key for dm-crypt

    decrypt the with dcp-tool decrypt and consume as plain text with cryptsetup plain.

    Signed-off-by: Parthiban Nallathambi [email protected]

    opened by parthitce 1
  • fix: groups not cleaning old platform references during non-reboot transitions

    fix: groups not cleaning old platform references during non-reboot transitions

    Currently, in non-reboot transitions, Pantavisor keeps the current state running for the new revision, but transfers the new/updated platforms from the pending state to the running one.This does not affect groups, as they are not changed whatsoever during non-reboot updates. We still have to re-link the platform reference list from the pending state to the current one.

    Before this fix, Pantavisor was just re-linking the platforms belonging to the new revision, but the old ones belonging to platforms that were deleted or platforms that were modified were still there. This was causing Pantavisor to keep groups with lists of platform references that pointed to deleted structs etc.

    With this fix, the list of references for each group are deleted during transitions, so the platforms belonging to the new revision can be cleanly re-linked to the groups.

    opened by anibalportero 1
  • load config policies after pantavisor.config

    load config policies after pantavisor.config

    Pantavisor can now load different policies at boot time. A policy is a configuration file following the same format as pantavisor.config. The files are located in /etc/pantavisor/policies/, so they can be added to each platform from vendor/stepskel/etc/pantavisor/policies/. The policy is set in the first stages of configuration (pantavisor.config or cmdline) and then loaded before the latest stages (initrdconfig or metadata config).

    For example, if we wanted to load this policy from vendor:

    vendor/stepskel/etc/pantavisor/policies/prod.config
    

    We would have to set this key in cmdline:

    pv_policy=prod
    

    Another thing that would work is to set it in pantavisor.config

    policy=prod
    

    List of changes:

    • config: add new "policy" key to pantavisor.config, overridable with pv_ suffix in cmdline
    • config: new "policy" key is a string without '/' characters
    • path: add new dynamic path for policies
    opened by anibalportero 0
  • avoid loading pantahub.config in local mode; stop supporting deprecated ph.config keys

    avoid loading pantahub.config in local mode; stop supporting deprecated ph.config keys

    This PR moves the loading of pantahub.config out of the early init so we can decide whether to load it or not based on Pantavisor being in remote or local mode. The idea is to only load the config file after bootup or transition once. Then, it is saved only after registration.

    List of changes:

    • config: stop supporting deprecated pantahub.config keys
    • config: remove pantahub.config load from early init
    • config: improve logs for load/save pantahub.config
    • pantahub: remove loading of pantahub.config
    • pantavisor: load pantahub.config in state RUN only
    opened by anibalportero 1
Releases(014)
Owner
Pantavisor
A framework for containerized embedded Linux
Pantavisor
Nin - It's metal to my ears. Build system in Go.

nin An experimental fork of ninja translated in Go. Currently a toy. Are you serious? Yeah. Marc-Antoine, isn't it a stupid idea? Yeah. When Google wa

M-A 10 Nov 3, 2022
an easy implementation of a multi-process tcp server and a multi-thread tcp client

一个TCP多进程服务器-多线程客户端的简单实现。 客户端类似Apache ab的测试功能,能够通过向某一个ip端口发送指定并发量和总数量的tcp短连接;服务端处理tcp短连接,每来一条消息就打印一条log。 使用cmake编译,建议在vscode里编译,或者命令行 # 终端进入目录 mkdir bu

adin 1 Nov 28, 2021
aria2 is a lightweight multi-protocol & multi-source, cross platform download utility operated in command-line.

aria2 is a lightweight multi-protocol & multi-source, cross platform download utility operated in command-line. It supports HTTP/HTTPS, FTP, SFTP, BitTorrent and Metalink.

aria2 28.7k Jan 7, 2023
Accelerated Container Image

OverlayBD Accelerated Container Image Accelerated Container Image is an open-source implementation of paper "DADI: Block-Level Image Service for Agile

Alibaba 141 Jan 4, 2023
Steve's Unreal Quest System: data-driven quest system for UE4

Steve's Unreal Quest System (SUQS) What Is It? SUQS is a simple, data-driven quest system for UE4. It helps you define quest structures for your game,

Steve Streeting 66 Dec 11, 2022
Mongoose Embedded Web Server Library - a multi-protocol embedded networking library with TCP/UDP, HTTP, WebSocket, MQTT built-in protocols, async DNS resolver, and non-blocking API.

Mongoose - Embedded Web Server / Embedded Networking Library Mongoose is a networking library for C/C++. It implements event-driven non-blocking APIs

Cesanta Software 9k Jan 1, 2023
An HTTPS beaconing Windows implant and multi-layered proxy C2 network designed for covert APT emulation focused offensive operations

WARFOX is a software-based HTTPS beaconing Windows implant that uses a multi-layered proxy network for C2 communications. This kit was designed to emulate covert APT offensive operations. This kit includes WARFOX (Windows implant), HIGHTOWER (Listening Post), and other tools to build configs and set up a proxy network.

null 85 Nov 25, 2022
Event-driven network library for multi-threaded Linux server in C++11

Muduo is a multithreaded C++ network library based on the reactor pattern. http://github.com/chenshuo/muduo Copyright (c) 2010, Shuo Chen. All righ

Shuo Chen 12.4k Jan 1, 2023
SoftEther VPN - Cross-platform multi-protocol VPN software.

SoftEther VPN - Cross-platform multi-protocol VPN software.

SoftEther 9.6k Jan 4, 2023
Multi-protocol Port Mapping client library

libplum - Multi-protocol Port Mapping client library libplum (Port Lightweight and Universal Mapping) is a library allowing to forward ports on Networ

Paul-Louis Ageneau 18 Dec 26, 2022
WARFOX is a software-based HTTPS beaconing Windows implant that uses a multi-layered proxy network for C2 communications.

An HTTPS beaconing Windows implant and multi-layered proxy C2 network designed for covert APT emulation focused offensive operations

null 85 Nov 25, 2022
wolfSSL Intrusion Detection and Prevention System (IDPS)

wolfSentry is the wolfSSL IDPS (Intrusion Detection and Prevention System). It is mainly used as a library, but can also be used as part of a kernel module.

wolfSSL 19 Nov 24, 2022
Open Source IoT Operating System

IoTaaP OS Open Source IoT Operating System Usage Include IoTaaP_OS.h to your project and define IoTaaP OS object Usage example #include <IoTaaP_OS.h>

IoTaaP 40 Oct 27, 2022
Open source file system for small embedded systems

STORfs Open Source File System Release Version 1.0.2 Created by: KrauseGLOBAL Solutions, LLC What is STORfs? STORfs is an open source flash file syste

null 17 Jul 26, 2022
A webserver hosting a bank system for Minecraft, able to be used from web browser or from CC/OC if you're playing modded.

CCash A webserver hosting a bank system for Minecraft, able to be used from web browser or from CC/OC if you're playing modded. Description the curren

William Katz 23 Aug 7, 2022
A linux based file-transfer system in terminal. Share Files Over A Network

Introduction A linux based file-transfer system in terminal. Share Files Over A Network Note This Project Is Not Fully Completed Yet But You Are Free

notaweeb 8 Sep 20, 2021
Linux Terminal Service Manager (LTSM) is a set of service programs that allows remote computers to connect to a Linux operating system computer using a remote terminal session (over VNC or RDP)

Linux Terminal Service Manager (LTSM) is a set of service programs that allows remote computers to connect to a Linux operating system computer using a remote terminal session (over VNC)

null 34 Dec 16, 2022
Sync up system date/time with this NTP client for OS/400 V4R5

Synchronise OS/400 V4R5 system date/time with an NTP server OS/400 V4R5 lacks an NTP client, so here is one. I followed the specifications provided in

Dave Asta 2 Oct 20, 2022
Built a peer-to-peer group based file sharing system where users could share or download files from the groups they belonged to. Supports parallel downloading with multiple file chunks from multiple peers.

Mini-Torrent Built a peer-to-peer group based file sharing system where users could share or download files from the groups they belonged to. Supports

null 1 Nov 15, 2021