ControlNode.Release (Control Node v0.1.1) View Source
Link to this section Summary
Functions
Connects to a remote release via Node.connect/1
Deploys a release to the host specified by host_spec
With the given release_spec
, host_spec
and cookie
tries to connect to
the release running on the remote host. In case the release is running on the
host a SSH tunnel is established and control node connects to the release (via
Node.connect/1
) and starts monitoring the release node.
Creates a SSH tunnel to remote service and forwards a local port to the remote service port.
Stops the release running on host_spec
Stops the release node on a given remote host
Stops monitoring the remote release and closes the SSH tunnel to the remote host
Link to this section Functions
Connects to a remote release via Node.connect/1
NOTE: Assumes that a SSH tunnel has been setup to the remote service
Specs
deploy( ControlNode.Release.Spec.t(), ControlNode.Host.SSH.t(), ControlNode.Registry.Local.t(), binary() ) :: :ok | {:error, ControlNode.Host.SSH.ExecStatus.t()}
Deploys a release to the host specified by host_spec
NOTE: Prior to calling this function it should be ensured that no release with
name release_spec.name
is running on host specified by host_spec
With the given release_spec
, host_spec
and cookie
tries to connect to
the release running on the remote host. In case the release is running on the
host a SSH tunnel is established and control node connects to the release (via
Node.connect/1
) and starts monitoring the release node.
Specs
setup_tunnel(ControlNode.Release.Spec.t(), ControlNode.Host.SSH.t()) :: {:ok, integer()} | {:error, :release_not_running}
Creates a SSH tunnel to remote service and forwards a local port to the remote service port.
NOTE: remote service's port is the one registered with the EPMD service running on the remote host
Specs
stop(ControlNode.Release.Spec.t(), ControlNode.Host.SSH.t()) :: term() | {:badrpc, term()}
Stops the release running on host_spec
Stops the release node on a given remote host
Specs
terminate_state(ControlNode.Release.Spec.t(), ControlNode.Release.State.t()) :: ControlNode.Host.SSH.t()
Stops monitoring the remote release and closes the SSH tunnel to the remote host