flambe.runnable.environment

Module Contents

class flambe.runnable.environment.RemoteEnvironment(key: str, orchestrator_ip: str, factories_ips: List[str], user: str, local_user: str, public_orchestrator_ip: Optional[str] = None, public_factories_ips: Optional[List[str]] = None, **kwargs)[source]

Bases: flambe.compile.Registrable

This objects contains information about the cluster

This object will be available on the remote execution of the ClusterRunnable (as an attribute).

IMPORTANT: this object needs to be serializable, hence it Needs to be created using ‘compile’ method.

key

The key that communicates the cluster

Type:str
orchestrator_ip

The orchestrator visible IP for the factories (usually the private IP)

Type:str
factories_ips

The list of factories IPs visible for other factories and orchestrator (usually private IPs)

Type:List[str]
user

The username of all machines. This implementations assumes same username for all machines

Type:str
local_user

The username of the local process that launched the cluster

Type:str
public_orchestrator_ip

The public orchestrator IP, if available.

Type:Optional[str]
public_factories_ips

The public factories IPs, if available.

Type:Optional[List[str]]
classmethod to_yaml(cls, representer: Any, node: Any, tag: str)[source]

Use representer to create yaml representation of node

classmethod from_yaml(cls, constructor: Any, node: Any, factory_name: str)[source]

Use constructor to create an instance of cls