How to create a Deployment

Overview

With this guide, you’ll learn how to create a Deployment using the Quix Portal. You’ll take a Project and prepare it to run in the Quix serverless environment.

Before you begin

  • You’ll need to have created a Project to deploy.

Creating a deployment

To deploy a Project, click on the Deploy button from that Project’s Develop page.

develop deploy

You can also click the Create Deployment button on the Deployments page.

deployments

Deployment config

There are three tabs of optional configuration settings for each deployment:

General

On the General config page you can set the following:

  • Name — Give the Deployment a name for future reference.

  • Project — Choose the Project to deploy.

  • Version Tag — Choose a particular Git tag or commit revision to build and deploy.

  • Deployment type

    • Service — A service (e.g. pub/sub model, data connector etc.) that runs all the time.

    • Job — A one-time run that has an end state. For example model training or a static data import job.

If a Service fails or terminates, it will be restarted automatically, and will pick up on the last data point. A Job will not restart.
  • CPU millicores — Set the maximum amount of CPU millicores that can be consumed by each replica. 1000 millicores equals one physical CPU core.

  • Memory in MB — Set the maximum amount of memory that can be consumed for each replica.

  • Replicas — Set the number of instances of a service. Used to horizontally scale your deployments.

new deployment

Variables

On the variables page you can specify environment variables that are inserted into the service. This helps you to parameterize your project without rebuilding the docker image.

new deployment variables

Here’s some Python code to show an example use case for environment variables:

import os

buffer_options.time_span_in_milliseconds = int(os.environ["window"])

Network

You can assign public DNS addresses to your deployments. This is useful if your project exposes an API (e.g. to call a model directly) or if the project hosts any sort of frontend or dashboard.

This option will wire a DNS address to the service on port 80. Please note that it might take up to 10 minutes after you run your service to propagate through the DNS servers to your network.
new deployment public access

Such deployments will have a Browse button deployment browse enabled. This lets you navigate your browser to the URL assigned to the deployment.

deployment browse