Ir al contenido

swarm_service

El dominio swarm_service tiene 9 acciones. En la superficie meta se alcanzan todas a través de arcane_swarm_service; 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_service.createCreate swarm serviceescritura
swarm_service.deleteDelete swarm servicedestructiva
swarm_service.getGet swarm servicelectura
swarm_service.listList swarm serviceslectura
swarm_service.logsGet Swarm service logslectura
swarm_service.rollbackRollback a swarm servicedestructiva
swarm_service.scaleScale a swarm serviceescritura
swarm_service.tasksList tasks for a swarm servicelectura
swarm_service.updateUpdate swarm servicedestructiva

Create swarm service

  • Tipo: escritura
  • Parámetros obligatorios: spec
  • Meta-herramienta: arcane_swarm_service con "action": "create"
  • Herramienta individual: arcane_swarm_service_create
  • Ruta de Arcane: POST /api/environments/{id}/swarm/services
  • ID de operación: create-swarm-service
  • Uso: spec is a Docker ServiceSpec with Docker’s field names. Duration fields (StopGracePeriod, healthcheck intervals, RestartPolicy/UpdateConfig delays, …) are integer nanoseconds. Returns the new service’s id. Follow its tasks with swarm_service.tasks.
  • Acciones relacionadas: swarm_service.update, swarm_service.tasks

Delete swarm service

  • Tipo: destructiva — exige confirm: true
  • Parámetros obligatorios: serviceId
  • Meta-herramienta: arcane_swarm_service con "action": "delete"
  • Herramienta individual: arcane_swarm_service_delete
  • Ruta de Arcane: DELETE /api/environments/{id}/swarm/services/{serviceId}
  • ID de operación: delete-swarm-service
  • Uso: serviceId (ID or name) from swarm_service.list. Removes the service and stops all its tasks. This cannot be undone. Docker refuses to delete configs and secrets while a service references them, so delete the service first. To remove a whole stack use swarm_stack.delete instead. Needs a Swarm manager and the swarm:services permission.
  • Acciones relacionadas: swarm_service.list, swarm_stack.delete, swarm_config.delete, swarm_secret.delete

Get swarm service

  • Tipo: lectura
  • Parámetros obligatorios: serviceId
  • Meta-herramienta: arcane_swarm_service con "action": "get"
  • Herramienta individual: arcane_swarm_service_get
  • Ruta de Arcane: GET /api/environments/{id}/swarm/services/{serviceId}
  • ID de operación: get-swarm-service
  • Uso: serviceId (ID or name) from swarm_service.list. Returns the full Docker spec and version.Index (both needed by swarm_service.update), endpoint (published ports and virtual IPs), updateStatus (state of the last update or rollback, absent if none), the hostnames of nodes running its tasks (filled only when serviceId is the ID, empty when called by name), and networkDetails and mounts enriched with network and volume details.
  • Acciones relacionadas: swarm_service.list, swarm_service.update, swarm_service.tasks, swarm_service.logs

List swarm services

  • Tipo: lectura
  • Parámetros obligatorios: ninguno
  • Meta-herramienta: arcane_swarm_service con "action": "list"
  • Herramienta individual: arcane_swarm_service_list
  • Ruta de Arcane: GET /api/environments/{id}/swarm/services
  • ID de operación: list-swarm-services
  • Uso: The starting point for every serviceId: returns a page of service summaries (id, name, image, mode, replicas, runningReplicas, ports, stackName, nodes, networks, mounts, labels). search matches name, image, ID, stack name, mode, network or node names. Sort by name, image, mode, replicas, created or updated. Paginate with start and limit (default 20). Needs an environment that is a Swarm manager. Use swarm_stack.services for one stack’s services.
  • Acciones relacionadas: swarm_service.get, swarm_service.tasks, swarm_service.create, swarm_stack.services, swarm.status

Get Swarm service logs

