main: add a helper function for starting raft