Questions about product deployment setup

Hi, I have a problem related to product deployment.

  1. my temporal clustering is running at container A with ip a.a.a.a
  2. my application (workflow definitions, activities) and workers are running at container B with ip b.b.b.b
  3. my client(WorkflowClient) is running at container C with ip c.c.c.c;

so, can this work? Is setTarget when creating WorkflowServiceStubs in container C enough?

WorkflowServiceStubsOptions workflowServiceStubsOptions =
                WorkflowServiceStubsOptions.newBuilder()
                        .setTarget("a.a.a.a")
                        .build();
WorkflowClientOptions clientOptions = WorkflowClientOptions.newBuilder()
                .setNamespace("default")
                .build();

WorkflowServiceStubs workflowServiceStubs = WorkflowServiceStubs.newServiceStubs(workflowServiceStubsOptions);        
return WorkflowClient.newInstance(workflowServiceStubs, clientOptions);

Or, I have to put client and application at same place?
Thanks.

Hi,

They can be in different host, the only requirement is that the Temporal Server should be reachable from clients and workers,

Are you facing any issues?

Antonio

Thanks for replying.

I do face some problem when deploying. In my product env, i cannot use k8s or docker compose. All i can do is start each services one by one on different hosts and containers using docker run below

docker run
    -e SERVICES=history \                      -- Spin up one or more: history, matching, worker, frontend
    ....
    -e BIND_ON_IP 0.0.0.0 \
    -e BROAD_CAST_ADDR {container ip} \ 
    ...
    temporalio/server:<tag>

how can i know the container ip before docker run? I cannot use docker network neither btw.
Is there any other way to deploy the cluster? (or by changing some env value or config file?)

Also, if 4 services are in different host or container. which ip is the ip that my external client, workers, … should connect to?

Thanks.