I am looking for some guidance in the following:
I want to host a Mender server for, hopefully, future production use. For simplicity’s sake, we need to host our own server so it makes sense to do so. My question is: what issues have people been facing when hosting their own server.
Also, one of my questions would be: if the mender server completely crashes, for any reason at all, creating a new Mender server and hosting it at the same URL would allow me to “recover” (re-add) all the devices without having to manually connect to each one? In my opinion, since mender.conf has the following stanza:
I would guess that the devices will, at regular intervals poll https://mender.domain, which will allow me to just accept all the devices as new devices. Is that right?
Thanks in advance!
while I do not really know what you mean by “completely crashing”, the general advice, as anywhere in IT is: have a tested backup and restore strategy. The documentation on this is here.
What issues you may face depends on your project and set up, like scaling, hosting, etc. If you run into a specific problem, feel free to ask about it here, or (sales pitch) just use Hosted Mender where we take care of this
By “complete crashing” I mean something catastrophic. I don’t know, the DC catches fire
The question is: would a new mender instance, hosted at the same URL, using certificates signed by the same authority, be able to register the devices that were already registered in the old Mender server? That’s basically my question, since this is an extreme scenario so, if something like this happens, and it’s still possible to recover, then I guess anything else is rather simple
lets say, according to my understanding it should work like that. But why not just give it a short test, and then let us know? Should be relatively straightforward.
- get the integration repo
- spin up server
- register device
- spin down server
- wipe server
6 spin up server again
- see what happens
To be honest, I was hoping someone already tested this.
Still, I ran the tests, it works. The only thing is that the devices need a reboot / a restart of the mender-client. I would guess that the DNS is cached somewhere, and on
systemctl restart mender-client that DNS entry is flushed or something.
P.S. (1): the OS DNS was updated, as both
ping mender.domain and
dig mender.domain were showing the correct IP address.
P.S. (2): It might make sense to update that DNS record either on schedule or before calling the endpoint.