There are several matches to Variable Star---the Heinlein/Robinson collaboration---but there are also several points of difference (no military, didn't get signed up on the drunk which wasn't with a friend).
The main character is a musician by training but grew up on a farm, and it is his experience in agriculture which earns him a place on the ship and his living on board. You might also remember an episode where he gets in a fight over a misunderstanding and has to stand trial for assault he is sentenced to psychotherapy. His skill as a musician earns him a sideline income for a while and also plays a role in the development of several characters.