Introduction to Deployments¶
Deployments are objects within UbiOps that serve your code to process data. From the uploaded code, the platform will build a container, running as a microservice inside UbiOps. A deployment has a unique API endpoint for receiving requests with data to process. Examples of typical deployments are algorithms, data aggregation scripts and trained machine learning models.
UbiOps distinguishes two deployment types: express, or batch.
Express deployments work with direct requests, which are synchronous and have a maximum duration of 1 hour. Most deployments will fall into this category. They are designed for low-latency data processing.
Batch deployments work with batch requests, which are asynchronous and have a maximum duration of 48 hours. They are intended for longer, time consuming jobs like model training or optimization algorithms. Since they work in an asynchronous way you need two API calls for your requests, one to create the request, and one to fetch the results once it is done processing.
You need to specify the deployment type for each deployment version.
Creating a deployment¶
When you create a new deployment in UbiOps, you first define its expected in- and output structure and data types. To learn more about options for data in-/output, see the page on data types.
Each deployment has at least 1 or more versions. Therefore, when you create a new deployment, you will automatically create the first deployment version.
Uploading your code¶
The code that will run, as well as its requirements and artifacts, are uploaded to UbiOps in the form of a zipped deployment package. In this deployment package, you include your code but also requirement files, artifacts and other dependencies.
UbiOps will take care of containerizing your code and installing all its dependencies. You can also configure the memory allocation and scaling settings when you create a version. See advanced parameters for more information about deployment settings and options.
Wrapping your code in a UbiOps deployment package
After the deployment is built in the background, it is ready to receive requests through its API endpoint. For more information about how to let a deployment process data, see the making requests page.
Creating data pipelines from multiple Deployments¶
A deployment can also be connected to other deployments in a pipeline.
More information on Deployments¶
Read more about creating deployment versions on the deployment version page.
For a tutorial on deployments, see: Deployment quickstart.
Creating a new Deployment with the UbiOps WebApp¶
A deployment can be created in the UbiOps WebApp by visiting Deployments in the left navigation bar and clicking on the Create button.
A deployment requires a name, an input type and an output type. The input type and output type can be structured or plain. See Deployment package structure for more information.
Adding labels/tags to deployments
You can assign labels to deployments to filter them easily later on. Provide a name and a value, such as "type" - "image_recognition" and click on Add.
After confirming the deployment, you can create Environment Variables for your deployment. Environment variables allow you to externally set variables, managed by UbiOps, that can be used inside your deployment code.
The first version of your deployment can be created in the next step of the deployment creation form. A default name
v1 will be filled in, though feel free to name them as your team finds most convenient. For more information about deployment versions, see Deployment versions
Fill in the programming language of your code. Click on the Upload code button to upload the ZIP file. The required structure of the ZIP file can be found under Deployment package structure. For a concrete example of a deployment ready to be deployed, follow the steps in our quickstart.
More deployment options are optional, such as for example the memory allocation. These can be set in the Advanced parameters.
Finally, click on the Create button.