Upgrade from Previous Versions

Upgrading the Genvid SDK from one version to another may include some manual steps. This page includes any steps required to update to version 1.30.0 from the last version. If you’re upgrading an older version of the SDK, start with any special upgrade instructions for your version found here.

General Upgrade Instructions

Upgrade the Genvid SDK

To set up the new SDK locally:

  1. Install the new SDK.

  2. Run the Python script to install the Genvid Toolbox.

    py install-toolbox.py
    
  3. Run the Genvid Bastion script to update your bastion.

    genvid-bastion reinstall --reconfigure -b {mybastion} -uml
    

Update Your Broadcast Website

If you used code from the samples we provide in your own project, note that we recently enforced a best practice concerning service discovery using consul in those samples. You should check again the samples and update your project accordingly. We invite you to use the consul health api instead of the catalog api to fetch the url of your services, since it is more likely that the url will point to a healthy service.

Update Your Game

To update your game without applying new features, just replace the old genvid.dll from the previous SDK with the one from the new SDK. The old plugins and integration should work as-is, with the exception of the specific upgrade instructions below.

Attention

Always follow the full upgrade path for the Genvid SDK version you’re using. For example: If you’re upgrading from version 1.6.0 to 1.10.0, start by upgrading from 1.6.0 to 1.7.0 then continue with each version.

See the full list of upgrade instructions for your specific version.

Upgrade the Javascript API

You should also upgrade the Genvid JavaScript API on your website.

Update Your Cluster

We strongly recommend keeping your old clusters as-is and creating a new one for the update.

To create a new cloud-based cluster, follow the standard instructions:

  1. Set up a new wingame AMI that matches the new version.
  2. Create new clusters.

To create a new local cluster, follow the standard instructions listed in the Initialize a Local Cluster section.

Once you have replaced all your clusters, you can remove the old SDK repositories from the Modules Section page.

Updating an Existing Cluster

Warning

Updating your cluster can replace all your instances and even erase your current configuration. We recommend not updating a live cluster. If you do, carefully check the changes before applying the plan.

You can update the module used to build your cluster by clicking on Reimport Module in the module section of your cluster infrastructure, then select the module new version and import it. Finally, click apply in the Terraform section.

Note

Some changes can take time to propagate to AWS. This is especially true for IAM roles and policies, which could then create some conflicts when recreated. Re-applying the Terraform plan should fix the problem.

Update Genvid SDK Samples

Along with your own project, make sure you update any of the Genvid SDK samples you’ve previously installed.

Upgrade from 1.29.0 to 1.30.0

Setting up the AMI Owner on AWS cluster

Previous version of the SDK have only partial support for changing the AMI owner. This version of the SDK supports them all by adding game_ami_owners and server_ami_owners for all types of sample clusters.

If you are using the variable ami_owner in previous AMI setup, you should now instead use the game_ami_owners which is a list. Basically, just replace:

ami_owner = "1234567890"

with:

game_ami_owners = ["1234567890"]

This is the same whether you are using the setup_ami or the minimal_setup_ami module. It also applies if you are using the submodule game/aws directly.

genvid.toolbox.SDK.update_archive() has been deprecated.

Instead, you can use genvid.toolbox.PackageArchiver.update_archive(). The code is almost identical:

archive = "path/to/package.zip"
packager = PackageArchiver()
chksum = packager.stable_checksum(archive)
packager.update_archive(archive,
                        name="package",
                        version="dev",
                        chksum=chksum,
                        destdir="destination/folder")

ProjectTool.LOGS is now deprecated

The attribute ProjectTool.LOGS is now deprecated. It has been moved to genvid.toolbox.ClusterTool, and was actually no longer used for setting the default logs. To access the default logs configuration, use genvid.toolbox.SDK.get_sdk_config() instead or the genvid.toolbox.LogsAPI.get_logs().

BastionTool.SETUP_LOGS has been removed

The attribute is no longer used and a copy exist under genvid.toolbox.ClusterTool. To get the list of all logs, used genvid.toolbox.LogsAPI.get_logs().

PackageFactory has been deprecated.

Instead, you can use genvid.toolbox.PackageArchiver. The code is almost identical:

from pathlib import Path

sources = Path("path/to/source")
archive = Path("path/to/package.zip")

packager = PackageArchiver()

# Use archive name relative to source path.
# For flatten, you can use PackageArchiver.flatten_path instead.
path2name = packager.relative_path(sources)

# Create the archive.
packager.make_archive(archive, sources.rglob("*.*"), path2name)

# Compute a checksum base on filename and content only.
chksum = packager.stable_checksum(archive)

# Update the archives in a destination folder.
packager.update_archive(archive,
                        name="package",
                        version="dev",
                        chksum=chksum,
                        destdir="export/folder")

Deprecated DockerPackage.

This class was a very straighforward wrapper around update_image(). You can use the original method directly instead.

Removed the Genvid Unity RESTCSharp API dependency with Newtonsoft.Json.dll.

Since version 2020.3.10f1, Unity has a dependency with Newtonsoft.Json.dll. The Genvid Unity RESTCSharp API also had a dependency with Newtonsoft.Json.dll. The Newtonsoft.Json.dll dependency was removed and the Genvid Unity RESTSharp API is now totally agnostic about the serialization and deserialization part. The source file Assets/Genvid/Editor/Scripts/GenvidWindow.cs has been updated to use the Unity JsonUtility library for serializing and deserialing. As a result, the Newtonsoft.Json.dll library in the Genvid Editor Unity package has been removed.