5 ms·
I was looking into doing something similar with Nomad recently since lately I have been using systemd to launch containers and managing that config with some ja
by zoidb 5y ago
I was looking into doing something similar with Nomad recently since lately I have been using systemd to launch containers and managing that config with some janky shell scripts. How are you configuring everything to run on a single server, including consul? Isn't Nomad designed to to run on multiple servers or are you running nomad in multiple containers on your VPS? When I looked into this previously I got to https://stackoverflow.com/questions/56112422/nomad-configuration-for-single-node-to-act-as-production-server-and-client https://stackoverflow.com/questions/56112422/nomad-configura... which has some suggestions for running Nomad on a single node but generally recommends against it.
- Jedd 5y agoFor development purposes you very much can run Nomad and Consul on a single host. They recommend you don't, as you lose any HA, of course, but for those of us not seeking 5 nines of availability, that's quite acceptable. In my lab I'm actually running a two-node cluster, but that's 'even worse' and engenders the occasional mildly surprising failure states. Anyway, I can highly recommend setting up Nomad (and some friends) on a single host. It's going to be much more robust & interesting than 'some janky shell scripts'. : )
- CGamesPlay 5y agoWhat's the configuration here? 1 server-client and 1 client? Or are you actually running 2 server-clients?
- Jedd 5y agoIt's not my ideal situation, but pandemic relocation etc means I'm not next to my normal lab (two ESX servers + NAS). So, that said, yes, server (whitebox) plus desktop (xeon, 32gb) - both running Debian, with Consul, Nomad, Traefik, promtail etc running on both, but no shared NFS between the two, so I've got constraints on most of the important stuff to run on the server (prometheus, cortex, loki, nodered). In practice, desktop is running 24/7, just it occasionally gets a reboot. Having consul/nomad running as server-client on two machines is undeniably weird, and requires some careful consideration around bootstrap_expect= settings. Almost all of this is around having a useful facsimile of my work environment, rather than (say) running an SSG public site.
- gtestault 5y agoHey, I'm the author of the stack overflow answer. You can absolutely do it and it's pretty cool! Just keep in mind that you lose the advantages of a 3 node setup: data replication across nodes, failure tolerance, new leader election. That's why it's discouraged for production environments where things are meant to be up 24/24h