Hi all, so far I have been working with docker and docker compose / swarm. Simple projects, nothing extremely elaborate.
I am new to the hashicorp world.
I did the first tutorials of nomad but I still can’t understand some things.
I would like to create a simple job that runs a youtrack container. The docker compose I use is this:
I don’t understand how I should declare volumes, how should I map ports and finally if I need a task group, or I can just declare the job and a “youtrack” task
I have to admit that nomad is intimidating, but it is likely that I am not able.
Thanks to anyone who can give me a hand or an indication where to start.
So first you should remember, nomad “is not docker only” that is why the job definition is more generic. I haven’t used docker swarm myself but in nomad if you apply a job, nomad tries to place the job where it can fulfill the constraints. Persistent workloads (volumes) is a bit of an advanced setup because, you need either define host volumes on one node or have CSI in place.
note that I set the port to “static” which works for small things but in the long run you would want an ingress controller and which route the http request to the nomad node running the container.
port "web" {
to = 8080
}
I would create another job for an ingress controller (web proxy) like traefik which has nomad and consul support and this web proxy only has the static port on 80
Thank you very much resmo, now everything is much clearer to me. I was trying to put the pieces together in my head and visualizing a simple job like this gave me a better understanding of how nomad works.
I guess the host volumes can be mounts to nfs shares, I’ll check.
I have read the documentation of the csi plugins, yes, it seems quite advanced, but thanks for pointing this out to me too