Ir al contenido

swarm_node

El dominio swarm_node tiene 12 acciones. En la superficie meta se alcanzan todas a través de arcane_swarm_node; en la individual, cada una es una herramienta propia; en la dinámica se ejecutan con arcane_execute_action y el ID canónico.

AcciónTítuloTipo
swarm_node.agent_binding_deleteDetach a visible environment from a swarm nodedestructiva
swarm_node.agent_binding_setAttach a visible environment to a swarm nodeescritura
swarm_node.agent_deployment_createGet swarm node agent deployment snippetsdestructiva
swarm_node.agent_deployment_deleteRemove a dedicated swarm node agent registrationdestructiva
swarm_node.agents_reconcileReconcile swarm node agent bindingsescritura
swarm_node.deleteDelete swarm nodedestructiva
swarm_node.demoteDemote swarm nodedestructiva
swarm_node.getGet swarm nodelectura
swarm_node.listList swarm nodeslectura
swarm_node.promotePromote swarm nodeescritura
swarm_node.tasksList tasks for a swarm nodelectura
swarm_node.updateUpdate swarm nodeescritura

Detach a visible environment from a swarm node

  • Tipo: destructiva — exige confirm: true
  • Parámetros obligatorios: nodeId
  • Meta-herramienta: arcane_swarm_node con "action": "agent_binding_delete"
  • Herramienta individual: arcane_swarm_node_agent_binding_delete
  • Ruta de Arcane: DELETE /api/environments/{id}/swarm/nodes/{nodeId}/agent/binding
  • ID de operación: delete-swarm-node-agent-binding
  • Uso: Clears the visible environment bound to the node (nodeId from swarm_node.list, on the manager’s environment). The environment itself, its agent and token are kept, and legacy hidden registrations are not touched (use swarm_node.agent_deployment_delete). Succeeds even when nothing was bound.
  • Acciones relacionadas: swarm_node.get, swarm_node.agent_binding_set, swarm_node.agent_deployment_delete

Attach a visible environment to a swarm node

  • Tipo: escritura
  • Parámetros obligatorios: nodeId, body
  • Meta-herramienta: arcane_swarm_node con "action": "agent_binding_set"
  • Herramienta individual: arcane_swarm_node_agent_binding_set
  • Ruta de Arcane: PUT /api/environments/{id}/swarm/nodes/{nodeId}/agent/binding
  • ID de operación: put-swarm-node-agent-binding
  • Uso: Records that an existing Arcane environment is the agent of this node. nodeId from swarm_node.list, environmentId is the manager’s environment, and the environment to attach goes in body.environmentId (from environment.list or the node’s agent.candidates). Arcane first asks that environment for its swarm identity, so it must be visible, enabled, reachable and report exactly this node ID, else 400. Set body.rebind to move a binding (the environment is bound elsewhere, or the node already has one), body.replaceDeployment to also delete a legacy hidden agent of the node. Returns the node with its updated agent.
  • Acciones relacionadas: swarm_node.list, environment.list, swarm_node.agent_binding_delete, swarm_node.agents_reconcile, swarm_node.get

Get swarm node agent deployment snippets

  • Tipo: destructiva — solo cuando rotate is true; esas llamadas exigen confirm: true, las demás no
  • Parámetros obligatorios: nodeId
  • Meta-herramienta: arcane_swarm_node con "action": "agent_deployment_create"
  • Herramienta individual: arcane_swarm_node_agent_deployment_create
  • Ruta de Arcane: POST /api/environments/{id}/swarm/nodes/{nodeId}/agent/deployment
  • ID de operación: get-swarm-node-agent-deployment
  • Uso: Registers (or reuses) an environment bound to the node and returns docker run / compose snippets for its agent. The environment it creates is a normal visible environment: remove it with environment.delete. nodeId from swarm_node.list, needs swarm:nodes. A node that already has a binding reuses that environment and its token. rotate=true issues a new token and deletes the old one, cutting off an agent still using it, and only that needs confirm=true. The result holds dockerRun, dockerCompose, environmentId and the node’s agent status.
  • Acciones relacionadas: swarm_node.list, swarm_node.agent_binding_delete, environment.delete, swarm_node.get

Remove a dedicated swarm node agent registration

  • Tipo: destructiva — exige confirm: true
  • Parámetros obligatorios: nodeId
  • Meta-herramienta: arcane_swarm_node con "action": "agent_deployment_delete"
  • Herramienta individual: arcane_swarm_node_agent_deployment_delete
  • Ruta de Arcane: DELETE /api/environments/{id}/swarm/nodes/{nodeId}/agent/deployment
  • ID de operación: delete-swarm-node-agent-deployment
  • Uso: Removes only a legacy hidden (dedicated) agent registration of the node. It leaves the visible environment that agent_deployment_create creates. nodeId from swarm_node.list. Succeeds even when the node has no hidden registration. To undo agent_deployment_create, use environment.delete with its environmentId.
  • Acciones relacionadas: environment.delete, swarm_node.agent_binding_delete, swarm_node.get

Reconcile swarm node agent bindings

  • Tipo: escritura
  • Parámetros obligatorios: ninguno
  • Meta-herramienta: arcane_swarm_node con "action": "agents_reconcile"
  • Herramienta individual: arcane_swarm_node_agents_reconcile
  • Ruta de Arcane: POST /api/environments/{id}/swarm/nodes/agents/reconcile
  • ID de operación: reconcile-swarm-node-agents
  • Uso: Binds every node that exactly one visible environment reports as its own to that environment. Ambiguous and mismatched nodes are left as they are. Call on the manager’s environment (Swarm manager only, needs swarm:nodes). Nodes already bound are not changed. results lists every node with nodeId, state, environmentId and, when still unbound, candidates to resolve with swarm_node.agent_binding_set.
  • Acciones relacionadas: swarm_node.list, swarm_node.agent_binding_set, swarm_node.get

Delete swarm node

  • Tipo: destructiva — exige confirm: true
  • Parámetros obligatorios: nodeId
  • Meta-herramienta: arcane_swarm_node con "action": "delete"
  • Herramienta individual: arcane_swarm_node_delete
  • Ruta de Arcane: DELETE /api/environments/{id}/swarm/nodes/{nodeId}
  • ID de operación: delete-swarm-node
  • Uso: A node that is not down is refused unless force is true, and the removed node’s daemon still believes it is in the swarm until it leaves. nodeId from swarm_node.list. Swarm manager only, needs swarm:nodes. The clean order is swarm.leave on the node’s own environment, wait for status down in swarm_node.get, then delete. An environment bound to the node stays bound (detach it with swarm_node.agent_binding_delete).
  • Acciones relacionadas: swarm_node.list, swarm_node.get, swarm.leave, swarm_node.agent_binding_delete

Demote swarm node

  • Tipo: destructiva — exige confirm: true
  • Parámetros obligatorios: nodeId
  • Meta-herramienta: arcane_swarm_node con "action": "demote"
  • Herramienta individual: arcane_swarm_node_demote
  • Ruta de Arcane: POST /api/environments/{id}/swarm/nodes/{nodeId}/demote
  • ID de operación: demote-swarm-node
  • Uso: Turns a manager back into a worker (role=worker through a node update). nodeId from swarm_node.list, Swarm manager only, needs swarm:nodes. Docker refuses to demote the last manager. role shows worker at once (it is the node spec), and managerStatus empties in swarm_node.get once Docker has finished.
  • Acciones relacionadas: swarm_node.list, swarm_node.get, swarm_node.promote

Get swarm node

  • Tipo: lectura
  • Parámetros obligatorios: nodeId
  • Meta-herramienta: arcane_swarm_node con "action": "get"
  • Herramienta individual: arcane_swarm_node_get
  • Ruta de Arcane: GET /api/environments/{id}/swarm/nodes/{nodeId}
  • ID de operación: get-swarm-node
  • Uso: nodeId from swarm_node.list, on the manager’s environment. Fails when the node is gone. Returns the same summary as the list (role, availability, status, reachability, labels, engineVersion, agent binding). Use it to confirm update, promote and demote: role, availability and labels show the node spec and change at once, while managerStatus and reachability follow when Docker has finished the role change.
  • Acciones relacionadas: swarm_node.list, swarm_node.tasks, swarm_node.update

List swarm nodes

  • Tipo: lectura
  • Parámetros obligatorios: ninguno
  • Meta-herramienta: arcane_swarm_node con "action": "list"
  • Herramienta individual: arcane_swarm_node_list
  • Ruta de Arcane: GET /api/environments/{id}/swarm/nodes
  • ID de operación: list-swarm-nodes
  • Uso: The starting point for every nodeId: call it on the swarm manager’s environment (Swarm manager only: refused outside a swarm or on a worker). Each node has id, hostname, role, availability, status (ready/down), managerStatus (leader/manager), managerAddress, reachability, labels, engineVersion and agent (which Arcane environment covers the node: state, environmentId, bindingKind, candidates). search matches hostname, id, role, status or availability. Sort by hostname, role, status, availability, created or updated. Paginate with start and limit (default 20).
  • Acciones relacionadas: swarm_node.get, swarm_node.tasks, swarm_node.update, swarm.join_tokens

Promote swarm node

  • Tipo: escritura
  • Parámetros obligatorios: nodeId
  • Meta-herramienta: arcane_swarm_node con "action": "promote"
  • Herramienta individual: arcane_swarm_node_promote
  • Ruta de Arcane: POST /api/environments/{id}/swarm/nodes/{nodeId}/promote
  • ID de operación: promote-swarm-node
  • Uso: Makes a worker a manager (role=manager through a node update). nodeId from swarm_node.list, Swarm manager only, needs swarm:nodes. Joining the managers takes a moment: role shows manager at once, so poll swarm_node.get until reachability is reachable. Keep an odd number of managers, since quorum needs a majority of them.
  • Acciones relacionadas: swarm_node.list, swarm_node.get, swarm_node.demote

List tasks for a swarm node

  • Tipo: lectura
  • Parámetros obligatorios: nodeId
  • Meta-herramienta: arcane_swarm_node con "action": "tasks"
  • Herramienta individual: arcane_swarm_node_tasks
  • Ruta de Arcane: GET /api/environments/{id}/swarm/nodes/{nodeId}/tasks
  • ID de operación: list-swarm-node-tasks
  • Uso: nodeId from swarm_node.list. Swarm manager only. Lists the tasks Docker has scheduled on that node, including finished and shut-down ones still in task history (compare desiredState and currentState): id, serviceName, slot, currentState, error, containerId. search matches task name, service name, node name, id or state. Sort by service, node, state, created or updated. Use swarm_service.tasks for one service across nodes.
  • Acciones relacionadas: swarm_node.list, swarm_task.list, swarm_service.tasks

Update swarm node

  • Tipo: escritura
  • Parámetros obligatorios: nodeId
  • Meta-herramienta: arcane_swarm_node con "action": "update"
  • Herramienta individual: arcane_swarm_node_update
  • Ruta de Arcane: PATCH /api/environments/{id}/swarm/nodes/{nodeId}
  • ID de operación: update-swarm-node
  • Uso: nodeId from swarm_node.list. Swarm manager only, needs swarm:nodes. Changes only the fields given: availability (active, pause or drain, where drain moves the node’s tasks elsewhere), role (manager or worker), name, labels. labels replace the whole label set (pass the current ones from swarm_node.get plus yours, {} clears them). version defaults to the node’s current version. Returns only a message: check with swarm_node.get.
  • Acciones relacionadas: swarm_node.get, swarm_node.list, swarm_node.promote, swarm_node.demote