swarm
El dominio swarm tiene 13 acciones. En la superficie meta se alcanzan todas a través de arcane_swarm; en la individual, cada una es una herramienta propia; en la dinámica se ejecutan con arcane_execute_action y el ID canónico.
Resumen
Sección titulada «Resumen»| Acción | Título | Tipo |
|---|---|---|
swarm.info | Get swarm info | lectura |
swarm.init | Initialize swarm | escritura |
swarm.join | Join swarm | escritura |
swarm.join_candidates | List environments available for Easy Join | lectura |
swarm.join_environments | Join environments to a swarm | escritura |
swarm.join_tokens | Get swarm join tokens | lectura |
swarm.join_tokens_rotate | Rotate swarm join tokens | destructiva |
swarm.leave | Leave swarm | destructiva |
swarm.node_identity | Get local swarm node identity | lectura |
swarm.spec_update | Update swarm spec | destructiva |
swarm.status | Get swarm status | lectura |
swarm.unlock | Unlock swarm | destructiva |
swarm.unlock_key | Get swarm unlock key | lectura |
Acciones
Sección titulada «Acciones»swarm.info
Sección titulada «swarm.info»Get swarm info
- Tipo: lectura
- Parámetros obligatorios: ninguno
- Meta-herramienta:
arcane_swarmcon"action": "info" - Herramienta individual:
arcane_swarm_info - Ruta de Arcane:
GET /api/environments/{id}/swarm/info - ID de operación:
get-swarm-info - Uso: Swarm manager only: answers 409 ‘Swarm mode is not enabled’ outside a swarm and 403 ‘Swarm manager access required’ on a worker. Returns id, createdAt, updatedAt, rootRotationInProgress and spec (Name, Labels, Orchestration, Raft, Dispatcher, CAConfig, EncryptionConfig.AutoLockManagers, TaskDefaults), the starting point for swarm.spec_update. Join tokens are not included (swarm.join_tokens).
- Acciones relacionadas:
swarm.status,swarm.spec_update,swarm.join_tokens,swarm_node.list
swarm.init
Sección titulada «swarm.init»Initialize swarm
- Tipo: escritura
- Parámetros obligatorios:
spec - Meta-herramienta:
arcane_swarmcon"action": "init" - Herramienta individual:
arcane_swarm_init - Ruta de Arcane:
POST /api/environments/{id}/swarm/init - ID de operación:
init-swarm - Uso: Makes this environment’s engine the first manager of a new swarm, and fails with 409 when it is already in one (active, pending or locked) unless forceNewCluster is true. Needs the swarm:init permission. spec is required: pass {} for Docker’s defaults. Duration fields (Dispatcher.HeartbeatPeriod, CAConfig.NodeCertExpiry, …) are integer nanoseconds, as swarm.info returns them. listenAddr defaults to 0.0.0.0:2377. Set advertiseAddr (IP or interface such as eth0) on hosts with several addresses. autoLockManagers, defaultAddrPool (CIDRs), subnetSize and forceNewCluster are optional. Returns nodeId. Add nodes next with swarm.join_environments or swarm.join_tokens + swarm.join.
- Acciones relacionadas:
swarm.status,swarm.info,swarm.join_tokens,swarm.join_environments,swarm.leave
swarm.join
Sección titulada «swarm.join»Join swarm
- Tipo: escritura
- Parámetros obligatorios:
joinToken,remoteAddrs - Meta-herramienta:
arcane_swarmcon"action": "join" - Herramienta individual:
arcane_swarm_join - Ruta de Arcane:
POST /api/environments/{id}/swarm/join - ID de operación:
join-swarm - Uso: Joins this environment’s engine (environmentId from environment.list) to an existing swarm with a token: joinToken is the worker or manager token from swarm.join_tokens on the manager’s environment, remoteAddrs the manager address(es) host:2377 (managerAddress in swarm_node.list). listenAddr defaults to 0.0.0.0:2377. advertiseAddr, dataPathAddr and availability are optional. Needs swarm:join, and fails with 409 when the engine is already in a swarm (swarm.leave first). Returns only a message, and the node shows up in swarm_node.list once ready. swarm.join_environments does the same without handling tokens and also binds the node to its environment.
- Acciones relacionadas:
swarm.join_tokens,swarm_node.list,swarm.join_environments,swarm.status,environment.list
swarm.join_candidates
Sección titulada «swarm.join_candidates»List environments available for Easy Join
- Tipo: lectura
- Parámetros obligatorios: ninguno
- Meta-herramienta:
arcane_swarmcon"action": "join_candidates" - Herramienta individual:
arcane_swarm_join_candidates - Ruta de Arcane:
GET /api/environments/{id}/swarm/join-candidates - ID de operación:
get-swarm-join-candidates - Uso: Call on the manager’s environment to list the Arcane environments swarm.join_environments can add: enabled, visible, not the local environment 0, not the manager itself and not already bound to a node of this swarm. Each item has environmentId, environmentName, environmentType (direct or edge) and status. Empty when the environment is not an active swarm manager. Needs swarm:join on the manager, and only environments where the caller also has swarm:join are listed. A candidate that is already in another swarm is listed but fails to join.
- Acciones relacionadas:
swarm.join_environments,swarm.status,environment.list,swarm_node.list
swarm.join_environments
Sección titulada «swarm.join_environments»Join environments to a swarm
- Tipo: escritura
- Parámetros obligatorios:
remoteAddrs,targets - Meta-herramienta:
arcane_swarmcon"action": "join_environments" - Herramienta individual:
arcane_swarm_join_environments - Ruta de Arcane:
POST /api/environments/{id}/swarm/join-environments - ID de operación:
join-swarm-environments - Uso: Easy Join: joins Arcane environments (see swarm.join_candidates) to this environment’s swarm without exposing join tokens, and binds each to its new node. Leave remoteAddrs empty to use the managers’ advertised addresses.
- Acciones relacionadas:
swarm.join_candidates,swarm.join
swarm.join_tokens
Sección titulada «swarm.join_tokens»Get swarm join tokens
- Tipo: lectura
- Parámetros obligatorios: ninguno
- Meta-herramienta:
arcane_swarmcon"action": "join_tokens" - Herramienta individual:
arcane_swarm_join_tokens - Ruta de Arcane:
GET /api/environments/{id}/swarm/join-tokens - ID de operación:
get-swarm-join-tokens - Uso: Returns the worker and manager join tokens (SWMTKN-…) of the swarm this environment manages, for swarm.join (with managerAddress from swarm_node.list). Treat them as secrets. Manager only (409 outside a swarm, 403 on a worker), and Arcane checks the swarm:unlock permission for this read. Replace leaked tokens with swarm.join_tokens_rotate.
- Acciones relacionadas:
swarm.join,swarm.join_tokens_rotate,swarm_node.list
swarm.join_tokens_rotate
Sección titulada «swarm.join_tokens_rotate»Rotate swarm join tokens
- Tipo: destructiva — exige
confirm: true - Parámetros obligatorios: ninguno
- Meta-herramienta:
arcane_swarmcon"action": "join_tokens_rotate" - Herramienta individual:
arcane_swarm_join_tokens_rotate - Ruta de Arcane:
POST /api/environments/{id}/swarm/join-tokens/rotate - ID de operación:
rotate-swarm-join-tokens - Uso: With neither rotateWorkerToken nor rotateManagerToken set, both tokens are rotated. Nodes already in the swarm are not affected.
- Acciones relacionadas:
swarm.join_tokens
swarm.leave
Sección titulada «swarm.leave»Leave swarm
- Tipo: destructiva — exige
confirm: true - Parámetros obligatorios: ninguno
- Meta-herramienta:
arcane_swarmcon"action": "leave" - Herramienta individual:
arcane_swarm_leave - Ruta de Arcane:
POST /api/environments/{id}/swarm/leave - ID de operación:
leave-swarm - Uso: Takes this environment’s engine out of its swarm (docker swarm leave) and clears Arcane’s swarm flag. It answers 409 when it is not in a swarm. Needs swarm:leave. Docker refuses a manager without force when that would remove the last manager or break quorum, and forcing the last manager discards the swarm’s state. The departed node stays in swarm_node.list as down on the remaining managers until swarm_node.delete removes it.
- Acciones relacionadas:
swarm_node.demote,swarm_node.delete,swarm_node.list,swarm.status
swarm.node_identity
Sección titulada «swarm.node_identity»Get local swarm node identity
- Tipo: lectura
- Parámetros obligatorios: ninguno
- Meta-herramienta:
arcane_swarmcon"action": "node_identity" - Herramienta individual:
arcane_swarm_node_identity - Ruta de Arcane:
GET /api/swarm/node-identity - ID de operación:
get-swarm-node-identity - Uso: Not environment-scoped: describes the Docker engine of the Arcane manager answering the request (its local daemon), not a remote environment’s. Returns swarmNodeId, hostname, role (manager or worker, empty outside a swarm), engineVersion and swarmActive. For a given environment use swarm.status or swarm.info.
- Acciones relacionadas:
swarm.status,swarm.info,swarm_node.get
swarm.spec_update
Sección titulada «swarm.spec_update»Update swarm spec
- Tipo: destructiva — exige
confirm: true - Parámetros obligatorios:
spec - Meta-herramienta:
arcane_swarmcon"action": "spec_update" - Herramienta individual:
arcane_swarm_spec_update - Ruta de Arcane:
PUT /api/environments/{id}/swarm/spec - ID de operación:
update-swarm-spec - Uso: Replaces the whole swarm spec: start from swarm.info’s spec, since omitted fields are reset (a left-out duration such as Dispatcher.HeartbeatPeriod becomes 0). Durations are integer nanoseconds, exactly as swarm.info returns them, so its spec can be sent back with only your changes.
- Acciones relacionadas:
swarm.info,swarm.unlock_key
swarm.status
Sección titulada «swarm.status»Get swarm status
- Tipo: lectura
- Parámetros obligatorios: ninguno
- Meta-herramienta:
arcane_swarmcon"action": "status" - Herramienta individual:
arcane_swarm_status - Ruta de Arcane:
GET /api/environments/{id}/swarm/status - ID de operación:
get-swarm-status - Uso: Cheap check whether an environment’s engine is in swarm mode: returns only enabled, true for workers as well as managers. It is Arcane’s stored flag, refreshed when Arcane (or the environment’s agent) starts and by swarm.init, swarm.join and swarm.leave, so it can lag changes made with the docker CLI. swarm.info and the other cluster reads additionally need a manager.
- Acciones relacionadas:
swarm.info,swarm.init,swarm.join,environment.list
swarm.unlock
Sección titulada «swarm.unlock»Unlock swarm
- Tipo: destructiva — exige
confirm: true - Parámetros obligatorios:
key - Meta-herramienta:
arcane_swarmcon"action": "unlock" - Herramienta individual:
arcane_swarm_unlock - Ruta de Arcane:
POST /api/environments/{id}/swarm/unlock - ID de operación:
unlock-swarm - Uso: Unlocks a manager that restarted with autolock on (its swarm state is locked) using key, the SWMKEY-… from swarm.unlock_key read before the restart. environmentId is the locked node’s environment. A wrong key is refused by Docker, an unlocked node answers 409 ‘swarm is not locked’, and a node outside any swarm ‘Swarm mode is not enabled’. Needs swarm:unlock.
- Acciones relacionadas:
swarm.unlock_key
swarm.unlock_key
Sección titulada «swarm.unlock_key»Get swarm unlock key
- Tipo: lectura
- Parámetros obligatorios: ninguno
- Meta-herramienta:
arcane_swarmcon"action": "unlock_key" - Herramienta individual:
arcane_swarm_unlock_key - Ruta de Arcane:
GET /api/environments/{id}/swarm/unlock-key - ID de operación:
get-swarm-unlock-key - Uso: Returns unlockKey (SWMKEY-…) of the swarm this environment manages. It is empty when autolock is off (turn it on with EncryptionConfig.AutoLockManagers through swarm.spec_update, or autoLockManagers at swarm.init). Manager only, needs swarm:unlock. Store it safely: a restarted autolocked manager stays locked until swarm.unlock (or
docker swarm unlockon the host) is given this key. - Acciones relacionadas:
swarm.unlock,swarm.spec_update,swarm.info