Log In | Get Help   
Home My Page Projects Code Snippets Project Openings BonFIRE VCOC Demonstration Kit
Summary Activity SCM Files Wiki
[bonfiredemokit] View of /virt-cluster/vc/vc-node-execd.py
[bonfiredemokit] / virt-cluster / vc / vc-node-execd.py Repository:
ViewVC logotype

View of /virt-cluster/vc/vc-node-execd.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 10 - (download) (as text) (annotate)
Fri Aug 31 10:40:38 2012 UTC (11 years, 9 months ago) by agomez
File size: 1351 byte(s)
Corrected minor error in license text
Powerpoint presentation to show how to use the software (also in PDF).
#!/usr/bin/python
#
# BonFIRE Virtual Clusters on Federated Clouds Demonstration Kit
#
# Copyright (c) Fundacion Centro Tecnologico de Supercomputacion de Galicia 2012
# 
# License GPL Version 3
#
# The research leading to these results has received funding from 
# the European Community's Seventh Framework Programme (FP7/2007-2013) 
# under agreement number 257386
#
# This software is provided with ABSOLUTELY NO WARRANTY
# 
import socket
import bonfire
import ogs
import sys
import time
import vcutil

from logger import log,configure
if len(sys.argv) >1:
        configure(logfile = sys.argv[1], debug=True, console=False)
else:
        configure(debug=True, console=True)

default_bonfire = "/etc/default/bonfire"
bonfire.read_defaults(default_bonfire)
log.info("Bonfire URI: %s" % bonfire.uri)
log.info("Credentials: %s:%s" % (bonfire.user,bonfire.password,))
log.info("Experiment: %s" % bonfire.experiment_id)

while True:
	try:
		log.info("Get hostname")
		hostname = socket.gethostname()
		log.info("I am %s" % hostname)
		#Check if it is registered	
		log.info("Get hosts")
		hosts = ogs.get_execution_hosts()
		log.debug(hosts)
		if hostname in hosts:
			log.info("Starting execd")
			ogs.start_execd()
			break
	except Exception as excpt:
		log.exception(excpt)
	time.sleep(20)






root@forge.cesga.es
ViewVC Help
Powered by ViewVC 1.0.0  

Powered By FusionForge