Skip to main content

Testing your integration locally

When integrating IMS zeuz into your game, you can iterate faster by using the mock payload-local-api server that is part of the IMS CLI. The command ims orchestration payload-local-api will start a local server on port 8080 for your game server to connect to and communicate with. The server supports all of the endpoints specified in the Payload Local API (including the Session Manager Local endpoints).

Initially the payload state will be Starting. You can then call the ready API which will set the state to Ready. Then after a 10 second delay, the state will automatically update to Reserved.

It is recommended that you add the localhost:8080 server address to a local environment variable on your computer under ORCHESTRATION_PAYLOAD_API to simulate running your game server in a payload. As a result, you should be able to test most of your IMS zeuz logic locally without having to upload to the game image manager every time.

Additionally, you can set the port the server is listening on and pass in a config file to mock values for the payload metadata and session config: ims orchestration payload-local-api --port 1234 --payload-config ./config.json. The expected file format is as follows:

{
"payload_config": {
"metadata": {
"annotations": {
"game_mode": "8v8",
"game_data": "{\"foo\": \"bar\"}"
},
"labels": {
"foo": "bar"
}
}
},
"session_config": "{\"game_length\":360,\"max_players\":12}"
}

Additionally, you may refer to the CLI reference for this command.