diff --git a/profiles/applications/app-ollama.profile.yaml b/profiles/applications/app-ollama.profile.yaml index bff441b..2fa14d4 100644 --- a/profiles/applications/app-ollama.profile.yaml +++ b/profiles/applications/app-ollama.profile.yaml @@ -5,7 +5,7 @@ config: linux.kernel_modules: overlay raw.lxc: |- lxc.apparmor.profile = unconfined - lxc.cgroup.devices.allow = a + lxc.cgroup2.devices.allow = a lxc.mount.auto=proc:rw sys:rw lxc.cap.drop = security.nesting: "true" diff --git a/profiles/containerization/coolify.profile.yaml b/profiles/containerization/coolify.profile.yaml index 9c0626a..f22b68b 100644 --- a/profiles/containerization/coolify.profile.yaml +++ b/profiles/containerization/coolify.profile.yaml @@ -13,11 +13,6 @@ config: timezone: Europe/Paris locale: fr_FR.UTF-8 linux.kernel_modules: overlay - raw.lxc: |- - lxc.apparmor.profile = unconfined - lxc.cgroup.devices.allow = a - lxc.mount.auto=proc:rw sys:rw - lxc.cap.drop = security.nesting: "true" security.privileged: "true" devices: {} diff --git a/profiles/containerization/docker-unprivileged.profile.yaml b/profiles/containerization/docker-unprivileged.profile.yaml new file mode 100644 index 0000000..59764bd --- /dev/null +++ b/profiles/containerization/docker-unprivileged.profile.yaml @@ -0,0 +1,18 @@ +name: docker-unprivileged +description: "A profile that deploy docker in an unprivileged LXD container" +config: + linux.kernel_modules: overlay + security.nesting: "true" + # Requis pour les images dont les couches créent des device nodes ou des xattrs + security.syscalls.intercept.mknod: "true" + security.syscalls.intercept.setxattr: "true" + cloud-init.vendor-data: | + #cloud-config + package_update: true + package_upgrade: true + packages: + - curl + runcmd: + - curl https://get.docker.com | sh + timezone: Europe/Paris + locale: fr_FR.UTF-8 diff --git a/profiles/containerization/docker.profile.yaml b/profiles/containerization/docker.profile.yaml index d9fa2eb..c87d65c 100644 --- a/profiles/containerization/docker.profile.yaml +++ b/profiles/containerization/docker.profile.yaml @@ -2,11 +2,6 @@ name: docker description: "A profile that deploy docker in an LXD container" config: linux.kernel_modules: overlay - raw.lxc: |- - lxc.apparmor.profile = unconfined - lxc.cgroup.devices.allow = a - lxc.mount.auto=proc:rw sys:rw - lxc.cap.drop = security.nesting: "true" security.privileged: "true" cloud-init.vendor-data: | diff --git a/profiles/containerization/dokploy.profile.yaml b/profiles/containerization/dokploy.profile.yaml index 2cb17d4..0b8b47d 100644 --- a/profiles/containerization/dokploy.profile.yaml +++ b/profiles/containerization/dokploy.profile.yaml @@ -13,11 +13,6 @@ config: timezone: Europe/Paris locale: fr_FR.UTF-8 linux.kernel_modules: overlay - raw.lxc: |- - lxc.apparmor.profile = unconfined - lxc.cgroup.devices.allow = a - lxc.mount.auto=proc:rw sys:rw - lxc.cap.drop = security.nesting: "true" security.privileged: "true" devices: {} diff --git a/profiles/containerization/microk8s.profile.yaml b/profiles/containerization/microk8s.profile.yaml index 15866c4..37d73fd 100644 --- a/profiles/containerization/microk8s.profile.yaml +++ b/profiles/containerization/microk8s.profile.yaml @@ -1,35 +1,6 @@ name: microk8s -description: "A profile that deploy microk8s in an LXD container" -devices: - aadisable: - path: /sys/module/nf_conntrack/parameters/hashsize - source: /sys/module/nf_conntrack/parameters/hashsize - type: disk - aadisable2: - path: /dev/zfs - source: /dev/zfs - type: disk - aadisable3: - path: /dev/kmsg - source: /dev/kmsg - type: unix-char - aadisable4: - path: /sys/fs/bpf - source: /sys/fs/bpf - type: disk - aadisable5: - path: /proc/sys/net/netfilter/nf_conntrack_max - source: /proc/sys/net/netfilter/nf_conntrack_max - type: disk +description: A profile that deploy microk8s in an LXD container config: - linux.kernel_modules: ip_vs,ip_vs_rr,ip_vs_wrr,ip_vs_sh,ip_tables,ip6_tables,netlink_diag,nf_nat,overlay,br_netfilter - raw.lxc: | - lxc.apparmor.profile=unconfined - lxc.mount.auto=proc:rw sys:rw cgroup:rw - lxc.cgroup.devices.allow=a - lxc.cap.drop= - security.nesting: "true" - security.privileged: "true" cloud-init.vendor-data: | #cloud-config package_update: true @@ -38,3 +9,32 @@ config: - [ 'snap', 'install', 'microk8s', '--classic' ] timezone: Europe/Paris locale: fr_FR.UTF-8 + linux.kernel_modules: ip_vs,ip_vs_rr,ip_vs_wrr,ip_vs_sh,ip_tables,ip6_tables,netlink_diag,nf_nat,overlay,br_netfilter + raw.lxc: | + lxc.apparmor.profile=unconfined + lxc.mount.auto=proc:rw sys:rw cgroup:rw + lxc.cgroup2.devices.allow=a + lxc.cap.drop= + security.nesting: "true" + security.privileged: "true" +devices: + aadisable: + path: /sys/module/nf_conntrack/parameters/hashsize + source: /sys/module/nf_conntrack/parameters/hashsize + type: disk + aadisable2: + path: /dev/kmsg + source: /dev/kmsg + type: unix-char + aadisable3: + path: /sys/fs/bpf + source: /sys/fs/bpf + type: disk + aadisable4: + path: /proc/sys/net/netfilter/nf_conntrack_max + source: /proc/sys/net/netfilter/nf_conntrack_max + type: disk + aadisable5: + path: /dev/zfs + source: /dev/zfs + type: disk