Return the recent log lines of a Swarm service across its tasks, optionally listening for new lines for a few seconds

  • Tipo: lectura
  • Parámetros obligatorios: serviceId
  • Meta-herramienta: arcane_swarm_service con "action": "logs"
  • Herramienta individual: arcane_swarm_service_logs
  • Ruta de Arcane: GET /api/environments/{id}/ws/swarm/services/{serviceId}/logs (WebSocket)
  • ID de operación: ws-swarm-service-logs
  • Uso: serviceId is the service ID or name from swarm_service.list (a stack’s services are named <stack>_<service>, see swarm_stack.services). Merges the output of all the service’s tasks: returns the last tail lines (default 100, or ‘all’) in lines. Narrow with since, add timestamps, or set follow to keep listening for up to seconds. Use swarm_service.tasks to see which task or node failed when the logs are empty.
  • Acciones relacionadas: swarm_service.list, swarm_service.tasks, swarm_service.get, swarm_stack.services

Rollback a swarm service

  • Tipo: destructiva — exige confirm: true
  • Parámetros obligatorios: serviceId
  • Meta-herramienta: arcane_swarm_service con "action": "rollback"
  • Herramienta individual: arcane_swarm_service_rollback
  • Ruta de Arcane: POST /api/environments/{id}/swarm/services/{serviceId}/rollback
  • ID de operación: rollback-swarm-service
  • Uso: Reverts the service to its previous spec (Docker’s PreviousSpec), as docker service rollback. serviceId from swarm_service.list. The previous spec is the one before the latest change, and swarm_service.scale counts as a change, so a rollback right after a scale undoes the scale. Runs in the background: poll swarm_service.get until updateStatus.State is rollback_completed. Needs a Swarm manager and the swarm:services permission.
  • Acciones relacionadas: swarm_service.get, swarm_service.update, swarm_service.tasks

Scale a swarm service

  • Tipo: escritura
  • Parámetros obligatorios: serviceId, replicas
  • Meta-herramienta: arcane_swarm_service con "action": "scale"
  • Herramienta individual: arcane_swarm_service_scale
  • Ruta de Arcane: POST /api/environments/{id}/swarm/services/{serviceId}/scale
  • ID de operación: scale-swarm-service
  • Uso: serviceId from swarm_service.list. replicas is the new desired count (0 stops all tasks). Only replicated services (and replicated jobs, where it sets TotalCompletions) can be scaled, and a global service is refused. Arcane rewrites the spec with the new count, so it becomes the spec that swarm_service.rollback returns to. Tasks start or stop in the background: check runningReplicas in swarm_service.list or swarm_service.tasks.
  • Acciones relacionadas: swarm_service.list, swarm_service.tasks, swarm_service.get

List tasks for a swarm service

  • Tipo: lectura
  • Parámetros obligatorios: serviceId
  • Meta-herramienta: arcane_swarm_service con "action": "tasks"
  • Herramienta individual: arcane_swarm_service_tasks
  • Ruta de Arcane: GET /api/environments/{id}/swarm/services/{serviceId}/tasks
  • ID de operación: list-swarm-service-tasks
  • Uso: serviceId from swarm_service.list. Returns a page of the service’s tasks, including stopped and failed ones from the task history: id, name, slot, nodeId/nodeName, desiredState, currentState, error, image and containerId. Use it to see where replicas run and why they fail. search matches task, service or node name, ID or state. Sort by service, node, state, created or updated. limit defaults to 20.
  • Acciones relacionadas: swarm_service.list, swarm_service.logs, swarm_node.get, swarm_task.list, swarm_node.tasks

Update swarm service

  • Tipo: destructiva — exige confirm: true
  • Parámetros obligatorios: serviceId, spec, version
  • Meta-herramienta: arcane_swarm_service con "action": "update"
  • Herramienta individual: arcane_swarm_service_update
  • Ruta de Arcane: PUT /api/environments/{id}/swarm/services/{serviceId}
  • ID de operación: update-swarm-service
  • Uso: Replaces the whole spec: pass the spec from swarm_service.get with your changes, and its version.Index (0 uses the current version).
  • Acciones relacionadas: swarm_service.get, swarm_service.rollback