Documentación de xEvolve

Instalar un agente

El agente se ejecuta en tu lado, junto al servidor de archivos. Se conecta de vuelta a tu espacio por HTTPS y hace el trabajo de SFTP, FTP, FTPS, SMB y NFS.

Crear el agente

  1. Abre Agentes y crea un agente. Se abre la guía de despliegue con el ID del agente y su secreto.
  2. Copia el secreto ahora. Solo se muestra una vez; una guía abierta más tarde muestra <agent-secret>.
  3. Decide la dirección HTTPS pública con la que xEvolve puede llegar al agente. La introduces como XEVOLVE_AGENT_URL.

Ajustes

VariableValor
AGENT_SECRETEl secreto del agente que muestra la guía.
XEVOLVE_API_URLLa dirección de tu espacio, por ejemplo https://<workspace>.xevolve.io. No uses api.xevolve.io: no tiene espacio y responde workspace_not_ready.
XEVOLVE_API_TOKENEl secreto del agente, de nuevo.
XEVOLVE_AGENT_IDEl ID del agente que muestra la guía.
XEVOLVE_AGENT_URLLa URL pública con la que xEvolve llega al agente.
PORT3100

Docker

docker run -d --name xevolve-agent \
  -p 3100:3100 \
  -e AGENT_SECRET=<agent-secret> \
  -e XEVOLVE_API_URL=https://<workspace>.xevolve.io \
  -e XEVOLVE_API_TOKEN=<agent-secret> \
  -e XEVOLVE_AGENT_ID=<agent-id> \
  -e XEVOLVE_AGENT_URL=https://your-agent-url.example.com \
  --restart unless-stopped \
  ghcr.io/spot-techno/xevolve-agent:latest

Azure Web App for Containers

az group create -n xevolve-agent-rg -l westeurope
az appservice plan create -n xevolve-agent-plan -g xevolve-agent-rg \
  --is-linux --sku B1

az webapp create -n xevolve-agent -g xevolve-agent-rg \
  -p xevolve-agent-plan \
  -i ghcr.io/spot-techno/xevolve-agent:latest

az webapp config appsettings set -n xevolve-agent -g xevolve-agent-rg \
  --settings \
  AGENT_SECRET=<agent-secret> \
  XEVOLVE_API_URL=https://<workspace>.xevolve.io \
  XEVOLVE_API_TOKEN=<agent-secret> \
  XEVOLVE_AGENT_ID=<agent-id> \
  XEVOLVE_AGENT_URL=https://xevolve-agent.azurewebsites.net \
  WEBSITES_PORT=3100

AWS ECS (Fargate)

Esto supone que ya existen una VPC, una subred y un clúster ECS llamado xevolve.

aws ecs register-task-definition --cli-input-json file://task-def.json
aws ecs create-service \
  --cluster xevolve \
  --service-name xevolve-agent \
  --task-definition xevolve-agent \
  --desired-count 1 \
  --launch-type FARGATE \
  --network-configuration "awsvpcConfiguration={subnets=[<subnet-id>],securityGroups=[<security-group-id>],assignPublicIp=ENABLED}"

El archivo task-def.json:

{
  "family": "xevolve-agent",
  "containerDefinitions": [{
    "name": "agent",
    "image": "ghcr.io/spot-techno/xevolve-agent:latest",
    "portMappings": [{"containerPort": 3100}],
    "environment": [
      {"name": "AGENT_SECRET", "value": "<agent-secret>"},
      {"name": "XEVOLVE_API_URL", "value": "https://<workspace>.xevolve.io"},
      {"name": "XEVOLVE_API_TOKEN", "value": "<agent-secret>"},
      {"name": "XEVOLVE_AGENT_ID", "value": "<agent-id>"},
      {"name": "XEVOLVE_AGENT_URL", "value": "https://your-agent-url.example.com"}
    ]
  }],
  "cpu": "256", "memory": "512",
  "networkMode": "awsvpc",
  "requiresCompatibilities": ["FARGATE"]
}

Comprobar que funciona

  1. Abre Agentes y elige Probar agente en la tarjeta del agente. Comprueba que xEvolve llega a la dirección del agente.
  2. Espera un minuto. El agente envía una señal de presencia cada 60 segundos y la tarjeta muestra cuándo se vio por última vez.
  3. Añade o edita una conexión SFTP, FTP, FTPS, SMB o NFS, selecciona este agente y prueba la conexión.

Probar el agente no verifica el secreto del agente. Un secreto incorrecto se nota porque no llega ninguna señal de presencia.