from openstack.icehouse.dashboard.dashboard import DashboardHA if __name__ == '__main__': print 'hello openstack-icehouse:dashboard============' print 'start time: %s' % time.ctime() #when execute script,exec: python <this file absolute path> #The params are retrieved from conf/openstack_params.json & /etc/puppet/localip, these two files are generated in init.pp in site.pp. ############################### INSTALL_TAG_FILE = '/opt/initDashboard' if os.path.exists(INSTALL_TAG_FILE) : print 'dashboard installed####' print 'exit====' pass else : Dashboard.start() DashboardHA.install() DashboardHA.configure() DashboardHA.start() # Dashboard.restart() DashboardHA.start() # ShellCmdExecutor.execCmd('service haproxy restart') #mark: dashboard is installed os.system('touch %s' % INSTALL_TAG_FILE) print 'hello openstack-icehouse:dashboard installed#######' pass