Ir al contenido

swarm_stack

El dominio swarm_stack tiene 9 acciones. En la superficie meta se alcanzan todas a través de arcane_swarm_stack; 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_stack.deleteDelete swarm stackdestructiva
swarm_stack.deployDeploy swarm stackdestructiva
swarm_stack.getGet swarm stacklectura
swarm_stack.listList swarm stackslectura
swarm_stack.render_configRender/validate swarm stack configlectura
swarm_stack.servicesList swarm stack serviceslectura
swarm_stack.source_getGet swarm stack sourcelectura
swarm_stack.source_updateUpdate swarm stack sourcedestructiva
swarm_stack.tasksList swarm stack taskslectura

Delete swarm stack

  • Tipo: destructiva — exige confirm: true
  • Parámetros obligatorios: name
  • Meta-herramienta: arcane_swarm_stack con "action": "delete"
  • Herramienta individual: arcane_swarm_stack_delete
  • Ruta de Arcane: DELETE /api/environments/{id}/swarm/stacks/{name}
  • ID de operación: delete-swarm-stack
  • Uso: Removes the stack’s services, waits for their tasks to stop, then removes its networks, configs, secrets and saved source in one call. Volumes are kept. Also removes a stack that only has a saved source. name from swarm_stack.list.
  • Acciones relacionadas: swarm_stack.list, swarm_stack.services, volume.list

Deploy swarm stack

  • Tipo: destructiva — exige confirm: true
  • Parámetros obligatorios: composeContent, name
  • Meta-herramienta: arcane_swarm_stack con "action": "deploy"
  • Herramienta individual: arcane_swarm_stack_deploy
  • Ruta de Arcane: POST /api/environments/{id}/swarm/stacks
  • ID de operación: deploy-swarm-stack
  • Uso: Creates a stack, or updates it when name already exists, from composeContent (optional envContent, overrideContent). Like docker stack deploy, services start in the background, so check swarm_stack.services or swarm_stack.tasks afterwards. Files referenced by the compose (configs/secrets file: ./app.conf, env_file) go in files as {relativePath, base64 content}. The saved source is replaced, so omitted extra files are deleted. prune (default false) removes services no longer in the file. resolveImage is always (default), changed or never. withRegistryAuth uses the matching registry from registry.list. The source is saved before deploying and kept if the deploy fails. Needs a Swarm manager and swarm:stacks.
  • Acciones relacionadas: swarm_stack.render_config, swarm_stack.services, swarm_stack.tasks, swarm_stack.source_update, registry.list

Get swarm stack

  • Tipo: lectura
  • Parámetros obligatorios: name
  • Meta-herramienta: arcane_swarm_stack con "action": "get"
  • Herramienta individual: arcane_swarm_stack_get
  • Ruta de Arcane: GET /api/environments/{id}/swarm/stacks/{name}
  • ID de operación: get-swarm-stack
  • Uso: name from swarm_stack.list. Returns only name, namespace, services count, createdAt and updatedAt (404 if the stack has neither services nor a saved source). Use swarm_stack.services, swarm_stack.tasks and swarm_stack.source_get for the details.
  • Acciones relacionadas: swarm_stack.list, swarm_stack.services, swarm_stack.tasks, swarm_stack.source_get

List swarm stacks

  • Tipo: lectura
  • Parámetros obligatorios: ninguno
  • Meta-herramienta: arcane_swarm_stack con "action": "list"
  • Herramienta individual: arcane_swarm_stack_list
  • Ruta de Arcane: GET /api/environments/{id}/swarm/stacks
  • ID de operación: list-swarm-stacks
  • Uso: The starting point for every stack name: returns a page of stacks (name, namespace, services count, createdAt, updatedAt) built from the com.docker.stack.namespace label of the Swarm services, plus stacks Arcane only has a saved source for (services 0, e.g. after a failed deploy). search matches the name. Sort by name, services, created or updated. Paginate with start and limit (default 20). Needs a Swarm manager.
  • Acciones relacionadas: swarm_stack.get, swarm_stack.services, swarm_stack.deploy, swarm_service.list

