netunicorn.base.deployment.Deployment¶
- class Deployment(node, pipeline, keep_alive_timeout_minutes=10, cleanup=True)[source]¶
Bases:
object
Single deployment of an execution graph on a node.
- Parameters:
node (
Node
) – Node to deploy execution graph onpipeline (
ExecutionGraph
) – pipeline (execution graph) to deploykeep_alive_timeout_minutes (
int
, default:10
) – time to wait for executor update before timeoutcleanup (
bool
, default:True
) – whether to remove artifacts (e.g., Docker image and containers) after execution
Attributes
Node to deploy execution graph on
if False, deployment is not prepared yet or failed during preparation
ID of executor on node
if deployment failed, this field contains error
Serialized ExecutionGraph to be deployed
Environment definition to use for deployment
time to wait for executor update before timeout
if True, corresponding artifacts (Docker image and containers) will be removed after execution
Methods
Create Deployment from JSON representation
-
environment_definition:
EnvironmentDefinition
[source]¶ Environment definition to use for deployment
-
cleanup:
bool
[source]¶ if True, corresponding artifacts (Docker image and containers) will be removed after execution
- classmethod from_json(data)[source]¶
Create Deployment from JSON representation
- Parameters:
data (
DeploymentRepresentation
) – JSON representation of Deployment- Returns:
Deployment
– Deserialized Deployment