curl https://api.gcore.com/cloud/v2/inference/deployments/$INSTANCE_ID \
-X PUT \
-H 'Content-Type: application/json' \
-H "APIKey: $CLOUD_API_API_KEY" \
-d '{
"containers": [
{
"region_id": 7,
"scale": {
"max": 3,
"min": 1,
"cooldown_period": 60,
"triggers": {
"cpu": {
"threshold": 80
},
"gpu_memory": {
"threshold": 1
},
"gpu_utilization": {
"threshold": 1
},
"http": {
"rate": 1,
"window": 1
},
"memory": {
"threshold": 70
}
}
}
}
],
"flavor_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"image": "nginx:latest",
"listening_port": 8080,
"name": "my-instance",
"api_key_ids": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"auth_enabled": false,
"command": [
"nginx",
"-g",
"daemon off;"
],
"description": "My first instance",
"envs": {
"DEBUG_MODE": "False",
"KEY": "12345"
},
"image_registry_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"probes": {
"liveness_probe": {
"enabled": true,
"probe": {
"exec": {
"command": [
"ls",
"-l"
]
},
"failure_threshold": 3,
"http_get": {
"port": 80,
"headers": {
"Authorization": "Bearer token 123"
},
"host": "127.0.0.1",
"path": "/healthz",
"schema": "HTTP"
},
"initial_delay_seconds": 0,
"period_seconds": 5,
"success_threshold": 1,
"tcp_socket": {
"port": 80
},
"timeout_seconds": 1
}
},
"readiness_probe": {
"enabled": true,
"probe": {
"exec": {
"command": [
"ls",
"-l"
]
},
"failure_threshold": 3,
"http_get": {
"port": 80,
"headers": {
"Authorization": "Bearer token 123"
},
"host": "127.0.0.1",
"path": "/healthz",
"schema": "HTTP"
},
"initial_delay_seconds": 0,
"period_seconds": 5,
"success_threshold": 1,
"tcp_socket": {
"port": 80
},
"timeout_seconds": 1
}
},
"startup_probe": {
"enabled": true,
"probe": {
"exec": {
"command": [
"ls",
"-l"
]
},
"failure_threshold": 3,
"http_get": {
"port": 80,
"headers": {
"Authorization": "Bearer token 123"
},
"host": "127.0.0.1",
"path": "/healthz",
"schema": "HTTP"
},
"initial_delay_seconds": 0,
"period_seconds": 5,
"success_threshold": 1,
"tcp_socket": {
"port": 80
},
"timeout_seconds": 1
}
}
},
"project_id": 1,
"timeout": 120
}'
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"containers": [
{
"deploy_status": {
"ready": 1,
"total": 3
},
"region_id": 7,
"scale": {
"max": 3,
"min": 1,
"cooldown_period": 60,
"triggers": {
"cpu": {
"threshold": 80
},
"gpu_memory": {
"threshold": 1
},
"gpu_utilization": {
"threshold": 1
},
"http": {
"rate": 1,
"window": 1
},
"memory": {
"threshold": 70
}
}
},
"error_message": "Failed to pull image"
}
],
"flavor_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"image": "nginx:latest",
"listening_port": 8080,
"name": "my-instance",
"status": "ACTIVE",
"address": "https://example.com",
"api_key_ids": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"auth_enabled": false,
"command": [
"nginx",
"-g",
"daemon off;"
],
"created_at": "2023-08-22T11:21:00Z",
"description": "My first instance",
"envs": {
"DEBUG_MODE": "False",
"KEY": "12345"
},
"image_registry_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"probes": {
"liveness_probe": {
"enabled": true,
"probe": {
"exec": {
"command": [
"ls",
"-l"
]
},
"failure_threshold": 3,
"http_get": {
"port": 80,
"headers": {
"Authorization": "Bearer token 123"
},
"host": "127.0.0.1",
"path": "/healthz",
"schema": "HTTP"
},
"initial_delay_seconds": 0,
"period_seconds": 5,
"success_threshold": 1,
"tcp_socket": {
"port": 80
},
"timeout_seconds": 1
}
},
"readiness_probe": {
"enabled": true,
"probe": {
"exec": {
"command": [
"ls",
"-l"
]
},
"failure_threshold": 3,
"http_get": {
"port": 80,
"headers": {
"Authorization": "Bearer token 123"
},
"host": "127.0.0.1",
"path": "/healthz",
"schema": "HTTP"
},
"initial_delay_seconds": 0,
"period_seconds": 5,
"success_threshold": 1,
"tcp_socket": {
"port": 80
},
"timeout_seconds": 1
}
},
"startup_probe": {
"enabled": true,
"probe": {
"exec": {
"command": [
"ls",
"-l"
]
},
"failure_threshold": 3,
"http_get": {
"port": 80,
"headers": {
"Authorization": "Bearer token 123"
},
"host": "127.0.0.1",
"path": "/healthz",
"schema": "HTTP"
},
"initial_delay_seconds": 0,
"period_seconds": 5,
"success_threshold": 1,
"tcp_socket": {
"port": 80
},
"timeout_seconds": 1
}
}
},
"timeout": 120
}