def run(): parser = get_parser() args = parser.parse_args() dotcloud_endpoint = os.environ.get('DOTCLOUD_API_ENDPOINT', 'https://rest.dotcloud.com/v1') cli = DotCloudCLI(endpoint=dotcloud_endpoint) if args.setup: cloud.setup(cli) elif args.reset: cloud.destroy_satellite(cli) cli.success("Skypipe system reset. Now run `skypipe --setup`") elif args.satellite: os.environ['PORT_ZMQ'] = args.satellite runpy.run_path('/'.join([os.path.dirname(__file__), 'satellite', 'server.py'])) else: skypipe_endpoint = os.environ.get("SATELLITE", load_satellite_endpoint()) skypipe_endpoint = skypipe_endpoint or cloud.discover_satellite(cli, deploy=False) if not skypipe_endpoint: cli.die("Unable to locate satellite. Please run `skypipe --setup`") save_satellite_endpoint(skypipe_endpoint) if args.check: cli.success("Skypipe is ready for action") else: client.run(skypipe_endpoint, args.name)
def run(): parser = get_parser() args = parser.parse_args() dotcloud_endpoint = os.environ.get('DOTCLOUD_API_ENDPOINT', 'https://rest.dotcloud.com/v1') cli = DotCloudCLI(endpoint=dotcloud_endpoint) if args.setup: cloud.setup(cli) else: skypipe_endpoint = os.environ.get("SATELLITE", load_satellite_endpoint()) skypipe_endpoint = skypipe_endpoint or cloud.discover_satellite(cli, deploy=False) if not skypipe_endpoint: cli.die("Unable to locate satellite. Please run `skypipe --setup`") save_satellite_endpoint(skypipe_endpoint) if args.check: cli.success("Skypipe is ready for action") else: client.run(skypipe_endpoint, args.name)
def run(): parser = get_parser() args = parser.parse_args() dotcloud_endpoint = os.environ.get('DOTCLOUD_API_ENDPOINT', 'https://rest.dotcloud.com/v1') cli = DotCloudCLI(endpoint=dotcloud_endpoint) if args.setup: cloud.setup(cli) else: skypipe_endpoint = os.environ.get("SATELLITE", load_satellite_endpoint()) skypipe_endpoint = skypipe_endpoint or cloud.discover_satellite( cli, deploy=False) if not skypipe_endpoint: cli.die("Unable to locate satellite. Please run `skypipe --setup`") save_satellite_endpoint(skypipe_endpoint) if args.check: cli.success("Skypipe is ready for action") else: client.run(skypipe_endpoint, args.name)