def create(): from IPython.lib import passwd from fabfile.util import yaml_file_replace local("ipython profile create nbserver") local('cp etc/ipython_notebook_config.py ~/.ipython/profile_nbserver') result = passwd() yaml_file_replace(filename='/../.ipython/profile_nbserver/ipython_notebook_config.py', replacements={'SHAPASSWD': result} ) progress.off() filename = "~/.ipython/profile_nbserver/mycert.pem" local("openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout {0} -out {0}".format(filename)) local("chmod go-rw ~/.ipython/profile_nbserver/mycert.pem")
def create(): from IPython.lib import passwd from fabfile.util import yaml_file_replace local("ipython profile create nbserver") local('cp etc/ipython_notebook_config.py ~/.ipython/profile_nbserver') result = passwd() yaml_file_replace( filename='/../.ipython/profile_nbserver/ipython_notebook_config.py', replacements={'SHAPASSWD': result}) progress.off() filename = "~/.ipython/profile_nbserver/mycert.pem" local( "openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout {0} -out {0}" .format(filename)) local("chmod go-rw ~/.ipython/profile_nbserver/mycert.pem")
__all__ = ['start', 'stop', 'kill', 'view', 'clean', 'agent', 'quick', 'wsgi', 'web'] # # SETTING THE BROWSER BASED ON PLATFORM # web_browser = "firefox" debug = True try: debug = cm_config_server().get("cloudmesh.server.debug") except: pass if debug: progress.off() else: progress.on() PROGRESS.set('Cloudmesh Services', 50) if sys.platform == 'darwin': web_browser = "open" def execute_command(msg, command, debug): _capture = not debug if debug: banner(msg, debug=debug) else: PROGRESS.next()
import sys import os import time from cloudmesh_common.util import PROGRESS import progress PROGRESS.set('Cloudmesh Services', 50) debug = True try: debug = cm_config_server().get("cloudmesh.server.debug") except: pass if debug: progress.off() else: progress.on() def get_pid(command): with hide('output', 'running', 'warnings'): lines = local("ps -ax |fgrep {0}".format(command), capture=True).split("\n") pid = None line = None for line in lines: if "fgrep" not in line: pid = line.split(" ")[0] break if pid is None:
def start(): progress.off() local("mkdir -p ~/notebook/") local( "cd ~/notebook/ && ipython notebook --certfile=~/.ipython/profile_nbserver/mycert.pem --profile=nbserver" )
def start(): progress.off() local("mkdir -p ~/notebook/") local("cd ~/notebook/ && ipython notebook --certfile=~/.ipython/profile_nbserver/mycert.pem --profile=nbserver")