<s> import utils <EOL> import subprocess <EOL> print "<STR_LIT>" <EOL> instances = [ ] <EOL> for n in range ( <NUM_LIT:1> , <NUM_LIT:3> ) : <EOL> command = "<STR_LIT>" % ( n , ) <EOL> result = subprocess . check_output ( command , shell = True ) <EOL> externalIP = result . split ( ) [ <NUM_LIT:1> ] <EOL> result = utils . runSSH ( externalIP , [ "<STR_LIT>" ] ) <EOL> internalIP = result . split ( "<STR_LIT:\n>" ) [ <NUM_LIT:1> ] . split ( ) [ <NUM_LIT:1> ] . split ( "<STR_LIT::>" ) [ <NUM_LIT:1> ] <EOL> instances . append ( ( externalIP , internalIP ) ) <EOL> masterExternal , masterInternal = instances [ <NUM_LIT:0> ] <EOL> minionExternal , minionInternal = instances [ <NUM_LIT:1> ] <EOL> utils . pushConfig ( masterExternal , instances ) <EOL> print "<STR_LIT>" <EOL> utils . runSSHPassthru ( masterExternal , [ "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ] ) <EOL> utils . runSSHPassthru ( minionExternal , [ "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ] ) <EOL> print "<STR_LIT>" <EOL> print "<STR_LIT>" <EOL> utils . runSSHRaw ( masterExternal , '<STR_LIT>' ) <EOL> utils . runSSHRaw ( minionExternal , '<STR_LIT>' ) <EOL> masterPubkey = utils . runSSH ( masterExternal , <EOL> [ "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ] ) . strip ( ) <EOL> minionPubkey = utils . runSSH ( minionExternal , <EOL> [ "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ] ) . strip ( ) <EOL> utils . runSSH ( masterExternal , [ "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT:-c>" , <EOL> "<STR_LIT>" % ( minionPubkey , ) ] ) <EOL> utils . runSSH ( minionExternal , [ "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT:-c>" , <EOL> "<STR_LIT>" % ( masterPubkey , ) ] ) <EOL> print "<STR_LIT>" <EOL> utils . runSSH ( masterExternal , [ "<STR_LIT>" , "<STR_LIT>" ] ) <EOL> utils . runSSH ( minionExternal , [ "<STR_LIT>" , "<STR_LIT>" ] ) <EOL> print "<STR_LIT>" </s>
