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@latest
See earlier versions
$ emily deployment add kubernetes [options]

Add a deployment specification targeting a Kubernetes cluster.

$ emily deployment add kubernetes

? 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: Please enter your Docker Hub username:
· johnsmith
Emily: Kubernetes deployment "production" added to project my-project
(M9VHKD)

Created:

- /my/project/my-project/deployments/production/deployment.json


Adding Kubernetes Deployment Specifications

A deployment specification of type kubernetes specifies the deployment of a project to a Kubernetes cluster.

Emily supports deployments to any Kubernetes cluster, with explicit support for Azure Kubernetes Service clusters.

Deploying using Docker Hub

When deploying to a Kubernetes cluster, the project image is hosted on an image repository. By default, this is a Docker Hub repository.

When creating the Kubernetes configuration with emily configuration add kubernetes, the user specifies the repository from which to pull images for the service. The --docker-user flag specifies the user to use when logging into Docker Hub to pull the image.

If using a private Docker Hub repo, the --email must also be provided (this should be the email for the specified Docker user).

Deploying using Azure Kubernetes Service

When deploying to an Azure Kubernetes cluster, pass the --azure flag.

When this flag is provided, the --acr-name must also be provided. This is the name of the Azure Container Registry to pull images from. Usually, if your images are pulled from myregistry.azurecr.io/images/my-image, the --acr-name would be myregistry.azurecr.io.

    Options

  • -h,--help

    Display help for command

  • -az,--azure

    Use an Azure Container Registry instead of Docker Hub. Unless --acr-name is passed, requires that the registry is connected via az acr login --name <registry>.

  • -acr,--acr-name<name>

    The name of the Azure Container Registry to push the image to (only needed if --azure is passed).

  • -du,--docker-user<username>

    Docker Hub username (not required if --azure is passed).

  • -em,--email<email>

    Your Docker hub email address. Only necessary if using a private Docker hub repository.

  • -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.