New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a containerd module #34402
Add a containerd module #34402
Conversation
266f4eb
to
90164e4
Compare
the module is not included in |
@Mic92 oups.. I forgot to commit that 🤦♂️ |
367c4ff
to
3f1e076
Compare
ping 👼 🙏 |
"" | ||
'' | ||
${cfg.package}/bin/containerd \ | ||
${cfg.extraOptions} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
somebody found that trick!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 😝
|
||
systemd.services.containerd = { | ||
wantedBy = [ "multi-user.target" ]; | ||
environment = proxy_env; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is this option defined?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oups, it's not supposed to be there ... 😓
3f1e076
to
6e1c530
Compare
Updated 👼 |
|
||
config = mkIf cfg.enable (mkMerge [{ | ||
environment.systemPackages = [ cfg.containerd ]; | ||
systemd.packages = [ cfg.containerd ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be pkgs.containerd
or cfg.package
. Have you ever tested this module?
ExecStart = [ | ||
"" | ||
'' | ||
${cfg.package}/bin/containerd \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cfg.package
does not exists as well.
Please test modules before ticking the |
@Mic92 oh.. seems like I didn't correctly update that file frol my nixos configuration, sorry 🙇, I'll update 😇 |
6e1c530
to
ee93981
Compare
This seems okay to merge now? |
@colemickens I need to updated the module to be able to add some additionnal |
ee93981
to
e2dfe8f
Compare
Updated 👼 |
Ping @Mic92, can you review/merge? Thanks! |
ping @Mic92 |
default = ["/run/containerd/containerd.sock"]; | ||
description = | ||
'' | ||
A list of unix and tcp containerd should listen to. The format follows |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A list of unix and tcp what? Sockets?
A list of unix and tcp containerd should listen to. The format follows | |
A list of unix and TCP sockets containerd should listen to. The format follows |
description = "List of packages to be added to containerd service path"; | ||
}; | ||
|
||
extraOptions = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why unnecessarily indent it?
extraOptions = | |
extraOptions = mkOption { |
wantedBy = [ "multi-user.target" ]; | ||
serviceConfig = { | ||
ExecStart = [ | ||
"" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's this for?
ExecStart = [ | ||
"" | ||
'' | ||
${pkgs.containerd}/bin/containerd \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it work with a multiline command? It's very short, just put it in a single line.
${cfg.extraOptions} | ||
'']; | ||
}; | ||
path = [ pkgs.containerd ] ++ cfg.packages; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need containerd in the path if you're already calling it from the absolute path.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is required to get containerd-shim
and some other containerd-*
commands (mainly the shims)
###### interface | ||
|
||
options.virtualisation.containerd = { | ||
enable = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
enable = | |
enable = mkEnableOption "containerd"; |
This generates the rest.
e2dfe8f
to
a5176c3
Compare
This add a containerd module so you can have a containerd systemd service running and using it with other tools. One possibility is to make dockerd using this containerd service using `--containerd` flag on dockerd Signed-off-by: Vincent Demeester <vincent@sbr.pm>
a5176c3
to
b7796ab
Compare
@Mic92 @nlewo @JohnAZoidberg finally updated this PR 😅 |
I marked this as stale due to inactivity. → More info |
@vdemeester did you abandon containerd or do you have this out-of-nixpkgs somewhere now? |
I keep a module in my own configuration, but I use it less than I used to. I closed the PR because I don't find enough time right now to update it and get it merge 😅. If someone wants to take over that would be nice, otherwise, the day I find some time, I'll re-open a new one 😉 |
I can also re-open if we think it can get merged as is 😉 |
This add a containerd module so you can have a containerd systemd service
running and using it with other tools. One possibility is to make dockerd
using this containerd service using
--containerd
flag on dockerdSigned-off-by: Vincent Demeester vincent@sbr.pm
Motivation for this change
Have a
containerd
module, that could be used withdockerd
orkubernetes
andcri-containerd
, etc..Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)