cronicle-edge / cronicle-edge

Cronicle V2 (Orchestra) community prototype
Other
138 stars 21 forks source link

Issue with adding remote worker VM [Error: Failed to launch event: server or server group not found] #146

Open caldenmic opened 1 week ago

caldenmic commented 1 week ago

I have ran the docker containers in both machines lets say X (manager) and Y(worker). When I try to create a job and run it on Y from X's UI it says:

Error: Failed to launch event: server or server group not found

NOTE: X and Y are different azure VMs. X has the manager container and Y has the worker container

I have added Y's IP address as a server but will this work? But there after I add the IP address in the text box it says server added and shows Y's worker container's IP. This is the image of the server page: image

Additionally I have opened the necessary ports so that it is accessible i.e (port 3012)

Below are the respective docker commands for manager and worker

Manager:

docker run -d -it --name cronicle-manager -p 3012:3012 ghcr.io/cronicle-edge/cronicle-edge:main manager

Worker:

docker run -d -it --name cronicle-edge -p 3012:3012 ghcr.io/cronicle-edge/cronicle-edge:main worker

This is what it shows in activity logs: image

mikeTWC1984 commented 1 week ago

I'd suggest to use persistent names for host (e.g. --hostname manager01 ). It also would be useful to have manager/worker as prefix to those hostnames (it will match default manager/worker group names)

You can use this docker compose/stack file to test.

https://github.com/cronicle-edge/cronicle-edge/blob/main/Docker/LocalCluster.yaml

caldenmic commented 1 week ago

But what if the worker is in one VM and manager is in a different VM will it work because here in the docker-compose file manager and workers will get deployed together?

mikeTWC1984 commented 1 week ago

If you have multiple VMs - switch to swarm mode, and deploy same example file. This is how I ran cronicle for years btw. You can also run it the way you proposed. But in this case also use --net=host parameter, so it will use same hostname/network interface as you host machine.