Executes a command and throw an error if it doesn't return 0
Executes a command and throw an error if it doesn't return 0
Execute a command on the remote machine and return stdout as a string.
Execute a command on the remote machine and return stdout as a string. Throws an exception if the command doesn't exit with status code 0.
Append to file on the remote machine with the given contents
Append to file on the remote machine with the given contents
- The desired path of the file. If the given path is relative, the file will be created in the rootDirectory
- A string to be appended to the file
The services that are assigned to be deployed to this remote machine.
The services that are assigned to be deployed to this remote machine.
Block until the specified file is created on the remote machine.
Block until the specified file is created on the remote machine.
Block until we can make a connection to the given port, checking every 5 seconds.
Block until we can make a connection to the given port, checking every 5 seconds.
Blocks the current thread until this instance is up and accepting ssh connections.
Creates a new AMI based on this image using ec2-bundle-vol and ec2-upload-bundle.
Caches this file on the instance (keyed by the hash of the file contents)
Return the contents of the remote file as a string.
Return the contents of the remote file as a string.
Create a file on the remote machine with the given contents
Create a file on the remote machine with the given contents
- The desired path of the file. If the given path is relative, the file will be created in the rootDirectory
- A string with the desired contents of the file
Downloads a file from the remote machine.
Downloads a file from the remote machine.
Execute a command sync with a maximum timeout to wait for result and return the result as an ExecuteResponse
Execute a command sync with a maximum timeout to wait for result and return the result as an ExecuteResponse
Returns the result of the command free.
Returns the result of the command free.
Parsed as: total used free shared buffers cached Mem: 7864548 4332752 3531796 0 78112 2640248
Use netstat to check if a port is currently bound to a listening socket on the remote machine.
Use netstat to check if a port is currently bound to a listening socket on the remote machine.
The location of the java command on the remote machine
The location of the java command on the remote machine
Return a list of all the java processes running on the remote machine.
Return a list of all the java processes running on the remote machine.
Return a list of RemoteFiles found in dir on the remote machine.
Return a list of RemoteFiles found in dir on the remote machine.
returns an md5 hash of the specified remote file
returns an md5 hash of the specified remote file
create directories on the remote machine.
create directories on the remote machine.
The private key used to authenticate with the remote ssh server
The private key used to authenticate with the remote ssh server
lists the processes running on the remote machine.
lists the processes running on the remote machine. Expects: USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 1 0.0 0.0 23708 1952 ? Ss 01:00 0:00 /sbin/init
Upload all of the jars in the file .
Upload all of the jars in the file ./allJars and create jrun/console scripts for working with them Note, this is mostly a hack to work around problems with mesos on EC2. TODO: Integrate w/ sbt
The default root directory for operations (The user should have read write permissions to this directory)
The default root directory for operations (The user should have read write permissions to this directory)
Runs pre-experiment setup like recording instance details in the database and making needed directories
Kill all processes currently tailing a file.
Kill all processes currently tailing a file.
return the last numLines from the specified file
return the last numLines from the specified file
Custom upload method that copies a file once to S3 and then from there to any number of EC2Instances.
Custom upload method that copies a file once to S3 and then from there to any number of EC2Instances.
Provide an ssh connection to the server.
Provide an ssh connection to the server. If one is not already available or has been disconnected, create one.
The username used to authenticate with the remote ssh server
The username used to authenticate with the remote ssh server
run tail -F on the specifed file in a seperate thread.
run tail -F on the specifed file in a seperate thread. all ouput is printed on local stdout.
use getService
A specific RemoteMachine used to control a single Instances of this class can be obtained by instanceId from the static method getInstance