Abstract— Minimizing the energy cost and improving thermal performance of power-limited datacenters, deploying large computing clusters, are the key issues towards optimizing their computing resources and maximally exploiting the computation capabilities. In this paper, we develop a unique merger between the physical infrastructure and resource management functions of a cluster management system to take a holistic view of datacenter management, and make global (at the level of a datacenter) thermal-aware job scheduling decisions. A software architecture is presented in this regard and implemented in a fully operational computational cluster in the ASU datacenter. The proposed architecture develops a feedback-control loop, by combining information from ambient and on-board sensors with the node allocation and job scheduling mechanisms, for managing the system load depending on the thermal distribution in the datacenter.