- Overview
- Getting Started Guide
- UserGuide
-
References
-
ABEJA Platform CLI
- CONFIG COMMAND
- DATALAKE COMMAND
- DATASET COMMAND
- TRAINING COMMAND
-
MODEL COMMAND
- check-endpoint-image
- check-endpoint-json
- create-deployment
- create-endpoint
- create-model
- create-service
- create-trigger
- create-version
- delete-deployment
- delete-endpoint
- delete-model
- delete-service
- delete-version
- describe-deployments
- describe-endpoints
- describe-models
- describe-service-logs
- describe-services
- describe-versions
- download-versions
- run-local
- run-local-server
- start-service
- stop-service
- submit-run
- update-endpoint
- startapp command
-
ABEJA Platform CLI
- FAQ
- Appendix
create-service
Description
Create Service model.
A service is deployed based on specified version information then program is run n the container image environment specified in the version. Please wait minutes to access endpoint after execute a command cause it takes time to deploy.
Notes
Can not update or overwrite service. Please create new service and delete old one.
Service deployment method
You can create multiple services for deployment, and it is possible to do Blue Green Deployment such as switching the endpoint to a new service by specifying an optional service at update-endpoint
.
Synopsis
$ abeja model create-service [--help]
Usage: abeja model create-service [OPTIONS]
Create http service
Options:
-d, --deployment_id, --deployment-id TEXT
Deployment identifier [required]
-v, --version_id, --version-id TEXT
Version identifier [required]
-m, --model_id, --model-id TEXT
Model identifier
-e, --environment ENVIRONMENTSTRING
Service environment variable
--instance-type, --instance_type TEXT
Instance type
--disable-autoscale, --disable_autoscale
Disable autscale. Autoscale is enabled by
default
--instance-number, --instance_number INTEGER
Number of intances. Available values are 1 to
300. Default is 1
--max-instance-number, --max_instance_number INTEGER
Max number of intances of autoscaling.
Default is double of instance-number
--record-channel-id, --record_channel_id TEXT
Channel identifier where input data will be
saved
--help Show this message and exit.
Options
-d
, --deployment_id
Specify deployment_id with create-deployment you created
-v
, --version_id
Specify version_id with create-deployment you created
-e
, --environment
Specifies environment variables.The registered environment variables can be referenced from the code. E.g.)IMAGE_WIDTH:100
For more information on user-specifiable environment variables, see here.
--disable-autoscale
, --disable_autoscale
Disable autoscale option of the service to create. If this option is not specified, autoscale is enabled.
--instance-number
, --instance_number
Specifies the number of instances which run the service. Default values is 1.
--max-instance-number
, --max_instance_number
Specifies the max number of instances which run the service. Default values is double of the --max-instance-number.
--instance-type
, --instance_type
Specify instance type.
you can select cpu-0.25
, cpu-1
, cpu-2
, cpu-4
and default instance is cpu-0.25
.
** gpu-1
is supported by CLI only. **
--record-channel-id
, --record_channel_id
Specify channel ID to save the input data.
Example
Creating service
Command:
$ abeja model create-service --deployment_id 3456789012345 \
--version_id ver-2345678901234 \
--instance_type cpu-1 \
--record_channel_id 5678901234567
Output:
{
"created_at": "2018-01-01T00:00:00.000000Z",
"deployment_id": "3456789012345",
"disruptable": true,
"instance_number": 1,
"instance_type": "cpu-1",
"merged_env_vars": {},
"metrics_url": "https://p.datadoghq.com/sb/xxxxxxxx",
"model_version": "broken",
"model_version_id": "ver-2345678901234",
"modified_at": "2018-01-01T00:00:00.000000Z",
"record_channel_id": "5678901234567",
"service_id": "ser-4567890123456",
"status": "IN_PROGRESS",
"user_env_vars": {}
}