Skip to content

A/B Deployment Manually

A/B deployment is an update process whereby you deploy new versions of your game servers alongside your already existing game servers.

Initial situation sketch

We have a Fleet with 1 ApplicationBuild in its GameDeploymentTemplate.

This chapter assumes you already have created a new ApplicationBuild for your updated software.

Actions to perform

  • create a new GameDeploymentTemplate with the new ApplicationBuild ID.
  • create the new Fleet (based on the old one).
  • start sending the first updated clients to the game servers running the new build in the new Fleet (e.g. a group of testers).
  • if there is something wrong, downgrade those clients and send everyone back to the old build in the old Fleet. You can remove the new Fleet if you want to destroy all the game servers running the new build.
  • if all went well, update all your clients and send those to the game servers running the new build.
  • eventually all clients are migrated. The old Fleet can be removed.

API example

Step 1: get Fleet details

We need to get the Fleet object so that we can create a new one, based on this old one.

If you do not know your Fleet ID yet, you can look it up by using GET /fleet.

HTTP request

GET /fleet/988194285688223011

Response body

[
    {
        "id": "988194285688223011",
        "name": "Example Fleet",
        "deploymentEnvironmentId": "1528510395058174656",
        "deploymentProfileId": "2641748478114564847",
        "gameDeploymentTemplateId": "6629032387499739571",
        "utilityDeploymentTemplateId": "",
        "operationalStatus": 2
    }
]

Step 2: create new GameDeploymentTemplate

Before we create the new Fleet, first create a new GameDeploymentTemplate with your new ApplicationBuild ID, which can be used in the new Fleet.

If you do not know your new ApplicationBuild ID yet, you can look it up by using GET /applicationBuild.

HTTP request

POST /deploymentTemplate/game

Request body

{
  "name": "Example Game Deployment Template (new)",
  "gameDeploymentTemplateBuild": [
    {
      "applicationBuildId": "817092209556457642"
    }
  ]
}

Response body

[
    {
        "id": "3700287048120517011",
        "fleetIds": [],
        "name": "Example Game Deployment Template (new)",
        "inUse": 0,
        "createdAt": 1567591403,
        "gameDeploymentTemplateBuild": [
            {
                "applicationBuildId": "817092209556457642"
            }
        ]
    }
]

Step 3: create new Fleet

Now we can create the new Fleet based on the old Fleet, with the new GameDeploymentTemplate.

HTTP request

POST /fleet

Request body

{
    "name": "Example Fleet (new)",
    "deploymentEnvironmentId": "1528510395058174656",
    "deploymentProfileId": "2641748478114564847",
    "gameDeploymentTemplateId": "3700287048120517011",
    "utilityDeploymentTemplateId": ""
}

Response body

[
    {
        "id": "2501509179291972037",
        "name": "Example Fleet (new)",
        "deploymentEnvironmentId": "1528510395058174656",
        "deploymentProfileId": "2641748478114564847",
        "gameDeploymentTemplateId": "3700287048120517011",
        "utilityDeploymentTemplateId": "",
        "operationalStatus": 0
    }
]

Step 4: activate the new Fleet

Set the new Fleet's operationalStatus property to 2 (Automatic scaling enabled) to have the platform start deploying new game servers for it.

HTTP request

PUT /fleet/2501509179291972037/operationalStatus

Request body

{
  "operationalStatus": 2
}

Response body

[
    {
        "id": "2501509179291972037",
        "name": "Example Fleet (new)",
        "deploymentEnvironmentId": "1528510395058174656",
        "deploymentProfileId": "2641748478114564847",
        "gameDeploymentTemplateId": "3700287048120517011",
        "utilityDeploymentTemplateId": "",
        "operationalStatus": 2
    }
]

New game servers will be deployed now, for this new Fleet and you can start sending your first clients to them.

If you spot errors with the new game servers, you could revert the creation of the new Fleet and GameDeploymentTemplate. Or you can leave them to use for later with a new build containing any fixes.

Step 5: remove old Fleet

When everything is going well with the new game servers and once all clients have migrated to the new version, remove the old fleet.

Note

This action still needs the markedForDeletion property / functionality implemented!

HTTP request

DELETE /fleet/988194285688223011

Response body

[
    {
        "id": "988194285688223011",
        "name": "Example Fleet",
        "deploymentEnvironmentId": "1528510395058174656",
        "deploymentProfileId": "2641748478114564847",
        "gameDeploymentTemplateId": "6629032387499739571",
        "utilityDeploymentTemplateId": "",
        "operationalStatus": 2,
        "markedForDeletion": 1 <<< not implemented yet
    }
]