-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
28 changed files
with
380 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,3 +20,5 @@ BB_HASHSERVE = "auto" | |
BB_SIGNATURE_HANDLER = "OEEquivHash" | ||
|
||
CONF_VERSION = "2" | ||
|
||
SKIP_META_VIRT_SANITY_CHECK = "1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
meta-oasis-vm/recipes-containers/container-host-config/container-host-config.bb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
HOMEPAGE = "https://git.yoctoproject.org/meta-virtualization" | ||
SUMMARY = "Configuration Package for container hosts" | ||
DESCRIPTION = "Common / centralized configuration files for container hosts" | ||
|
||
LICENSE = "MIT" | ||
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" | ||
|
||
SRC_URI = " \ | ||
file://containers.conf \ | ||
file://storage.conf \ | ||
file://registries.conf \ | ||
file://policy.json \ | ||
" | ||
|
||
do_install() { | ||
install -d ${D}${sysconfdir}/containers | ||
install -m 0644 ${WORKDIR}/containers.conf ${D}${sysconfdir}/containers/containers.conf | ||
install -m 0644 ${WORKDIR}/storage.conf ${D}${sysconfdir}/containers/storage.conf | ||
install -m 0644 ${WORKDIR}/registries.conf ${D}${sysconfdir}/containers/registries.conf | ||
install -m 0644 ${WORKDIR}/policy.json ${D}${sysconfdir}/containers/policy.json | ||
} | ||
|
||
BBCLASSEXTEND = "native nativesdk" |
10 changes: 10 additions & 0 deletions
10
meta-oasis-vm/recipes-containers/container-host-config/container-host-config/containers.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[engine] | ||
cgroup_manager = "cgroupfs" | ||
events_logger = "none" | ||
runtime = "runc" | ||
lock_type = "shm" | ||
no_pivot_root = true | ||
image_copy_tmp_dir = "storage" | ||
|
||
[network] | ||
network_config_dir = "/storage/containers/net" |
7 changes: 7 additions & 0 deletions
7
meta-oasis-vm/recipes-containers/container-host-config/container-host-config/policy.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"default": [ | ||
{ | ||
"type": "insecureAcceptAnything" | ||
} | ||
] | ||
} |
25 changes: 25 additions & 0 deletions
25
meta-oasis-vm/recipes-containers/container-host-config/container-host-config/registries.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# This is a system-wide configuration file used to | ||
# keep track of registries for various container backends. | ||
# It adheres to TOML format and does not support recursive | ||
# lists of registries. | ||
|
||
# The default location for this configuration file is /etc/containers/registries.conf. | ||
|
||
# The only valid categories are: 'registries.search', 'registries.insecure', | ||
# and 'registries.block'. | ||
|
||
[registries.search] | ||
registries = ['docker.io', 'registry.fedoraproject.org', 'quay.io', 'registry.access.redhat.com'] | ||
|
||
# If you need to access insecure registries, add the registry's fully-qualified name. | ||
# An insecure registry is one that does not have a valid SSL certificate or only does HTTP. | ||
[registries.insecure] | ||
registries = [] | ||
|
||
|
||
# If you need to block pull access from a registry, uncomment the section below | ||
# and add the registries fully-qualified name. | ||
# | ||
# Docker only | ||
[registries.block] | ||
registries = [] |
11 changes: 11 additions & 0 deletions
11
meta-oasis-vm/recipes-containers/container-host-config/container-host-config/storage.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[storage] | ||
driver = "overlay" | ||
runroot = "/storage/containers/run" | ||
graphroot = "/storage/containers/graph" | ||
|
||
[storage.options] | ||
additionalimagestores = [ | ||
] | ||
pull_options = { enable_partial_images = "false", use_hard_links = "false", ostree_repos = "" } | ||
|
||
[storage.options.overlay] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
OASIS_BASIC_INSTALL = "stage2-base busybox libgcc libssl ca-certificates" | ||
|
||
IMAGE_FEATURES = "" | ||
IMAGE_NAME_SUFFIX ?= "" | ||
IMAGE_LINGUAS = "" | ||
|
||
LICENSE = "MIT" | ||
|
||
IMAGE_FSTYPES = "tar.bz2" | ||
|
||
inherit core-image | ||
|
||
IMAGE_ROOTFS_SIZE = "8192" | ||
IMAGE_ROOTFS_EXTRA_SPACE = "0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,7 @@ | ||
DESCRIPTION = "Minimal root filesystem for a stage2." | ||
|
||
OASIS_BASIC_INSTALL = "stage2-base busybox libgcc libssl ca-certificates" | ||
require common.inc | ||
|
||
PACKAGE_INSTALL = "${OASIS_BASIC_INSTALL} ${VIRTUAL-RUNTIME_base-utils} ${ROOTFS_BOOTSTRAP_INSTALL}" | ||
|
||
IMAGE_FEATURES = "" | ||
|
||
export IMAGE_BASENAME = "oasis-vm-stage2-basic" | ||
IMAGE_NAME_SUFFIX ?= "" | ||
IMAGE_LINGUAS = "" | ||
|
||
LICENSE = "MIT" | ||
|
||
IMAGE_FSTYPES = "tar.bz2" | ||
|
||
inherit core-image | ||
|
||
IMAGE_ROOTFS_SIZE = "8192" | ||
IMAGE_ROOTFS_EXTRA_SPACE = "0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
DESCRIPTION = "Stage2 with Podman container support." | ||
|
||
require common.inc | ||
|
||
OASIS_PODMAN_INSTALL = "stage2-podman" | ||
|
||
PACKAGE_INSTALL = "${OASIS_BASIC_INSTALL} ${OASIS_PODMAN_INSTALL} ${VIRTUAL-RUNTIME_base-utils} ${ROOTFS_BOOTSTRAP_INSTALL}" | ||
|
||
export IMAGE_BASENAME = "oasis-vm-stage2-podman" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/sh | ||
|
||
# Abort on failure. | ||
set -e | ||
|
||
# Mount tmpfs so we will be able to update resolv.conf. | ||
mount none -t tmpfs /tmp | ||
|
||
# Start DHCP client to bring up the interfaces. | ||
udhcpc -i eth0 -q -n |
13 changes: 6 additions & 7 deletions
13
meta-oasis-vm/recipes-core/stage2-base/files/init.post-registration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
#!/bin/sh | ||
|
||
# Abort on failure. | ||
set -e | ||
# Execute all registered handlers. | ||
for file in /etc/oasis/post-registration.d/*; do | ||
if [ -f "$file" ]; then | ||
$file | ||
fi | ||
done | ||
|
||
# Mount tmpfs so we will be able to update resolv.conf. | ||
mount none -t tmpfs /tmp | ||
|
||
# Start DHCP client to bring up the interfaces. | ||
udhcpc -i eth0 -q -n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/sh | ||
|
||
# Abort on failure. | ||
set -e | ||
|
||
# Mount cgroups. | ||
mount -t cgroup2 none /sys/fs/cgroup | ||
# Create /dev/shm for podman locks. | ||
mkdir -p /dev/shm | ||
mount -t tmpfs none /dev/shm | ||
|
||
# Create the necessary directories on ephemeral storage. | ||
mkdir -p /storage/containers/run | ||
mkdir -p /storage/containers/graph | ||
mkdir -p /storage/containers/graph/tmp | ||
mkdir -p /storage/containers/net | ||
|
||
# Update TUN device permissions. | ||
chmod 0666 /dev/net/tun | ||
|
||
# Use podman-compose to start up containers when defined. | ||
if [ -d "/etc/oasis/containers" ]; then | ||
cd /etc/oasis/containers | ||
podman-compose up --detach | ||
fi |
Oops, something went wrong.