-
Notifications
You must be signed in to change notification settings - Fork 627
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 nomad with containerd example #352
Conversation
Thanks, but the example seems lacking network. I guess this result is not expected? # nerdctl -n nomad exec redis-c6718e ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever |
Could you add an example nomad job with networking and port forwarding to |
More like "bad example", I think the original docker version did add a network too... https://learn.hashicorp.com/tutorials/nomad/get-started-run?in=nomad/get-started anders@lima-nomad:~$ nomad job init -short
Example job file written to example.nomad
anders@lima-nomad:~$ cat example.nomad
job "example" {
datacenters = ["dc1"]
group "cache" {
network {
port "db" {
to = 6379
}
}
task "redis" {
driver = "docker"
config {
image = "redis:3.2"
ports = ["db"]
}
resources {
cpu = 500
memory = 256
}
}
}
} Was mostly showing the "driver" and "image" differences... Also, you need to use |
Could you add the link in |
Missed the fine print:
|
Now it has network:
But no mapped ports (like docker and qemu):
|
Can use https://www.nomadproject.io/docs/configuration/client#cni_path instead |
Similar to the vagrant from Hashicorp tutorial, but uses deb packages and the containerd driver. Configure nomad to use containerd cni plugins, so that the "bridge" network stanza works to use. Signed-off-by: Anders F Björklund <[email protected]>
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.
Thanks
The more, the merrier...
Similar to the vagrant from Hashicorp tutorial,
but uses deb packages and the containerd driver.
https://learn.hashicorp.com/collections/nomad/get-started
https://www.nomadproject.io/docs/drivers/external/containerd
example.nomad
limactl shell nomad nomad job run example.nomad
UI: http://localhost:4646