An Ottawa man was sentenced Thursday to 28 years in prison for an armed Ottawa home invasion, during which shots were fired.