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


How to Edit a Deployment

Via the UI

  1. Sign in to HPE Machine Learning Inferencing Software.
  2. Navigate to Deployments.
  3. Select the ellipsis icon next to the deployment you want to edit.
  4. Select Edit.
  5. Make the desired changes to the deployment.
  6. Select Done.

Via the CLI

  1. Sign in to HPE Machine Learning Inferencing Software.
    aioli user login <YOUR_USERNAME>
  2. 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> 
  3. Wait for your deployment to reach Ready state.
    aioli deployment show <DEPLOYMENT_NAME>

Via the API

  1. 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>"
      }'
  2. Obtain the Bearer token from the response.
  3. 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>'
  4. Get the deployment ID from the response.
  5. 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>
           }
         }'