If you want to do Data Parallel Training, you should use DDP and this tutorial should help you: Getting Started with Distributed Data Parallel — PyTorch Tutorials 1.10.0+cu102 documentation 3.

I understand that I should use gloo as the backend, but how do I configure the slave nodes?
I understand that process with rank 0 is the master, but where do I provide the slave IPs? How to get the slave(s) to listen to the master node for new jobs? How do I start the slave processes?

I think you probably need to familiarize yourself with ProcessGroups and our ProcessGroup API before looking into DDP. This tutorial would give a good overview: Writing Distributed Applications with PyTorch — PyTorch Tutorials 1.10.0+cu102 documentation 2
Essentially to run DDP, first you need spawn N processes and these processes have ranks [0, N). Now for all of these processes to talk to each other, first you need to initialize a ProcessGroup (think of this as a communication channel you are initializing across all processes) using init_process_group.
Regarding initialization you can refer to this section of our docs (TCP initialization): Distributed communication package - torch.distributed — PyTorch 1.10.0 documentation. You only need to specify the IP of the master on all the ranks/processes. All processes which are not rank 0 will try to connect to that IP and discover all of the other peers.
So essentially you start N processes and specify a master addr on all, then all processes discover each other via that master address. After that point these processes form a ProcessGroup and you can run collective operations as you wish across the entire process group.