feat(orchestration): make supervisor XML RPC port and address configurable

Every service's supervisord instance hardcoded port 9001 for its inet HTTP server, and the client library hardcoded http://juice-{service_name}:9001 to reach it over RPC. In the scenario of upcoming https://demo.orangeqs.com this is not suitable, because there we avoid the default orchestrator and instead use custom deployment logic. In the demo setup all the services are accessible on http://localhost:XXXX. IPythonKernelConfigs support configuring the IP/domain name of the services, but in supervisor communication we still hardcode the conventions of Juice Orchestrator. Thus, we need a way to override:

  1. Default port to spawn supervisor - it gets also used by the custom logic.
  2. Address to reach it.

In this merge request we:

  • Add ServiceSettings.supervisor_port (default 9001, validated 1-65535), used into the service_supervisor/supervisord.conf.j2 template so it controls both the inet_http_server bind port and the supervisorctl server URL. This remains the single source of truth for what port a service's supervisord is actually launched on.
  • Add supervisor_port to KernelConnectionInfo (schemas/ipython.py). It is not part of an actual IPython kernel connection config (and it is excluded from jupyter_client_connection_info), but this is the most natural place to put it within the current config hirerarchy: IPythonKernelConfigs serve as one per-service address config for both a service's IPython kernel and its supervisord RPC server, via the new IPythonKernelConfigs.for_service(name) (mirroring TaskServerConfigs.for_service), which defaults unset ip/ supervisor_port to the Podman-network address (juice-<service_name>, port 9001).
  • Update client/service.py's restart_service_partial to resolve a service's address via IPythonKernelConfigs.for_service instead of hardcoding IP/hostname value.
  • Both supervisor_port (on ServiceSettings) and the IPythonKernelConfigs override are admin-configurable and documented in the generated configuration reference.

Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com

Edited by Viacheslav Ostroukh

Merge request reports

Loading
Loading