Edit Deployment
You can make changes to certain aspects of an active deployment, such as the packaged model, authentication requirements, and auto-scaling configurations. If you change the packaged model, you must choose between an abrupt upgrade or a canary rollout to handle the change.
Before You Start #
- You must have already created a deployment.
- You must have either a new packaged model or a new version of the existing deployed packaged model that you want to test.
How to Edit a Deployment #
Via the UI #
- Sign in to HPE Machine Learning Inferencing Software.
- Navigate to Deployments.
- Select the ellipsis icon next to the deployment you want to edit.
- Select Edit.
- Make the desired changes to the deployment.
- Select Done.
Via the CLI #
- Sign in to HPE Machine Learning Inferencing Software.
aioli user login <YOUR_USERNAME>
- Update a deployment with the following command:
aioli deployment update <DEPLOYMENT_NAME> \ --model <PACKAGED_MODEL_NAME> \ --canary-percentage <CANARY_PERCENTAGE> \ --authentication-required <BOOLEAN> \ --auto-scaling-max-replicas <MAX_REPLICAS> \ --auto-scaling-min-replicas <MIN_REPLICAS> \ --auto-scaling-metric <METRIC> \ --auto-scaling-target <TARGET_VALUE> \ --environment <VAR_1>=<VALUE_1> <VAR_2>=<VALUE_2> \ --arguments <ARG_1> <ARG_2>
- Wait for your deployment to reach
Ready
state.aioli deployment show <DEPLOYMENT_NAME>
- For more information on the
aioli deployment update
command, see the CLI command reference. - For information on setting environment variables and arguments, see the Advanced Configuration reference article.
Via the API #
- Sign in to HPE Machine Learning Inferencing Software.
curl -X 'POST' \ '<YOUR_EXT_CLUSTER_IP>/api/v1/login' \ -H 'accept: application/json' \ -H 'Content-Type: application/json' \ -d '{ "username": "<YOUR_USERNAME>", "password": "<YOUR_PASSWORD>" }'
- Obtain the Bearer token from the response.
- Get a list of deployments to find the deployment ID.
curl -X 'GET' \ '<YOUR_EXT_CLUSTER_IP>/api/v1/deployments' \ -H 'accept: application/json' \ -H 'Authorization : Bearer <YOUR_ACCESS_TOKEN>'
- Get the deployment ID from the response.
- Use the following curl command to update a deployment.
curl -X 'PUT' \ '<YOUR_EXT_CLUSTER_IP>/api/v1/deployments/<DEPLOYMENT_ID>' \ -H 'accept: application/json' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \ -d '{ "arguments": [ "--debug" ], "autoScaling": { "maxReplicas": <MAX_REPLICAS>, "metric": "<METRIC>", "minReplicas": <MIN_REPLICAS>, "target": <TARGET_VALUE> }, "canaryTrafficPercent": <CANARY_TRAFFIC_PERCENT>, "environment": { "<VAR_1>": "<VALUE_1>", "<VAR_2>": "<VALUE_2>" }, "goalStatus": "<GOAL_STATUS>", "model": "<PACKAGED_MODEL_NAME>", "security": { "authenticationRequired": <BOOLEAN> } }'