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.33.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¶
Important
Since version 1.33, the Genvid Toolbox package no longer depends on the Azure CLI. Instead, it uses the standalone Azure CLI Installer to avoid some dependency conflicts. When upgrading, you might get some conflict errors. However, the installation favors the last package, so your Toolbox installation will be successful despite these messages. As a precaution, you might want to remove the Azure CLI package and its dependencies and use the standalone Azure CLI installer instead.
To set up the new SDK locally:
Install the new SDK.
Run the Python script to install the Genvid Toolbox.
py install-toolbox.py
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:
- 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 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.32.0 to 1.33.0¶
With changes introduced in Genvid MILE SDK 1.33.0, we’ve deprecated a number of APIs, classes, and methods. In cases where it’s possible, we include additional instructions for projects that need to rely on prior functionality.
Note
To check if any of your scripts are affected by these changes, run them with
the -W default::DeprecationWarning
option and look for the warnings.
(For example, py -W default::DeprecationWarning myscript.py
.)
See the Python warnings
module for more info.
In This Section
/consultemplate
replaced by/template_renderer
.genvid.toolbox.EventsTool
replaced with methods from other classes.genvid.toolbox.ConfigTool
replaced with methods from other classes.genvid.toolbox.ProjectTool
replaced by~genvid.toolbox.ConfigurationLoader
.~genvid.toolbox.ConsulTemplateTool
replaced by~genvid.toolbox.ClusterAPI.render_template
.genvid-sdk
andgenvid-bastion
now use the newtemplate_renderer
API when available.- AWS and Azure support in
genvid-toolbox
is now optional.
/consultemplate
replaced by /template_renderer
.¶
We deprecated the Cluster API POST /consultemplate
and its associated
interfaces in favor of the POST /template_renderer
API.
To upgrade:
Replace direct calls to
POST /consultemplate
with the following code:POST /v1/template_renderer HTTP/1.1 Content-Type: application/json {"content":"template-to-render"}
Replace the command genvid-sdk consul-template template.txt with:
genvid-sdk render-template -c template.txt
Replace the method
clusterApi.do_consul_template("template-to-render")
with:self.clusterAPI.render_template(content="template-to-render")
genvid.toolbox.EventsTool
replaced with methods from other classes.¶
We replaced the genvid.toolbox.EventsTool
API with the
ClusterAPI
events defs
methods and
the higher level SDK
config
methods.
For example, the equivalent of calling the method
eventsTool.load_map_reduce('events.json')
is:
sdkTool.load_config('events.json')
This change also affects RuntimeTool
and its
descendants.
genvid.toolbox.ConfigTool
replaced with methods from other classes.¶
We replaced the genvid.toolbox.ConfigTool
API with the
ClusterAPI
config
and log defs
methods, and
the higher level SDK
config
and logs
methods. You can also directly use
consul_kv
for doing the lower-level work.
In addition to the SDK class mentioned above, this change also affects
RuntimeTool
and its descendants.
genvid.toolbox.ProjectTool
replaced by ~genvid.toolbox.ConfigurationLoader
.¶
We replaced the genvid.toolbox.ProjectTool
API with
ConfigurationLoader
, a simpler utility class with
fewer dependencies. To replace the old class, derive it from
ConsulTemplateTool
instead and do the following:
class MyClass(ConsulTemplateTool):
...
def load_project_configuration(self, project_config_folder):
loader = ConfigurationLoader(self, self.load_config_template)
configuration = loader.load_config_folder(project_config_folder)
loader.update_config(configuration)
...
The change also affects the classes SDK
and
BastionTool
(through its ancestors). If you need
the old functionality, use the method above or derive a new class
from ProjectTool
. For example, a class MyScript
that originally derived
from the SDK
class is converted to:
class MyScript(SDK, ProjectTool):
...
It will work just like it did before.
~genvid.toolbox.ConsulTemplateTool
replaced by ~genvid.toolbox.ClusterAPI.render_template
.¶
Methods like load_config_template()
,
consul_template_once()
, and
consul_template()
won’t be
part of its interface once the deprecation is applied. We recommended you
switch to the new render_template()
and
render_template()
methods instead.
If your scripts depend on it, you can add
ConsulTemplateTool
directly to your hierarchy.
class MyClass(ConsulTemplateTool):
...
def load_project_configuration(self, project_config_folder):
loader = ConfigurationLoader(self, self.load_config_template)
configuration = loader.load_config_folder(project_config_folder)
loader.update_config(configuration)
...
genvid-sdk
and genvid-bastion
now use the new template_renderer
API when available.¶
This should work transparently unless you are using consul-template
functions or plugins that depend on the local context of execution not present
for cluster-api
or bastion-api
. If you need to fall back on the old
behavior, you can reproduce it by deriving it from
ConsulTemplateTool
instead and doing the
following:
class MyClass(ConsulTemplateTool):
...
def load_project_configuration(self, project_config_folder):
loader = ConfigurationLoader(self, self.load_config_template)
configuration = loader.load_config_folder(project_config_folder)
loader.update_config(configuration)
...
AWS and Azure support in genvid-toolbox
is now optional.¶
You can now install genvid-toolbox
without the support of Azure or AWS,
or with only one of them.
To install without any cloud support, run the following command:
py ./install-toolbox.py --no-extra
To install with only AWS support, run the following command:
py ./install-toolbox.py --extra aws
To install with only Azure support, run the following command:
py ./install-toolbox.py --extra azure
Note that Azure support also now requires that you install the Azure CLI package globally, which can be done through the installer.
See also
Install the Toolbox, The AWS Cloud Environment and The Azure Cloud Environment for more details.
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
- Upgrade from 1.19.0 to 1.20.0
- Upgrade from 1.20.1 to 1.21.0
- Upgrade from 1.21.2 to 1.22.0
- Upgrade from 1.22.0 to 1.23.0
- Upgrade from 1.23.0 to 1.24.0
- Upgrade from 1.24.0 to 1.25.0
- Upgrade from 1.25.0 to 1.26.0
- Upgrade from 1.26.0 to 1.27.0
- Upgrade from 1.27.0 to 1.27.1
- Upgrade from 1.27.0 to 1.28.1
- Upgrade from 1.28.0 to 1.29.0
- Upgrade from 1.29.0 to 1.30.0
- Upgrade from 1.30.0 to 1.31.0
- Upgrade from 1.31.0 to 1.32.0