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.20.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.
In This Section
General Upgrade Instructions¶
Upgrade the Genvid SDK¶
To set up the new SDK locally:
- Install the new SDK.
- Run the script
install-toolbox.py
from the new SDK. - Run
genvid-bastion reinstall --reconfigure -b mybastion -uml
to update your bastion.
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:
- Set up a new wingame AMI that matches the new version.
- 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 Modify/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.19.0 to 1.20.0¶
gvencode
Options Have Changed¶
The gvencode
option -p healthPort is now -h healthAddress which requires
a string containing IPAddress:Port. Make sure you adjust any
templates that call gvencode
.
Nomad Upgraded¶
We upgraded the version of Nomad used in the Genvid SDK, which might require some adjustments to your code.
Most importantly, IPv6 addresses will be preferred by default for jobs started by Nomad on Windows. We added IPv6 support on the backend because of this change. You might need to adjust your Nomad templates to detect IPv6 addresses (For example, ::1) and wrap them properly.
If you based your setup on one of the Genvid SDK samples, make sure you replace
config.ts
in your setup with
/samples/tutorial/web/utils/config.ts
which correctly wraps IPv6
addresses.
Note
The updated config.ts
file is the same for all the Genvid SDK demos.
New JavaScript API Modules¶
The Genvid SDK now supports importing our JavaScript modules as NPM packages.
To do so, first install both the genvid
and genvidMath
packages:
npm install -s path/to/genvid.tgz
npm install -s path/to/genvid-math.tgz
Then you can import them normally:
import { createGenvidClient, IGenvidClient } from 'genvid';
import * as genvidMath from 'genvid-math';
Note
If you plan on dockerizing your web app, you must copy the tgz file in your Docker before importing it.
See either the Unity sample or Load Tester sample for examples of importing Genvid modules as NPM packages and dockerizing them.
When using the <scrip src=”…”/> tag, we recommend you use the
genvid.umd.js
and genvid-math.umd.js
files. The “genvid” lib
is exposed as the global variable genvid
and the “genvid-math” lib as
genvidMath
.
We advise against including the Genvid TypeScript definition files directly
in your source code. The Genvid SDK includes them in the
/api/web/legacy_types/
folder if you need them to simplify your
upgrade.
See the Tutorial and Unreal Engine samples for working examples of this method.
See the Website Integration section for more detailed information.
DockerTool
No Longer Sets DOCKER_MACHINE_NAME
to default
¶
DockerTool
no longer sets the environment variable DOCKER_MACHINE_NAME
to default
if it isn’t already set. The client uses its default settings
to connect to a Docker host, which it can get from other environment
variables. This should allow DockerTool
to work with a local Docker that
doesn’t use Docker Machine, such as
Docker for Windows.
Known Issue: Terraform Command Crashing After Upgrade¶
In some cases, running a Terraform command from the Bastion UI on an existing cluster can cause the Terraform command to crash. If you encounter this issue:
- Go to
.genvid/terraform/workdir/YOUR_CLUSTER_NAME/tf/.terraform/
(under your user folder). - Delete all the modules and files in the folder.
- Re-import the module from the command page.
Afterwards, your Terraform command should run correctly.
Known Issue: Error When Trying To Destroy Or Plan Apply an Existing Cluster After Upgrade¶
After an upgrade of the Genvid SDK, the [PLAN APPLY] and [PLAN DESTROY] terraform commands will fail with the following message:
Error: Error loading modules: module vpc: not found, may need to run ‘terraform init’
To fix this simply re-import the module:
- Open Bastion-UI
- Click on Terraform
- Click on the link with your cluster name on the left navigation bar
- Click re-import module
- Click [PLAN DESTROY] or [PLAN APPLY]
- Should work!
Local Cluster No Longer Configured During Bastion Setup¶
The genvid-bastion install
command no longer automatically sets up a local
cluster. Before running other genvid-sdk
commands, you can create a local
cluster by running:
genvid-sdk setup
This is required even if you are upgrading a local cluster you set up previously.
After setting up your local cluster, configure it by running:
genvid-sdk load-config-sdk
C Sharp Wrapper Now Detects Failure Statuses¶
You can use the function statusFailed(status)
to validate if a returned
status from any Genvid SDK function is considered a failure. This function
filters out warnings which aren’t errors.
To update, copy the new C Sharp wrapper DLL over your current one.
For the Unity sample and prefab, rebuild the Genvid Unity Package with the new C Sharp wrapper and re-install it in your project.
Upgrading from Older Versions¶
Note
If there aren’t specific instructions listed for a version, then there aren’t any special steps for upgrading that version.
- Upgrade from 1.0.0 to 1.1.0
- Upgrade from 1.2.0 to 1.3.0
- Upgrade from 1.3.0 to 1.4.0
- Upgrade from 1.6.0 to 1.7.0
- Upgrade from 1.7.0 to 1.8.0
- Upgrade from 1.8.0 to 1.9.0
- Upgrade from 1.9.0 to 1.10.0
- Upgrade from 1.11.0 to 1.12.0
- Upgrade from 1.12.0 to 1.13.0
- Upgrade from 1.13.0 to 1.14.0
- Upgrade from 1.15.0 to 1.15.1
- Upgrade from 1.16.0 to 1.17.0
- Upgrade from 1.17.0 to 1.18.0
- Upgrade from 1.18.0 to 1.19.0