Cluster algebras and triangulated categories I