SDK in the Cloud¶
Once a cluster is up, you need to upload the SDK and the project to it.
In This Section
Loading the SDK to a Cluster¶
To load a project in the cloud the first step is to upload the SDK images.
genvid-sdk -c myclusterid upload-images-sdk -u
The next step is to set up the SDK.
genvid-sdk -c myclusterid setup
After this step, some services are available in Cluster-UI. You can open Cluster-UI with the following command.
genvid-sdk -c myclusterid monitor
Although the list of jobs is empty, you can find the list of nodes at the top.
It may take some time for some nodes to show up, like the game
node.
Note
On average, a Windows server will finish configuring after between 15 and 25 minutes, although it can take up to an hour. If your setup is taking longer than that, check with your cloud provider to see if the node will eventually come up or if there are other issues with it.
Even without all the nodes available, you can load the SDK configuration into the cluster:
genvid-sdk -c myclusterid load-config-sdk
The SDK definition is loaded and now there is one job: services
.
Optional: Set Environment to Use a Specific Storage Account¶
By default, the Genvid MILE SDK creates a storage account automatically when
uploading images. You can override this by setting the
AZURE_STORAGE_ACCOUNT
environment variable from the command prompt used to
run the toolbox commands. You will need to do this every time
you want to run commands that interact with the Azure environment.
AZURE_STORAGE_ACCOUNT
must be set to the name of the storage account
you want to use. For example, if name of your storage account is
genvidtechprivate, AZURE_STORAGE_ACCOUNT
must also be set to
genvidtechprivate.
Azure storage account names must:
- Be UNIQUE within Azure,
- be between 3 and 24 characters in length, and
- contain only numbers and lowercase letters
The resource group the storage account is created in is set to Genvidtech by
default. You can override this by setting the AZURE_RESOURCE_GROUP
environment variable from the command prompt used to
run the toolbox commands. You will need to do this every time you want
to run commands that interact with the Azure environment.
Building the DirectX Sample for the Cloud¶
Assuming the Docker host was set up correctly, you can build the images for the DirectX game. (See Building Images Using Docker for more information.)
Build the cloud image (this will create the associated images we need to run it on the cloud):
py ./samples/cube/web/web.py build-cloud
Upload the image we just created and update the config for it:
py ./samples/cube/web/web.py -c USERNAME-CLUSTERNAME upload-images --update-config
Load the cube config on the cluster:
py ./samples/cube/web/web.py -c USERNAME-CLUSTERNAME load
Repeat the process for the game. There are different game samples available, below is the directx one:
py ./samples/cube/directx/directx.py prepare py ./samples/cube/directx/directx.py build-cloud py ./samples/cube/directx/directx.py -c USERNAME-CLUSTERNAME upload-images --update-config py ./samples/cube/directx/directx.py -c USERNAME-CLUSTERNAME load
After this step, the images are available on S3 and the project configuration is loaded and ready to use in the cloud.
Open the Jobs page.
genvid-sdk -c myclusterid monitor
Click the Start all button.
Click the CUBE SAMPLE link.
Check that everything is working correctly.
When you’re finished click the Stop All button to stop the services.
Note that the Unity Sample and Unreal Cube sample can be run in the cloud with similar steps.