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.
Deployment starter tutorial
See our tutorial on deployments to start using UbiOps now: Deployment starter tutorial.
Creating a deployment¶
When you create a new deployment in UbiOps, you first define the 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 instance type 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
Deployment packages are different for Python or R. See this page for more information. You can find templates for deployment packages on our Github or download an example here.
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 starter tutorial.
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 base environment 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 starter tutorial.
More deployment options are optional, such as for example the instance type. These can be set in the Advanced parameters.
Finally, click on the Create button.