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
How to registry service to consul #9
Comments
I'll take a look next week, if you solve this before let me know. |
I tried but I failed, I can not make it work. Because I can't get the CNI assigned IP Address. |
@ox0spy I have not checked that yet, but I'm assuming is a CNI more related configuration. |
@ox0spy is any of the examples working for you?, the network interface should pickup the ip address provided by your cni network configuration. |
@ox0spy job "consul-example" {
datacenters = ["dc1"]
type = "service"
group "test" {
restart {
attempts = 0
mode = "fail"
}
service {
name = "nwn-service"
port = 22
check {
type = "tcp"
interval = "10s"
timeout = "5s"
}
}
task "nwn" {
driver = "firecracker-task-driver"
config {
Vcpus = 1
Mem = 128
KernelImage= "/home/cneira/kernel-images/vmlinux.bin"
BootDisk = "/dev/zvol/vms/centos7"
Network = "default"
}
}
}
} and I also deploy consul by nomad job "consul" {
datacenters = ["dc1"] group "consul" {
count = 1
task "consul" {
driver = "raw_exec"
config {
command = "consul"
args = ["agent", "-dev"]
}
}
}
}
I followed this guide https://medium.com/hashicorp-engineering/hashicorp-nomad-from-zero-to-wow-1615345aa539 and the service registers on consul. |
@ox0spy feel free to re-open if needed. |
@cneira Thanks for your update. Now also can not support cni conf: /etc/cni/conf.d/firecracker.conflist
job config
docs for address_mode in service block: https://www.nomadproject.io/docs/job-specification/service#address_mode run job
|
Hi cneira,
The driver can not support register
service
toconsul
I modify some code, but it's not work correctly.
support-cni-service.txt
note:
move support-cni-service.txt support-cni-service.patch
I think I should get the IP Address assigned by
group -> network section
, then setuptaskConfigSpec.Nic
.Could you give me so me advice?
Thx!
The text was updated successfully, but these errors were encountered: