The Mariners have signed shortstop J.P. Crawford to a five-year contract, with sources saying the deal is worth $51 million.