Render/validate swarm stack config

  • Tipo: lectura
  • Parámetros obligatorios: composeContent, name
  • Meta-herramienta: arcane_swarm_stack con "action": "render_config"
  • Herramienta individual: arcane_swarm_stack_render_config
  • Ruta de Arcane: POST /api/environments/{id}/swarm/stacks/config/render
  • ID de operación: render-swarm-stack-config
  • Uso: Validates and interpolates a stack without deploying it. It takes no files: configs or secrets read from files resolve against the stack’s saved source, so they render only once the stack has been deployed. name and composeContent are required (envContent and overrideContent optional). Returns renderedCompose and the services, networks, volumes, configs and secrets names. Invalid YAML is a 400 error.
  • Acciones relacionadas: swarm_stack.deploy, swarm_stack.source_get

List swarm stack services

  • Tipo: lectura
  • Parámetros obligatorios: name
  • Meta-herramienta: arcane_swarm_stack con "action": "services"
  • Herramienta individual: arcane_swarm_stack_services
  • Ruta de Arcane: GET /api/environments/{id}/swarm/stacks/{name}/services
  • ID de operación: list-swarm-stack-services
  • Uso: name from swarm_stack.list. Returns a page of the stack’s services (id, name as <stack>_<service>, image, mode, replicas, runningReplicas, ports, networks, nodes, stackName). 404 when the stack has no Swarm services at all, even if a saved source exists. search matches name, image, id or mode. Sort by name, image, mode, replicas, created or updated. The id feeds swarm_service.get, swarm_service.logs and swarm_service.scale.
  • Acciones relacionadas: swarm_stack.list, swarm_stack.tasks, swarm_service.get, swarm_service.logs, swarm_service.scale

Get swarm stack source

  • Tipo: lectura
  • Parámetros obligatorios: name
  • Meta-herramienta: arcane_swarm_stack con "action": "source_get"
  • Herramienta individual: arcane_swarm_stack_source_get
  • Ruta de Arcane: GET /api/environments/{id}/swarm/stacks/{name}/source
  • ID de operación: get-swarm-stack-source
  • Uso: name from swarm_stack.list. Returns the source Arcane saved at deploy time: composeContent, envContent, overrideContent and files (extra files with base64 content). 404 for stacks deployed outside Arcane or already deleted. Needs the swarm:stacks permission, not just swarm:read. Edit it and send it back whole with swarm_stack.source_update.
  • Acciones relacionadas: swarm_stack.source_update, swarm_stack.list, swarm_stack.render_config

Update swarm stack source

  • Tipo: destructiva — exige confirm: true
  • Parámetros obligatorios: name, composeContent
  • Meta-herramienta: arcane_swarm_stack con "action": "source_update"
  • Herramienta individual: arcane_swarm_stack_source_update
  • Ruta de Arcane: PUT /api/environments/{id}/swarm/stacks/{name}/source
  • ID de operación: update-swarm-stack-source
  • Uso: Saves the stack’s compose/.env/files and redeploys it at once (with prune: services removed from the file are removed). A failed redeploy restores the previous source. It replaces the whole saved source: start from swarm_stack.source_get and send every extra file again, or it is deleted.
  • Acciones relacionadas: swarm_stack.source_get, swarm_stack.deploy, swarm_stack.services

List swarm stack tasks

  • Tipo: lectura
  • Parámetros obligatorios: name
  • Meta-herramienta: arcane_swarm_stack con "action": "tasks"
  • Herramienta individual: arcane_swarm_stack_tasks
  • Ruta de Arcane: GET /api/environments/{id}/swarm/stacks/{name}/tasks
  • ID de operación: list-swarm-stack-tasks
  • Uso: name from swarm_stack.list. Returns a page of tasks of all the stack’s services, past ones included (id, name, serviceName, nodeName, desiredState, currentState, error, containerId, slot). 404 when the stack has no services. search matches name, service, node, id or state. Sort by service, node, state, created or updated. Use it to see where replicas run and why one fails.
  • Acciones relacionadas: swarm_stack.services, swarm_service.logs, swarm_node.get, swarm_task.list