You can migrate your existing services from VESSL Serve Beta to the latest version. This guide provides a step-by-step process to help you migrate your services.

Before you go, please refer to the new Serve YAML documentation to understand the new features and changes.

Assumptions

  • You have a running VESSL Serve on your organization.
  • You have a running or stopped VESSL Serve revision.
  • You have the older version of service.yaml file as below format.
message: vessl-yaml-serve-test
launch_immediately: true

image: quay.io/vessl-ai/kernels:py39

resources:
  accelerators: T4:1
  spot: true

volumes:
  /root/examples:
    git:
      clone: https://github.com/vessl-ai/examples
      revision: 33a49398fc6f87265ac490b1cf587912b337741a

run:
  - workdir: /code/examples
    command: |
      python3 mnist.py

env:
  - key: TEST_ENV
    value: test

ports:
  - name: http
    type: http
    port: 8000

autoscaling:
  min: 1
  max: 1
  metric: cpu
  target: 50

Step 1. Get a new version of YAML by using the CLI

You can get the new version of the YAML file by using the CLI.

vessl serve revision show --service <service_name> --number <revision_number> --format yaml

Save the output to a new file, for example, new_service.yaml.

Step 2. Manage the revision.

Creating a new revision

You can use the new YAML file to create a new revision.

Add --set-current-active or -a to set the new revision as the current active revision and activate the endpoint.

vessl serve create -f new_service.yaml --set-current-active

Updating the revision

You can update traffic weight for the revision.

vessl serve update --service <service_name> -n <revision_number> -w <weight>

Terminating the revision

You can terminate the revision.

vessl serve revision terminate --service <service_name> -n <revision_number>

Reference: Differences between the old and new CLI.

APIStatusNew CLI APIDescription
vessl serve revision createDisabled and replacedvessl serve createUse with new service.yaml schema
vessl serve revision update-autoscaler-configDisabled and replacedvessl serve revision scaleWorks same but changed in API Signature and options.
vessl serve gateway <subcommand>Will be deprecated.Gateway is automatically managed by the system and other commands.

| vessl serve revision list|show|terminate | Supported | . | | | vessl serve create | New | . | Uses service.yaml for creating revisions and rolling out them. | | vessl serve create-yaml | New | . | Creates service.yaml by project configuration and your inputs | | vessl serve abort-update | New | . | Force stops ongoing rollout and triggers rollback if possible | | vessl serve update | New | . | Updates configuration for traffic splits |

Reference: Difference in configuring the gateway.

You used to enable the gateway by hand in web or using service-gateway.yaml file.

Now you can manage gateway configuration by CLI.

  1. You can control traffic split with vessl serve update command.
vessl serve update --service <service_name> -n <revision_number> -w <weight>
  1. When the revisions are terminated or the service itself is deleted, the endpoint is automatically disabled.

Any questions or issues, please contact us at support@vessl.ai.