Sites

Menu

Cloud deployment workflow

The following flowchart provides a reference of the cloud deployment workflow on the GDK.

If you haven’t already, please follow the GDK Starter Template guide which provides a detailed explanation of the different steps.

You may find the following command-line snippets useful as reference:

Build server-worker assembly

The filepath you use depends on whether you have the UnrealGDK plugin set up as an engine plugin or as a project plugin. If you followed the default setup instructions which use the InstallGDK.bat script, you have it set up as an engine plugin.

Engine plugin filepath (default):

UnrealEngine\Engine\Plugins\UnrealGDK\SpatialGDK\Build\Scripts\BuildWorker.bat <YourProject>Server Linux Development <YourProject>.uproject

Project plugin filepath:

<YourProject>\Game\Plugins\UnrealGDK\SpatialGDK\Build\Scripts\BuildWorker.bat <YourProject>Server Linux Development <YourProject>.uproject

Replacing <YourProject> with the name of your Unreal project.

For more information on the available options when using BuildWorker.bat, please see the Helper scripts reference.

Build client-worker assembly

The filepath you use depends on whether you have the UnrealGDK plugin set up as an engine plugin or as a project plugin. If you followed the default setup instructions which use the InstallGDK.bat script, you have it set up as an engine plugin.

Engine plugin filepath (default):

UnrealEngine\Engine\Plugins\UnrealGDK\SpatialGDK\Build\Scripts\BuildWorker.bat <YourProject> Win64 Development <YourProject>.uproject

Project plugin filepath:

<YourProject>\Game\Plugins\UnrealGDK\SpatialGDK\Build\Scripts\BuildWorker.bat <YourProject> Win64 Development <YourProject>.uproject

Replacing <YourProject> with the name of your Unreal project.

For more information on the available options when using BuildWorker.bat, please see the Helper scripts reference.

Upload assembly

spatial cloud upload <myassembly>

Replacing <myassembly> with the name you choose to give your assembly.

This command must be run from the spatial directory of your project.

Launch cloud deployment

You can launch a cloud deployment using the Unreal Editor or the SpatialOS CLI. Launching via the CLI is useful if you want to launch cloud deployments as part of continuous integration.

Using the Unreal Editor

  1. On the GDK toolbar, click Deploy.
    GDK toolbar "Deploy" button
    Image: The Deploy button in the GDK toolbar

    This opens the cloud deployment dialog box.
    Image: The Cloud Deployment settings dialog box
  2. Enter your project name. This will be something like beta_someword_anotherword_000, and you can find it in the Console.
  3. In the Assembly Name field, enter the name you gave your assembly.
  4. In the Deployment Name field, enter a name for your deployment. This labels the deployment in the Console.
  5. Leave the Snapshot File field as it is. In the Launch Config File field, enter the path to the launch configuration file for this deployment (including the file name).
  6. (Optional) If needed, change the Region.
  7. (Optional) Create an additional deployment with simulated players that connect to your main game deployment. Simulated players are game clients running in the cloud, mimicking real players of your game from a connection flow and server-worker load perspective. This means they’re useful for scale testing.

    Build out the simulated player clients (which will run on Linux in the cloud) using the following command:

    Engine plugin filepath (default):

    UnrealEngine\Engine\Plugins\UnrealGDK\SpatialGDK\Build\Scripts\BuildWorker.bat <YourProject>SimulatedPlayer Linux Development <YourProject>.uproject 
    

    Project plugin filepath:

    <YourProject>\Game\Plugins\UnrealGDK\SpatialGDK\Build\Scripts\BuildWorker.bat <YourProject>SimulatedPlayer Linux Development <YourProject>.uproject 
    

    Then, back in the Editor Deploy window:

    1. Check the box next to Add simulated players.
    2. In the Deployment Name field, enter enter a name for your simulated player deployment. This labels the deployment in the Console.
    3. In the Number of Simulated Players field, choose the number of simulated players you want to start.
    4. (Optional) If needed, change the Region.

  8. Click Launch Deployment.

Your deployment(s) won’t launch instantly. A console window is displayed where you can see their progress.

When your deployment(s) have launched, you can open the Console to view them.

Using the SpatialOS CLI

To launch a cloud deployment via the CLI, in a terminal window, navigate to <ProjectRoot>\spatial\ and run:

spatial cloud launch --snapshot=snapshots/default.snapshot <myassembly> <launch_config>.json <deployment_name>

Where:

  • <myassembly> identifies the worker assemblies to use (as chosen in the spatial cloud upload command).
  • <launch_config>.json declares the world and load balancing configuration.
  • <deployment_name> labels the deployment for SpatialOS to reference in the Console.



——
2019-10-31 Page updated without editorial review: add missing build step for simulated player clients.
2019-07-31 Page updated with limited editorial review
2019-07-21 Page updated with limited editorial review

Search results

Was this page helpful?

Thanks for letting us know!

Thanks for your feedback

Need more help? Ask on the forums