UtilityDeploymentTemplate
The UtilityDeploymentTemplate indicates which utility / utilities you want to deploy onto each host (bare metal or VM). A utility, also known as a sidecar, is always deployed once per host. You can indicate whether a utility should be deployed only on bare metal servers or virtual machines, or both.
When a new host is selected for deployment of game servers, the utility will be the first thing to be deployed onto the host. Reversely, when a host has been freed from any game server applications, the utilities will be removed again, cleaning up the host.
Usage
A UtilityDeploymentTemplate is used by a Fleet and defines which ApplicationBuilds (of type Utility) will be deployed for that Fleet. A single UtilityDeploymentTemplate can define more than one ApplicationBuild by adding multiple UtilityDeploymentTemplate elements. Each of these defines a single ApplicationBuild (of type Utility).
Each ApplicationBuild in the UtilityDeploymentTemplate will be deployed once per host, unless indicated otherwise in a UtilityDeploymentTemplateBuild. There you can indicate whether a utility should be deployed onto bare metal only, VM only or both (UtilityDeploymentTemplate.deployOn). Additionally a limit can be set to the amount of hosts the utilities are deployed on (UtilityDeploymentTemplate.installsPerLocation). This can be useful for certain types of utilities such as ping servers, for which you may only need a limited number.
You can create as many UtilityDeploymentTemplates as you like within the platform. However, a Fleet can only point to one UtilityDeploymentTemplate at a time. A UtilityDeploymentTemplate can be shared (re-used) across multiple fleets though.
Note
Utilities / sidecars must be regular applications that run in the foreground. It is generally not a good idea to start utilities as a service.
Element structure
Property | Value type | Required | Description |
---|---|---|---|
id | string | Read-only | Unique identifier of this element |
fleetIds | [int] | Read-only | List of Fleet IDs this template is used in |
name | string | Yes | Name of the template |
inUse | boolean | Read-only | Indicates whether this template is actively being used in a Fleet |
createdAt | int | Read-only | A unix timestamp of when this element was created |
utilityDeploymentTemplateBuild | [UtilityDeploymentTemplateBuild] | Yes | List of UtilityDeploymentTemplateBuild elements, pointing to ApplicationBuilds |
UtilityDeploymentTemplateBuild element structure
Property | Value type | Required | Description |
---|---|---|---|
applicationBuildId | string | Yes | Identifier of the ApplicationBuild you want to deploy |
deployOn | int | No | 1: bare metal 2: VM 3: both (default) |
installsPerLocation | int | No | The amount of hosts to deploy this utility on, on a per DC location basis. The value 0 means "install on all hosts". Defaults to 0 if omitted. |
API example
Create a new GameDeploymentTemplate within your i3D.net account.
HTTP request
POST /v3/deploymentTemplate/utility
Request body
{
"name": "MyUtilityDeploymentTemplate",
"utilityDeploymentTemplateBuild": [
{
"applicationBuildId": "3801243597300703061",
"deployOn": 3,
"installsPerLocation": 0
}
]
}
Response body
[
{
"id": "5077110393967868847",
"fleetIds": [
0
],
"name": "MyUtilityDeploymentTemplate",
"inUse": 0,
"createdAt": 1573060365,
"utilityDeploymentTemplateBuild": [
{
"applicationBuildId": "3801243597300703061",
"deployOn": 3,
"installsPerLocation": 0
}
]
}
]
Attach UtilityDeploymentTemplate to a Fleet:
HTTP request
Request body
{
"utilityDeploymentTemplateId": "8243136848298003197",
}
Response body
[
{
"id": "string",
"name": "string",
"deploymentEnvironmentId": "string",
"deploymentProfileId": "string",
"gameDeploymentTemplateId": "string",
"utilityDeploymentTemplateId": "8243136848298003197",
"operationalStatus": 0
}
]