support local repo on cluster creation for appmgr like ClouderaMgr and Ambari
code refactor -- support local repo for CM/Ambari
support local repo for appmgr -- small updates based on code review comments