Job albatross on freebsd-14
README
Skip to buildsAlbatross: orchestrate and manage MirageOS unikernels with Solo5
The goal of albatross is robust deployment of MirageOS
unikernels using Solo5. Resources managed
by albatross are network interfaces of kind tap
, which are connected to
already existing bridges, block devices, memory, and CPU. Each unikernel is
pinned (cpuset
/ taskset
) to a specific core.
Albatross allows remote management. To deploy or destroy a unikernel, no shell access is necessary. The remote channel is a mutually authenticated (with X.509 certificates) TLS connection. Console output of the unikernels is stored in memory in a ring buffer, and accessible remotely. Monitoring data (CPU and memory usage) of the unikernels can be collected as well, and pushed into an Influx time series database.
Albatross consists of multiple processes, each running with the least privileges. Albatross can be run next to other orchestration systems; it does not assume to be the single instance on a dom0 which creates and destroys virtual machines. Resource policies can be dynamically configured for each administrative domain (similar to DNS, a hierarchical naming scheme), and are checked statically (to decrease while going down the tree) and dynamically when a new unikernel is to be deployed.
When a unikernel is deployed, albatross tries its best to keep it running, even when the physical hardware reboots, or albatross is restarted. When the unikernel exits, depending on configuration and its exit code, it is re-started. The current set of running unikernels is persisted on disk, though there is no dependency or order for restarting them.
The scope of albatross is to provide a minimal orchestration system that avoids the need for shell access on the dom0. This leads to mostly immutable - or only mutable via albatross - infrastructure. Further dissemination of albatross into virtual machines, and a communication interface for deploying and destroying unikernels, is being researched on.
Components
Albatross consists of a set of binaries. Several daemons, which communicate in a request-response style over Unix domain sockets, are run in the host system:
albatrossd
: privileged to create and destroy unikernelsalbatross-console
: reads the console output of unikernelsalbatross-stats
: statistics gathering (rusage, ifstat, BHyve debug counters)albatross-tls-endpoint
: remote deployment via TLS (and possibly inetd)albatross-influx
: statistic reporting fromalbatross-stats
to influx
The main daemon is the privileged albatrossd
, which supervises unikernels. It opens
a listening Unix domain socket, reads the persisted unikernel configuration,
starts these unikernels, and awaits commands. Access can be regulated by Unix
file permissions -- only those users who can write to that socket can send
commands.
Albatross-console
does not keep any persistent state, but a ring buffer of console
output from each unikernel. These messages can be retrieved by a client as a
stream of messages (history, and whenever a new line is output, it is sent to
the interested client). Each unikernel output can only be read by a single
client, to avoid amplification of traffic if lots of clients are connected.
Albatrossd
sends a message to albatross-console
whenever a new unikernel is started,
upon reception albatross-console
opens and reads the fifo which the unikernel will
write their standard output to.
Albatross-stats
periodically gathers statistics (memory, CPU, network, hypervisor)
from all running unikernels.
Albatross-tls-endpoint
listens on a TCP port, or uses systemd socket activation, or
via inetd (remember to add --syslog
when using --inetd
to log via syslog),
and proxies requests from remote clients to the respective daemons described
above. It enforces client authentication, and uses the common names of the client
certificate chain as the administrative domain. The policies are embedded in CA
certificates, and the command is embedded in the leaf certificate.
The albatross-client
is provided for both local and remote management. It executes the provided command, and can also prepare certificate signing requests (--csr
) to send the certificate at a later point.
It also includes functionality for generating an initial CA (and server certificate), and signing certificate signing requests.
Albatross over TLS
Albatross uses PKI to authenticate both client and server. Requests are signed by a certificate authority (CA) that is trusted by the server. CA can delegate resources using policies, which happens by creating an intermediate CA. Revokation is not implemented, as delegation happens without the server knowing about it.
This example shows how one can delegate part of the resources to a user. There are 4 entities:
- server: runs the albatross TLS endpoint
- CA: root certificate authority
- intermediate CA: user certificate authority
- client: requests initiator
Note: there are 4 entities but depending on the security model some can exist
on the same machine. For example, when client and intermediate CA can be
combined, requests are automatically signed using albatross-client --destination
(see step 8).
Setup
This step-by-step guide shows how files are generated and to which entity they belong. Filename is in bold when it's created by the current step.
- Generate the root CA certificate and server keypair
albatross-client generate ca db
description | server | CA | intermediate CA | client | |
---|---|---|---|---|---|
private key | server.key | ca.key | |||
public certificate | server.pem | cacert.pem |
- server: start the endpoint using the server keypair and the root CA certificate
albatross-tls-endpoint cacert.pem server.pem server.key
- intermediate CA: we want to delegate part of the resources to a given user. The user generates a signing request to allow a memory of 1024MB to run 16 unikernels on CPU IDs 0 and 1.
albatross-client add-policy user 16 --mem 1024 --cpu 0 --cpu 1 --csr
description | server | CA | intermediate CA | client | |
---|---|---|---|---|---|
private key | server.key | ca.key | user.key | ||
public certificate | server.pem | cacert.pem | |||
certificate signing request | user.req |
- CA: CA signs the user's request, which generates an intermediate CA certificate containing the restriction policies (limited memory, cpu), which in turn will be used to sign user requests.
albatross-client sign cacert.pem db ca.key user.req
description | server | CA | intermediate CA | client | |
---|---|---|---|---|---|
private key | server.key | ca.key | user.key | ||
public certificate | server.pem | cacert.pem | user.pem | ||
certificate signing request | user.req |
- client: the client wants to create an unikernel, it has to wrap the request in a certificate signing request which will be submitted to the intermediate CA. Note: you can download hello-key.hvt.
albatross-client create hello hello-key.hvt --csr [--arg='--hello=albatross-hi'] [--cpu=1]
description | server | CA | intermediate CA | client | |
---|---|---|---|---|---|
private key | server.key | ca.key | user.key | hello.key | |
public certificate | server.pem | cacert.pem | user.pem | ||
certificate signing request | user.req | hello.req |
- intermediate CA: the intermediate CA signs the request
albatross-client sign user.pem db user.key hello.req
description | server | CA | intermediate CA | client | |
---|---|---|---|---|---|
private key | server.key | ca.key | user.key | hello.key | |
public certificate | server.pem | cacert.pem | user.pem | hello.pem | |
certificate signing request | user.req | hello.req |
- client: client sends the signed request to the server,
albatross-client sign
appended the intermediate CA certificate tohello.pem
to form the full chain.
albatross-client certificate cacert.pem hello.pem hello.key --destination <REMOTE_IP:PORT>`
- Steps 5, 6, and 7 can be done in a single command - if there's no requirement to retain the signing request and certificate, and the user keys are on the local machine.
albatross-client create hello hello-key.hvt --ca=user.pem --ca-key=user.pem --server-ca=cacert.pem --destination <REMOTE_IP:PORT> [--arg='--hello=albatross-hi'] [--cpu=1]
Installation
Binary packages are available for Debian, Ubuntu and FreeBSD. How to install.
For other operating systems / distributions, run opam install albatross
.
Also read the blog article for the motivation behind albatross and an overview of its functionality.
Builds
Back to readme- ☑ freebsd-14 2024-11-20 23:47:02Z albatross.pkg
SHA256:767b63cb5ba9d390be79c466d2f3160ecf973ab64abc270f8502cdce5a62a14f
(12.2MB) - ☑ freebsd-14 2024-11-20 00:36:39Z albatross.pkg
SHA256:337cb09e1c790740c261b952cbec824ceaf171dbfc34a12b63f345592479c3ef
(12.1MB) - ☑ freebsd-14 2024-11-15 00:14:48Z albatross.pkg
SHA256:31c1b17b4d9a4631955f8e20037ab43ece28008107e021620ab760a73fab4181
(11MB) - ☑ freebsd-14 2024-11-06 23:34:51Z albatross.pkg
SHA256:a1a5daac8a9a33b915348cd13d4161783e6222ee61652b6fa279871b791fd86f
(11MB) - ☑ freebsd-14 2024-10-23 23:22:29Z albatross.pkg
SHA256:2aa8b30e368e51b73b3f0a520366b13bb148b60db36bc1e6cf28c8fb43a6d55d
(12.2MB) - ☑ freebsd-14 2024-10-20 23:19:52Z albatross.pkg
SHA256:69e1d1e64e755aaacde73415b4ae4b95f5e09a331bf26e97ed2e496cd7b33f92
(12.2MB) - ☑ freebsd-14 2024-10-10 23:10:56Z albatross.pkg
SHA256:387730476a9319eb94729b5fdb2b8fec949c56a4e31011001e449c952504cb21
(12.1MB) - ☑ freebsd-14 2024-10-07 15:34:52Z albatross.pkg
SHA256:75a5fe2f7f349e8d01006b6b18bc37027b606f5b60081f853fb17a61d3834864
(12MB) - ☑ freebsd-14 2024-10-06 15:33:56Z albatross.pkg
SHA256:a3d8053fb65e6858bca79fecf8d0e7856d2c1d36f3c8f559cae63d11a998404d
(12.2MB) - ☑ freebsd-14 2024-09-29 15:27:25Z albatross.pkg
SHA256:2f39ce1e8a7f26e28df22e00a68a223cfe0efa3f6948cd1fa1c40d8e4d40d107
(13.2MB) - ☑ freebsd-14 2024-09-17 15:16:45Z albatross.pkg
SHA256:1a391c9e1105bfaa72253764bcf43639b5504a4d456f392ff97879fba7289841
(13.2MB) - ☑ freebsd-14 2024-09-12 15:12:03Z albatross.pkg
SHA256:be7fded58f4bb1e46a5dbf50bf3c1457b51ac299cdd81d2d5a4ff0103354dec7
(13.2MB) - ☑ freebsd-14 2024-09-10 15:10:07Z albatross.pkg
SHA256:ee652506c4f9fee0e68ed3208fa125df007b8f3bad776f63a535bb9e712d36ba
(12.1MB) - ☑ freebsd-14 2024-09-05 17:22:39Z albatross.pkg
SHA256:3c681a99a5e13302493bcb39a445fcb16eafaf5ff37985a4c0eb29cd6f65f8e9
(11MB) - ☑ freebsd-14 2024-09-05 15:05:27Z albatross.pkg
SHA256:edd501e27058c7a10bc4890ae23c09bbed2aee2144736f2a2530839ab8057c82
(16.3MB) - ☑ freebsd-14 2024-08-15 14:45:38Z albatross.pkg
SHA256:6fc4233520b68936aedf4e81540a83533184dafe6fc926c24807764d61d2e4d4
(13.7MB) - ☑ freebsd-14 2024-08-11 14:41:51Z albatross.pkg
SHA256:8168aaf79a251b2a45e1bc94805a5af061a91a2705045d725842d4e92b2d58bc
(12.5MB) - ☑ freebsd-14 2024-07-20 14:21:08Z albatross.pkg
SHA256:e932bf5d409990d4ae260575ef632c3fe596cdb7ea584849c27e73fa7a5f667d
(12.4MB) - ☑ freebsd-14 2024-07-15 11:18:57Z albatross.pkg
SHA256:46b81cca1f4822791bbefd80d15fd22808fe4b94ce70b19aa508463db6a3d0bc
(12.4MB) - ☑ freebsd-14 2024-07-07 14:08:55Z albatross.pkg
SHA256:08e597ed86db153a9a730d87ae2968fcf0d9a5be7c5d7f3999bae29f2c2aa20a
(11.4MB) - ☑ freebsd-14 2024-07-01 14:03:06Z albatross.pkg
SHA256:b7f45fe34e3ab0e8b51bc1c367750d13ac75413ce0057ec0f6feaff01e81e00d
(12.3MB) - ☑ freebsd-14 2024-07-01 13:15:27Z albatross.pkg
SHA256:430635ba3da94ce737a0d6ec6f0b06770300d315830b858a18e0d99e32601cb6
(11.2MB) - ☑ freebsd-14 2024-06-30 14:02:09Z albatross.pkg
SHA256:f2c5c4b17300a1b3b0eeaa63df5865613381add9d051287f871060557b923b5f
(12.4MB)
Excluding failed builds here.