direktiv / vbundler

build system for vorteil.io bundles

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool


Logo

vbundler

build system for vorteil.io micro virtual machine bundles


Virtual machines build with vorteil.io tools are based on bundles providing all the required dependencies to run the VM. During build the required files are getting selected from a bundle. This project is the builder for those bundles. This project is used to build the bundle with all dependencies from scratch. If you want to modify vinitd only it is recommended to follow the vinitd documentation of how to modify, run and test the code.

Bundle Layout

The bundle is the base for the first partition of a vorteil.io disk image. It is basically a tar archive with an additional metadata file. The following is a shortened example of this metadata file.

Metadata file

{
  "version": "1.0.0",
  "files": [
  {
    "name": "vinitd",
    "tags": []
  },
  {
    "name": "strace",
    "tags": []
  },
  {
    "name": "fluent-bit",
    "tags": ["logs"]
  },
  {
    "name": "tcpdump",
    "tags": ["tcp"]
    }
  ]
}

The vorteil.io tools select files from a bundle depending on the tags associated with each specific file. For example: if an application configuration uses internal fluentbit logging the tools will pick all items from the bundle that are tagged with "logs" along with other required files (such as vinitd and linux).

Bundle to disk partition

bundle

During the disk image build process the manifest file is removed and only the necessary artifacts are picked from the bundle. It is important that linux is the first item in the tar archive. The bootloader loads linux from a fixed offset on the created image.

Disk Layout

bundle

The final disk has two partitions. The first one contains the created live bundle and the second partition contains a filesystem generated from the project used to build the image.

The first partition is mounted under /vorteil during boot of the system. The second partition is mounted under /.

Artifacts for builder:

Building

The build process is supported on Debian and Centos systems. The following commands will create a file in the root directory of the project with the name kernel-99.99.1. The version of the bundle can be changed with the BUNDLE_VERSION variable.

git clone https://github.com/vorteil/vbundler
cd vbundler
make dependencies
BUNDLE_VERSION=20.9.1 make bundle

License

Distributed under the Apache 2.0 License. See LICENSE for more information.

About

build system for vorteil.io bundles

License:Apache License 2.0


Languages

Language:Makefile 91.9%Language:Go 8.1%