orangeqs.juice.client.service#

Client functions for interacting with Juice services.

Module Contents#

Functions#

orchestrator_rpc_client

Create an XML-RPC client for the orchestrator.

restart_service_partial

Restart the service without restarting the container.

restart_service_full

Restart the service by restarting the container.

restart_service

Restart an OrangeQS Juice service.

rebuild_service_dry_run

Run a dry-run rebuild of the environment for a service.

rebuild_service

Rebuild an OrangeQS Juice service by name.

API#

orangeqs.juice.client.service.orchestrator_rpc_client() orangeqs.juice.messaging._rpc._client.UnixStreamXMLRPCClient#

Create an XML-RPC client for the orchestrator.

orangeqs.juice.client.service.restart_service_partial(service_name: str) None#

Restart the service without restarting the container.

orangeqs.juice.client.service.restart_service_full(service_name: str) None#

Restart the service by restarting the container.

orangeqs.juice.client.service.restart_service(service_name: str, method: Literal[full, partial] = 'full') None#

Restart an OrangeQS Juice service.

Parameters#

  • service_name (str): The name of the OrangeQS Juice service to restart.

  • method (“full” | “partial”, optional): The restart method to use. Defaults to “full”. - “full”: Restart the container running the service. This will use the newest version of the service image. Uses the Juice Orchestrator RPC. - “partial”: Restart the service process inside the container without restarting the container itself. Uses the Supervisor RPC inside the container.

orangeqs.juice.client.service.rebuild_service_dry_run(service_name: str) tuple[bool, list[str]]#

Run a dry-run rebuild of the environment for a service.

Parameters#

  • service_name (str): The name of the service to rebuild.

Returns#

  • (bool): Whether the dry-run command was successful.

  • (list[str]): The output lines from the dry-run command.

orangeqs.juice.client.service.rebuild_service(service_name: str, mode: Literal[safe, force, dry - run] = 'safe') None#

Rebuild an OrangeQS Juice service by name.

Parameters#

  • service_name (str): The name of the service to rebuild. This should correspond to a valid OrangeQS Juice service or the “singleuser” environment.

  • mode (“safe” | “force” | “dry-run”, optional): The rebuild mode to use. Defaults to “safe”. - “safe”: Do a dry-run inside the service first, then rebuild if successful. - “force”: Rebuild the service directly without a dry-run. - “dry-run”: Only perform a dry-run inside the service.