Skip to content

Instantly share code, notes, and snippets.

@nkrumm
Created January 7, 2014 00:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nkrumm/8292905 to your computer and use it in GitHub Desktop.
Save nkrumm/8292905 to your computer and use it in GitHub Desktop.
Simple starcluster script runner
from starcluster.clustersetup import ClusterSetup
class ScriptRunner(ClusterSetup):
"""
Runs local scripts on node or master startup
"""
def __init__(self, node_startup_script):
self.node_startup_script = node_startup_script
def on_add_node(self, node, nodes, master, user, user_shell, volumes):
node.ssh.execute('/bin/bash %s' % self.node_startup_script)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment