Emily CLI Documentation

Release-v3.0.6

Emily combines the powers of Python and Docker to build stable and consistent machine learning and datascience python environments. Emily is useful for large cross-team project development as well as for simply running a single jupyter notebook or python script.

Download emily@v3.0.6
See earlier versions
$ emily deployment add server [options]

Add a deployment specification targeting a server.

$ emily deployment add server

? Emily: Choose a project(Use arrow keys, confirm with ENTER)> M9VHKD - my-project
AB82JD - movie-recommender
· M9VHKD - my-project
Emily: Please enter a deployment name:
· production
? Emily: Please select a configuration(Use arrow keys, confirm with ENTER)> nginx-reverse-proxy
+ Add new configuration
· nginx-reverse-proxy
? Emily: Please select an environment(Use arrow keys, confirm with ENTER)> prod
+ Add new environment
· prod
? Emily: Select or create a server(Use arrow keys, confirm with ENTER)
+ Add server
> Name: my-server
IP/Domain: my-server.com
Status: Online
· my-server
Emily: Server deployment "production" added to project my-project
(M9VHKD)

Created:

- my/project/my-project/deployments/production/deploy.sh
- my/project/my-project/deployments/production/deployment.sh
- my/project/my-project/deployments/production/post_deployment_hook.sh


Adding Server Deployment Specifications

A deployment specification of type server specifies the deployment of your project to a server with SSH access.

Ensure that the port 22 (SSH) is open to the IP you're deploying from.

The emily deployment add server command requires you to select the server to deploy your project to. This server is created with emily servers add.

While creating the deployment specification, you can specify the following deploying options:

--workers

The --workers flag specify the number of parallel worker processes to server your project under. When running on the server, requests will be load-balanced between each worker.

--server-directory

The --server-directory flag specifies the directory on the server to place your project in. If not provided, this will default to /home/<user>. The <user> is specified when creating the server with emily servers add.

--run

The --run flag specifies a bash script to run after transferring the project files to the server. If not provided, this will default to ./deployments/<deployment>/post_deployment_hook.sh, which is automatically generated when creating the deployment specification. You can either choose to override the file itself, or provide another script to run. If you would like to just transfer the files without running a post script, pass --no-run.

--force

The --force flag specifies whether to forcefully stop any Emily container running on the same port as the project being deployed. If not provided, the user is prompted to stop the occupying server - if one exists - or abort the deployment.

    Options

  • -h,--help

    Display help for command

  • -w,--workers<workers>

    The number of worker processes to run in parallel. (default: 1)

  • -t,--target<target>

    Name or ID of the server targeted for deployment.

  • -sd,--server-directory<path>

    Server directory to transfer files to (default: /home/<SERVER USER>).

  • -r,--run<file>(--no-run)

    Bash script to run on the server after transferring files (default: ./deployments/<deploynemt>/post_deployment_hook.sh).

  • -f,--force

    Overwrite Emily container already running on chosen server port. No effect if port is not used or used by something not an Emily project. (default: false)

  • -n,--name<name>

    The name of the deployment specification.

  • -c,--configuration<name>

    Default configuration to use in this deployment.

  • -e,--environment<name>

    Default environment to use in this deployment.

  • -p,--project<project>

    The project to manage deployment specifications for.

  • -s,--silent

    Execute Emily silently. (default: false)

  • -u,--update(--no-update)

    Prompt for update if newer version found. (default: true)

  • -vb,--verbose

    Print detailed information while running commands.