Migrating a SpatialOS project to the FPL
This page presents a step-by-step guide on how to migrate a SpatialOS project from the structured project layout (SPL) to the flexible project layout (FPL).
Overview
To migrate a SpatialOS project from the SPL to the FPL, you need to:
- Migrate your workers
- Migrate your launch configuration file
- Migrate your project definition file
- Generate a schema descriptor
- Verify the integrity of your project
- Customise your project folder structure
1. Migrate your workers
- Migrate the build process of your workers by following the steps in Building a worker executable.
- Migrate your workers’ worker configuration files by following the steps in Converting the worker configuration file.
- Delete all previous SPL format configuration files related to the configuration and build process of your workers. Those configuration files include:
- Your SPL format worker configuration files
- Your SPL format worker build configuration files
- spatialos_worker_packages.json files
2. Migrate your launch configuration files
- Migrate your launch configuration files by following the steps in Converting the launch configuration file.
- Delete your previous SPL format launch configuration file.
3. Migrate your project definition file
- Migrate your project definition file by following the steps in Converting the project definition file.
- Delete your previous SPL format project definition file.
4. Generate a schema descriptor
Generate a schema descriptor by following the steps in Building a schema descriptor.
5. Verify the integrity of your project
Your project is now in a state where it complies with the FPL and can be run.
- Ensure that your
spatial
CLI is up-to-date (runspatial update
). - Run
spatial alpha local launch
and verify that your deployment behaves how it did pre-migration. - Run
spatial alpha cloud upload -a <some-assembly-name>
and verify that this uploads your project assembly correctly tohttps://console.improbable.io/projects/<your-project-name>/assemblies
. Your project assemblies should contain your schema descriptor and a zip file for each worker and each supported platform in your project. Each worker zip file should contain the content from thelocalBuildDirectory
folder of the worker configuration file. - Run
spatial alpha cloud launch -d <your-deployment-name> - a <your-assembly-name>
and verify that your deployment behaves how it did pre-migration.
6. Customise your project folder structure
You have successfully migrated your project to the FPL. Congratulations! You now have the freedom to customise your project’s folder structure in ways that were not possible in the SPL. For example:
- You can freely choose where you store your project schema. You just need to make sure that the schema compiler finds all relevant schema files as you generate code or the schema descriptor.
- You can freely choose where you store your worker projects and change the build process. You just need to make sure you update:
- the references to your worker configuration files in your project configuration file
- the
localBuildDirectory
fields in each worker configuration file.