Methods for managing the docker swarm. This object is $swarm within a docker_client object.

Details

Below is reference documentation for all methods for version '1.29' of the docker API - other versions are available. This documentation is automatically generated from docker's API schema, and so inaccuracies may exist between it and stevedore's interface (especially references to JSON objects). Please report any documentation that might be improved at https://github.com/richfitz/stevedore/issues

Methods

help

Display help for this object

Usage:

  help(help_type = getOption("help_type"))

Arguments:

  • help_type: Passed to utils::help, can be one of "text", "html" or "pdf" (or an abbreviation). By default it uses the value getOption("help_type") and should follow the same behaviour as other R help (e.g., using "?")

swarm_init

Initialize a new swarm. Similar to the cli command docker swarm init.

Usage:

  swarm_init(listen_addr = "0.0.0.0:2377",
      advertise_addr = NULL, force_new_cluster = NULL,
      spec = NULL)

Arguments:

  • listen_addr: Listen address used for inter-manager communication, as well as determining the networking interface used for the VXLAN Tunnel Endpoint (VTEP). This can either be an address/port combination in the form 192.168.1.1:4567, or an interface followed by a port number, like eth0:4567. If the port number is omitted, the default swarm listening port is used.

  • advertise_addr: Externally reachable address advertised to other nodes. This can either be an address/port combination in the form 192.168.1.1:4567, or an interface followed by a port number, like eth0:4567. If the port number is omitted, the port number from the listen address is used. If AdvertiseAddr is not specified, it will be automatically detected when possible.

  • force_new_cluster: Force creation of a new swarm.

  • spec: User modifiable swarm configuration.

swarm_inspect

Inspect swarm

Usage:

  swarm_inspect()
swarm_join

Join an existing swarm. Similar to the cli command docker swarm join.

Usage:

  swarm_join(listen_addr = NULL, advertise_addr = NULL,
      remote_addrs = NULL, join_token = NULL)

Arguments:

  • listen_addr: Listen address used for inter-manager communication if the node gets promoted to manager, as well as determining the networking interface used for the VXLAN Tunnel Endpoint (VTEP).

  • advertise_addr: Externally reachable address advertised to other nodes. This can either be an address/port combination in the form 192.168.1.1:4567, or an interface followed by a port number, like eth0:4567. If the port number is omitted, the port number from the listen address is used. If AdvertiseAddr is not specified, it will be automatically detected when possible.

  • remote_addrs: Addresses of manager nodes already participating in the swarm.

  • join_token: Secret token for joining this swarm.

swarm_leave

Leave a swarm. Similar to the cli command docker swarm leave.

Usage:

  swarm_leave(force = NULL)

Arguments:

  • force: Force leave swarm, even if this is the last manager or that it will break the cluster.

swarm_unlock

Unlock a locked manager. Similar to the cli command docker swarm unlock.

Usage:

  swarm_unlock(unlock_key = NULL)

Arguments:

  • unlock_key: The swarm's unlock key.

swarm_unlock_key

Get the unlock key. Similar to the cli command docker swarm unlock-key.

Usage:

  swarm_unlock_key()
swarm_update

Update a swarm. Similar to the cli command docker swarm update.

Usage:

  swarm_update(version, name = NULL, labels = NULL,
      orchestration = NULL, raft = NULL, dispatcher = NULL,
      ca_config = NULL, encryption_config = NULL,
      task_defaults = NULL, rotate_worker_token = NULL,
      rotate_manager_token = NULL,
      rotate_manager_unlock_key = NULL)

Arguments:

  • version: The version number of the swarm object being updated. This is required to avoid conflicting writes.

  • name: Name of the swarm.

  • labels: User-defined key/value metadata.

  • orchestration: Orchestration configuration.

  • raft: Raft configuration.

  • dispatcher: Dispatcher configuration.

  • ca_config: CA configuration.

  • encryption_config: Parameters related to encryption-at-rest.

  • task_defaults: Defaults for creating tasks in this cluster.

  • rotate_worker_token: Rotate the worker join token.

  • rotate_manager_token: Rotate the manager join token.

  • rotate_manager_unlock_key: Rotate the manager unlock key.