weed/admin/plugin/DESIGN.md
This document describes the plugin system for admin-managed workers, implemented in parallel with the current maintenance/worker mechanism.
weed/pb/plugin.protoPluginControlService.WorkerStreamWhy this model:
PluginRegistrySchemaCoordinatorJobTypeDescriptor.ConfigStoredataDir.DetectorSchedulercan_detect=true).RunDetectionRequest with saved configs + cluster context.DetectionProposals, dedupes by dedupe_key, inserts jobs.JobDispatchercan_execute=true) for each pending job.ExecuteJobRequest.JobProgressUpdate and JobCompleted.WorkflowMonitorWorkerHello).ConfigSchemaResponse) including UI schemas:RunDetectionRequest) and return proposals.ExecuteJobRequest) and stream progress.CancelRequest) for in-flight detection/execution.UI is fully derived from protobuf schema:
ConfigFormConfigSectionConfigFieldConfigOptionValidationRuleConfigValue (typed scalar/list/map/object value container)Result:
RunDetectionRequest with:
AdminRuntimeConfig,admin_config_values,worker_config_values,ClusterContext (master/filer/volume grpc locations, metadata).DetectionProposals and DetectionComplete.JobProgressUpdate and JobCompleted.Current layout under <admin-data-dir>/plugin/:
job_types/<job_type>/descriptor.pbjob_types/<job_type>/descriptor.jsonjob_types/<job_type>/config.pbjob_types/<job_type>/config.jsonjob_types/<job_type>/runs.jsonjobs/tracked_jobs.jsonactivities/activities.jsonconfig.pb should use PersistedJobTypeConfig from plugin.proto.
/pluginDetector selection per job type:
can_detect=true.Execution dispatch:
can_execute=true.job_type, dedupe_key).worker.proto runtime remains internally available where still referenced.Phase 1
Phase 2
Phase 3
Phase 4
Phase 4 status (starter)
weed worker command as an external plugin.proto worker process.vacuum job type with:
ConfigSchemaResponse),RunDetectionRequest),ExecuteJobRequest),Run example:
weed admin -master=localhost:9333weed worker -admin=localhost:23646weed worker -admin=localhost:23646 -jobType=vacuumweed worker -admin=localhost:23646 -workingDir=/var/lib/seaweedfs-pluginPhase 5