SDK in the Cloud
Once a cluster is up, you need to upload the SDK and the project to it.
Loading the SDK to a Cluster
To load a project in the cloud the first step is to upload the SDK images to a s3 bucket.
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. It can take up to
55 minutes for a Windows server to finish its configuration but the average is more between
15 and 25 minutes. If they don’t, 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
.
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 with 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 Cube Sample and Unreal Cube sample can be run in the cloud with similar steps.