ControlNode.Release (Control Node v0.2.0) View Source

Link to this section Summary

Functions

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.

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

Link to this function

connect(release_spec, host_spec, cookie, monitor_node? \\ false)

View Source

Connects to a remote release via Node.connect/1

NOTE: Assumes that a SSH tunnel has been setup to the remote service

Link to this function

deploy(release_spec, host_spec, registry_spec, version)

View Source

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

Link to this function

initialize_state(release_spec, host_spec, cookie)

View Source

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.

Link to this function

start(release_spec, state)

View Source

Specs

Link to this function

stop(release_spec, state)

View Source

Stops the release node on a given remote host

Link to this function

terminate_state(release_spec, release_state)

View Source

Specs

Stops monitoring the remote release and closes the SSH tunnel to the remote host