Multiple deployments for session-based games
5: Launch multiple session-based deployments
Step 1: Launch deployments using the Deployment Manager
Now you use the Deployment Manager to launch multiple session-based cloud deployments.
To do this:
- In File Explorer, navigate to your Deployment Manager repository.
- Select File > Open Windows Powershell > Open Windows Powershell as administrator.
- In Powershell, run the following two commands, making sure to replace the text in
<....>according to your project. See the list below the commands:
.\publish-linux-workers.ps1 <launch config path> <snapshot path>
.\cloud-launch.ps1 <assembly name> <deployment name>
<launch config path>is
<snapshot path>is the path to the snapshot file you generated in the Example Project set up guide
<deployment manager assembly name>is a name that you choose for your Deployment Manager assembly. This must be a different name to the
<assembly name>you created when you uploaded your assembly in Step 3: Build and upload your workers.
<deployment name>is a name that you choose for your deployment.
For example, your commands might look like:
.\publish-linux-workers.ps1 ..\UnrealGDKExampleProject\spatial\one_worker_test.json ..\UnrealGDKExampleProject\spatial\snapshots\default.snapshot
.\cloud-launch.ps1 deploymentassembly deploymentmanager
Step 2: Review the deployments in the SpatialOS Console
After running these commands, the SpatialOS CLI automatically deploys your project. The Deployment Overview Console page opens automatically after your project has successfully deployed.
With the Console open, on the Deployment Overview page, select Projects to see a list of your deployments. You should see three deployments in this list:
Image: The SpatialOS Console Projects page, with running deployments highlighted.
If you can see these three deployments, then you have successfully launched multiple deployments of the Example project using the Deployment Manager. By default, these deployment sessions run for 60 minutes before restarting automatically.
The PowerShell Cannot find path '\UnrealGDKExampleProject\spatial\one_worker_test.json' because it does not exist.
Make sure your Deployment Manager repository is in the same parent directory as your Example Project repository. If it is not, you have to edit the file paths in these Powershell commands to point to wherever your Example Project
default.snapshot files are located.
> Next: 6. Play your game
2019-05-21 Page added with editorial review