deploylib.runit

RunitManager

trait RunitManager extends RemoteMachine

Allows the management of services controlled by Runit on the remote machine

Linear Supertypes
RemoteMachine, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. RunitManager
  2. RemoteMachine
  3. AnyRef
  4. Any
Visibility
  1. Public
  2. All

Type Members

  1. case class FreeStats (total: Int, used: Int, free: Int, shared: Int, buffers: Int, cached: Int) extends Product with Serializable

  2. case class RemoteFile (name: String, owner: String, permissions: String, modDate: String, size: String) extends Product with Serializable

  3. case class RemoteJavaProcess (pid: Int, main: String) extends Product with Serializable

  4. case class RemoteProcess (user: String, pid: Int, cpu: Float, mem: Float, vsz: Int, rss: Int, tty: String, stat: String, start: String, time: String, command: String) extends Product with Serializable

Abstract Value Members

  1. val hostname : String

    The hostname that the ssh connection is established with

    The hostname that the ssh connection is established with

    Attributes
    abstract
    Definition Classes
    RemoteMachine
  2. val javaCmd : File

    The location of the java command on the remote machine

    The location of the java command on the remote machine

    Attributes
    abstract
    Definition Classes
    RemoteMachine
  3. val rootDirectory : File

    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)

    Attributes
    abstract
    Definition Classes
    RemoteMachine
  4. val runitBinaryPath : File

    Attributes
    abstract
  5. val username : String

    The username used to authenticate with the remote ssh server

    The username used to authenticate with the remote ssh server

    Attributes
    abstract
    Definition Classes
    RemoteMachine

Concrete Value Members

  1. def ! (cmd: String): Unit

    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

    Definition Classes
    RemoteMachine
  2. def != (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  3. def != (arg0: Any): Boolean

    Attributes
    final
    Definition Classes
    Any
  4. def !? (cmd: String): String

    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.

    Definition Classes
    RemoteMachine
  5. def ## (): Int

    Attributes
    final
    Definition Classes
    AnyRef → Any
  6. def == (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  7. def == (arg0: Any): Boolean

    Attributes
    final
    Definition Classes
    Any
  8. def appendFile (file: File, contents: String): Unit

    Append to file on the remote machine with the given contents

    Append to file on the remote machine with the given contents

    file

    - The desired path of the file. If the given path is relative, the file will be created in the rootDirectory

    contents

    - A string to be appended to the file

    Definition Classes
    RemoteMachine
  9. def asInstanceOf [T0] : T0

    Attributes
    final
    Definition Classes
    Any
  10. var assignedServices : Set[Service]

    The services that are assigned to be deployed to this remote machine.

    The services that are assigned to be deployed to this remote machine.

    Attributes
    protected
    Definition Classes
    RemoteMachine
  11. def blockTillFileCreated (file: File): Unit

    Block until the specified file is created on the remote machine.

    Block until the specified file is created on the remote machine.

    Definition Classes
    RemoteMachine
  12. def blockTillPortOpen (port: Int): Unit

    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.

    Definition Classes
    RemoteMachine
  13. def catFile (remoteFile: File): String

    Return the contents of the remote file as a string.

    Return the contents of the remote file as a string.

    Definition Classes
    RemoteMachine
  14. def clearAll : Unit

  15. def clone (): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  16. def createFile (file: File, contents: String, mode: String = "644"): Unit

    Create a file on the remote machine with the given contents

    Create a file on the remote machine with the given contents

    file

    - The desired path of the file. If the given path is relative, the file will be created in the rootDirectory

    contents

    - A string with the desired contents of the file

    Definition Classes
    RemoteMachine
  17. def download (remoteFile: File, localDirectory: File): Unit

    Downloads a file from the remote machine.

    Downloads a file from the remote machine.

    Definition Classes
    RemoteMachine
  18. def eq (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  19. def equals (arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  20. def executeCommand (cmd: String, timeout: Long = 0): ExecuteResponse

    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

    Definition Classes
    RemoteMachine
  21. def finalize (): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  22. def free : FreeStats

    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

    Definition Classes
    RemoteMachine
  23. val freeResponse : Regex

    Definition Classes
    RemoteMachine
  24. def getClass (): java.lang.Class[_]

    Attributes
    final
    Definition Classes
    AnyRef → Any
  25. def hashCode (): Int

    Definition Classes
    AnyRef → Any
  26. def isInstanceOf [T0] : Boolean

    Attributes
    final
    Definition Classes
    Any
  27. def isPortAvailableToListen (port: Int): Boolean

    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.

    Definition Classes
    RemoteMachine
  28. def jps : Seq[RemoteJavaProcess]

    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.

    Definition Classes
    RemoteMachine
  29. val logger : Logger

    Definition Classes
    RemoteMachine
  30. def ls (dir: File): Seq[RemoteFile]

    Return a list of RemoteFiles found in dir on the remote machine.

    Return a list of RemoteFiles found in dir on the remote machine.

    Definition Classes
    RemoteMachine
  31. def md5 (remoteFile: File): String

    returns an md5 hash of the specified remote file

    returns an md5 hash of the specified remote file

    Definition Classes
    RemoteMachine
  32. def mkdir (remoteDir: File): Unit

    create directories on the remote machine.

    create directories on the remote machine.

    Definition Classes
    RemoteMachine
  33. def ne (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  34. def notify (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  35. def notifyAll (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  36. def prepareCommand (cmd: String): String

    Attributes
    protected
    Definition Classes
    RemoteMachine
  37. val privateKey : File

    The private key used to authenticate with the remote ssh server

    The private key used to authenticate with the remote ssh server

    Definition Classes
    RemoteMachine
  38. def ps : Seq[RemoteProcess]

    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

    Definition Classes
    RemoteMachine
  39. lazy val runsvdirCmd : File

  40. lazy val serviceRoot : File

  41. def services : List[RunitService]

  42. def stopWatches (): Unit

    Kill all processes currently tailing a file.

    Kill all processes currently tailing a file.

    Definition Classes
    RemoteMachine
  43. lazy val svCmd : File

  44. lazy val svlogdCmd : File

  45. def synchronized [T0] (arg0: ⇒ T0): T0

    Attributes
    final
    Definition Classes
    AnyRef
  46. def tail (remoteFile: File, numLines: Int = 20): String

    return the last numLines from the specified file

    return the last numLines from the specified file

    Definition Classes
    RemoteMachine
  47. implicit def toOption [A] (a: A): Option[A]

    Attributes
    protected implicit
    Definition Classes
    RemoteMachine
  48. def toString (): String

    Definition Classes
    RemoteMachine → AnyRef → Any
  49. def upload (localFile: File, remoteDirectory: File): Unit

    Upload a file to the remote machine.

    Upload a file to the remote machine. Before performing the transfer check the md5hash of the local file and any existing file to ensure we don't waste bandwidth.

    Definition Classes
    RemoteMachine
  50. def useConnection [ReturnType] (func: (Connection) ⇒ ReturnType, numTries: Int): ReturnType

    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.

    Attributes
    protected
    Definition Classes
    RemoteMachine
  51. def wait (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()
  52. def wait (arg0: Long, arg1: Int): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()
  53. def wait (arg0: Long): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()
  54. def watch (remoteFile: File): Unit

    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.

    Definition Classes
    RemoteMachine

Deprecated Value Members

  1. def addService (service: Service): Unit

    Definition Classes
    RemoteMachine
    Annotations
    @deprecated
    Deprecated

    use getService

Inherited from RemoteMachine

Inherited from AnyRef

Inherited from Any