IPSEC tutorial

I’m looking for a complet guide to setup a ipsec connection between a mikrotik and a UDMpro

Who is the client and who is the server?

Regards.