Skip to content

autonomy.deploy.base

Base deployments module.

NotValidKeysFile Objects

class NotValidKeysFile(Exception)

Raise when provided keys file is not valid.

ServiceBuilder Objects

class ServiceBuilder()

Class to assist with generating deployments.

__init__

def __init__(service: Service,
             keys: Optional[List[Dict[str, str]]] = None,
             private_keys_password: Optional[str] = None,
             agent_instances: Optional[List[str]] = None,
             apply_environment_variables: bool = False) -> None

Initialize the Base Deployment.

try_get_all_participants

def try_get_all_participants() -> Optional[List[str]]

Try get all participants from the ABCI overrides

private_keys_password

@property
def private_keys_password() -> Optional[str]

Service password for agent keys.

agent_instances

@property
def agent_instances() -> Optional[List[str]]

Agent instances.

agent_instances

@agent_instances.setter
def agent_instances(instances: List[str]) -> None

Agent instances setter.

keys

@property
def keys() -> List[Dict[str, str]]

Keys.

from_dir

@classmethod
def from_dir(cls,
             path: Path,
             keys_file: Optional[Path] = None,
             number_of_agents: Optional[int] = None,
             private_keys_password: Optional[str] = None,
             agent_instances: Optional[List[str]] = None,
             apply_environment_variables: bool = False) -> "ServiceBuilder"

Service builder from path.

verify_agent_instances

@staticmethod
def verify_agent_instances(keys: List[Dict[str, str]],
                           agent_instances: List[str]) -> None

Cross verify agent instances with the keys.

read_keys

def read_keys(keys_file: Path) -> None

Read in keys from a file on disk.

try_update_runtime_params

def try_update_runtime_params(
        multisig_address: Optional[str] = None,
        agent_instances: Optional[List[str]] = None,
        consensus_threshold: Optional[int] = None) -> None

Try and update setup parameters.

get_maximum_participants

def get_maximum_participants() -> int

Returns the maximum number of participants

try_update_abci_connection_params

def try_update_abci_connection_params() -> None

Try and update ledger connection parameters.

process_component_overrides

def process_component_overrides(agent_n: int) -> Dict

Generates env vars based on model overrides.

generate_agents

def generate_agents() -> List

Generate multiple agent.

generate_common_vars

def generate_common_vars(agent_n: int) -> Dict

Retrieve vars common for agent.

generate_agent

def generate_agent(agent_n: int,
                   override_idx: Optional[int] = None) -> Dict[Any, Any]

Generate next agent.

BaseDeploymentGenerator Objects

class BaseDeploymentGenerator(abc.ABC)

Base Deployment Class.

__init__

def __init__(service_builder: ServiceBuilder,
             build_dir: Path,
             use_tm_testnet_setup: bool = False,
             dev_mode: bool = False,
             packages_dir: Optional[Path] = None,
             open_aea_dir: Optional[Path] = None,
             open_autonomy_dir: Optional[Path] = None,
             image_author: Optional[str] = None)

Initialise with only kwargs.

generate

@abc.abstractmethod
def generate(image_version: Optional[str] = None,
             use_hardhat: bool = False,
             use_acn: bool = False) -> "BaseDeploymentGenerator"

Generate the deployment configuration.

generate_config_tendermint

@abc.abstractmethod
def generate_config_tendermint() -> "BaseDeploymentGenerator"

Generate the deployment configuration.

populate_private_keys

@abc.abstractmethod
def populate_private_keys() -> "BaseDeploymentGenerator"

Populate the private keys to the deployment.

write_config

def write_config() -> "BaseDeploymentGenerator"

Write output to build dir