You can migrate your existing services from VESSL Service 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 Service YAML documentation to understand the new features and changes.

Assumptions

This guide is based on the following assumptions:

  • You have a running VESSL Service on your organization.
  • You have a running or stopped VESSL Service 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

Start a migration

1

Get a new version of YAML by using 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.

2

Manage the 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 deprecatedN/AGateway is automatically managed by the system and other commands.
vessl serve revision list/show/terminateSupportedN/A
vessl serve createNewN/AUses service.yaml for creating revisions and rolling out them.
vessl serve create-yamlNewN/ACreates service.yaml by project configuration and your inputs.
vessl serve abort-updateNewN/AForce stops ongoing rollout and triggers rollback if possible.
vessl serve updateNewN/AUpdates 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.