diff options
author | Bruce Ashfield <bruce.ashfield@gmail.com> | 2023-03-02 15:49:48 -0500 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2023-03-08 17:08:02 -0500 |
commit | 534e8b6ed7016aff57794dd66645556f5994d151 (patch) | |
tree | 0b26d1415f8079f036a6ba5b376bdca19648c847 /conf | |
parent | a8e46c6e1f414a761a3d97701cd57ed71a19902e (diff) | |
download | meta-virtualization-534e8b6ed7016aff57794dd66645556f5994d151.tar.gz |
conf: introduce container configuration values
From the configuration file itself:
These variables represent groupings of functionality in the CNCF
landscape. In particular, they are areas where there is a choice
between more than one implementation or an area where abstraction
is beneficial.
The contents of the variables are are runtime components that
recipes may use for RDEPENDS.
Build dependencies are not typically flexible, so do not currently
have DEPENDS equivalents for the components (i.e. DEPENDS on runc
versus crun).
Distro features such as kubernetes or other container stacks
can be used to set different defaults for these variables.
Note: these are "global" values, since they represent choices.
If more than of a grouping is required on target, then the variable
can be appended or set to multiple values. That being said, Recipes
should generally agree on the values, hence the global namespace.
Recipe specific choices can still be done, but they risk
conflicting on target or causing runtime issues / errors.
## CNCF "components"
# engines: docker-ce/docker-moby, virtual-containerd, cri-o, podman
VIRTUAL-RUNTIME_container_engine ??= "podman"
# runtime: runc, crun, runv, runx
VIRTUAL-RUNTIME_container_runtime ??= "virtual-runc"
# networking: cni, netavark
VIRTUAL-RUNTIME_container_networking ??= "cni"
# dns: cni, aardvark-dns
VIRTUAL-RUNTIME_container_dns ??= "cni"
# orchestration: k8s, k3s
VIRTUAL-RUNTIME_container_orchestration ??= "k3s"
## Kubernetes terminology "components"
VIRTUAL-RUNTIME_cri ??= "containerd"
VIRTUAL-RUNTIME_cni ??= "cni"
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Diffstat (limited to 'conf')
-rw-r--r-- | conf/distro/include/meta-virt-container.inc | 40 | ||||
-rw-r--r-- | conf/layer.conf | 2 |
2 files changed, 42 insertions, 0 deletions
diff --git a/conf/distro/include/meta-virt-container.inc b/conf/distro/include/meta-virt-container.inc new file mode 100644 index 00000000..c3ac8394 --- /dev/null +++ b/conf/distro/include/meta-virt-container.inc | |||
@@ -0,0 +1,40 @@ | |||
1 | # These variables represent groupings of functionality in the CNCF | ||
2 | # landscape. In particular, they are areas where there is a choice | ||
3 | # between more than one implementation or an area where abstraction | ||
4 | # is beneficial. | ||
5 | # | ||
6 | # The contents of the variables are are runtime components that | ||
7 | # recipes may use for RDEPENDS. | ||
8 | # | ||
9 | # Build dependencies are not typically flexible, so do not currently | ||
10 | # have DEPENDS equivalents for the components (i.e. DEPENDS on runc | ||
11 | # versus crun). | ||
12 | # | ||
13 | # Distro features such as kubernetes or other container stacks | ||
14 | # can be used to set different defaults for these variables. | ||
15 | # | ||
16 | # Note: these are "global" values, since they represent choices. | ||
17 | # If more than of a grouping is required on target, then the variable | ||
18 | # can be appended or set to multiple values. That being said, Recipes | ||
19 | # should generally agree on the values, hence the global namespace. | ||
20 | # Recipe specific choices can still be done, but they risk | ||
21 | # conflicting on target or causing runtime issues / errors. | ||
22 | # | ||
23 | |||
24 | ## CNCF "components" | ||
25 | |||
26 | # engines: docker-ce/docker-moby, virtual-containerd, cri-o, podman | ||
27 | VIRTUAL-RUNTIME_container_engine ??= "podman" | ||
28 | # runtime: runc, crun, runv, runx | ||
29 | VIRTUAL-RUNTIME_container_runtime ??= "virtual-runc" | ||
30 | # networking: cni, netavark | ||
31 | VIRTUAL-RUNTIME_container_networking ??= "cni" | ||
32 | # dns: cni, aardvark-dns | ||
33 | VIRTUAL-RUNTIME_container_dns ??= "cni" | ||
34 | # orchestration: k8s, k3s | ||
35 | VIRTUAL-RUNTIME_container_orchestration ??= "k3s" | ||
36 | |||
37 | ## Kubernetes terminology "components" | ||
38 | |||
39 | VIRTUAL-RUNTIME_cri ??= "virtual-containerd" | ||
40 | VIRTUAL-RUNTIME_cni ??= "cni" | ||
diff --git a/conf/layer.conf b/conf/layer.conf index 10b457f8..88ac3905 100644 --- a/conf/layer.conf +++ b/conf/layer.conf | |||
@@ -52,9 +52,11 @@ INHERIT += "sanity-meta-virt" | |||
52 | # layer.conf load time, we delay using a special bbclass that simply includes | 52 | # layer.conf load time, we delay using a special bbclass that simply includes |
53 | # the META_VIRT_CONFIG_PATH file, and likewise for the Xen and k8s configs | 53 | # the META_VIRT_CONFIG_PATH file, and likewise for the Xen and k8s configs |
54 | META_VIRT_CONFIG_PATH = "${LAYERDIR}/conf/distro/include/meta-virt-default-versions.inc" | 54 | META_VIRT_CONFIG_PATH = "${LAYERDIR}/conf/distro/include/meta-virt-default-versions.inc" |
55 | META_VIRT_CONTAINER_CONFIG_PATH = "${LAYERDIR}/conf/distro/include/meta-virt-container.inc" | ||
55 | META_VIRT_XEN_CONFIG_PATH = "${LAYERDIR}/conf/distro/include/meta-virt-xen.inc" | 56 | META_VIRT_XEN_CONFIG_PATH = "${LAYERDIR}/conf/distro/include/meta-virt-xen.inc" |
56 | K8S_CONFIG_PATH = "${LAYERDIR}/conf/distro/include/k8s-versions.inc" | 57 | K8S_CONFIG_PATH = "${LAYERDIR}/conf/distro/include/k8s-versions.inc" |
57 | USER_CLASSES:append = " meta-virt-cfg" | 58 | USER_CLASSES:append = " meta-virt-cfg" |
59 | USER_CLASSES:append = " meta-virt-container-cfg" | ||
58 | USER_CLASSES:append = " meta-virt-k8s-cfg" | 60 | USER_CLASSES:append = " meta-virt-k8s-cfg" |
59 | USER_CLASSES:append = " meta-virt-xen-cfg" | 61 | USER_CLASSES:append = " meta-virt-xen-cfg" |
60 | USER_CLASSES:append = " meta-virt-hosts" | 62 | USER_CLASSES:append = " meta-virt-hosts" |