Petraeus garners praise at retirement ceremony