توثيق xEvolve

تثبيت وكيل

يعمل الوكيل لديك، بجانب خادم الملفات. يتصل بمساحة عملك عبر HTTPS وينفّذ أعمال SFTP وFTP وFTPS وSMB وNFS.

إنشاء الوكيل

  1. افتح الوكلاء وأنشئ وكيلاً. يُفتح دليل النشر ومعه معرّف الوكيل وسره.
  2. انسخ السر الآن. يظهر مرة واحدة فقط؛ وسيعرض الدليل المفتوح لاحقاً <agent-secret>.
  3. حدّد عنوان HTTPS العام الذي يستطيع xEvolve الوصول إلى الوكيل عبره. تدخله باسم XEVOLVE_AGENT_URL.

الإعدادات

المتغيرالقيمة
AGENT_SECRETسر الوكيل الظاهر في الدليل.
XEVOLVE_API_URLعنوان مساحة عملك، مثل https://<workspace>.xevolve.io. لا تستخدم api.xevolve.io: فليس له مساحة عمل ويردّ بـ workspace_not_ready.
XEVOLVE_API_TOKENسر الوكيل مرة أخرى.
XEVOLVE_AGENT_IDمعرّف الوكيل الظاهر في الدليل.
XEVOLVE_AGENT_URLالعنوان العام الذي يصل xEvolve عبره إلى الوكيل.
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)

يفترض هذا وجود VPC وشبكة فرعية وعنقود ECS باسم 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}"

الملف 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"]
}

التحقق من أنه يعمل

  1. افتح الوكلاء واختر اختبار الوكيل في بطاقة الوكيل. يتحقق ذلك من أن xEvolve يصل إلى عنوان الوكيل.
  2. انتظر دقيقة. يرسل الوكيل نبضة كل 60 ثانية وتعرض البطاقة وقت آخر ظهور له.
  3. أضف اتصال SFTP أو FTP أو FTPS أو SMB أو NFS أو عدّله، واختر هذا الوكيل، واختبر الاتصال.

لا يتحقق اختبار الوكيل من سر الوكيل. السر الخاطئ يظهر على شكل غياب النبضة.