Skip to content

worker client flow for register - #1304

Merged
mayuka-c merged 6 commits into
IBM:mainfrom
yussufsh:worker
Aug 24, 2026
Merged

worker client flow for register#1304
mayuka-c merged 6 commits into
IBM:mainfrom
yussufsh:worker

Conversation

@yussufsh

@yussufsh yussufsh commented Aug 21, 2026

Copy link
Copy Markdown
Member

This PR implements worker join subcommand to register the worker with the remote control-plane.

  1. Sets up Caddy pod for registering routes
  2. Registers with the control-plane and start the stream connection.

Will take up other custom arguments ie. certificates, domain name, etc. in future.

TODO: dispatch cmd to the local runtime executor.

@yussufsh

Copy link
Copy Markdown
Member Author

Control-plane register:

[root@onprem133721154 ai-services]# ./bin/ai-services-linux-ppc64le catalog worker list
ID                                     NAME   RUNTIME   STATUS         LAST HEARTBEAT
52b40d8c-88e2-4c5d-9915-4451ac2f7943   d      unknown   disconnected   -
3e7ee33e-742b-4185-8fcb-af8feb2c76e4   3      podman    ready          2026-08-21T11:27:18Z

Worker join:

[root@onprem133728235 ai-services]# ./bin/ai-services-linux-ppc64le worker join 10.20.179.49:9090 --runtime podman --token 1c2179c7-7e65-423f-96cf-71c1c1306b4d
Starting worker join — press Ctrl-C to stop.
Setting up worker Caddy proxy...
worker caddy: Caddyfile written to /var/lib/ai-services/worker/caddy/Caddyfile
worker caddy: deploying ai-services--worker-caddy
'caddy.yaml.tmpl', 'ai-services--worker-caddy': Starting Pod Readiness check...
'caddy.yaml.tmpl', 'ai-services--worker-caddy': Performing Containers Creation check for pod...
'caddy.yaml.tmpl', 'ai-services--worker-caddy': Waiting for Containers Creation... Timeout set: 5m0s
'caddy.yaml.tmpl', 'ai-services--worker-caddy': Containers creation check for pod is completed
'caddy.yaml.tmpl', 'ai-services--worker-caddy', 'ai-services--worker-caddy-caddy': Performing Container Readiness check...
'caddy.yaml.tmpl', 'ai-services--worker-caddy', 'ai-services--worker-caddy-caddy': Waiting for Container Readiness... Timeout set: 2m5s
'caddy.yaml.tmpl', 'ai-services--worker-caddy', 'ai-services--worker-caddy-caddy': Readiness Check for the container is completed!
-------
'caddy.yaml.tmpl', 'ai-services--worker-caddy', 'f4f20e5ff47b-infra': Performing Container Readiness check...
'caddy.yaml.tmpl', 'ai-services--worker-caddy', 'f4f20e5ff47b-infra': Waiting for Container Readiness... Timeout set: 2m0s
'caddy.yaml.tmpl', 'ai-services--worker-caddy', 'f4f20e5ff47b-infra': Readiness Check for the container is completed!
-------
'caddy.yaml.tmpl', 'ai-services--worker-caddy': Pod has been successfully deployed and ready!
-------
-------
-------
Worker Caddy proxy is ready.
Connecting to catalog gateway at 10.20.179.49:9090...
Registering worker with catalog control plane...
Worker "3" registered with control plane.
Opening CommandStream for worker "3"...
CommandStream open for worker "3".

@mayuka-c mayuka-c left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rest LGTM

Comment thread ai-services/assets/worker/podman/templates/caddy.yaml.tmpl
Comment thread ai-services/assets/worker/podman/templates/caddy.yaml.tmpl
Comment thread ai-services/cmd/ai-services/cmd/worker/join.go
Comment thread ai-services/cmd/ai-services/cmd/worker/join.go
Comment thread ai-services/internal/pkg/worker/caddy/caddy.go Outdated
Comment thread ai-services/internal/pkg/worker/caddy/caddy.go Outdated
Comment thread ai-services/internal/pkg/worker/caddy/caddy.go Outdated
Comment thread ai-services/internal/pkg/worker/join/join.go
@yussufsh
yussufsh marked this pull request as ready for review August 21, 2026 14:08
Comment thread ai-services/internal/pkg/worker/caddy/caddy.go Outdated
Comment thread ai-services/internal/pkg/worker/caddy/caddy.go Outdated

@mayuka-c mayuka-c left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rest LGTM

Comment thread ai-services/internal/pkg/worker/deploy/deploy.go
Signed-off-by: Yussuf Shaikh <yussuf.shaikh1@ibm.com>
Signed-off-by: Yussuf Shaikh <yussuf.shaikh1@ibm.com>
Signed-off-by: Yussuf Shaikh <yussuf.shaikh1@ibm.com>
Signed-off-by: Yussuf Shaikh <yussuf.shaikh1@ibm.com>
Signed-off-by: Yussuf Shaikh <yussuf.shaikh1@ibm.com>
mayuka-c
mayuka-c previously approved these changes Aug 24, 2026

@mayuka-c mayuka-c left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Signed-off-by: Yussuf Shaikh <yussuf.shaikh1@ibm.com>
@mayuka-c
mayuka-c merged commit acec178 into IBM:main Aug 24, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants