Multinode - Rapidly build distributed cloud applications in Python | Product Hunt

Deployments

Persistent deployments

A persistent deployment is for running a web app backend in production. It is created using the multinode deploy command.

Unlike ephemeral runs, persistent deployments are not tied to the terminal process. They remain alive until the developer runs the multinode undeploy command (see below).

The full syntax is for the multinode deploy command is:

multinode deploy \
    --env-file={environment-variables-file} \
    --region={cloud-region-name} \
    {deployment-name}
    {name-of-main-script}

Rules about environment variable formatting, cloud region naming and function imports are the same as for ephemeral runs.

Managing the lifecycle of persistent deployments

Upgrading a deployment

multinode upgrade \
    --env-file={environment-variables-file} \
    {deployment-name}

Undeploying a deployment

multinode undeploy {deployment-name}

As written, this command undeploys the compute, but retains all data in the system (e.g. dicts, job results and logs). If a new deployment is later created with the same name, then the original data will still be accessible.

Data from undeployed deployments will automatically be erased after 30 days.

To force immediate deletion, run the following command

multinode undeploy {deployment-name} --delete-data

Listing all deployments

multinode list

Getting metadata about a deployment

multinode describe {deployment-name}

This returns a list of workers or replicas associated with each workload. For each worker or replica, the following information will be displayed:

  • The status of the worker or replica ("RUNNING" or "TERMINATED").
  • The time when the worker was created, and the time when the worker terminated (if applicable).
  • The current CPU and memory utilisation (if currently running).
  • Whether the worker is occupied or idle (if applicable).

This command will also output the domain names for each deployed service.

Viewing logs

  • Logs from a service
multinode logs {deployment-name} --service {service-name}
  • Logs from a function
multinode logs {deployment-name} --function {function-name}
  • Logs from a job execution
multinode logs {deployment-name} --job {job-name} --id {job-id}
  • Logs from a scheduled task
multinode logs {deployment-name} \
  --scheduled-task {scheduled-task-name} \
  --last {number-of-executions}
  • Logs from a daemon
multinode logs {deployment-name} --daemon {daemon-name}

Logs will persist for 30 days.

Previous
Ephemeral runs