Command: ubiops deployments
Alias: ubiops dpl
Command: ubiops deployments list
Description:
List all your deployments in your project.
The <labels> option can be used to filter on specific labels.
Arguments: -
Options:
-
-lb/--labels
Labels defined as key/value pairs
This option can be provided multiple times in a single command -
-fmt/--format
The output format
Allowed values:table,json
Command: ubiops deployments get
Description:
Get the deployment settings, like, input_type and output_type.
If you specify the <output_path> option, this location will be used to store the
deployment settings in a yaml file. You can either specify the <output_path> as file or
directory. If the specified <output_path> is a directory, the settings will be
stored in deployment.yaml.
Arguments:
- [required]
deployment_name
Options:
-
-o/--output_path
Path to file or directory to store deployment yaml file -
-q/--quiet
Suppress informational messages -
-fmt/--format
The output format
Allowed values:row,yaml,json
Command: ubiops deployments create
Description:
Create a new deployment.
Use --overwrite flag to update the deployment if it already exists.
Define the deployment parameters using a yaml file. For example:
deployment_name: my-deployment-name
deployment_description: Deployment created via command line.
deployment_labels:
my-key-1: my-label-1
my-key-2: my-label-2
deployment_supports_request_format: true
input_type: structured
input_fields:
- name: param1
data_type: int
- name: param2
data_type: string
output_type: plain
The deployment name can either be passed as argument or specified inside the yaml file. If it is both passed as argument and specified inside the yaml file, the value passed as argument is used.
Possible input/output types: [structured, plain]. Possible data_types: [int, string, double, bool, dict, file, array_string, array_int, array_double, array_file].
Arguments:
deployment_name
Options:
-
[required]
-f/--yaml_file
Path to a yaml file that containing deployment details -
--overwrite
Whether you want to overwrite if exists -
-fmt/--format
The output format
Allowed values:row,yaml,json
Command: ubiops deployments update
Description:
Update a deployment.
It is possible to define the updated parameter values using a yaml file. Or provide the <new_name> or
<default_version> directly as command options. When both a yaml file and command options are given, the command
options are prioritized over the yaml content.
For example:
deployment_name: new-name
deployment_description: Deployment created via command line.
deployment_labels:
my-key-1: my-label-1
my-key-2: my-label-2
deployment_supports_request_format: true
input_fields:
- name: param1
data_type: int
- name: param2
data_type: string
output_fields:
- name: param1
data_type: int
- name: param2
data_type: string
default_version: v1
Arguments:
- [required]
deployment_name
Options:
-
-n/--new_name
The new deployment name -
-default/--default_version
The name of the version that should become the default -
-f/--yaml_file
Path to a yaml file containing deployment details -
-q/--quiet
Suppress informational messages
Command: ubiops deployments delete
Description:
Delete a deployment.
Arguments:
- [required]
deployment_name
Options:
-
-y/--assume_yes
Assume yes instead of asking for confirmation -
-q/--quiet
Suppress informational messages
Command: ubiops deployments package
Description:
Package code to archive file which is ready to be deployed.
Please, specify the code <directory> that should be deployed. The files in this directory will be zipped.
Subdirectories and files that shouldn't be contained in the archive can be specified in an ignore file, which is by
default '.ubiops-ignore'. The structure of this file is assumed to be equal to the well-known .gitignore file.
Use the <output_path> option to specify the output location of the archive file. If not specified,
the current directory will be used. If the <output_path> is a directory, the archive will be saved as
[deployment_name]_[deployment_version]_[datetime.now()].zip. Use the <assume_yes> option to overwrite
without confirmation if file specified in <output_path> already exists.
Arguments: -
Options:
-
-d/--deployment_name
The deployment name used in the archive filename -
-v/--version_name
The version name used in the archive filename -
[required]
-dir/--directory
Path to a directory that contains at least a 'deployment.py' -
-o/--output_path
Path to file or directory to store the deployment package archive file -
-i/--ignore_file
File name of ubiops-ignore file located in the root of the specified directory [default = .ubiops-ignore] -
-y/--assume_yes
Assume yes instead of asking for confirmation -
-q/--quiet
Suppress informational messages
Command: ubiops deployments upload
Description:
Upload a deployment package archive file to a version of a deployment.
Please, specify the deployment package <archive_path> that should be uploaded.
Use the <overwrite> option to overwrite the deployment package on UbiOps if one already exists for this version.
Arguments:
- [required]
deployment_name
Options:
-
[required]
-v/--version_name
The version name -
-a/-z/--archive_path/--zip_path
Path to deployment version archive file -
--overwrite
Whether you want to overwrite if exists -
-pb/--progress_bar
Whether to show a progress bar while uploading -
-q/--quiet
Suppress informational messages
Command: ubiops deployments download
Description:
Get the version of a deployment.
The <output_path> option will be used as output location of the archive file. If not specified,
the current directory will be used. If the <output_path> is a directory, the archive will be
saved in [deployment_name]_[deployment_version]_[datetime.now()].zip.
Arguments:
- [required]
deployment_name
Options:
-
[required]
-v/--version_name
The version name -
-o/--output_path
Path to file or directory to store the deployment package archive file -
-q/--quiet
Suppress informational messages
Command: ubiops deployments deploy
Description:
Deploy a new version of a deployment.
For deployments that support request format, you can specify the code <directory> that should be deployed. The
files in this directory will be zipped and uploaded. Subdirectories and files that shouldn't be contained in the
archive file can be specified in an ignore file, which is by default '.ubiops-ignore'. The structure of this file
is assumed to be equal to the well-known '.gitignore' file.
It's also possible to skip <directory> and continue with an empty revision. In that case, we assume that your
deployment code is part of your environment, e.g. custom docker image.
If you want to store a local copy of the uploaded archive file, please use the <output_path> option.
The <output_path> option will be used as output location of the archive file. If the <output_path> is a
directory, the archive will be saved as [deployment_name]_[deployment_version]_[datetime.now()].zip. Use
the <assume_yes> option to overwrite without confirmation if file specified in <output_path> already exists.
It is possible to define the parameters using a yaml file. For example:
deployment_name: my-deployment-name
version_name: my-deployment-version
version_description: Version created via command line.
version_labels:
my-key-1: my-label-1
my-key-2: my-label-2
environment: python3-13
instance_type_group_name: 2048 MB + 0.5 vCPU
scaling_strategy: default
minimum_instances: 0
maximum_instances: 1
instance_processes: 1
maximum_idle_time: 300
request_retention_mode: none
request_retention_time: 604800
maximum_queue_size: 100000
static_ip: false
health_check:
port: 8080
path: "/status"
timeout: 3
interval: 5
failure_threshold: 3
Those parameters can also be provided as command options. If both a <yaml_file> is set and options are given,
the options defined by <yaml_file> will be overwritten by the specified command options. The deployment name can
either be passed as command argument or specified inside the yaml file using <deployment_name>.
Arguments:
deployment_name
Options:
-
-v/--version_name
The version name -
-dir/--directory
Path to a directory that contains at least a 'deployment.py' -
-deployment_py/--deployment_file
Name of deployment file which contains class Deployment. Must be located in the root of the deployment package directory -
-i/--ignore_file
File name of ubiops-ignore file located in the root of the specified directory [default = .ubiops-ignore] -
-o/--output_path
Path to file or directory to store the deployment package archive file -
-f/--yaml_file
Path to a yaml file that contains version options -
-e/--environment
Environment for the version -
-inst/--instance_type
[DEPRECATED] Reserved instance type for the version -
--instance_type_group_id
ID of the reserved instance type group for the version -
-inst_group/--instance_type_group_name
Name of the reserved instance type group for the version -
--scaling_strategy
Scaling strategy to use for scaling the instances for the version -
-min/--minimum_instances
Minimum number of instances -
-max/--maximum_instances
Maximum number of instances -
--instance_processes
Number of instance processes (usually 1) -
-t/--maximum_idle_time
Maximum idle time before shutting down instance (seconds) -
-rtm/-rrm/--request_retention_mode
Mode of request retention for requests to the version
Allowed values:none,metadata,full -
-rtt/-rrt/--request_retention_time
Number of seconds to store requests to the version -
-qs/--maximum_queue_size
Maximum number of queued requests to the version -
--static-ip/--static_ip
Whether the deployment version should get a static IP -
--hc_port
Port for the health check -
--hc_path
Path for the health check, it should start with a / -
--hc_timeout
The number of seconds after which the health check times out -
--hc_interval
How often to check the service in seconds -
--hc_failure_threshold
The number of times that the health check can fail before the service is considered failed -
-lb/--labels
Labels defined as key/value pairs
This option can be provided multiple times in a single command -
-desc/--version_description
The version description -
--overwrite
Whether you want to overwrite if exists -
-y/--assume_yes
Assume yes instead of asking for confirmation -
-pb/--progress_bar
Whether to show a progress bar while uploading -
-q/--quiet
Suppress informational messages
Command: ubiops deployments requests
Command: ubiops deployments requests create
Description:
Create a deployment request and retrieve request IDs to collect the results later.
Use the option timeout to specify the timeout of the request. The minimum value is 10 seconds. The maximum value
is 3600 (1 hour) for direct (synchronous) requests and 345600 (96 hours) for batch (asynchronous) requests.
The default value is 300 (5 minutes) for direct requests and 14400 (4 hours) for batch requests.
Use the version option to make a request to a specific deployment version:
ubiops deployments requests create <my-deployment> -v <my-version> --data <input>
If not specified, a request is made to the default version:
ubiops deployments requests create <my-deployment> --data <input>
Use --batch to make an asynchronous batch request:
ubiops deployments requests create <my-deployment> --batch --data <input>
Multiple data inputs can be specified at once and send as batch by using the '--data' option multiple times:
ubiops deployments requests create <my-deployment> --batch --data <input-1> --data <input-2> --data <input-3>
For structured input, specify data input as JSON formatted string. For example:
ubiops deployments requests create <my-deployment> --data "{\"param1\": 1, \"param2\": \"two\"}"
Arguments:
- [required]
deployment_name
Options:
-
-v/--version_name
The version name -
--batch
Whether you want to perform the request as batch request (async) -
--data
The input data of the request
This option can be provided multiple times in a single command -
-f/--json_file
Path to json file containing the input data of the request -
-t/--timeout
Timeout in seconds -
-fmt/--format
The output format
Allowed values:oneline,reference,json
Command: ubiops deployments requests get
Description:
Get one or more deployment requests.
Deployment requests are only stored for deployment versions with request_retention_mode 'full' or 'metadata'.
Use the version option to get a request for a specific deployment version. If not specified, the request is retrieved for the default version.
Multiple request ids can be specified at once by using the '-id' options multiple times:
ubiops deployments requests get <my-deployment> -v <my-version> -id <id-1> -id <id-2> -id <id-3>
Arguments:
- [required]
deployment_name
Options:
-
-v/--version_name
The version name -
[required]
-id/--request_id
The ID of the request
This option can be provided multiple times in a single command -
-fmt/--format
The output format
Allowed values:oneline,reference,json
Command: ubiops deployments requests list
Description:
List deployment requests.
Deployment requests are only stored for deployment versions with request_retention_mode 'full' or 'metadata'.
Use the version option to list the requests for a specific deployment version. If not specified, the requests are listed for the default version.
Arguments:
- [required]
deployment_name
Options:
-
-v/--version_name
The version name -
--offset
The starting point: if offset equals 2, then the first 2 records will be omitted -
--limit
Limit of the number of requests. The maximum value is 50. -
--status
Status of the request
Allowed values:pending,processing,failed,completed,cancelled -
--start_date
Start date of the interval for which the requests are retrieved, looking at the creation date of the request. Formatted like '2020-01-01T00:00:00.000000Z'. -
--end_date
End date of the interval for which the requests are retrieved, looking at the creation date of the request. Formatted like '2020-01-01T00:00:00.000000Z'. -
--search_id
A string to search inside request ids. It will filter all request ids that contain this string. -
-fmt/--format
The output format
Allowed values:table,json
Command: ubiops deployments requests input
Description:
Get the input data of a deployment request.
Data is only stored for deployment versions with request_retention_mode 'full'.
Use the version option to get the input data for a request of a specific deployment version. If not specified, the input data is retrieved for the default version.
Arguments:
- [required]
deployment_name
Options:
-
-v/--version_name
The version name -
[required]
-id/--request_id
The ID of the request -
-o/--output_path
Path to file or directory to store the data -
-y/--assume_yes
Assume yes instead of asking for confirmation
Command: ubiops deployments requests output
Description:
Get the output data of a deployment request.
Data is only stored for deployment versions with request_retention_mode 'full'.
Use the version option to get the output data for a request of a specific deployment version. If not specified, the output data is retrieved for the default version.
Arguments:
- [required]
deployment_name
Options:
-
-v/--version_name
The version name -
[required]
-id/--request_id
The ID of the request -
-o/--output_path
Path to file or directory to store the data -
-y/--assume_yes
Assume yes instead of asking for confirmation